17085 Commits
Author SHA1 Message Date
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
Andrea Gelmini 3bc01f0c99 Fix typos
Change-Id: I3fb0e9e9d2b16195bf9445d01da8b5936c148544
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211770
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-10-03 10:23:57 +02:00
Caolán McNamara e269db95ff sfx2: start ImportFrom from the same link update state as Load
as ConvertFrom and SwDocShell::Load already do for an initial load, so
links are left alone until UpdateLinks decides what to do with them

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ifbc334736988a8a747f83ef4830cf95cb485a148
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13866
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 8d57e690c64fa6e4385e396d115cc5124ffbf34d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211668
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-01 22:41:40 +02:00
Caolán McNamara 2bc4c7ea19 save the document Basic and dialog libraries without the BasicManager
Store the library containers directly. Creating the BasicManager first
loads the libraries only to save them again.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I056cf4d8549ab5b9ecf31072704bfcd70e13f7e6
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13645
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 358ad5b06facfa12061d94586f66cfbd01ffe4d3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211525
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-01 09:02:56 +02:00
Caolán McNamara a1fa358d47 don't create the document BasicManager on save to check module sizes
Creating it loads every Basic library of the document. Only an
existing BasicManager can have loaded the password protected
modules that the size check looks at.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I1a66c4738d9a91cda785f0603c6f4fd6e6549802
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13628
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 35fb01a50f47698e9b059b75c2a3b88699579fac)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211524
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-30 14:41:13 +02:00
Hossein 3cb281d3d0 tdf#173779 Add command label for tooltips with HELP_DEBUG=1
Previously, when setting HELP_DEBUG=1, the tooltips lacked the label
(description) for the commands in extended tip mode.

The problem was that, if the extended help content was empty, then the
ToolBox::RequestHelp() function added appropriate description. But, with
the help debug mode on, the tooltip was no longer empty. It containted
seperator "-------------" and the UNO command.

This patch adds the description when the extra help content is empty and
solves the issue. The result contains mnemonic characters like ~ which
can be suitable for debugging. These characters are removed with the
call to MnemonicGenerator::EraseAllMnemonicChars in ToolBox::RequestHelp
in a normal LibreOffice session without setting HELP_DEBUG.

Keyboard shortcuts are displayed in normal mode, but not in the extended
tips mode. This issue can be later fixed by adding the keyboard shortcut
to the tooltips when HELP_DEBUG=1 is set.

Change-Id: Iead828ece855fa3e712919ef62353dbca9db1d52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211577
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-09-30 09:46:31 +02:00
Caolán McNamara 51744f6265 don't load the document Basic to parse formula names during ODF import
While macros are not yet allowed, a called name is kept as a macro
call if the document has Basic libraries at all.

A cell macro call now decides the macro mode before it loads the
document Basic.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I2f33b51490db8515cd74d5e753bb9a18c5e6a587
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13626
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit d17fd31994d71c28f503bb3cc93471c307756627)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211523
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-30 08:44:12 +02:00
Andreas Heinisch 25d30234d5 tdf#104892 - Rebuild the sidebar at once only on an application switch
Change-Id: Iedf872c53cc8fdfb6300298ce980dafc4a60b719
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211428
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-09-25 17:33:14 +02:00
Xisco Fauli 1e3ace6710 sfx2: fix crash in SfxCommonTemplateDialog_Impl::FamilySelect
Seen in https://crashreport.libreoffice.org/stats/signature/SfxCommonTemplateDialog_Impl::FamilySelect(unsigned%20short,bool)

Change-Id: I3c778270301e9e140ee40a1288813dacf43b1a0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211429
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-24 17:18:47 +02:00
Laurent Balland daadf3e95a tdf#167472 Integrate MediaWiki template for translation
Add the constants needed for the translation
Update mediawiki.ott:
- add title in meta.xml for translation
- remove German language tags to make the template language independant
- simplify Settings.xml
- update Thumbnail.png
- replace fonts with Noto's family fonts
Build mediawiki.ott from XML files like other templates. See
/extras/CustomTarget_templates.mk

Change-Id: I575843003796cb04099f1061f816ba52c658d41d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211247
Tested-by: Jenkins
Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2026-09-23 18:51:43 +02:00
Michael Weghorn 692482b522 sfx2: Pass SfxPrinterController's SfxViewShell by ref
Switch the SSfxViewShell param for the SfxPrinterController
from pointer to reference to make clear it's always non-null.

