1239 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
Andrea Gelmini eeb4290b30 Fix typos
Change-Id: I53571976c4e045a5a09f1adc4425b41d96b0e6a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210565
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 21:26:38 +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
Andrea Gelmini c664918e40 Fix typos
Change-Id: I4209ef12af9e6cecb97e290a35a9de4d5f738ad5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210164
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-29 16:20:13 +02:00
Andrea Gelmini ebbe637cc0 Fix typos in code and comments
Change-Id: Ib4330a7696cbee7c5cdd27ddc14f0741fab7e833
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210048
Tested-by: Jenkins
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 20:39:06 +02:00
Mike Kaganski 9d36b250d9 cool#16078: add SdrGrafClipPolyPolygonItem
Introduce an SfxPoolItem in the SDR graphic attribute range that
carries a basegfx::B2DPolyPolygon clip outline on SdrGrafObj.
Allocate SDRATTR_GRAFCLIPPOLYPOLYGON between SDRATTR_GRAFCROP and
SDRATTR_GRAF_LAST (which shifts SDRATTR_3D_FIRST and the downstream
ids by one), register the pool default, and surface the value as the
"GraphicClipPolyPolygon" UNO property on the GraphicObjectShape
property map (covering both drawing.GraphicObjectShape and
presentation.GraphicObjectShape via SVXMAP_GRAPHICOBJECT) using the
css::drawing::PolyPolygonBezierCoords type. QueryValue/PutValue
do the round-trip through the existing basegfx helpers.

The new which-id is 1175. The trailing comments in svddef.hxx have
run 2 high since two XATTR items were dropped upstream, so the ones
added here say 1177 to stay consistent with the file.

No reader, writer or render path consumes the property yet; this
is infrastructure for upcoming custGeom round-trip work on empty
picture placeholders.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I17d98cabeb230c25b3de0da4eadd8338ed672ce1
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9190
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit be7f21fc7187bb87129eed4e8ed2f794faf6e757)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210036
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-26 21:09:05 +02:00
Jesus Solis 39dcff4a99 tdf#156931 add import support for JPEG XL image format
Change-Id: I5b8c70d5739fdc91b0ca30fbaa780a5c7004741d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208352
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-26 11:43:32 +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
Ferdinand Gassauer 47f593c865 sc: Add warning infobar when deletion breaks cell references
When rows, columns, or sheets are deleted, referencing cells can
result in #REF! errors without warning. Manual reconstruction is
often time-intensive once the session is closed, so this patch
detects these errors and shows a warning infobar to alert the user.

The infobar includes a "Go to First Error" button that navigates to
the first affected formula cell. Only the first error is surfaced to
avoid UI clutter. The warning is dismissed on undo and re-shown on
redo automatically.

The feature is controlled by an Expert Configuration option at
org.openoffice.Office.Calc/Input/WarnOnDeleteCellReferences
(default: off for now).

See: https://github.com/CollaboraOnline/online/issues/2861

Change-Id: I649296444e783c88cbd4688109ac10b3a1bb5046
Signed-off-by: Ferdinand Gassauer <f.gassauer@chricar.at>
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/816
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Balázs Varga <balazs.varga@collabora.com>
(cherry picked from commit b3354e376bee90dedf1fe84b5cf6f4f3c17b7f70)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205499
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-05-22 07:17:11 +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
Xisco Fauli cfd3309a5d loplugin:unusedmethods
Check existing ones that can be removed

Change-Id: I6ee6fc1772c620ac5d12fea915681b094b7c3bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204583
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 08:54:45 +02:00
Julien Nabet 30bb2b6954 tdf#164685: Remove SfxItemSetFixed
Change-Id: Id9a8a699ae42aa8d9a2b1398dbb5468623cd334c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203958
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-04-20 17:18:28 +02:00
Khaled Hosny f02741f3e6 tdf#171624: Add SvxFontVariationsItem and EditEngine plumbing
Change-Id: I2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203244
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-04-06 17:13:04 +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
Ethan Garcia a0cbaa57a1 tdf#143148 use pragma once in include/svl
Change-Id: If7e3ee66fbfc882efea6b5e0af6108757a346a33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201424
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-03-11 10:17:13 +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
Khaled Hosny d128bdf1fe tdf#153368: Support optical size for variable fonts, part 2
Add SvxOpticalSizingItem and EditEngine plumbing. Mostly mindlessly
copying stuff here. Lets hope for the best.

