Commit Graph
4007 Commits
Author SHA1 Message Date
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
Michael Weghorn 675d216886 Use existing weld::TreeView::iter_string typedef
Use the existing typedef instead of having multiple
versions that are all the same.

Change-Id: I7bc99a641ce5e7aa8237968b8b88fa4835917cd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204288
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-26 18:07:59 +02:00
Bogdan Buzea f7e617b0a9 tdf#154368 Status bar - Inconsistent position for Document modified
in basctl/uiconfig/basicide/statusbar

Change-Id: Ic8b97c6fd7d433010f2c7efbab4cd9e5738b1142
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203880
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-04-20 17:39:30 +02:00
Julien Nabet a22ace7174 Related tdf#164685: Cleanup class SfxItemSetFixed (basctl to reportdesign)
Change-Id: If8c312cb5da1c5a35a4768a601edd853e2357530
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203890
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-04-18 16:28:01 +02:00
Michael Weghorn 03d5d803c4 weld: Switch TreeView selection changed signal param to ItemView
Switch the param for the signal and handlers used when
the selection in a weld::TreeView changes from weld::TreeView&
to the base class, weld::ItemView&.

This is in preparation of moving the logic to the weld::ItemView
base class in an upcoming commit.

Handler implementations that require a weld::TreeView
instance can use the one that the signal is connected
to, e.g. use the class member directly inside of the
implementation instead of using the param (as is done
in most of the places anyway).

Change-Id: I0bbf8fe1dbd95906a5224155d48d832bcd144532
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203366
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-10 06:36:08 +02:00
Michael Weghorn 8ff8ad952e weld: Rename row activation related TreeView members to match IconView
Rename methods and field related to signalling activation
of a weld::TreeView row to use the same names as the equivalent
ones for signalling activation of an entry in weld::IconView:

* weld::TreeView::m_aRowActivatedHdl -> weld::TreeView::m_aItemActivatedHdl
* weld::TreeView::signal_row_activated -> weld::TreeView::signal_item_activated
* weld::TreeView::connect_row_activated -> weld::TreeView::connect_item_activated

This is in preparation of deduplicating the weld::TreeView
and weld::IconView implementations for these by moving them
to the common weld::ItemView base class in an upcoming commit.

Change-Id: I4ca4dec1295c57cea574b68fd41b89c12144c4f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203350
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-10 06:29:43 +02:00
shlok3640 e41f1a246f tdf#126389 basctl:replace generic new/open buttons with macro tools
Change-Id: I4106662d027daaa6e69b5f62eb7073f3df58120a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203214
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-04-09 14:37:49 +02:00
Michael Weghorn 11789e47ac weld: Pass activated row in TreeView::signal_row_activated
This is basically the weld::TreeView version of earlier
commit

        Change-Id: I8ca62ac32108f01e2055d5ef9301de22eb5b1931
        Author: Michael Weghorn <m.weghorn@posteo.de>
        Date:   Wed Apr 8 12:35:25 2026 +0200

            weld: Pass activated item in IconView::signal_item_activated

applying an equivalent change for weld::IconView instead
of weld::TreeView. See that commit for more details/background.

For weld::TreeView, the weld::TreeIter refers to
a full row (and columns are handled separately
by a column index in the weld::TreeView API).

As for the above commit:
Initially, leave the logic of the existing signal handlers/callbackes
(in dialog implementations) unchanged. At least some of them
will be simplified in upcoming commits to use the
newly passed weld::TreeIter param directly instead of
determining the current/activated row a different
way.

Change-Id: Ie6a962702d4f7f069b2f7b77a22a78722b2a6408
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203331
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-09 10:21:45 +02:00
Michael Weghorn a5816638ad basctl: Use TreeView member instead of param in TreeView hdl
Use ObjectBrowser::m_xRightMembersView  directly instead of
the weld::TreeView& param passed to the handler.
That is the weld::TreeView that the handler is connected to.

This also prepares for adjusting weld::TreeView::m_aRowActivatedHdl
to pass the weld::TreeIter of the activated entry instead of just
the TreeView itself.

Change-Id: I0f35df5b6af80910f2d6cce7e606ba82c7eeb8b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203292
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-04-09 10:16:56 +02:00
Julien Nabet 808f613616 Fix GtkTreeView treelist could use GtkListStore for better performance
Change-Id: I6fd850380f1d8f85c8824b94bd98d473d7f48f1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203253
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-04-06 12:28:42 +02:00