Commit Graph
520913 Commits
Author SHA1 Message Date
Neil Roberts 0ef39cbc0b store: Use rtl::Reference::get() instead of &*
Using &* can be problematic if the pointer is null. In this case it
doesn’t matter, but using Reference::get() is probably easier to
understand anyway. This also paves the way for a later compiler plugin
to check for this.

Change-Id: I52837f7c972a87229ecbc4f72ee4c2f352a04dc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211840
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-10-07 19:14:23 +02:00
Neil Roberts 987449e0b4 storbase: Use rtl::Reference::get() instead of &*
Using &* can be problematic if the pointer is null. In this case it
doesn’t matter, but using Reference::get() is probably easier to
understand anyway. This also paves the way for a later compiler plugin
to check for this.

Change-Id: I67bd637fef17a505cf49e3332ceebc61c3280c1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211839
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-10-07 19:13:57 +02:00
Andreas Heinisch 216d39140d tdf#47890 - Remember last used position and size of the mail merge dialog
Change-Id: Ibc6ba048d9f330f499d873c220f750964438c52e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211862
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-10-07 18:04:36 +02:00
Andreas Heinisch 7f1231cfec tdf#171416 - Put Link field before Text again in the Hyperlink dialog
Change-Id: I86cabe93386f0c0eafd1821fa4d2d988ccf8a0af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211954
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-10-07 17:58:10 +02:00
Michael Weghorn 4909fb2b4c svtools: Drop ValueSetItemType::ImageAndText and related logic
Prio to

    Change-Id: I0d2f691eecfac013bc8ad3e506484d958d18ce0a
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Oct 6 17:22:54 2026 +0200

        svtools: Drop always false ValueSet::InsertItem bLegend param

, the only place where the type would have been set was
in ValueSet::InsertItem, but the method was never called
in a way that caused that code path being used.

Now that that was dropped from ValueSet::InsertItem,
also drop the remaining logic from the ValueSet
implementation.

This also means that the `rRenderContext` param for
ValueSet::ImplFormatItem becomes unused. Dropping
it and related cleanup will be done in an upcoming
commit.

Change-Id: I3593630b4758d0547264c0ed63fec7ac111ccfd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211910
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-10-07 17:52:40 +02:00
Michael Weghorn cd6d8538d0 svtools: Drop always false ValueSet::InsertItem bLegend param
No single caller passes any explicit value for that
param, so the default of `false` is always used.

Drop the param and simplify the implementation a bit.
This will also allow for further cleanup in an upcoming
commit.

Change-Id: I0d2f691eecfac013bc8ad3e506484d958d18ce0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211909
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:52:18 +02:00
Michael Weghorn f504ea8b34 sd: Port LayoutToolbarMenu from ValueSet to weld::IconView
Port the toolbar popup to select the slide layout to use
from using two ValueSet widgets to using weld::IconView
instead.

This helps to be more consistent with other platform/toolkit
widgets and reduces custom widget logic.

Adjust indices used to account for the fact that
weld::IconView indices are 0-based while the ValueSet ones
are 1-based. For the particular case here, custom non-continguous
item IDs were used for the ValueSet items that
correspond to the AutoLayout enum values.
Store those custom IDs as the IDs of the weld::IconView items and
retrieve the ID again in LayoutToolbarMenu::IconViewItemActivatedHdl.

The popup can be triggered like this:

* start Impress
* in the toolbar, click on the "Slide Layout" button

Change-Id: Ib4bf1c611663e8001a6ffcff6bc5ecf393c22277
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211908
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:52:01 +02:00
Michael Weghorn b25df6df3f svx: Port ExtrusionDirectionWindow from ValueSet to weld::IconView
Port the widget to select the extrusion direction from using
a ValueSet widget to using weld::IconView.

This helps to be more consistent with other platform/toolkit
widgets and reduces custom widget logic.

Adjust indices used to account for the fact that
weld::IconView indices are 0-based while the ValueSet ones
are 1-based.

The popup can be triggered like this:

* open attachment 175894 from tdf#145296
* make sure the "3D-Settings" toolbar is enabled
  in "View" -> "Toolbars" -> "3D-Settings"
* select the extruded shape
* press the "Direction" button in the "3D-Settings"
  toolbar

