4016 Commits
Author SHA1 Message Date
Armin Le Grand (collabora) 5519a3d407 Correct StyleSheet handling when cloning to different Model II
Until now the 'local' StyleSheet got set, but that may
not be the same as the original. It was/gets identified just
by searching by name and type, not comparing content.

What to do? We could...

(a) the Style-Friendly way:
 - check if StyleSheet is identical
  - if not, create a new in-between StyleSheet hosting missing Items
  - if yes, use, done.

(b) the pragmatic/practical way:
 - Just hard-attribute the Items that are detected as different
   similar to what BurnInStyleSheetAttributes does/did, but only
   for a view differing Items

(b) is the most simple for now, but will lead to more hard
attributes. The other possibilities will be better in the
long term. For now, I will use (b).

Note that there are more cases in that VERY complex and grown
stuff emerging from SdDrawDocument::PasteBookmarkAsPage. More
things will need to be fixed, see this as a 1st step.

Needed to adapt postProcessAfterCloneToDifferentModel due to
UT testTdf96206 failing, see comment there for details.

That 1st implementation showed weaknesses with those Items
critical and only on MasterPages, so decided to give up on
that and implement ContentCompare to SdPage::Equals. That
was easier than thought: No parameter needed, only used by
InsertBookmarkAsPage_FindDuplicateLayouts::operator(). Thus,
SdPage::Equals needs no change, just SdrObject::Equals.

Due to still problems with Items corrected in Objects on
MasterPages I will for now exclude this.

