3523 Commits
Author SHA1 Message Date
Armin Le Grand (collabora) 760394bbad Remove XFillAttrSetItem and XLineAttrSetItem
Both are derived from SfxSetItem which means they contain
a SfxItemSet themselves. That leads to problems since at
their construction time a SfxItemPool has to be known and
it *should* not be different to the one of the ItemSet
that Item gets added later - that leads to the 2nd class
of problems.

In the long therm we should get rid of all SfxSetItems.
This change simplifies already some stuff, including that
the standard Items for DrawObjects reduces by two (and
more due to containing a whole ItemSet) and e.g. the
problem that these Items had to be converted to hard
attributes in the done fixes for copy/pasting Slides.

Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Change-Id: I8b1c6cabdaa43ed6062811b5508ab3dece47a755
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6795
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e67458a9b769fe7a3a7ee0739ed6d5c46dbc0692)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211734
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-08 08:56:42 +02:00
Caolán McNamara f666a74220 ofz#500542909 svl: don't broadcast an unchanged SetHidden or SetFollow
During import, hidden is set on every page style. Each time, every sheet
using that style is repaginated, which lays out the header and footer
again.

In the fuzzed document those 44 repaginations took 48.75s of its 49s,
and now 1.8s.

SetFollow gets the same check for consistency.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibdacc93203873d2c6498bf4444d5cc64e929aa83
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14217
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit d84523bd599f0fabc46ce4f82a6907f938aef55e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211811
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-07 08:40:24 +02:00
Caolán McNamara 984bb7858f check the byte ranges of a pdf signature against the file
The offsets and lengths come from the document, so a range that is
not inside the file leaves the signature unchecked now.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4c293d4c49326cb08336295714dec91d833bbd88
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13334
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 2fb3bbcf0afd5d13f41d526551835a24a0d8b5aa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211454
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-25 19:37:47 +02:00
Asim Raza f283f35e6b tdf#163691 Use std::copy_n() instead of memcpy() in numfmuno.cxx
Replace memcpy() with std::copy_n() to improve type safety by
eliminating manual sizeof() calculations. This is the single change for
the EasyHack as requested in the review.

Change-Id: Ib2d0f84186a126d6cc1a8a1fa296e418853d13ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204347
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-09-21 23:25:09 +02:00
Andrea Gelmini 4ee0d493d0 Fix typos in code + comments
Change-Id: I66a422f3519dceed4f5e253a2895eb2e0d943662
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210574
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-09-11 02:53:38 +02:00
Xisco Fauli 6971d69b6a svl: drop obsolete check. Minimum GCC version is 13
Since
commit 16dd61ab4d
Author: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Date:   Sat Mar 21 08:40:09 2026 +0200

    Bump minimum GCC version to 13

Change-Id: I4077e7dd81815ce281c1b6097d0abdc255685f6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210558
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-09 09:31:25 +02:00
Julien Nabet e808025d6f tdf#146404: Fix number Format Code when reopen ods/fods
As Eike indicated in https://bugs.documentfoundation.org/show_bug.cgi?id=146404#c4
COLOR format codes are preserved in ods/fods format.
The pb was the missing map back.
Indeed, we had the mapping for [COLOR<something>] => Color value (eg: "ffaa16")
but not the reverse mapping Color value => [COLOR<something>]

Eike had provided the right code pointer in xmlnumfi.cxx.
First, I thought using PaletteManager but this one is in svx and svx shouldn't be used in xmloff
(dependency pb).
Then I used ChatGpt (GPT-5.6 Luna) and it pointed the right process.
It just consisted to use a similar callback system (DECL_LINK, IMPL_LINK, LINK) of GetUserDefinedColor.

In addition, by testing all this, I noticed that maList in XColorList::GetIndexOfColor was empty.
So I added the Load call in case mbListDirty is true.

Change-Id: I0ef6b5901f2e4c757e88994412dbf79a13100ffd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210518
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-09-07 10:17:29 +02:00
Michael Stahl aac2961770 oox,svl,vcl: use more appropriate random numbers
Signed-off-by: Michael Stahl <michael.stahl@collabora.com>
Change-Id: I9d6f200cc5a146f46dca64af270b77d0ce6abf6b
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8174
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 52ba487c3d84a89a027c3130bc86afdcfe57a860)
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/8261
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
(cherry picked from commit 63ab1f905bddbac4871a246d61aa59d09f122e5c)
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/8277
(cherry picked from commit 396747a0e319943e7d411b0d6bc8d8abcc3e4f19)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209276
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-19 00:20:32 +02:00
Mike Kaganski 87e8a997b8 svl: identify a number format color by value, not by name
The color name is stored in the language the format was parsed in, while
GetMappedFormatstring matched it against the keyword table the scanner holds
at export time. Those differ in a document holding formats of several
languages, and the color was then left out of the exported format - German
being the only language with localized color names. Identify the color by its
value instead, against the standard color table the color keywords are
aligned with; that table is static, so the value does not depend on which
formatter parsed the format.