Change-Id: I045bd1d605b0f5bb5c4ad7eeb3247e50356b39b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211907
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-10-07 17:51:46 +02:00
Michael Weghorn 8e1c047cf7 svx: Resave directionwindow.ui with glade 3.40
The popup can be triggered like this:

* open attachment 175894 from tdf#145296
* make sure the "3D-Settings" toolbar is enabled
  in "View" -> "Toolbars" -> "3D-Settings"
* select the extruded shape
* press the "Direction" button in the "3D-Settings"
  toolbar

Change-Id: If9c59a5d2e1d5232a909a4ad8a9e9e6086149ec5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211906
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-10-07 17:51:35 +02:00
Michael Weghorn b08518a14a svx: Drop ExtrusionDirectionWindow::maImgDirection only used in ctor
No need to store the images in a class member as they're
only used once in the ctor when inserting items into
the ValueSet. Just use a local variable and create the
images in the existing loop that inserts the items.

Change-Id: Ifa6722a88f97aac35e1b3c17ee9db7606c1ef001
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211905
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-10-07 17:51:08 +02:00
Michael Weghorn 9ad54fe80e svtools: Drop now unused ValueSet::SetItemImage
The last caller of that method was ported from ValueSet
to weld::IconView in previous commit

    Change-Id: I28d86251b70149574535dc7b583660dbe42e9a0d
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Oct 6 15:01:52 2026 +0200

        svx: Port ExtrusionLightingWindow from ValueSet to weld::IconView

Change-Id: I232f3767268a4fde206515f2a6d92e35c664ccd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211904
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-10-07 17:50:55 +02:00
Michael Weghorn 0bf31b7f4c svx: Port ExtrusionLightingWindow from ValueSet to weld::IconView
Port the widget to select the lighting from using
a ValueSet widget to using weld::IconView.

This helps to be more consistent with other platform/toolkit
widgets and reduces custom widget logic.

Adjust indices used to account for the fact that
weld::IconView indices are 0-based while the ValueSet ones
are 1-based.

The popup can be triggered like this:

* open attachment 175894 from tdf#145296
* make sure the "3D-Settings" toolbar is enabled
  in "View" -> "Toolbars" -> "3D-Settings"
* select the extruded shape
* press the "Lighting" button in the "3D-Settings"
  toolbar

Change-Id: I28d86251b70149574535dc7b583660dbe42e9a0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211903
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:50:48 +02:00
Michael Weghorn 1050ed2e56 svx: Resave lightingwindow.ui with glade 3.40
The popup can be triggered like this:

* open attachment 175894 from tdf#145296
* make sure the "3D-Settings" toolbar is enabled
  in "View" -> "Toolbars" -> "3D-Settings"
* select the extruded shape
* press the "Lighting" button in the "3D-Settings"
  toolbar

Change-Id: I195d1d7973b12541c7296433324b67a19dcd8021
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211902
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:50:39 +02:00
Michael Weghorn 8fc8feaae7 tdf#130857 qt weld: Support "Extrusion Depth" dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* open attachment 175894 from tdf#145296
* make sure the "3D-Settings" toolbar is enabled
  in "View" -> "Toolbars" -> "3D-Settings"
* select the extruded shape
* press the "Depth" button in the "3D-Settings"
  toolbar and select "Custom"

Change-Id: I4f1e43e20bac5525d3c24fdaa85c83f978460b0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211901
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-10-07 17:50:31 +02:00
Michael Weghorn f3df5034a9 svx: Resave extrustiondepthdialog.ui with glade 3.40
The dialog can be triggered like this:

* open attachment 175894 from tdf#145296
* make sure the "3D-Settings" toolbar is enabled
  in "View" -> "Toolbars" -> "3D-Settings"
* select the extruded shape
* press the "Depth" button in the "3D-Settings"
  toolbar and select "Custom"

Change-Id: Ia7da2d663569f733451a692a0a6201cc19b5fe9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211900
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:50:16 +02:00
Michael Weghorn a91d44317a svtools: Drop ValueSetItem::mnTextOffset
After

    Change-Id: I0150e699602a625874e5a09b8df38110f52c0c03
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Oct 6 12:15:49 2026 +0200

        svtools: Drop now unused WB_NAMEFIELD logic from ValueSet