This allows to drop now superfluous null-checks.

Change-Id: I49862b6eeffbf7db388520e801a50557205631a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211074
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-18 07:55:43 +02:00
Michael Weghorn 52e8ee78b6 sfx2: Use SFX_TITLE_FILENAME constant instead of magic number
This constant is explicitly mentioned in the
SfxObjectShell::GetTitle doc, so use it instead
of a hard-coded 1.

Change-Id: Ifba43b860732c2879086d216a9b166d4dbb3f32d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211072
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-18 07:55:27 +02:00
Michael Weghorn dd26d06b7c sfx2: Return concrete type in SfxObjectShell::GetBaseModel
Instead of returning a reference to the abstract
XModel3 interface, return the more concrete
SfxBaseModel.

Drop some now unnecessary casting/UNO querying in callers.

More simplification to avoid UNO querying elsewhere
will follow in upcoming commits.

Change-Id: I05ad3a4bccfb080ccbee3af956451def3bcc94fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211053
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-17 14:51:31 +02:00
Michael Weghorn a92113ba34 sfx2 devtools: Switch DocumentModelTreeHandler::mxDocument to XModel3
Use the XModel3 interface instead of only the very
basic XInterface base interface for the document
as the object that is passed is known to implement
this more specific interface.

The DevelopmentToolDockingWindow ctor passes the
result of calling SfxObjectShell::GetBaseModel
(which returns XModel3) for the param.

This also prepares for switching the return type
of SfxObjectShell::GetBaseModel to a reference of
the concrete SfxBaseModel in an upcoming commit (without
introducing ambiguity due to multi-inheritance from
XInterface in places using only an XInterface
reference).

Change-Id: I61f531caea266286fe51b5231c13f56e5b9d82b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211050
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-17 14:51:07 +02:00
Michael Weghorn d81664bb1b sfx2: Simplify by dropping intermediate reassignment to local var
Instead of assigning a different value to `nMaxLength`,
simply treat those 2 values for which that was done the
same as SFX_TITLE_FULLNAME right away.

This is equivalent because the value of `nMaxLength`
isn't used any more for anything else afterwards.

Change-Id: I3913c03ee3a14e0f685d7b3a5f898067229a2297
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211040
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 22:28:07 +02:00
Michael Weghorn 1c0a4c9ed7 sfx2: Simplify condition by moving into existing block
Avoid the duplicate check for INetProtocol::File
by moving the check into the existing block in
which the protocol is known to be something else.

Further simplification will follow.

Change-Id: I7c06e475b3518a6d422df41b2fce5f165166a247
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211039
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 22:28:01 +02:00
Michael Weghorn 1f172e053a sfx2: Skip assignment of then unused value
The

    nMaxLength = 32;

path is only reached when `aURL.GetProtocol() == INetProtocol::File`
and the previous value of `nMaxLength` is SFX_TITLE_PICKLIST or
SFX_TITLE_HISTORY.

However, in that case, assigning 32 to that local variable has no
effect, because the following block only compares `nMaxLength`
to specific values which `nMaxLength` is known to not have even
without reassigning a new value:

    if ( aURL.GetProtocol() == INetProtocol::File )
    {
        if ( nMaxLength == SFX_TITLE_FULLNAME )
            return aURL.HasMark() ? INetURLObject( aURL.GetURLNoMark() ).PathToFileName() : aURL.PathToFileName();
        if ( nMaxLength == SFX_TITLE_FILENAME )
            return aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset);
        if ( pImpl->aTitle.isEmpty() )
            pImpl->aTitle = aURL.getBase( INetURLObject::LAST_SEGMENT,
                                         true, INetURLObject::DecodeMechanism::WithCharset );
    }

Therefore, drop the superfluous reassignment altogether.

Furthe simplification will be done in a separate commit.

Change-Id: I468a9c4ce6e885f8a562c68fa6fbce7eff395a87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211038
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 22:27:55 +02:00
Michael Weghorn 4eacf45ece sfx2: Drop 'aTitleMap_Impl' with unused and duplicate entries
The map is only used for the SFX_TITLE_PICKLIST
and SFX_TITLE_HISTORY cases.
That means that the first entry is irrelevant/unused
and for the other two, the same values are assigned.