This surfaced as testLocalePrefix in CppunitTest_sc_subsequent_export_test4
failing in a CODA-W build with

 - Expected: #,##0.00\ [$€-407];[RED]\-#,##0.00\ [$€]
 - Actual  : #,##0.00\ [$€-407];\-#,##0.00\ [$€]

where the German format's name is not normalized because
GetFormatStringForExcel skips that step with the Kit active, see commit
0a5026b367 ("lok: save correct number format in
multi-lang session", 2024-04-26).

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I9874185a3204c8e6aac19532b4b446895807feeb
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8063
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 967df3c828dbaba1d5e1451fcf43b2d57d404c67)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209260
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-18 15:55:54 +02:00
Xisco Fauli 00aebb5e88 loplugin:unusedmethods
Change-Id: I5eec1b68efc285995db3b5825699c07fa006cb35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207375
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-29 10:16:53 +02:00
Xisco Fauli f5ec7e537f Revert "tdf#162563 Drop Applet and Plug-in object support in Writer filters"
This reverts commit ccbbb20630.

it breaks the published API

this commit also reverts part of
commit 6f81bce807
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Wed Jun 3 12:34:28 2026 +0200

    loplugin:unusedmethods

Change-Id: I827142fec0d2fa911d3c7ae60ef78d9701c2f06c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206708
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-17 08:53:34 +02:00
Armin Le Grand (collabora) 82f3257285 Undo/Redo: Repair SetUndoComment
In commit 93aa742ba3 which is
20 years ago 'cl' did a big change to get to SfxUndoManager
which is a needed abstraction for the formally Svx-based
Undo/Redo stuff.
Unfortunately SdrModel::SetUndoComment was *not* supported
and this was expressed as just doing a

OSL_FAIL("svx::SdrModel::SetUndoComment(), method not supported with application undo manager!" );

in SdrModel::SetUndoComment when SfxUndoManager was used.
But SetUndoComment *is* used in nine cases in
svdraw/svdedtv2.cxx. All of these execute some action and
create Undos for it. All nine Undos were without any Undo
text since then - over 20 years...

I stumbled over that when adding needed Diagram stuff to
UnGroupMarked().

I fix this with this commit. Creating that fix showed me
why 'cl' intentionally did not support that, but just
abandoning functionality is not a good choice.

Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Change-Id: Idde2fcecc85a9eee39b62d38ed7d71a8cfbd3288
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2486
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 5adf090261d705123074a0fa1c46119b2bf44bf3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206022
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-05 12:42:59 +02:00
Xisco Fauli 6f81bce807 loplugin:unusedmethods
Change-Id: I57a535f72e639a9b708c5c7dc1790e354d2d477e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205943
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-04 10:00:29 +02:00
Xisco Fauli fb28678005 loplugin:unusedmethods
Change-Id: If3dae53e3cf16df2d0c505a898138dfa6fe6c0f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205442
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-22 09:32:38 +02:00
Jim Raykowski afee30ce81 tdf#167949 Allow for independently toggling style filters
Change-Id: I1f51e992d7c472324288ae1f04d962d15937a6da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203150
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2026-05-22 08:06:48 +02:00
kallial 718882a186 tdf#100735 Localize lock file datetime in document-in-use dialogs
Add LockFileCommon::FormatDateTime() to parse the fixed-format lock
file time string (DD.MM.YYYY HH:MM) and reformat it using the user's
configured locale setting

Add unit tests for LockFileCommon::FormatDateTime()
- testFormatDateTimeShortInput()
- testFormatDateTimeLocaleOutput()

Change-Id: I77c94dc2a21d9bec6cf5e2584556cd89f216c40d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204683
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-05-12 17:22:45 +02:00
Muhammad Naeem 01144d08d9 tdf#145538: Prefer range-based for in svtools, Sfx2, DDE client
Replace a few index loops with range-based iteration where the counter
was only used for element access: index algorithm lookup, UTF-16 OLE
string streaming, and scanning DDE connections for a matching handle.

Verification: make svtools sfx2
Change-Id: I5678af4bdab855d7ce60bdccc46f608cee56c4e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204657
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-05-09 11:49:37 +02:00
Ujjawal Kumar d150236cd7 XLSX: merge standalone locale prefix with currency bracket
Bug document: fdo67682-2.ods