, that member is only written to, but never read, so drop
it completely.

Change-Id: I974183e725e3c530162152debd29bbf207b21b6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211899
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:50:08 +02:00
Michael Weghorn 0e206454b1 svtools: Drop now unused WB_NAMEFIELD logic from ValueSet
The last case where that style flag was set was ported
away from ValueSet to use weld::IconView instead in earlier
commit

    Change-Id: I1c23a305322105608d0152bcd0b0fa195be14eff
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Oct 6 11:48:21 2026 +0200

        cui: Port Callout tab page from ValueSet to weld::IconView

Therefore, drop the logic in ValueSet handling that
flag, to simplify the code.

This also means that the `pItem` param for ValueSet::ImplDrawSelect
is now unused, so drop that one, too.

Change-Id: I0150e699602a625874e5a09b8df38110f52c0c03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211898
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:49:55 +02:00
Michael Weghorn e0d0f4ca38 svtools: Drop unnecessary write to local var
The value of `n` is only used in the first branch.
Reduce the variable scope to that one.

Addresses this warning shown in Qt Creator:

    /home/michi/development/git/libreoffice/svtools/source/control/valueset.cxx:1522:8: Value stored to 'n' is never read [clang-analyzer-deadcode.DeadStores]

Change-Id: Ib6e74fb35152c1d6098274e1fd5a9a60253b4900
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211897
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:49:47 +02:00
Michael Weghorn a0e94744f0 tdf#130857 Define widgets in "Callout" tab page in order
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.

See

    commit 02692566ad
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Oct 24 17:43:35 2024 +0200

        tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order

for more background.

The tab page can be triggered like this:

* start Draw
* make sure the "Text" toolbar is enabled in
  "View" -> "Toolbars" -> "Text"
* in that "Text" toolbar, select the "Callouts" shape
  and insert it into the document
* right-click on the newly inserted shape to open the context menu
* activate the "Position and Size" menu entry
* switch to the "Callout" tab

The Python script mentioned in the commit message of

    commit 327679b2fb
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 8 15:50:59 2026 +0200

        tdf#130857 Define widgets in Calc "General" options page in order

was used to reorder the GtkGrid children automatically.

Change-Id: Ice8f6b318f57411bea553311faf45b40cb098b44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211883
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:49:27 +02:00
Michael Weghorn 373ff268bb cui: Port Callout tab page from ValueSet to weld::IconView
Port the widget to select the connector type using a ValueSet
widget to using weld::IconView.

This helps to be more consistent with other platform/toolkit
widgets and reduces custom widget logic.

Adjust indices used to account for the fact that
weld::IconView indices are 0-based while the ValueSet ones
are 1-based.

Increase the item padding in the .ui file to 18 to
use more space for the individual items, to be more
similar to the previous ValueSet implementation.

The tab page can be triggered like this:

* start Draw
* make sure the "Text" toolbar is enabled in
  "View" -> "Toolbars" -> "Text"
* in that "Text" toolbar, select the "Callouts" shape
  and insert it into the document
* right-click on the newly inserted shape to open the context menu
* activate the "Position and Size" menu entry
* switch to the "Callout" tab

Change-Id: I1c23a305322105608d0152bcd0b0fa195be14eff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211882
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:49:09 +02:00
Michael Weghorn e68422786a Drop unused ValueSet forward declarations
Drop ValueSet forward declarations from headers
not actually using the class.

Forward-declare the class in cui/source/inc/numpages.hxx
which actually uses it, but didn't forward-declare it
or include the header yet, but previously got the forward-declaration
from an included header.

Change-Id: I8876ad47eb362f581aa41ee4a61a85c4093a1dd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211881
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-10-07 17:48:46 +02:00
Michael Weghorn 5bf5c6e453 cui: Insert actual images right away in SvxCaptionTabPage ctor
Instead of first inserting entries with a dummy image
and then setting the actual images using
ValueSet::SetItemImage, just insert the actual images
when inserting the entries right away.