Simplify that by dropping `aTitleMap_Impl` altogether
and just assigning the relevant values directly.

Change-Id: Ia3039c6337b4f8c8a3d93c67dc9c68ba981ad041
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211037
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 22:27:48 +02:00
Michael Weghorn e6c451d7ef sfx2: Make condition in SfxObjectShell::GetTitle clearer
From include/sfx2/objsh.hxx:

    #define SFX_TITLE_CAPTION  5
    #define SFX_TITLE_PICKLIST 6
    #define SFX_TITLE_HISTORY  7

That means that

    if ( nMaxLength > SFX_TITLE_CAPTION && nMaxLength <= SFX_TITLE_HISTORY )

is met exactly when nMaxLength is one of
SFX_TITLE_PICKLIST or SFX_TITLE_HISTORY.

Explicitly check for that, to make the code
more readable/straight-forward.

This also prepares for further simplification.

Change-Id: Iade2f499597e6a7f97dd84395a2e697460dee47c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211036
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 22:27:42 +02:00
Michael Weghorn 6a023bacb9 Return std::unique_ptr in Application::CreateMessageDialog
The caller of Application::CreateMessageDialog owns the
returned message dialog.

So far, it was returned by a plain weld::MessageDialog*.

Return a unique_ptr instead, to make clear the ownership
semantics. (Also adjust SalInstance::CreateMessageDialog
accordingly, which is called by Application::CreateMessageDialog
and implements the actual logic to create a message dialog.)

Adjust callers where needed.
Most callers were already using a smart pointer for the
returned message dialog anyway.

Change-Id: I7c06bb24b611bd67f5af89800adb13bf22dcc6fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211013
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 10:35:19 +02:00
Andrea Gelmini 4ee0d493d0 Fix typos in code + comments
Change-Id: I66a422f3519dceed4f5e253a2895eb2e0d943662
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210574
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-09-11 02:53:38 +02:00
Justin Luth ecb92a32f3 tdf#107230 dinfdlg: no 'Save preview image' if !GenerateThumbnails
Disable the checkbox to save preview image
if the expert config says thumbnails are not allowed to be generated.

Change-Id: I5c2cceffb3f0ac301814b347ce0d3a6eff0cc79f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210639
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-09-10 15:44:53 +02:00
Justin Luth 96dee50f31 tdf#157087 dinfdlg: recognize when SfxDocumentInfoItem changes
Since SfxDocumentInfoItem didn't compare m_bUseThumbnailSave
in operator==, it didn't notice that putting *pInfoItem
was different from the previous value.

It also isn't checking m_bUseUserData,
but that doesn't seem to matter in the current implementation
so I'll just leave that absent for now.

Change-Id: Ibd1e5b161a92f659c72b235885a7f01fdd9e4115
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210634
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-09-10 02:40:31 +02:00
Caolán McNamara 890f388a78 move isScriptURLAllowed onto SfxObjectShell
it was private to sfx2's eventsupplier.hxx, so nothing outside sfx2
could run the AllowedDocumentEventURLs test