Excel rejects number formats with a standalone locale prefix like
[$-407] followed by a separate currency bracket like [$€]. The
locale ID must be inside the currency bracket: [$€-407].

Change-Id: I9e9391d3f52d42dc76f5f4957552f60d63af6ed1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202249
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202711
(cherry picked from commit d7f476f9b37d2a5867f419c7f17fc037c7953e85)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204661
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-02 17:41:26 +02:00
Noel Grandin ca82a93896 Fraction->double in SfxPoolItem
Change-Id: Ie5fe5f9367c6e657cee20c877a12d4c290aaec94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202588
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-03-24 14:07:52 +01:00
Noel Grandin 4b10710e09 loplugin:passstuffbyref
Change-Id: I559d246b25c99e5cb7a28ba94e04a2acedd3e720
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200943
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-04 19:22:19 +01:00
Paolo Benvenuto 52010fde09 tdf#89826 Add interactive property chips to style Organizer tab
The Organizer tab of the style dialog now shows interactive "chips"
for each property that differs from the parent style. Each chip
displays the property name and value, and includes an X button to
reset that property back to parent inheritance. All properties
are shown full text, no ellipsis.

Properties are grouped by tab page (Font, Font effects, etc.)
and displayed in a scrollable area. A View/Edit toggle lets the
user switch between the traditional description text and the
interactive chip view.

Implementation summary:

- New PropertyChip and PropertyCategoryRow widgets (sfx2) with
  corresponding .ui files for the chip layout.

- SfxStyleSheetBase::GetItemPresentation() virtual method returns
  per-property presentation strings, overridden in SwDocStyleSheet
  and ScStyleSheet for module-specific attributes.

- SfxItemSet access tracker mechanism to automatically map WhichIds
  to their owning tab pages via BuildWhichToTabMap().

- SfxTabDialogController::InvalidateItem() propagates chip resets
  to the output set and affected tab pages.

- SwDocStyleSheet::ResetItems() uses SwDoc::ResetAttrAtFormat() to
  ensure proper undo support in Writer.

- SfxStyleDialogController::Ok() clears invalidated items from the
  style's item set on dialog confirmation.

- SvxAsianTabPage now calls SetExchangeSupport() and implements
  DeactivatePage() so its items are properly tracked.

- Access tracker ignore guards in SvxCharBasePage::SetPrevFontWidthScale
  and SvxTransparenceTabPage::InitPreview to avoid false positives
  from preview-only item access.

Includes a UITest for Writer (sw/qa/uitest/ui/fmtui/tdf89826.py)
that creates a child style, modifies a property, removes it via
chip, and verifies inheritance is restored including undo.

A Calc UITest is not included because the style edit dialog in Calc
is opened asynchronously (ScTabViewShell::ExecuteStyleEdit) and the
UITest framework's execute_dialog_through_command cannot capture it.
The Calc functionality has been verified manually. A Calc UITest can
be added once the framework supports async style dialogs.

Change-Id: Ia764405798c212fe5340bba254f2ff6ac62365f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199318
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-02-28 15:52:40 +01:00
Noel Grandin 590d456dfb inline writeByteString
no longer serves any purpose

Change-Id: Ib8d1b642eddd6134785e295f2362745eb19c5a05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200463
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-27 07:49:17 +01:00
Noel Grandin 98174967db SvStream::WriteUniOrByteString should not need to specify encoding
Instead, rely on the stream being set into the correct encoding
during stream initialisation.

Change-Id: If141ba09afe1b04f5d836024975f00e8b20d1447
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200462
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-27 07:49:07 +01:00
Noel Grandin c60a4d5b1e inline readByteString
no longer serves a purpose

Change-Id: I142f643530a7e65dfe69b8db6afc92eb98885a3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200461
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-02-27 07:48:56 +01:00
Noel Grandin d235ca3589 SvStream::ReadUniOrByteString should not need to specify encoding
Instead, rely on the stream being set into the correct encoding
during stream initialisation.

Change-Id: I5b015f12f141a89b176c5a22aeecc4336f0b8f13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200460
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-27 07:48:47 +01:00
Mike Kaganski 55b9d8607b "CharSet" -> "Encoding" in SvStream
Use the correct term. E.g., Unicode charset has different encodings
like UTF-8 and UTF-16, and we mean encoding here.