Change-Id: I24b3e2a3a1e86a72eb99755c31602ac96845c9e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211880
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-10-07 17:48:32 +02:00
Michael Weghorn 1ad0ba1af4 sd: Dispose AbstractSvxCaptionDialog
Without this in place, the following assert
would be triggered when closing the dialog:

    soffice.bin: /home/michi/development/git/libreoffice/include/vcl/vclptr.hxx:134: VclPtr<SfxAbstractTabDialog>::~VclPtr() [reference_type = SfxAbstractTabDialog]: Assertion `(!m_rInnerRef.get() || m_rInnerRef->isDisposed() || m_rInnerRef->getRefCount() > 1) && "someone forgot to call dispose()"' failed.

Steps to reproduce:

* start Draw
* make sure the "Text" toolbar is enabled in "View" -> "Toolbars" -> "Text"
* in that "Text" toolbar, select the "Callouts" shape and insert it into the document
* right-click on the newly inserted shape to open the context menu
* activate the "Position and Size" menu entry to open the dialog
* press the "OK" button to close the dialog again

Change-Id: I2ddf9b6b0997db091ff8bc320ae04fbbfee19415
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211879
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:48:12 +02:00
Michael Weghorn e2c6a76dfe tdf#130857 qt weld: Support Callout dialog
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.

The dialog can be triggered like this:

* start Draw
* make sure the "Text" toolbar is enabled in "View" -> "Toolbars" -> "Text"
* in that "Text" toolbar, select the "Callouts" shape and insert it into the document
* right-click on the newly inserted shape to open the context menu
* activate the "Position and Size" menu entry

Closing the dialog currently triggers an assert,
but this is unrelated to this change and e.g.
also seen when using the gen vcl plugin and will
be addressed separately in an upcoming commit:

    soffice.bin: /home/michi/development/git/libreoffice/include/vcl/vclptr.hxx:134: VclPtr<SfxAbstractTabDialog>::~VclPtr() [reference_type = SfxAbstractTabDialog]: Assertion `(!m_rInnerRef.get() || m_rInnerRef->isDisposed() || m_rInnerRef->getRefCount() > 1) && "someone forgot to call dispose()"' failed.

Change-Id: I7ba1020dc045d95098ee45b1551f3e641141130b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211878
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-10-07 17:47:53 +02:00
Michael Weghorn 3281774c95 cui: Resave calloutpage.ui with glade 3.40
This UI file is used for the "Callout" tab page
that can be triggered like this:

* start Draw
* make sure the "Text" toolbar is enabled in
  "View" -> "Toolbars" -> "Text"
* in that "Text" toolbar, select the "Callouts" shape
  and insert it into the document
* right-click on the newly inserted shape to open the context menu
* activate the "Position and Size" menu entry
* switch to the "Callout" tab

Change-Id: I93118b94d5e7f63322df88ff1e6057cdc9b10ecc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211877
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:47:45 +02:00
Michael Weghorn a6aede6c5f cui: Add missing weld::ComboBox include in labdlg.hxx
Without this, Qt Creator shows this error:

    labdlg.hxx:60:27: No member named 'ComboBox' in namespace 'weld' (fix available)

Change-Id: Ica26b748976c0f034c490c92a16b1d393191529e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211876
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:47:34 +02:00
Michael Weghorn 0b69ad0583 cui: Drop SvxCaptionTabPage::m_aBmpCapTypes only used in ctor
There's no need to store the images in an array. Just
create the images when inserting them into the ValueSet instead.

Change-Id: I44506a80e461c7e3abfa2b8e059bd71757f1a731
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211875
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:47:24 +02:00
Michael Weghorn 4893aa3f22 cui: Merge SvxCaptionTabPage::FillValueSet into ctor
Merge the logic into the only caller, the
SvxCaptionTabPage ctor, which already directly inserts
items into the ValueSet as well.

Change-Id: Iab3264c8f4679eea9e6d3538e64c81704fbcb026
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211874
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:47:04 +02:00
Michael Weghorn 0cda587b29 svx: Set slot ID for DefaultShapesPanel IconView item ID
Following

    Change-Id: I3cdb85a966693514521637f672255ba086b9eb19
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Oct 6 09:33:08 2026 +0200

        svx: Port shapes panel from ValueSet to weld::IconView

, stop storing the slot IDs/UNO commands corresponding to the
items in the icon views in DefaultShapesPanel in a map and
instead store them as the ID of the items directly in the
weld::IconView, which simplifies the logic a bit.