Change-Id: Idf0b062ff955fa35bd04c8e69c103e15887932f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200501
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-03-02 21:45:06 +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
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 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 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
Andrea Gelmini e3f1b769c5 Fix typo
Change-Id: I4bbc331e745113dfd675025837a389d5e07fa646
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198846
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-02-07 21:25:40 +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 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
Markus Mohrhard c8b155c4d4 add sidebar entry for calc database ranges
Include limit UI and functionality only

for ranges with table styles. Do not allow for simple DbRanges.

Change-Id: I0b141c4e6fefd78bfcc7b30f4aad7fdcc42eee23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193667
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196735
Tested-by: Balazs Varga <balazs.varga@collabora.com>
Reviewed-by: Balazs Varga <balazs.varga@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197963
Tested-by: Jenkins
2026-01-29 09:26:14 +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
Noel Grandin aaedabdaa3 loplugin:unusedmethods
Change-Id: I85e2ca6222e33c2a99bfd0ea614d5ad238a7e8de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194890
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-12-01 18:27:09 +01:00
Gabor Kelemen 4d24007632 tdf#146619 Run IWYU again on include/svl/
Change-Id: I5dc8757a6d06ab6917a9af733550295008fde5b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193914
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2025-11-29 13:59:05 +01:00
Szymon Kłos 788a225f64 Writer: iterate styles to show also favourite in the notebookbar
- qFormat - specifies if style should be shown in more prominent places
  in the UI even if unused
- we show it in that case not only in all styles in sidebar, but also
  in the notebookbar style previews
- this is Writer specific, implemented on sw/ style iterator and SwFormat
  level
- XStyles is interface common for all modules but in fact we do per module
  implementations it seems and there is no sense to propagate that value
  everywhere
- currently we have also qFormat export so just reuse grab bag value

Change-Id: Iee8f35a3e575c3c1caf6c67f8b489d7d64932cf5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193398
(cherry picked from commit cee5c21e0c8c64c78e5d04ff4e300edfaac30404)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194550
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2025-11-29 09:24:48 +01:00
Mike Kaganski d3cb2e7e24 Let SfxItemSet::GetItem taking TypedWhichId use static_cast
Only use the dynamic_cast in assertion.

Change-Id: Idbb2800bf4fdba74118b13f5948bc1e26b482c49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194636
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-11-27 19:21:29 +01:00
Mike Kaganski e871a7d5a6 Drop default arguments from the templatized overload
These defaults don't provide any advantages over the base overload,
which works just fine in case when there's no ppItem argument. The
ppItem argument is the only sensible reason to use the templatized
overload.

Change-Id: Ic17fe1da7a3c02f9e7ebbe725060fcf129bc9f24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194616
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-11-27 19:20:55 +01:00
Mike Kaganski 1e086712e4 Drop templated HasItem in favor of GetItemIfSet
... and harden the latter using StaticWhichCast.

Change-Id: If49674b7725624e2a0493b1891ada4de0ebc0cd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194441
Code-Style: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-11-25 19:45:34 +01:00
Mike Kaganski 4ef4af0a2c Use StaticWhichCast instead of static_cast
It feels safer in CloneSetWhich; previously, there was no way to make
sure that the passed TypedWhichId makes sense.

Change-Id: I1df520282f5407a69a095d959d107f6b78621f75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194422
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-11-24 20:18:16 +01:00
Caolán McNamara abdba6ee5b save/restore docId in Application::Reschedule
similar to what we do for viewID.

