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>
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>
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>
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>
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>
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>
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
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
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>
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>
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
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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
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>
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>
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
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>
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>
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>
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>
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>
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