Change-Id: I97643abd64436cf106b88f835edf6e5c8fb5f7c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211857
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:46:30 +02:00
Michael Weghorn 969a6481a4 svx: Port shapes panel from ValueSet to weld::IconView
Port the widgets to select shapes to insert in the
Draw/Impress "Shapes" sidebar panel from using a ValueSet
widget to using weld::IconView.

This helps to be more consistent with other platform/toolkit
widgets and reduces custom widget logic.

Adjust indices used to account for the fact that
weld::IconView indices are 0-based while the ValueSet ones
are 1-based.

The UI can be triggered like this:

* start Impress
* open the sidebar
* switch to the "Shapes" sidebar deck

Change-Id: I3cdb85a966693514521637f672255ba086b9eb19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211856
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:46:20 +02:00
Michael Weghorn 30e7c4110b svx: Reduce scope of local variables
Change-Id: I5252cb01439e071211567e7c8e5cfc5ef1e67e5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211855
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:46:03 +02:00
Michael Weghorn f8055586e7 svx: Iterate over map elements once instead of twice
Instead of iterating over the DefaultShapesPanel::m_aShapesSetMap
elements twice, do so only once and just do everything that needs to be done
for each of the elements right away.

Change-Id: I0b774ccbed7e5110f57d0ce6cc6cf2382a6b923e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211854
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:45:45 +02:00
Michael Weghorn 2bfea7889c svx: Merge DefaultShapesPanel::{Initialize,populateShapes}
Merge DefaultShapesPanel::populateShapes into its only caller,
DefaultShapesPanel::Initialize.

This will also allow to merge the two for loops into one in an upcoming
commit.

Change-Id: I404d056424cc80bda76332543deee6ff287094ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211853
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-10-07 17:45:28 +02:00
Michael Weghorn 153b3d0aa3 svx: Use '#pragma once in DefaultShapesPanel.hxx
Change-Id: Idaff017b86c9a095f14b00df38febe1e2024cc01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211852
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:45:08 +02:00
Michael Weghorn 28cc8883eb chart2, sc: Enforce UI rules
Commit the results of running

    for a in `git ls-files "*.ui"`; do bin/ui-rules-enforcer.py $a; done

Change-Id: I7a97f75773b9e5750dcce848d730960a8561916b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211850
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-07 17:44:57 +02:00
Jean-Pierre Ledure 2821d29a87 ScriptForge (FileSystem) Manage ZIP archives
The FileSystem service provides simple
methods to manage compressed zip archives.

As an example, .odf and .oxt files being
formatted as such archives, massive or
punctual changes of file contents
with smart scripts can be facilitated.

New methods:
- IsZipFile(filename)
    returns True when filename is a valid
    zip file
- FilesInZip(filename, pattern)
    returns a list of archive members,
    optionally filtered with a Like pattern,
    stored in filename
- ExtractFromZip(filename, destination, source)
    stores the source file(s) found in the
    given ZIP file into a destination folder
- CompressToZip(filename, foldername, rootfolder)
    stores the content of folder, including
    its subfolders, into a zip archive,
    optionally under a root folder

The implementation is based on the python
zipfile standard library.

The methods area available both for Basic and
Python user scripts. For Python scripts, the
user is also free to use the native zipfile
library instead.

The user documentation shouid be updated
according to this commit.

Change-Id: I506a8583dc3fa38c7e05094562ade33f84a24747
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211891
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2026-10-07 14:26:54 +02:00
Justin Luth 72d2a706a3 tdf#173510 sc: prevent crash when table style deselected
This fixes a 26.8 regression from
commit 4fb31ea85f.

Format - AutoFormat Styles and Ctrl-click to de-select the style.