Change-Id: I65e90b31cda6e39fdb1584b492e6e0b9821865a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200285
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-02-25 10:33:55 +01:00
Caolán McNamara 16be1e7558 remove SvNumberformat::GetCurrentLanguageData
Change-Id: I797384d2dc91379a56ac21de20ac19dc54d807e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199839
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2026-02-21 20:03:07 +01:00
Caolán McNamara 8f9bfea59d pass an explicit SvNFLanguageData to this GetOutputString
Change-Id: I6502cff8dd07fac081012c5c486bcb7ab5cc5805
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199838
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2026-02-21 20:02:59 +01:00
Caolán McNamara 3e96c2865b interim change, call GetCurrentLanguageData just once here
Change-Id: Idc21e3346bae4947efa76d212a6a419d8b571104
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199837
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2026-02-21 20:02:51 +01:00
Caolán McNamara 3ddada1c3e bubble explicit SvNFLanguageData through calendar switching, etc
Change-Id: Ia43293806e43803301086d00ce3fee4a000ebf94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199836
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2026-02-21 17:22:43 +01:00
Noel Grandin 2e063bf91b speed up SfxItemIter
take some branches out of the hot path, which means
converting some places to for loops.

Change-Id: Idcac06f27761994e2554f723662f242a38d3778c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199853
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-02-21 12:38:26 +01:00
Caolán McNamara 96c65c2491 bubble the provided SvNFLanguageData through more helpers
Change-Id: I88d10099f68f063eb26c8754eecee9072beece11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199835
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2026-02-21 03:35:12 +01:00
Caolán McNamara e0a16e3315 bubble an explicit SvNFLanguageData through Imp*Fill functions
Change-Id: Ia3a646e9a2f6e8d0dddfe5c4df3fb8bba51a8053
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199834
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2026-02-21 01:05:51 +01:00
Caolán McNamara f09dc5451e bubble an explicit SvNFLanguageData through ImpGetLogicalOutput
Change-Id: I1e591e56da85f15a19cadb51496f56415ff277fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199832
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2026-02-21 01:05:41 +01:00
Caolán McNamara 7bed4fce0a forward more things from SvNFLanguageData to its FormatScanner
Change-Id: I3c6b83c2a84e362544d8f748df17b5f04f69576a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199831
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2026-02-21 01:05:25 +01:00
Caolán McNamara 693f44f923 tdf#167636 GetOutputString should be using the scanner from LanguageData
and not the shared one, bubble that around more explicitly

Change-Id: Iff6462dafd2baa75253ad9929f9cbf53a178e9b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199558
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2026-02-19 09:31:38 +01:00
Noel Grandin 7d519f0706 tdf#170827 FILEOPEN XLSX File hangs Calc when opened
regression from
  commit b1df578645
  Author: Noel Grandin <noel.grandin@collabora.co.uk>
  Date:   Sun Dec 21 19:55:04 2025 +0200
  tdf#166684 use hashing in CellAttributeHelper::registerAndCheck

Change-Id: Ibe17b14fd93da584aff551e774150d42294055c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199451
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-16 11:56:37 +01:00
Noel Grandin 5648ba78d7 loplugin:unusedmethods
Change-Id: Ibac145ec75271e740871ecb03d838d5f85b8f643
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199374
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-15 12:35:31 +01:00
Noel Grandin a4f0e30df3 tdf#170595 reduce exception throwing overhead
where we are just going to ignore the exception anyway

Change-Id: I2c05d94e2cf3582ca005aa4765bad0be85041895
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198641
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-02-06 15:46:26 +01:00
Gabor Kelemen 0bdcfc2900 tdf#146619 Use more forward declarations in include/unotools/
This shaves off some 40M of input

Change-Id: I12e10deb87ceea1f7a23f3de4ea624befe187c3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198238
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-05 17:35:46 +01:00
Gabor Kelemen 76eb42c5aa tdf#146619 Use more forward declarations in include/svl
This shaves off some 40M of input

Change-Id: I89411ee8d94963ec6bc16fe155c885d2c78ee3a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198233
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-31 16:36:16 +01:00
Andrea Gelmini 50159dbedc Harmonize "an URL" -> "a URL"
Change-Id: I17ae188e1dfca3a0d3b9b666a8407b1b7c862a9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198367
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-01-29 17:23:22 +01:00
Stephan Bergmann aee7b9b8e0 Avoid float-cast-overflow
...by completely getting rid of the code exhibiting UB and the helpless
workaround from 2b27652d2d "tdf#167892 fix hang
formatting very small number on windows".

TODO:  It is unclear to me whether using saturated values here is any better
than using whatever random values came out of the original code that exhibited
UB.  The whole algorithm probably needs to be replaced with something that
actually works.