On attemting to load multiple documents StatusIndicator::start calls
Application::Reschedule during load of document #1.

That inner loop ends up loading document #2. The inner loop ends, and
load of document #1 completes in the outer loop.

Unfortunately the inner loop left the current DocumentId as that of the
inner document #2, so the document id set on the view of #1 is
incorrect.

Extend the similar fix for viewId switching during Reschedule to restore
the docId. If this Reschedule happens at any other time except load then
restoring the viewId is sufficient to identify the correct document, but
in the load case there is no viewId yet

Move the mnCurrentDocId out of sfx2 and ViewShell into comphelper so
it's available from vcl without needing to make any adjustments to
LibreOfficeKit.h[xx]

Change-Id: Ied70e0f9ff33f2587cfbcb02b0c9ca3cd4792cfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193814
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-11-13 09:37:13 +01:00
Jonathan Clark 69e902d085 tdf#162120 Implement style:writing-mode-automatic
Implements the ODF 1.2 paragraph attribute style:writing-mode-automatic,
and supporting runtime features. When set, this attribute allows
programs to automatically recompute the paragraph writing mode when the
contents of the paragraph have been edited.

The ODF standard does not suggest any particular algorithm for
automatically determining paragraph direction. This implementation uses
the rules from Unicode UAX #9 3.3.1.

Currently, LO will only automatically change the writing direction when
new text is typed or deleted. Other known interesting cases are already
tracked as separate enhancement requests.

Change-Id: I49eecea36952588dc98f2a98ebce712cd2846c0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193547
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2025-11-13 04:45:50 +01:00
Mike Kaganski fb347e61c9 Some DDE fixes
It seems that some DDE code was virtually never tested in our CI.
That resulted in several unnoticed regressions.

In commit 81b954718f
(loplugin:unnecessaryvirtuals, 2015-06-09), DdeService::MakeTopic
was made non-virtual. That broke its use on Windows, where a derived
class used to override that method (which of course didn't use the
'override' keyvord, hence went unnoticed).

In commit 88e3b846b8 (remove some dead
bits of DDE, 2016-04-06), DdeService::MakeTopic was finally dropped.

In commit c026b93640 (no need to
allocate SfxDdeDocTopics_Impl separately, 2023-02-28), a check in
SfxApplication::AddDdeTopic was changed from testing if pDocTopics
were initialized to checking if they are empty. The new test made
adding anything to the vector impossible.

This change tried to make it functional again, and adds a (Windows-
only) unit test.

To enable unit test, we need an app name, so that DDE is initialized
properly. Also, ImplDdeService::MakeTopic had a condition to exit
early, when !Application::IsInExecute(). Here we allow to add it, if
unit test is running.

SfxDdeDocTopic_Impl::Put ismodified to store OUString to the Any -
see ScByteSequenceToString::GetString. Without the change, UTF-16
was treated as 8-bit-encoded string.

theDdeInstData in svl/source/svdde/ddecli.cxx is now not a pointer,
bus a function-local static. No need to delete it: it has nothing
that needs to be released. Before, it could get destroyed too early,
preventing DDE from working.

DdeConnection::~DdeConnection could reliably deadlock, when it had
a connection to the server in the same process; processEventsToIdle
is called now to avoid that.

DdeData ctor taking OUString is fixed: xImp->nData is bytes, not
characters.

Change-Id: I9a151eebc65a26b76c9f6134e97cd1f4d2e2b615
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-19 10:43:41 +02:00
Gabor Kelemen becdd99f2c tdf#146619 Run IWYU again on include/[d-e]*
Change-Id: Iec01747b87d93a0a7c6907ea1518dec026f38836
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191911
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-10-14 11:02:17 +02:00
Miklos Vajna b73dd7cc1a sd doc model xml dump: show styles
editeng paragraphs can refer to styles, but what are those styles,
stored in SdrModel was not visible previously.

Change-Id: Ic32795341595a4d8b61c8c686cd0b140034c1a7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192163
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-10-10 15:04:36 +02:00