Change-Id: I94961ec11932d76fc945fbb11031f22174111459
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211929
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-10-07 13:20:15 +02:00
Caolán McNamara b1df3b5b7a crashtesting: hold the same document BasicManager only once
crash on converting forums/ods/forum-en-39357.ods to xls, and on
recalculating INDIRECT cells in 14 other documents, a debug build
asserts:

 soffice.bin: svl/source/notify/lstner.cxx:83: void SfxListener::StartListening(SfxBroadcaster&, DuplicateHandling): Assertion `!(bListeningAlready && eDuplicateHanding == DuplicateHandling::Unexpected) && "duplicate listener, try building with DBG_UTIL to find the other insert site."' failed.

 #21 SfxListener::StartListening(SfxBroadcaster&, DuplicateHandling) at svl/source/notify/lstner.cxx:83
 #22 SfxBasicManagerHolder::reset(BasicManager*) at sfx2/source/appl/appbaslib.cxx:70
 #23 SfxObjectShell::InitBasicManager_Impl() at sfx2/source/doc/objxtor.cxx:845
 #24 lcl_getBasicManagerForDocument(SfxObjectShell const&) at sfx2/source/doc/objxtor.cxx:656
 #25 SfxObjectShell::GetBasicManager() const at sfx2/source/doc/objxtor.cxx:690
 #26 SfxObjectShell::GetBasic() const at sfx2/source/doc/objxtor.cxx:799
 #27 ScCompiler::ParseMacro(rtl::OUString const&, bool) at sc/source/core/tool/compiler.cxx:3830
 #28 ScCompiler::NextNewToken(bool) at sc/source/core/tool/compiler.cxx:5137
 #29 ScCompiler::CompileString(rtl::OUString const&) at sc/source/core/tool/compiler.cxx:5293
 #30 XclExpChSourceLink::ConvertDataSequence(...) at sc/source/filter/excel/xechart.cxx:901

and the first StartListening of the pair was:

 SfxBasicManagerHolder::reset(BasicManager*) at sfx2/source/appl/appbaslib.cxx:71
 SfxObjectShell::InitBasicManager_Impl() at sfx2/source/doc/objxtor.cxx:845
 lcl_getBasicManagerForDocument(SfxObjectShell const&) at sfx2/source/doc/objxtor.cxx:657
 SfxObjectShell::GetBasicManager() const at sfx2/source/doc/objxtor.cxx:690
 ScServiceProvider::MakeInstance(ScServiceProvider::Type, ScDocShell*) at sc/source/ui/unoobj/servuno.cxx:590
 ScModelObj::createInstance(rtl::OUString const&) at sc/source/ui/unoobj/docuno.cxx:4085
 basic::SfxScriptLibraryContainer::importLibraryElement(...)

Creating the BasicManager of a VBA mode document loads its VBA
document modules, and they create the VBA globals, which asks for
the document's BasicManager again. That nested InitBasicManager_Impl
gets the BasicManager under construction from the repository and
passes it to the holder, then the outer one passes the same one
again, so the holder starts listening to it twice.

That recursion is old, but crashtesting only reaches it since:

commit c8da2d3a99b3a318545f1947f57c929ac9b9a82d
Date:   Sat Sep 26 20:23:11 2026 +0000

    load the Basic project of a VBA mode Calc document after import
    Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13614

Previously the import loaded the Basic project at once and the first
request for the BasicManager came from inside that load. Now with
macros not allowed the project stays unloaded, so the first request
comes later, from a formula, and the load runs inside it.

so make SfxBasicManagerHolder::reset do nothing when it is given the
BasicManager it already holds

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5db2184ae0124879e47310d90b5371e1e2fb0235
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14516
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit a095496e0d649882531fd8e211ec4179333adee0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211941
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-07 12:46:22 +02:00
Michael Meeks e1b35f0bb1 sc: forward declare ScDrawView in tabview.hxx.
tabview.hxx included drawview.hxx for a std::unique_ptr<ScDrawView> member
and an accessor that returns the raw pointer. Neither needs the complete
type, and the destructor of ScTabView is already out of line. The include
dragged svx/fmview.hxx, svx/view3d.hxx, svx/svdview.hxx and the rest of the
svx view class chain into the 200 translation units that include the view
shell headers.

tabvwsh.hxx and tabview.hxx now include the small headers they used through
that chain, and the files that call into the draw view include drawview.hxx
themselves.

clang -ftime-trace says around 2% of the module build time saved here.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I198b19e74f6ad56090b987880a063dc9ee677cda
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12683
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit a7fd69666ea5fb4d26dfad0d286f6c1f3bcd3144)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211884
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-07 12:18:06 +02:00
ApurvR20 8ceb3ebcc6 tdf#74702 Replace instance of OUTDEV_WINDOW in ndole
Change-Id: I9d4a9ebf886614be3e446678b08aa915caa75d86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211895
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2026-10-07 09:42:01 +02:00
Aron Budea 80fa879dec oox: omit default attributes/elements in theme XMLs in OOXML
For fonts: charset, pitchFamily.
Various rectangles: fillRect, fillToRect, srcRect, tileRect

Change-Id: I6dbd914ca8d9f8a2760bfecc6e294d465d52c32f
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13779
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 2b4ed81074195c85d4fc179e22ca7d2e2e6da8f1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211692
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-07 08:50:12 +02:00
Neil Roberts 48535514d4 Add a compiler plugin to detect &*smart_pointer
Adds a compiler plugin to detect cases of dereferencing a smart
pointer (such as unique_ptr or UnoCursorPointer) and then immediately
taking the address of the reference. In that case it is better to just
call get() on the pointer. This is particularly important if the pointer
can be null because in that case the initial dereference results in
undefined behaviour.

Change-Id: Ib1cca00c9180572f446721b90f83aa7fddb88c7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211756
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-10-07 08:42:08 +02:00
Neil Roberts 1b6f6d39e3 SWTableAutoFormat: Use unique_ptr::get() instead of &*
Using &* can be problematic if the pointer is null. In this case I don’t
think it matters, but using unique_ptr::get() is probably easier to
understand anyway. This also paves the way for a later compiler plugin
to check for this.

Change-Id: If4626be07c6adcc14c595360748470ffb67b9e6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211753
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-10-07 08:41:41 +02:00
Neil Roberts 95218dded0 TableProperties: Use shared_ptr::get() instead of &*mpTableStyle
Using &* can be problematic if the pointer is null. In this case the
pointer is explicitly checked for null first so it doesn’t matter, but
using shared_ptr::get() is probably easier to understand anyway. This
also paves the way for a later compiler plugin to check for this.

Change-Id: If087962548c6a7e06311eab9175f5108b50ca549
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211752
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-10-07 08:41:30 +02:00
Neil Roberts 13fb6e87c7 ScAutoFormatData: Use unique_ptr::get() instead of &*iter
Using &* can be problematic if the pointer is null. In this case I don’t
think it matters, but using unique_ptr::get() is probably easier to
understand anyway. This also paves the way for a later compiler plugin
to check for this.

Change-Id: I6b399d57cdf580d40721789bf3d6e7607c56fd6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211751
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-10-07 08:41:18 +02:00
Neil Roberts 711c6c0c5b ScDPSaveDimension: Use unique_ptr::get() instead of &*iter
Using &* can be problematic if the pointer is null. In this case I
don’t think it matters, but using unique_ptr::get() is probably
easier to understand anyway. This also paves the way for a later
compiler plugin to check for this.

Change-Id: I064def383ccf4b1ff263a70cd0c7775ff6fbbc8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211750
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-10-07 08:40:59 +02:00
Neil Roberts d926f62338 lokdocview: Use m_pTileBuffer.get instead of &*m_pTileBuffer on unique_ptr
Using &* can be problematic if the pointer is null. In this case it
probably doesn’t matter, but using unique_ptr::get() is probably easier
to understand anyway. This also paves the way for a later compiler
plugin to check for this.

Change-Id: If0ece4548b44080acf6db7f8c0ac37922d1a197c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211749
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-10-07 08:40:46 +02:00
Neil Roberts 0ac807366d redlndlg: Use unique_ptr::get() instead of &*ptr
Using &* to get the pointer out of a unique_ptr can be problematic if
the pointer is null. In this case that probably can’t happen, but either
way using get() makes the code easier to understand. This also paves the
way for a compiler plugin to detect this in a later patch.

Change-Id: Ib5291002581565e227dd6ca30570ecee63ef7cba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211748
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-10-07 08:40:25 +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
Justin Luth 78e93a21ec tdf#173510 sw: update preview when convert table style is de-selected
This fixes a 26.8 regression from
commit 4fb31ea85f.

Change-Id: I947edd9ecc1f5c0e23e864dbf904b5652f79af50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211928
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-10-07 04:11:19 +02:00