Change-Id: I814a965cafc245eb7b7f2d8fb18a81d1f7b7e50f
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10920
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 4a5b2dd74b4e82b183961ca8f50d80bd485d5359)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210591
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-09 12:59:48 +02:00
Heiko Tietze c3844e912e Resolve tdf#171925 - Remove uno:SendFeedback / SID_SEND_FEEDBACK
Change-Id: I0a65e7a4ba1cd37fb28299c324027b31c41daacf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210340
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-09-02 06:05:11 +02:00
Noel Grandin 7b0729cd8b UpdateAllLinks pParent parameter is always nullptr
Change-Id: I67b9bc9cb235d66ffb4eef1d6a01535664b30bc7
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10464
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 178ec8504f2fe78725c2f9bff78f1db698b8fca3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210286
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-31 15:56:24 +02:00
Andrea Gelmini 73bad15553 Fix typos
Change-Id: Ia92e533b8753709937e87c94ada04a3e3064ea90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210191
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-29 13:34:56 +02:00
Andrea Gelmini 7dcc068124 Fix typos
Change-Id: I170af8cd8bcbc969631ee603f20efcf40b68e517
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210038
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 15:00:22 +02:00
Andrea Gelmini cdca504f29 Fix typos
Change-Id: Ia7dd97cbf467603797cb3d073a2b6fa0251ce7b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210077
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-27 14:10:49 +02:00
Andrea Gelmini dd7fa7563e Fix typos
Change-Id: I9895f3ba33682fa5d2eb040458579679e5a90f8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210076
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 13:58:25 +02:00
Andrea Gelmini 201b68ecfe Fix typos
Change-Id: I3f6e4a97ef61596bcdaf9abb1bcddf2ab0530974

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209798
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:27:44 +02:00
Andrea Gelmini aae006522f Fix typos
Change-Id: I9d41f9ab9cf8d9d547159de79bd7eaebba55491b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209912
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 10:40:57 +02:00
ApurvR20 510f4c48a5 tdf#170270 Replace copy_if by ranges::copy_if
Change-Id: Ifed54b1b00c25b4a74ae8c4b71b0f746ea8a1e1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209535
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-08-23 15:09:34 +02:00
Andrea Gelmini 335726898d Fix typos
Change-Id: Idab619de99649c2fb0a1920844cb07e5ede9691c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209474
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-22 10:25:17 +02:00
Saburo Yoshida fb02e9d1fc tdf#167549 fix:Read Only option does not work
add FILEOPEN_READONLY_VERSION_FILTEROPTIONS
Retained FILEOPEN_READONLY_VERSION just in case.

Change-Id: Ie03ab09bfeea94682461ff0015432f1e1030f101
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207509
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-08-15 14:02:57 +02:00
Heiko Tietze 9956982284 Resolves tdf#128005 - Hide uno:MenuBar on macOS
Command is not working on macOS

Change-Id: Ice4dcee4f149e3220e7bae6a5a64ec09e32eee3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209104
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-08-13 13:04:55 +02:00
Andrea Gelmini 39fbe6e337 Fix typo
Change-Id: Ia1f8e7b920c56229b431ee1990757729d9351bae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208994
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2026-08-04 00:53:21 +02:00
Christopher Sherlock 9a0a7de89e sfx2: make SfxBaseController::dispose() safely idempotent
Jenkins buildbots occasionally fail with a SIGSEGV during UITest
teardown in test_tdf117039_preview_signed_document. The crash is
triggered by a race condition between an asynchronous Print Preview
view-shell closure on the main thread and xDesktop.terminate()
invoked by the Python test harness.

When XFrameImpl::implts_checkSuicide() has its initial frame close
vetoed (e.g., frame is mid-load), it auto-retries once the lock count
drops. This can cause the framework to invoke SfxBaseController::dispose()
a second time on the same controller.

Because SfxBaseController::dispose() lacked a strict idempotency guard,
it would unconditionally re-run disposeAndClear() on its listener
container. Walking already-freed listeners results in a use-after-free
crash inside BaseReference::iquery.

This patch adds an early return if m_pData->m_bDisposing is already
true. This safely intercepts the double-dispose and adds a SAL_WARN
to track when this teardown race is caught.

Change-Id: Ifa68e2f113cad24a05f8b64c19eabec60cdbd0b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208046
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-08-03 16:13:29 +02:00
Jim Raykowski 28312cdf17 Remove 2 repeated lines of code
These were mistakenly added in commit
afee30ce81
'tdf#167949 Allow for independently toggling style filters'

Change-Id: Ia098d7ca95ea3d323d9a5632a09034f1704779d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208979
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2026-08-03 07:50:43 +02:00
Neil Roberts 95959da85b tdf#172199: Don’t skip disabling read-only when already in read-only mode
When a read-only document is saved to a new file using the SaveAs
command it is supposed to become editable. The commit below added a
check whether the document is currently read-only before proceeding to
remove the read-only status. The patch also makes the read-only method
true if the document has restricted fonts, so presumably the intention
was to avoid removing the read-only status in that case. However it
ended up making the condition so that read-only status is only removed
if the document isn’t read-only, which of course doesn’t make sense.

This patch instead extracts the part from IsReadOnly that checks whether
the document has restricted fonts and only checks for that instead.

