Commit Graph
520901 Commits
Author SHA1 Message Date
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
Justin Luth 8ebbdee2d2 tdf#173510 sw: do not default to a table style when converting to table
This fixes a 26.8 regression from
commit 4fb31ea85f.

Over the years we keep battling people who want to add borders
to tables by default. This last time was even worse
since it applies an entire table style,
and table styles simply have never worked well.

So do NOT default to infuriating results.

Change-Id: I804ddbf14b8d4b609793bbb4bd1fa7be3f905358
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211927
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-10-07 04:10:37 +02:00
Justin Luth 327a555d56 tdf#173510 svx: update preview when table style is de-selected
This fixes a 26.8 regression from
commit 4fb31ea85f

Change-Id: Ifbd749eccbf6a5bb5f292100d0d16c6eb9246109
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211926
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-10-07 04:09:57 +02:00
Justin Luth 197863f377 tdf#173510 sw: allow AutoFormat styles to remove table style
You can remove a table style by Ctrl-clicking on the selected one.
(Probably nobody will find this - it probably needs a help tip.)

This was kind-of working before 26.8 (when chosing 'None')
but not as 'nice'.

Then at least it STOPPED applying the style when new changes are made.

I assume that a lot of the work that when into table styles
in 26.8 made it so that with this patch's change,
the existing format is cleared to nothing as the style is removed.

Clearing the existing seems like a good thing to me.

Change-Id: I174b3e8a408995500598937bbb548250c80bc40f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211925
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-10-07 04:09:06 +02:00
Justin Luth a3be6f8c43 tdf#173510 sw: prevent another crash when table style deselected
This fixes a 26.8 regression from
commit 513bfbd476

With the table style deselected (via Ctrl-click),
pressing the OK button caused LibreOffice to crash.

Change-Id: If79d0c0bbd8c1b3f269ebb0b712f39a00b1f4fab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211924
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-10-07 04:08:27 +02:00
Justin Luth f74731de65 tdf#173510 svx: prevent a third crash when table style deselected
This fixes a 26.8 regression from
commit 4fb31ea85f.

It looks like it was a mistake to not include it here in the first place,
but doubly so when a table style is deselected (via Ctrl-click).
In that case, if the user pressed the edit button,
LibreOffice would crash because of an attempted -1 index access.

Change-Id: I98038dad3693fba26d17022bec75bd201340c1cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211923
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-10-07 04:07:44 +02:00
Justin Luth c08511c560 tdf#173510 svx: prevent another crash when table style deselected
This fixes a regression from
commit 4fb31ea85f

When you de-select a table style in Table - AutoFormat Styles,
then the checkboxes below were left enabled despite a -1 index,
so the rename and renew buttons would crash.

Change-Id: I3c9601476f874116e43387ee40e934932a44b311
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211922
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-10-07 04:07:13 +02:00
Justin Luth dc7f772380 tdf#173510 svx: prevent crash when table style deselected
This fixes a 26.8 regression from
commit 4fb31ea85f.

When Table - AutoFormat styles has the style de-selected (via a Ctrl-click),
then SelFormatHdl would call UpdateChecks and crash
when GetData tried to access an index of -1.

Change-Id: I2302436d19ef99584cdb7c4e41738894756e9e8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211921
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-10-07 04:03:01 +02:00
Justin Luth 90a6b78435 tdf#173510 sw: do not default to a table style when inserting one
This fixes a 26.8 regression from
commit 4fb31ea85f.

Over the years we keep battling people who want to add borders
to tables by default. This last time was even worse
since it applies an entire table style,
and table styles simply have never worked well.

So do NOT default to infuriating results.

Note that this depends on the prior patch
to prevent LO from crashing...

Change-Id: I639286ac1f66883f3dd3f41a3d027a75e9ac1d97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211918
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-10-07 01:24:10 +02:00
Justin Luth 7390c517c7 tdf#173510 sw: prevent crash when table style deselected
This fixes a 26.8 regression that can cause LO to crash,
from commit 2f16debb36.

A -1 is possible!
Hold down the Ctrl key to deselect the selected table style.
Since GetData requires a valid index, the -1 crashes the lookup.

The assert was added by Caolan just to silence warnings.
It OUGHT to be possible to have a -1,
so we desperately need to handle it.

One side effect of the -1 is that the preview window
needs to be updated. So that change is included in this patch.
It basically ends up being a partial revert of 2f16debb36.

P.S. I don't know how m_xTAutoFormat would already have a value,
but that has been like that since introduction,
so I decided not to fiddle with it.
But surely you cannot run the OKHdl more than once...

Change-Id: Ieae175072c17b20e79a139b434eae2fed09ca655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211917
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-10-07 01:23:26 +02:00
Andreas Heinisch 9329964052 tdf#108295 - Set the initial focus explicitly to the first input field
Change-Id: Icc16abfb305c457ac08323d8b56366c376e80e41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211893
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-10-06 22:49:35 +02:00
Xisco Fauli c64f9804ac expat: upgrade to 2.9.0
With this new version, the build started to fail with
error: ‘XML_Size XML_GetCurrentColumnNumber(XML_Parser)’ is deprecated: please use XML_GetCurrentColumnNumber64 instead [-Werror=deprecated-declarations]
so we need to check the expat version in case the system expat
is older than 2.9

Also add 0001-fix-XML_GE-is-not-defined-evaluates-to-0-Werror-unde.patch
to fix
error: "XML_GE" is not defined, evaluates to 0 [-Werror=undef]
1087 | # if XML_GE == 1
| ^~~~~~
cc1plus: all warnings being treated as errors

Change-Id: If4f1d652941b7766ed94b65a6eaa018f37c89387
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211867
Tested-by: Jenkins
Tested-by: René Engelhard <rene@debian.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-06 22:29:58 +02:00
Xisco Fauli 4257ff7382 harfbuzz: upgrade to 14.6.0
Downloaded from https://github.com/harfbuzz/harfbuzz/releases/download/14.6.0/harfbuzz-14.6.0.tar.xz

Change-Id: Ifc87857cd35503e432326869cae6b1c2b7a9d3b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211896
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-06 21:19:12 +02:00