(This was now reported with 4368272648
"tdf#167892: svl_qa_cppunit: Add test" as

> /svl/source/numbers/zformat.cxx:2886:52: runtime error: 1e+19 is outside the range of representable values of type 'long'
>     #0 0x7f3f6da013eb in SvNumberformat::ImpGetFractionElements(double&, unsigned short, double&, long&, long&) const /svl/source/numbers/zformat.cxx:2886:52
>     #1 0x7f3f6d9f84ee in SvNumberformat::ImpGetFractionOutput(double, unsigned short, bool, NativeNumberWrapper const&, rtl::OUStringBuffer&) const /svl/source/numbers/zformat.cxx:2961:5
>     #2 0x7f3f6d9e472a in SvNumberformat::GetOutputString(double, rtl::OUString&, Color const**, NativeNumberWrapper const&, SvNFLanguageData const&, bool) const /svl/source/numbers/zformat.cxx:2676:21
>     #3 0x7f3f6d8c37bc in SvNFEngine::GetPreviewString(SvNFLanguageData&, SvNFFormatData const&, NativeNumberWrapper const&, SvNFEngine::Accessor const&, rtl::OUString const&, double, rtl::OUString&, Color const**, o3tl::strong_int<unsigned short, LanguageTypeTag>, bool) /svl/source/numbers/zforlist.cxx:2147:20
>     #4 0x7f3f6d8c3ddb in SvNumberFormatter::GetPreviewString(rtl::OUString const&, double, rtl::OUString&, Color const**, o3tl::strong_int<unsigned short, LanguageTypeTag>, bool) /svl/source/numbers/zforlist.cxx:2165:12
>     #5 0x7f3f6ef90fd3 in (anonymous namespace)::Test::checkPreviewString(SvNumberFormatter&, rtl::OUString const&, double, o3tl::strong_int<unsigned short, LanguageTypeTag>, rtl::OUString const&) /svl/qa/unit/svl.cxx:462:21
>     #6 0x7f3f6ef67f13 in (anonymous namespace)::Test::testUserDefinedNumberFormats() /svl/qa/unit/svl.cxx:1443:9

<https://ci.libreoffice.org/job/lo_ubsan/3801/>.)

Change-Id: Iff449629ee309f9513af02da9dfdf2505d6fe725
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198278
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-28 13:15:46 +01:00
Noel Grandin 4a5afc0b35 flatten SfxItemPropertySet::setPropertyValue a little
Change-Id: I195c9c1b63d5fd780126cb9ecc3e4d77fb27119d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-01-28 12:17:54 +01:00
Xisco Fauli 4368272648 tdf#167892: svl_qa_cppunit: Add test
Change-Id: I56925b648518c8e3399e534e3c82eb9bc0bfa335
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198192
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-01-27 13:53:23 +01:00
Noel Grandin 2b27652d2d tdf#167892 fix hang formatting very small number on windows
Workaround undefined behaviour where llvm/gcc produces different
code from MSVC, resulting in oscillation in this algorithm.

regression from
  commit 44d17f8feca372acd41142d1b607d3360282bf30
  Author: Eike Rathke <erack@redhat.com>
  Date:   Tue Oct 13 21:41:45 2020 +0200
  Resolves: tdf#137453 Implicit conversion from sal_uInt64 to sal_Int32 is bad..

Change-Id: I486e8caabcbf582cf94b47547efc89d1b206503e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198163
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-01-27 08:38:36 +01:00
Gabor Kelemen 3fa280fe1a Fix some non self contained headers in module svl, svtools, svx
Change-Id: I626f88d92236659f53b0b867d9047b33aa5efaea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196637
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-22 11:49:22 +01:00
Aron Budea 211cbca48c tdf#170325 update default TwoDigitYear to 1950
2030 is almost here, so start of range still interpeted
as 1900s should be pushed back.

Change-Id: I76d7171a9947860d8353241aae1f2a97e9da5c69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197261
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea@collabora.com>
2026-01-14 19:29:44 +01:00
Noel Grandin e72a16a500 tdf#166684 inline SfxStyleSheetIterator::GetSearchFamily
which is a little hot here, and this is just a getter method.
Shaves about 1% off.

Change-Id: I94fcdbb35e1be9cbc446f7f7709eaa67d21d0d48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196064
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit a6812f5dab4b4eab0dca92a0556a70317aeca80d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196359
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-01-01 14:31:31 +01:00
Noel Grandin b1df578645 tdf#166684 use hashing in CellAttributeHelper::registerAndCheck
reduces load time from 1m11s to 33s.

Change-Id: I911c101eb8692bf678e6f7147e64e503e9f2bf0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196062
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 044885e896a441c96a6934b10cbb723fabcf262d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196357
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-01-01 09:10:56 +01:00