Could now isolate remaining problems, these are defaults
and/or PresObj things on MasterPages. Important is that I can
completely correct all Items for all Objects in
postProcessAfterCloneToDifferentModel. I can react to these
false-positives in the ContentCompare in SdrObject::Equals.

Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Change-Id: I10e17c8d6a893dbe92ab716182f07bafce1f3284
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6595
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
(cherry picked from commit 92ffaeac04c5c8586006b026f29ce12fba3674f1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211729
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-05 08:52:54 +02:00
Michael Weghorn 371bfd404f tdf#173273 basctl: Pass parent iter again in SbTreeListBox::ImpFindEntry
Before

    commit 4887919802
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jan 1 13:02:42 2026 +0100

        basctl: Return std::unique_ptr in SbTreeListBox::ImpFindEntry

, SbTreeListBox::ImpFindEntry was using an in/out weld::TreeIter&
param that passed the parent.

The above commit changed the method to return the
result instead of using the out param, but missed that
the param was also used as an input parameter.

Restore the input parameter, but keep returning the
result.

The above commit also caused weld::TreeView::iter_children
to be caused with an invalid iter, which in combination with

    commit 9d055f5261
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Sat Jan 10 21:46:57 2026 +0100

        tdf#130857 weld: Filter dummy entries in base weld::TreeView::iter_children

would trigger a nullptr dereference for the vcl (SalInstanceTreeView)
implementation.

Making sure to pass a valid iter fixes that.

Also add an assert in SalInstanceTreeView::get_children_on_demand
to check that the iter that gets passed is actually valid which
would have triggered.

Backtrace of the crash seen for the tdf#173273 scenario
without this commit in place:

    1 __gnu_cxx::__normal_iterator<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>const *, std::__cxx1998::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>>::__normal_iterator stl_iterator.h 1059 0x7fb3db75e001
    2 std::__cxx1998::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>::begin stl_vector.h 999 0x7fb3db75e001
    3 std::__cxx1998::vector<std::unique_ptr<SvTreeListEntry, std::default_delete<SvTreeListEntry>>>::empty stl_vector.h 1214 0x7fb3db75cd76
    4 SvTreeListEntry::HasChildren treelistentry.cxx 72 0x7fb3db7879ad
    5 SalInstanceTreeView::GetPlaceHolderChild salvtables.cxx 3550 0x7fb3dba702d1
    6 SalInstanceTreeView::get_children_on_demand salvtables.cxx 4436 0x7fb3dba76ec1
    7 weld::TreeView::iter_children TreeView.cxx 165 0x7fb3dbed1735
    8 basctl::SbTreeListBox::ImpFindEntry bastype2.cxx 551 0x7fb38b4c0fe2
    9 basctl::SbTreeListBox::SetCurrentEntry bastype2.cxx 830 0x7fb38b4c009a
    10 basctl::SbTreeListBox::UpdateEntries bastype2.cxx 638 0x7fb38b4c0eba
    11 basctl::SbTreeListBox::onDocumentCreated bastype2.cxx 563 0x7fb38b4c11e9
    12 basctl::DocumentEventNotifier::Impl::documentEventOccured doceventnotifier.cxx 164 0x7fb38b4f0a39
    13 comphelper::OInterfaceContainerHelper4<com::sun::star::document::XDocumentEventListener>::NotifySingleListener<com::sun::star::document::DocumentEvent>::operator() interfacecontainer4.hxx 322 0x7fb3e1ef39d7
    14 comphelper::OInterfaceContainerHelper4<com::sun::star::document::XDocumentEventListener>::forEach<comphelper::OInterfaceContainerHelper4<com::sun::star::document::XDocumentEventListener>::NotifySingleListener<com::sun::star::document::DocumentEvent>, (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener(com::sun::star::document::DocumentEvent const&)::$_1>(std::unique_lock<std::mutex>&, comphelper::OInterfaceContainerHelper4<com::sun::star::document::XDocumentEventListener>::NotifySingleListener<com::sun::star::document::DocumentEvent>const&, (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener(com::sun::star::document::DocumentEvent const&)::$_1 const&) const interfacecontainer4.hxx 387 0x7fb3e1eefdd2
    15 comphelper::OInterfaceContainerHelper4<com::sun::star::document::XDocumentEventListener>::notifyEach<com::sun::star::document::DocumentEvent, (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener(com::sun::star::document::DocumentEvent const&)::$_1>(std::unique_lock<std::mutex>&, void (com::sun::star::document::XDocumentEventListener:: *)(com::sun::star::document::DocumentEvent const&), com::sun::star::document::DocumentEvent const&, (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener(com::sun::star::document::DocumentEvent const&)::$_1 const&) const interfacecontainer4.hxx 423 0x7fb3e1eef6e4
    16 (anonymous namespace)::SfxGlobalEvents_Impl::implts_notifyListener globalevents.cxx 487 0x7fb3e1eef505
    17 (anonymous namespace)::SfxGlobalEvents_Impl::documentEventOccured globalevents.cxx 226 0x7fb3e1eece4f
    18 (anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent>::operator() sfxbasemodel.cxx 3338 0x7fb3e1e79127
    19 comphelper::OInterfaceContainerHelper3<com::sun::star::document::XDocumentEventListener>::forEach<(anonymous namespace)::NotifySingleListenerIgnoreRE<com::sun::star::document::XDocumentEventListener, com::sun::star::document::DocumentEvent>> interfacecontainer3.hxx 278 0x7fb3e1e6ab15
    20 SfxBaseModel::postEvent_Impl sfxbasemodel.cxx 3372 0x7fb3e1e6a263
    21 SfxBaseModel::Notify sfxbasemodel.cxx 3005 0x7fb3e1e6976c
    22 SfxBroadcaster::Broadcast SfxBroadcaster.cxx 43 0x7fb3e0f3d0bc
    23 (anonymous namespace)::SfxEventAsyncer_Impl::IdleHdl appcfg.cxx 109 0x7fb3e1848ce9
    24 (anonymous namespace)::SfxEventAsyncer_Impl::LinkStubIdleHdl appcfg.cxx 102 0x7fb3e184885d
    25 Link<Timer *, void>::Call link.hxx 105 0x7fb3dbb3bda1
    26 Timer::Invoke timer.cxx 75 0x7fb3dbb3bc0c
    27 Scheduler::CallbackTaskScheduling scheduler.cxx 615 0x7fb3dbae368d
    28 SalTimer::CallCallback saltimer.hxx 53 0x7fb3d2709822
    29 X11SalData::Timeout saldata.cxx 532 0x7fb3d270801f
    30 SalXLib::CheckTimeout saldata.cxx 616 0x7fb3d270853e
    31 SalXLib::Yield saldata.cxx 697 0x7fb3d2708c1e
    32 X11SalInstance::DoYield salinst.cxx 173 0x7fb3d27259cd
    33 InnerYield svapp.cxx 388 0x7fb3dbb0e996
    34 Application::Yield svapp.cxx 501 0x7fb3dbb0e21f
    35 Application::Execute svapp.cxx 363 0x7fb3dbb0e005
    36 desktop::Desktop::Main app.cxx 1679 0x7fb3e5b1de65
    37 ImplSVMainRun svmain.cxx 234 0x7fb3dbb38bfc
    38 SalInstance::SVMainRun salinst.hxx 108 0x7fb3d2726761
    39 ImplSVMain svmain.cxx 221 0x7fb3dbb38122
    40 SVMain svmain.cxx 252 0x7fb3dbb39cb9
    41 soffice_main sofficemain.cxx 122 0x7fb3e5b979aa
    42 sal_main main.c 51 0x55fc90ad69fd
    43 main main.c 49 0x55fc90ad69d7

Change-Id: I3b282533ec43fdd37bfdf8739ff51d25197bf8be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211603
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-30 13:45:05 +02:00
jan 95e804b637 tdf#171892:Icons in menus only on most important items
This removes icons for many menu entries to only have icons
for the most important commands, as suggested in the design guidelines
(See: https://wiki.documentfoundation.org/Design/Guidelines/MenuBar)

Change-Id: I687aa79333ab9f391e8b51c4900a348622f7ab3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210342
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-09-15 10:59:51 +02:00
Andrea Gelmini 6a1480506d Fix typos
Change-Id: I9d99aba8500ea31628e4b883974bb60181407647
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210562
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 22:08:01 +02:00
Noel Grandin 1b276f9265 merge the outliner ParagraphData information into the regular EditTextObject
as part of the process of merging the Outliner code into the normal EditEngine paths.

So instead of keeping a bunch of information "on the side" and then having to merge information
from multiple sources, it all lives where it logically belongs.

Also take the chance to rename the depth/getdepth/setdepth
fields and methods to NumberingDepth, which makes the purpose
more obvious.

Change-Id: I314673ee1b9efa14f178ac34a122995a554cd788
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10551
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 284bbe0af12b96844976f30bb35ade3a327ea76d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210503
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-05 00:09:20 +02:00
Michael Weghorn 753c9c6689 a11y: Drop unused XServiceInfo includes
basctl/source/basicide/baside3.cxx actually needs the
include and now no longer gets it transitively, so
add the include there directly.

Change-Id: Iff9eca9f7a8c9585522a783f63f77a5ab1555333
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210409
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-03 09:22:50 +02:00
Michael Weghorn 939a77b14c [API CHANGE] a11y: Drop com.sun.star.awt.AccessibleWindow
Drop the unpublished service
"com.sun.star.awt.AccessibleWindow"
because it's unused. (The IDL file only documents some
internal implementation details of the a11y classes
implementing the service.)

Change-Id: I958aeb6c6baaa48e2e02ab170b17db5c3510379b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210406
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-03 09:22:26 +02:00
Michael Weghorn b0a27d7958 basctl a11y: Use operator!= to compare awt::Rectangle
... instead of manually comparing all members.

Change-Id: I5af07860ebcf0c21d2acc380a0a779340a252a10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210449
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-03 09:17:23 +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
Andrea Gelmini 5e260045bc Fix typos in code and comments
Change-Id: I47802ff4d8e27e738fde2b5ccb92a7765332eb51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210151
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-29 16:19:03 +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 cf0a1268e3 Fix typos
Change-Id: Ib8964b0b98005da480826cfdd2c64bd68c88575c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209460
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-22 10:15:11 +02:00
Neil Roberts f213860e49 basic/sbxmod: Combine two impls of CutLines into helper method
Previously there were two copies of a function called CutLines which
were used to remove a method from a string containing BASIC source code.
These have both been replaced with a helper method on SbModule that
returns the source without the given method.

Change-Id: I70c4a4ffe40085bd090ee6823c46154c057468e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207062
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-07-22 15:59:07 +02:00
Neil Roberts af830cc577 Move searchEOL from basicide to a general basic utility
Moves the searchEOL function from basicide to a general purpose utility
function in the basic module. This also adds some unit tests for it.

Change-Id: I8f446990654415a994b7964dd62706f3204d817a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207060
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-07-22 15:58:49 +02:00
Justin Luth 75276a62d8 tdf#162441 basctl: ask SEARCHALLMODULES if !Current Selection only
This fixes a regression from 6.1.

This qualification was there since initial import,
but was lost on the transition to weld::MessageDialog.

Change-Id: I022aa00a99e090bbbe4b17a57a043046f7c6a245
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208401
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-07-21 23:01:50 +02:00
Justin Luth 78f371e500 NFC tdf#111843 SfxViewShell: HasSelection(bText=true), remove =true
No Functional Change intended

This function is used very specifically for only UI stuff.
It is very different from any regular stuff.

So help to differentiate it by requiring the bool value.

To make sure I got all of them, I tested by requiring
a bogus OUString variable as well - make sure it compiled.

Change-Id: I4879427a806324d9fb9c033ef6b66ad24ba0bd54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208234
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-07-21 11:22:20 +02:00
Michael Weghorn 60ca33c3f5 basctl: Drop MacroExitCode enum class in favor of regular dialog ret vals
The MacroChooser dialog is only run from the ChooseMacro
function.

As mentioned in previous commit

    Change-Id: I49b6702c0083014d10c16b6917284cc8cc23d283
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Jul 14 08:53:17 2026 +0200

        bactl: Flatten ChooseMacro

, that one only cares about MacroExitCode::Macro_OkRun
and returns early for all other dialog return codes.

Drop the MacroExitCode enum class and use a regular
int return values of RET_OK instead of MacroExitCode::Macro_OkRun
and RET_CLOSE for the others directly instead of casting
back and forth between int and enum class values.

The dialog can be triggered like this:

* start Writer
* "Tools" -> "Macros" -> "Run Macro..."

Change-Id: I49b6702c0083014d10c16b6917284cc8cc23d283
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208061
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-07-18 14:31:09 +02:00
Michael Weghorn 9cc83fde77 basctl: Drop unused MacroExitCode::Macro_Edit
Change-Id: Icd04422b5ee453604221325f200dfb38c1dd8051
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208060
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-18 14:30:27 +02:00
Michael Weghorn 7baaa1481a basctl: Merge nested "else { if (...) { ...} else { ...} }"
Move check whether button is the `m_xDelButton` and the
else branch to the same level as the checks for the
other buttons. This gets rid of one extra indentation
level and seems logically more straightforward/consistent
to me as well.

(`git show --ignore-space-change` can help to see the
"actual" change more easily.)

Change-Id: I9e14f76c02a7f7487abd4887ed604d85395e1fb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208059
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-18 14:30:19 +02:00
Michael Weghorn 86e1481679 basctl: Flatten ChooseMacro
For all dialog return values other than
MacroExitCode::Macro_OkRun, the method only
returns an empty string.

Do that right away and drop the switch/case,
which gets rid of a few extra indentation levels.

(`git show --ignore-space` can be used to see the
"actual changes" more easily.)

Change-Id: I3ac919f310b204db3336cd88a5ba269805abe31e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208058
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-18 14:30:02 +02:00
Michael Weghorn 312aac710b Move SvtViewOptions from unotools to svtools
The SvtViewOptions class is used to store the state
of windows/dialogs.

So far, SvtViewOptions::SetWindowState and
SvtViewOptions::GetWindowState are string-based
and the callers are responsible for (de)serializing
the vcl::WindowData to/from string.

This will be changed to become the responsibility
of SvtViewOptions in an upcoming commit.

Since unotools is below vcl in the module
dependency chain, it cannot make use of vcl,
i.e. vcl::WindowData couldn't be used there.

Therefore, move SvtViewOptions from unotools
to svtools, which is above vcl in the module
dependencies.
(svtools/README.md summarizes the purpose of the
module as "Tools on the Top of VCL", which seems
an appropriate place for helper code to manage
the state/options for dialogs, tab pages,...)

Change-Id: If849224c35c7ac895659ddb7c17e6d17061d61a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208124
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-15 14:45:41 +02:00
Neil Roberts 785bff8f88 objectbrowser: Use locale-dependant decimal separator
It now uses LocaleDataWrapper::getNum to format the number of seconds so
that the right decimal separator can be used.

Change-Id: Ic433e6b9f91619bf32526befce00006a6021f79e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206349
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-07-12 10:38:34 +02:00
Neil Roberts 7f8a06f4d2 objectbrowser: Add a translator comment to “Returns”
I noticed that the French translation misunderstood it so maybe it needs
a comment.

Change-Id: I84e41252a7cf6607d29faadf2a498fe4cc1fb6e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206348
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-07-12 10:38:11 +02:00
Neil Roberts e0620bd443 objectbrowser: Use pluralisable strings in the description pane
This avoids having ungrammatical text like “1 items”.

Change-Id: I292f398bcfd2375f7b838e99230f6493840ccedb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206347
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-07-12 10:38:02 +02:00
Michael Weghorn f1f6a505a0 weld: Pass weld::TextWidget& in text change callback/handler
Switch the weld::Entry and weld::TextView handlers
that are called when the text changes due to user
interaction to pass a weld::TextWidget& param
instead of a weld::Entry& and weld::TextView&
one respectively.
Adjust related methods across the code base accordingly.

This unifies the behavior for both of these
weld::TextWidget subclasses and prepares for
deduplicating the logic and moving it to the
common base class in an upcoming commit.

That will also ensure they stay in sync.
(Change also motivated by the fact that their behavior was
differing before

    Change-Id: I03d2a13cd84d53d806eb9e363f49c4b6be28d938
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jul 9 13:08:58 2026 +0200

        tdf#130857 weld: Don't signal about programmatic TextView text change
.)

Change-Id: I5572fc88caf577fae9a23a39f1ec4f2179935a99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-10 18:17:27 +02:00
Michael Weghorn 35e2a8f8c6 tdf#130857 weld: Add default param for TreeView::enable_toggle_buttons
Most callers use weld::ColumnToggleType::Check
and only a few use weld::ColumnToggleType::Radio.

Add a default param of weld::ColumnToggleType::Check
and drop the explicit param for callers passing this.

This prepares for moving setting the toggle button
type to a separate method in an upcoming commit to
clarify what it actually does.
(It doesn't only set the toggle button type of the
special "expander toggle column" enabled by
weld::TreeView::enable_toggle_buttons, but of *all*
toggle buttons used in any of the cells of the
whole table.)

Change-Id: I65edb7cd5f79c59222c1c415f118b8adbdec0271
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207249
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-25 18:23:42 +02:00
Neil Roberts 00bd4b4aef basctl: Make QueryDelMacro a DLL public function
That way in can be used by the Macro Manager in a future patch.

Change-Id: Ifafcc360fa5ad8319b25593ca3b170e96d4ac8e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207056
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-06-24 14:36:41 +02:00
Neil Roberts bc67811c52 basctl: Move DeleteMacro to a common helper function
Moves the DeleteMacro method from MacroChooser to a common helper
function so that it can later be used in other dialogs too.

Change-Id: Ibc909f0411de9db54f4aed5e1c71659c017287aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207055
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-06-24 14:36:33 +02:00
Neil Roberts ff9899db6e Move string for macro security denied from basctl to sfx2
That way it can be used by other modules in later patches.

Change-Id: I5ea8ab0d835276e68de761d7e9b8924753388e6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207213
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-06-24 14:28:25 +02:00
Neil Roberts 8fa45b9f69 Related tdf#171441 idedataprovider: Lazily load libraries on demand
Instead of loading all of the scripting libraries when IdeDataProvider
is initialised, it now only loads them when the children are requested.
This is probably a good idea for efficiency anyway, but it also
partially fixes the problem described in tdf#171441. Loading a library
ends up making the members of the library accessible in the global
namespace of a running script. That meant that just openining the macro
editor would cause the IdeDataProvider to make all members of all
libraries available to the current script. If we lazily load them then
they are instead only available if the object browser is manipulated.
This is still a problem, but it’s no worse than the existing object
catalog and macro dialogs which also have the same problem (see comments
4&5 of the bug).

Change-Id: I43ccd06cee45e53e6575f768fa24fe4befeefc20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206473
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-06-22 10:24:38 +02:00
Michael Weghorn 6dabde0a9b tdf#130857 basicide: Merge checkbox/text cols in "Import Libraries" dlg
This is similar to

    Change-Id: I51302dbd96f3e8b23fcbd96855d01b489acd2c6b
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Jun 19 09:21:36 2026 +0200

        tdf#130857 sc: Merge checkbox and text column in "Protect Sheet" dialog

, but for a different dialog. See the above-mentioned
commit for more details/background.

The dialog that this commit here adjusts can
be triggered like this:

* start Writer
* "Tools" -> "Macros" -> "Organize Macros" -> "Basic..."
* select the current document in the "Macros From" section
* press "New" and confirm name using the "OK" button
* close Basic IDE and save the document
* create a new document
* "Tools" -> "Macros" -> "Organize Macros" -> "Basic..."
* press the "Organizer..." button
* switch to the "Libraries" tab
* press the "Import..." button
* select the previously saved file in the file dialog

This case was found by running the ui-rules-enforcer
with upcoming commit

    Change-Id: Ib596c39698d308e18e9ede27c239cd44e43863a9
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Jun 19 08:58:59 2026 +0200

        tdf#130857 ui-rules-enforcer: Check that special toggle renderer not by itself

in place.

Change-Id: Ibf4c4d3e89d71008bbef1c0bee5d7912642ac58e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207034
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-22 07:49:01 +02:00
Michael Weghorn 796ebea78c basctl: Resave importlibdialog.ui with glade 3.40
The dialog can be triggered like this:

* start Writer
* "Tools" -> "Macros" -> "Organize Macros" -> "Basic..."
* select the current document in the "Macros From" section
* press "New" and confirm name using the "OK" button
* close Basic IDE and save the document
* create a new document
* "Tools" -> "Macros" -> "Organize Macros" -> "Basic..."
* press the "Organizer..." button
* switch to the "Libraries" tab
* press the "Import..." button
* select the previously saved file in the file dialog

Change-Id: I09b86524a6d42399d4216c7bf27cf54db16dd926
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207032
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-22 07:48:45 +02:00
Michael Weghorn b3e34336c4 tdf#130857 basicide: Merge checkbox and text column in "Add UI Lang" dialog
This is similar to

    Change-Id: I51302dbd96f3e8b23fcbd96855d01b489acd2c6b
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Jun 19 09:21:36 2026 +0200

        tdf#130857 sc: Merge checkbox and text column in "Protect Sheet" dialog

, but for a different dialog. See the above-mentioned
commit for more details/background.

The dialog that this commit here adjusts can
be triggered like this:

* start Writer
* "Tools" -> "Macros" -> "Edit Macros..."
* "Dialog" -> "Manage Language"
* press the "Add" button
* select a language, press "OK"
* press the "Add" button again
  to bring up the dialog, now also showing
  checkboxes for the entries

This case was found by running the ui-rules-enforcer
with upcoming commit

    Change-Id: Ib596c39698d308e18e9ede27c239cd44e43863a9
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Jun 19 08:58:59 2026 +0200

        tdf#130857 ui-rules-enforcer: Check that special toggle renderer not by itself

in place.

Change-Id: I391103bb4b5aafbe2041060d7e203026279a562f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207031
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-22 07:48:36 +02:00
Michael Weghorn dd79eebe34 Commit result of running ui-rules-enforcer
Commit changes automatically done when running
the the UI rules enforcer:

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

Change-Id: I9c9bed95fc30fb1ba66056fc2508d96fa0d778f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206972
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 22:23:37 +02:00
Neil Roberts 14c0e370dc objectbrowser: Don’t mark Basic and IDL keywords as translatable
These strings are being used to build up a declaration for either a
Basic subroutine or a method from an IDL file. In the English original
they are the actual keywords used by the code. If they get translated it
is confusing because it looks like a new programming language. For
example in French the acess2base.Module.ProcOfLine function looks like
this in the description pane:

ProcOfLine(Facultatif pvLine Comme Variant,
           Facultatif pvProcType Comme Variant) Comme String

The “Facultatif” and “Comme” are translations of the “Optional” and “As”
keywords.

This patch just replaces them with string literals.

Change-Id: Icb427ebaa587f99ee2ce81a2e6997787a535001e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206335
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-06-11 10:26:46 +02:00
Michael Weghorn f26084217a weld: Move weld::Button to own header/Rename weld.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.

By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.

By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)

Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.

Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-05 07:58:07 +02:00
Michael Weghorn 8b5a46a0e0 weld: Move weld::toId and weld::fromId to weldutils.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses,
as well as a few helpers.

By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when anything in weld.hxx
changes.

Move the weld::toId and weld::fromId helpers from
weld.hxx to weldutils.hxx, in preparation of getting
rid of weld.hxx altogether in an upcomcing commit.

Change-Id: I408fe20a74ff104cbfe07bde3105317a1922ff61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-04 14:37:13 +02:00
Michael Weghorn 8f7cf9c32c weld: Move weld::CheckButton to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Add missing includes/forward declarations in places
previously depending on transitive includes that
are now dropped.

Change-Id: I3215b358e0fa45ffce08756218c386e1a4d7ebc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205928
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-04 08:39:19 +02:00
Michael Weghorn da1c7a5459 weld: Move weld::RadioButton to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I34876c5bef75e30e758029b0fe5afeecc92d509d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205903
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-03 23:19:54 +02:00
Michael Weghorn 911a89ddeb weld: Move weld::WaitObject to own header/source
Move the class out of weld.hxx into its own header and
source file, in order to make it easier to keep an overview
and to avoid having to recompile ~all UI code when the class
is modified.

Change-Id: I91bae842e5b18a83db45de12150c21f75e537fb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205900
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-03 23:19:30 +02:00
Michael Weghorn 243bb112ec weld: Move weld::Container to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Adjust includes in files that were implicitly depending
on transitive includes that are no longer present because
the more specific include/weld/Container.hxx is included
further down now instead of include/weld/weld.hxx.

Change-Id: I04e6bb72ce446b746dfdf88b45c7df9d0ccda473
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205899
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-03 23:19:22 +02:00
Michael Weghorn 336f70f966 weld: Move weld::Label to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: Ide86f35543468a88288a068cc9f89eaf381ac52f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205763
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-27 22:24:37 +02:00
Michael Weghorn 1a3d6d5cdf weld: Move weld::Frame to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: Ia7bc570fcd463d9adcbcdad070250cec5bc3b949
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205488
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-22 21:56:45 +02:00
Xisco Fauli fb28678005 loplugin:unusedmethods
Change-Id: If3dae53e3cf16df2d0c505a898138dfa6fe6c0f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205442
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-22 09:32:38 +02:00
Michael Weghorn 3f1fb9d4b0 weld: Move weld::Window to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: If7cb4403f1861c465f44a1cae4065b0bf8dfad48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205323
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-19 09:10:43 +02:00
Muhammad Naeem 71aa55e61a tdf#145538: Use range-based loops for palette and range fills
Replace index-only loops where we copy from containers into UNO or
diagram structures using an explicit sequence index / output pointer:

- BasicColorConfig: vector of property keys into Sequence OUString.
- ChartColorScheme: palette colors into uno color sequence buffer.
- RangeHighlighter: HighlightedRange list from OUString vectors.

Verified: make -j4 basctl chart2
Change-Id: If4a4a8747fadc772329d3ccc3f03778406b140ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204659
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-05-06 18:15:36 +02:00
Asad Tauqeer 3bd54de6c8 tdf#145538 use range-based for in baside2b.cxx
BreakPointList lacked begin()/end(), so add forwarders to its
underlying std::vector. Then convert two index-based loops in
BreakPointWindow::Paint and BreakPointWindow::FindBreakPoint
to use range-based for.

Change-Id: I1b6426913c76607a3300c6b4e435a281026e6a34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204481
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-04-30 09:56:58 +02:00
Xisco Fauli cfd3309a5d loplugin:unusedmethods
Check existing ones that can be removed

Change-Id: I6ee6fc1772c620ac5d12fea915681b094b7c3bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204583
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 08:54:45 +02:00
Michael Weghorn 6ea49cb1bd weld: Pass col index in TreeView::signal_editing_done
In addition to the weld::TreeIter and the new text,
also pass the column index of the cell that was edited
in the callback that gets called when a cell was edited.

This will allow callbacks to take that into account as
well when deciding whether to accept or reject the
editor operation.

One case that will make use of this in an upcoming
commit is Math's MatrixCreatorDialog, which currently
implements its own logic based on mouse clicks to
(try to) identify the column that is edited.
That is relatively complicated and won't work in the
case of keyboard-only interaction.

For the vcl implementation, this makes use of the
SvLBoxItem available in the callback since

    Change-Id: Iad2866d8fcc710d82f4f0dc0661a3b1f0bebaeab
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Apr 24 13:17:15 2026 +0200

        vcl: Also pass the item in treeview callback when entry edited

to retrieve the column index of the modified
item/cell.

For GTK, GtkInstanceTreeView::signal_cell_toggled
already contains similar logic.

For Qt, the column index is available via the
QModelIndex.

Change-Id: I36fa296d72ef2ff853da03037151cc060634d2a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204305
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-04-26 18:09:35 +02:00
Michael Weghorn 4378a8c953 basctl: Use existing weld::TreeView::iter_string typedef
Change-Id: I99a2e8b4bd0faf7804e906a07e1cd78de0bec5cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204304
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-26 18:09:27 +02:00