commit fdd24dabb6
Author: Mike Kaganski <mike.kaganski@collabora.com>
Date:   Mon Aug 11 17:55:27 2025 +0500

    tdf#145967: Initial support for docs with restricted embedded fonts

Change-Id: I7e59bf53e759110a636c398dc8f5af56b1e2da8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208746
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-08-01 13:22:58 +02:00
Michael Weghorn b6c6d25dc2 sfx2: Drop obsolete LibreOfficeKit checks in SfxNotebookBar
The comphelper::LibreOfficeKit::isActive() case in
SfxNotebookBar was only relevant for Collabora Online,
see e.g.

    commit 6bf428d354
    Date:   Sat Nov 4 12:05:16 2023 +0100

        lok: notebookbar: handle multiple sessions

That one isn't using this repo anymore, so drop these
now obsolete checks.

Change-Id: I3d364b17aa77eeb0b416b7de1f8db34bef6e86ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208657
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 23:20:00 +02:00
Michael Weghorn d9606662e5 sfx2: Drop duplicate LOK check in SfxNotebookBar::StateMethod
Since

    commit 8754a75d98
    Date:   Tue Jun 2 14:47:57 2026 +0200

        vcl: drop WeldedTabbedNotebookbar

, the if block that this code is in is only entered for the
`!bIsLOK" case`, so there is no need to check that inside
of the block again.

Drop the duplicate check.

Change-Id: If0f769ca4204b5219be3d4434f04651352410f2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208656
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 23:19:41 +02:00
Michael Weghorn 24ce1d9341 sfx2: Avoid duplicate string concatenation in SfxNotebookBar::StateMethod
Local variable `sNewFile` already holds the string
concatenated from `rUIFile` and `sFile`, so reuse
that one instead of having `aBuf` as another local
variable with the same value.

Make a few local vars const to make clear that
the values are indeed the same and the vars
can't have changed in the meantime.

Change-Id: I8eae7912eae037c94c095886eded2b0fea65df93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208655
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 23:19:33 +02:00
Michael Weghorn 2dbe94054f sfx2: Pass SfxWorkWindow::{Create,Remove}ChildWin_Impl param by ref
This makes clear it's always non-null and therefore
safe to dereference.

Change-Id: I4d371720bab174a5d656da714cf8229ab3e66380
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208390
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-23 23:21:49 +02:00
Michael Weghorn ab163614b2 sfx2: Switch SfxDockingWindow::m_pBindings to reference
... and rename accordingly.
This makes clear it's always non-null.

Change-Id: Idbb24dc0d36a9152d1d638b6e6ee62a00ec9eae0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208388
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-23 23:21:42 +02:00
Michael Weghorn a81cc28ba6 sfx2: Pass SfxDockingWindow's SfxBindings param by ref
With the refactoring from previous commits in place, it's
clear that all callers pass a non-null SfxBindings*
param.
Switch the param to a reference, to make that clear
and prepare for further refactoring.

Change-Id: Id9f1487dba4b84860f9afa52ff9ffb4dd7b1d2c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208387
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-23 23:21:34 +02:00
Michael Weghorn 552ea86469 sfx2: Pass DevelopmentToolDockingWindow's SfxBindings param by ref
Change-Id: Ie6476b0bbe99612ce544b884b51c222a3b57e25f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208377
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-23 15:39:23 +02:00
Michael Weghorn bfbef60178 sfx2: Pass SfxPartDockWnd_Impl's SfxBindings param by ref
Change-Id: I14fc8f5ed5d09e63e50b717e0f019d15c6bfe6e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208375
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-23 15:39:08 +02:00
Michael Weghorn 0c17eeb856 sfx2: Switch SidebarDockingWindow's SfxBindings param to ref
This also allows dropping a check/assert that it's non-null.

Change-Id: I866c8edf3df1b38469fdb13c7146a0417d69d076
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208374
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-23 15:39:00 +02:00
Michael Weghorn 08d5c60a02 sfx2: Pass SfxDockingWindow::Initialize param by ref
With refactoring from previous commits in place, it's
now clear that all callers pass a non-null
SfxChildWinInfo*. Pass by reference instead to make
that clear, which also allows to drop some null
checks.

Change-Id: I39bfe179c68afecf9b7aa209feb69d33e57e5388
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208371
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-23 15:38:45 +02:00