Commit Graph
1976 Commits
Author SHA1 Message Date
Michael Weghorn c8c367b31a Use vcl::WindowData instead of string for window state in more places
vcl::WindowData is used to manage/store various state
information for windows. It can be (de)serialized to/from string.

So far, both the weld::Window API to get/set window state
as well as the SvtViewOptions API were based on the string
representation.

Switch those and various related places to using vcl::WindowData
instead to use a stronger/more specific type than just OUString
in various places across the code base.

Do the string (de)serialization where necessary, but otherwise
prefer to use vcl::WindowData directly.

Calling weld::Window::set_window_state with a WindowData
param that doesn't indicate that anything should be set
(i.e. whose mask is vcl::WindowDataMask::NONE) should
have no effect, so drop extra checks that were previously
checking whether the string representation was empty
and skipping the call to weld::Window::set_window_state in
that case.

No change in user-observable behavior intended or
seen in a quick test.

Change-Id: I5bc4caeb49d0ab2bbc4fa597a5ef19d86d3aac2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208125
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-15 14:45:49 +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
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
Heiko Tietze 08f5d410a4 Related tdf#121174 - Make module-specific colos non-configurable
Colors were introduced as ThemeColors since they are not entirely application
colors (but also not really UI-related) and because svtools:: is not accessiblke
in vcl. This patch makes the colors hard-coded therefore, still allowing to
disable it but only via expert setting NotebookbarColorTransparency.
It also enables the colors on macOS following the positive feedback.

Change-Id: Iece63d440349b0c42ea6dbc1dad36f0b1e7120a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207476
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-06-30 10:04:33 +02:00
Xisco Fauli 00aebb5e88 loplugin:unusedmethods
Change-Id: I5eec1b68efc285995db3b5825699c07fa006cb35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207375
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-29 10:16:53 +02:00
Khaled Hosny 08c6344675 tdf#152396: Apply a chosen font subfamily as the style name
The Character dialog registered a change only when the family name
differed, so picking an extended style of the same family (say a width
such as "Condensed") updated weight/italic but never stored the chosen
subfamily.

Store the chosen style as the text's typographic subfamily, and detect
style-name-only changes too. R/I/B/BI styles stay weight/italic-only, so
common case is unaffected. Since the style box is localized, we map it
back to the font’s own style name to keep the stored subfamily
locale-independent, and show it again on reset.

Change-Id: I9cef7071af1c62829572253f7c9f6cee36ad8266
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207330
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-06-26 09:33:30 +02:00
Noel Grandin eb3cee606e template static field appearing in two different CUs
I saw some warnings and got suspicious, so I converted
the OSL_ENSURE to assert, and then found that we
have two copies of the s_nRefCount static field, which
obviously causes trouble.

I tried to fix this by removing usage of this dubious
template class, but the templates classes are intertwined,
and that lead to a very large patch with weird failures.

So this is a hacky minimal fix, using explicit template
instantiation to force the code to only be emitted
in a single library.

Change-Id: I634afb8b40570f2e7e0f8da541b8a2b6325fdc29
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/904
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit af69817a343ccf1411f6f8980c94ed1f696769b4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207023
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-06-20 14:20:53 +02:00
Michael Weghorn a7a599ddad svtools a11y: Pass OAccessible to BrowseBox::getAccessibleHeaderCell
Use more concrete OAccessible instead of the
abstract XAccessible UNO interface.

Change-Id: I46a5bd0af8c731a1da39f1960664152ee9c7c16c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206731
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-19 18:11:56 +02:00
Michael Weghorn a5861f19f6 vcl a11y: Return OAccessible in 2 IAccessibleTableProvider methods
Return the more concrete OAccessible class instead of the
abstract XAccessible UNO interface.

Change-Id: Ifc50ac7f74bf1743e849f905af3b9b66b7a98eba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206730
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-19 18:11:49 +02:00
Michael Weghorn e0fce78cbf svtools a11y: Return OAccessible in BrowseBox::getAccessible*
Return the more concrete OAccessible class instead of the
abstract XAccessible UNO interface.

Change-Id: I6e8b74c9bc06a72ab316ba97d76172529e9ab85b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206729
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-19 18:11:41 +02:00
Michael Weghorn 8bb4816710 svtools a11y: Use OAccessible for BrowseBox::THeaderCellMap
Use the more concrete OAccessible class instead of the
abstract XAccessible UNO interface.

Change-Id: I475ff467c5e430825e265d27972629a3f2f111f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206728
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-19 18:11:29 +02:00
Xisco Fauli 6ac93e562a normalize some namespace declarations
Change-Id: I4cc17f852dd58d95e97cdc673d1f1ca0c6de6c03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206636
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-15 22:35:56 +02:00
Michael Weghorn e34761e413 svtools: Drop always null ValueSet::mpNoneItem
After

    Change-Id: Iddf8cb3f8b8b0c81d469c0cd4b5d473634f7bac9
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Jun 9 15:07:39 2026 +0200

        svtools: Drop ValueSet's WB_NONEFIELD flag

, ValueSet::mpNoneItem isn't assigned anywhere, so
is always null. Drop it and corresponding logic altogether
and also the then unused ValueSet::maNoneItemRect.

Change-Id: I2e12d4664418d40df85a1f791893109695c31398
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206255
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-10 09:46:25 +02:00
Michael Weghorn 7d56eb1238 svtools: Pass ValueSet::ImplFormatItem item param by ref
It's known to always be non-null. (The only caller already
unconditinally dereferences the ValueSetItem* it passes
in the line above.)

Switch the param to reference to make more obvious it's always
non-null.

Change-Id: I60c66d6b5950fac6d9cd067106c7cdc05fce60f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206254
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-10 09:46:18 +02:00
Michael Weghorn 57035c165c svtools: Drop ValueSet's WB_NONEFIELD logic
The last user of that flag/feature was dropped in
previous commit

    Change-Id: I32fb82cf0d2a631e20265847b8387075738ad813
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Jun 9 14:51:15 2026 +0200

        sc: Use separate button for "Default" in tab bg color dialog

Therefore, drop the feature/implementation that would
only be relevant if there was still any user left.

In a first step (this commit), drop code checking for that
flag more or less directly. Further cleanup will follow
in separate commits.

the `nOff` local variable in ValueSet::Format can also be
dropped: It is assigned a value in any case, but the value
would only have been read of the WB_NONEFIELD case
further down.

Change-Id: Iddf8cb3f8b8b0c81d469c0cd4b5d473634f7bac9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206252
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-10 09:46:01 +02:00
Michael Weghorn a680c8b6b1 weld: Drop weld::Widget::connect_get_property_tree
weld::Widget::connect_get_property_tree
was relevant for Collabora Online/jsdialog,
but Collabora Online no longer uses this repo and
jsdialog support was dropped in

    commit 8a91868e21
    Date:   Tue Jun 2 14:53:19 2026 +0200

        drop JSDialog machinery

, so drop the method and some related logic as well.

Further simplification/cleanup will follow in
upcoming commits.

Change-Id: Id027e83e23ebb72a1cb62a36f27410fad6d698e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206009
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-05 08:00:21 +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 71ed6f1800 weld: Move weld::EntryFormatter to own header/source
This makes it easier to keep an overview and reduces
what needs to be recompiled if the class changes in
the future.

Change-Id: If29ec68d2d28dfaf1b11d46c7efc72e128857ccd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205934
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-04 14:36:49 +02:00
Michael Weghorn 8ef2a90277 weld: Move weld::PatternFormatter to own header/source
This makes it easier to keep an overview and reduces
what needs to be recompiled if the class changes in
the future.

Change-Id: I8cea078c992204327686c65f9f7ec2e70f689388
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205930
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-04 08:39:40 +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 0bcb591b0c weld: Move weld::TriStateEnabled to own header/source
Move the class definition and implementation out of weld.hxx
and weldutils.cxx 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: I97768bf75dac492e32e1d387853d123481aa643a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205902
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-03 23:19:47 +02:00
Michael Weghorn 6a299f8297 svtools: Port SvtLineListBox from ValueSet to weld::TreeView
Use a weld::TreeView inset of the custom ValueSet widget
for the SvtLineListBox that can be used to select a line
style.

Show the name of the line style in a column next to the
icon, which makes this more consistent with the popup used
to set a line style for Calc cells in the "Properties"
sidebar deck, section "Cell Appearance".

Using weld::TreeView also helps to be more consistent with
other platform/toolkit widgets and reduces use of custom
widget logic (implemented in the ValueSet class).

Some notes:

* ValueSet uses a 1-based ID for its items. weld::TreeView
  uses a 0-based index, so adjust places using those
  accordingly.

* Use the weld::TreeView handler for item activation
  (set with weld::TreeView::connect_item_activated) instead
  of the ValueSet selection handler (set with
  ValueSet::SetSelectHdl) and activate single-click activation
  (using the GtkTreeView::activate-on-single-click property
  in the UI file) so that a single click on an item still activates
  it but keyboard navigation using the arrow keys doesn't.

SvtLineListBox gets used e.g. in the control to pick the line style
in Writer's "Format" -> "Page Style" dialog, tab "Borders".

Adjust a UI test accordingly (use TreeView widget, use
new 0-based indices and press the Return key after selection,
to activate selected entry).

Change-Id: I54fb1d2a49774c6c64eda0ad5de7af36c3603cee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205821
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-01 08:53:16 +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
Mike Kaganski 315349828a Fix --enable-werror gcc build on Linux
Commit 8ed30e4a243a3efdfe380852d20910bc4a02e181 (Move ToolboxController
to use OPropertyContainerImplHelper, 2026-04-10) introduced cases similar
to the problem handled in commit 3917b082b9f4530d305cd947ab47658f6883c4f1
(Fix --enable-werror gcc build on Linux, 2026-04-09).

In file included from /home/mk/core/framework/inc/uielement/complextoolbarcontroller.hxx:28,
                 from /home/mk/core/framework/inc/uielement/comboboxtoolbarcontroller.hxx:24,
                 from /home/mk/core/framework/source/uielement/comboboxtoolbarcontroller.cxx:20:
/home/mk/core/include/svtools/toolboxcontroller.hxx:86:31: error: ‘virtual void svt::ToolboxController::disposing(const com::sun::star::lang::EventObject&)’ was hidden [-Werror=overloaded-virtual=]
   86 |         virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
      |                               ^~~~~~~~~
/home/mk/core/framework/inc/uielement/comboboxtoolbarcontroller.hxx:44:22: note:   by ‘virtual void framework::ComboboxToolbarController::disposing(std::unique_lock<std::mutex>&)’
   44 |         virtual void disposing(std::unique_lock<std::mutex>& rGuard) override;
      |                      ^~~~~~~~~

Change-Id: Ic41be4d39b032864c3427d17a85502e36f31dce9
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/757
Reviewed-by: Justin Luth <justin.luth@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e95308f8dc2e5c1088686eaa1552126eea9745d0)
(cherry picked from commit d6a555ec61272006e801764dd46a493bbbf3e90a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205689
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-26 00:41:16 +02:00
Mike Kaganski bce4bc55f9 Move ToolboxController to use OPropertyContainerImplHelper
Quite a large inheritance chain, which all needed replace dispose
with disposing, and make sure the locking is correct.

Introduce comphelper::unique_unlock, RAII class for scoped release
of std::unique_lock, to help ensure the invariant established in
commit 4fc1ab0ca8d9bb0f0b8344d0537882aab1d6d2c0 (add assert to keep
WeakComponentImplHelperBase::disposing callees honest, 2026-04-04).

Change-Id: I72c98c25c01b8042428ef2376c6aba3c6b15ec87
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/248
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 8ed30e4a243a3efdfe380852d20910bc4a02e181)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205688
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-26 00:41:07 +02:00
Michael Weghorn 8db0a537e4 weld: Move weld::Calendar 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: Ic0ca052460c3c84ca00bc392c81c1c9fa7bde6b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205464
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-22 21:55:23 +02:00
Heiko Tietze 7877351d36 Resolves tdf#121174 - Module-specific theme colors
Shades the background of Notebookbars with module-specific
colors if theming is enabled. The patch adds four *NOTEBOOKBARCOLOR
colors in the UI theming section.

To deal with light/dark system themes, the color is merged with the
background at a transparency of 150 by default, which can be changed
via the expert setting common::Misc::NotebookbarColorTransparency.

MacOS is excluded since it draws the whole Notebookbar and has
no extra colors for the background.

Change-Id: Ia016499a9657793ebcbe07f7a50281195ab08c43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205153
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-05-22 07:15:21 +02:00
Michael Weghorn 7b68bd0779 vcl: Pass Window::Draw outdev param by ref
This makes clear that it is always non-null.

Change-Id: Id29efa073dae8ce01657ec28493d5f63a564d0ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205350
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-20 00:38:47 +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
Caolán McNamara 23b768f9e6 return const OUString& from GetLanguageString
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/891
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 415340106a717b9d8fc8c82dbbe748addf5e574b)
Change-Id: I6351a92bff9f1c6035d603cd5b99a570f03c3b8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205265
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-05-17 19:42:37 +02:00
Michael Weghorn 37b561f12c svtools: Extract SvtLineListBox helper to get VirtualDev image
Extract logic from SvtLineListBox::UpdatePreview that allows
to get a VirtualDevice holding the image to use for the
line previews. It uses the existing SvtLineListBox::GetLineImage
that returns an Image and then draws that into the VirtualDevice,
with some padding around it.

Use a separate VirtualDevice and not SvtLineListBox::aVirDev.

This will also simplify porting away from using ValueSet in
SvtLineListBox in an upcoming commit.

This gets used e.g. in the control to pick the line style
in Writer's "Format" -> "Page Style" dialog, tab "Borders".

Change-Id: Idb26e6aba75dcb1642897be8886bd896a5de249e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205124
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-13 07:21:54 +02:00
Michael Weghorn a2351572f9 svtools: Extract helper method to handle SvtLineListBox selection
Move the SvtLineListBox::ValueSelectHdl logic to a new
helper method that doesn't require passing a
ValueSet* param that is ignored anyway.

This also prepares for porting away from ValueSet in an upcoming
commit.

Change-Id: I769cafb0a63542a720d8a62da2c8e50ceacbcef4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205107
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-13 07:21:39 +02:00
kallial d1722d87be tdf#169121 Replace 'Company' with 'Organization'
Change "Company" label to "Organization" throughout the UI (dialogs,
fields, mail merge, envelopes, business cards, spreadsheet header
presets).

Change-Id: I541111d8c0de55aead7bee93604f73e14e21d4de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204337
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-05-12 08:24:09 +02:00
Michael Weghorn 7070122ec1 svtools: Move more logic into SvtLineListBox helper to create bitmap
Rename SvtLineListBox::ImpGetLine to SvtLineListBox::GetLineImage
and move more logic from the only caller, SvtLineListBox::UpdateEntries
into the helper method:
Pass only a single ImpLineListData& param and get everything
needed from it right in the method itself.

This will also make an upcoming switch from using
ValueSet to using weld::IconView easier.

This gets used e.g. in the control to pick the line style
in Writer's "Format" -> "Page Style" dialog, tab "Borders".

Change-Id: Ice18481d2b90cf126692d1edbdce482638211002
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204972
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-10 00:27:19 +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 901ebd9c0b svtools: Move EditBrowseBox::clearActiveCell logic to only caller
Change-Id: If9065262c81a8ca8c01d27b51c4603dd7cbd9fbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204457
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-04-28 15:54:34 +02:00
Michael Weghorn 3375d2cab8 svtools: Make EditBrowseBox::pHeader private
Replace the only direct use in a subclass
in DbGridControl::Init with the local variable
that already gets assigned the return value of
EditBrowseBox::CreateHeaderBar, which is also
EditBrowseBox::pHeader.

Change-Id: I3e01549b07951c4c0cdfeb409f30bad82037566b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204453
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-04-28 15:53:52 +02:00
Michael Weghorn b0b90ec05c svtools: Convert EditBrowseBox::RowStatus to enum class
Also drop the explicit int values, as they are irrelevant.

Change-Id: I407ffe3c6a3c6d8e2f05ce57434da32db75acc5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204452
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-28 15:53:38 +02:00
Michael Weghorn 5656bcc3b7 svt: clang-format editbrowsebox.hxx
This in particular gets rid of an extra level
of indentation.

Change-Id: I4610a401c566ba26e56836f342d357522aee9faa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204451
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-28 15:53:28 +02:00
Michael Weghorn ad18e8595c svtools: Use more concrete EditBrowserHeader type
Change-Id: I24315ae4ff109ee9bb55b4b8b7aa6a2797582d1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204449
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-28 15:53:11 +02:00
Michael Weghorn 2f9b26c31c svt: Return more specific subclass in EditBrowseBox::imp_CreateHeaderBar
The return value is always a EditBrowserHeader
or subclass, so return that more specific type
instead of only the BrowserHeader base class.

Change-Id: Ifa01f640d9909063e9609e1106d832d0a96872a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204448
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-04-28 15:53:03 +02:00
Michael Weghorn b00a94fbf1 svtools: Drop unused BrowseBox::GetGlyphBoundRects
The method is unused. After previous commit

    Change-Id: I56a7c9940dc32c3c223e80fb9312bfd3be73459c
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Apr 27 09:48:08 2026 +0200

        a11y: Drop IAccessibleTableProvider::GetGlyphBoundRects

, it is also no longer necessary to have the method
due to it being defined in the abstract base class.

Therefore, drop it.

Change-Id: I3f7028e819c78f7d3b883eca00e137254efec488
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204446
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-28 15:52:43 +02:00
Michael Weghorn 55e5797ab5 a11y: Drop IAccessibleTableProvider::GetGlyphBoundRects
The method isn't called anywhere where there is only a
IAccessibleTableProvider pointer/reference available.

Therefore, it doesn't need to be a method of that
interface/abstract base class.
In a first step, drop it from there
and declare directly in the two subclasses instead.

Further cleanup will follow.

Change-Id: I56a7c9940dc32c3c223e80fb9312bfd3be73459c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204445
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-28 15:52:30 +02:00
Heiko Tietze ca4328f998 Resolves tdf#169313 - Invert 'Show Again' logic on query dialogs
* Checkbox label and position as well as button width and margins
  at the UI changed
* Consistent access to the variable via a new class including
  the consistent storage of the query flag
* Additional buttons added to have homogeneous Yes/No as well as
  non-homogeneous long names, eg. for file formats

Change-Id: Icfbd923b298e1192a1474519543986142167f6c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203572
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-04-28 11:28:06 +02:00
Michael Weghorn abc0918bf3 svtools: Drop by now unused ValueSet::GetHighlightedItemId
Change-Id: I7247063f05d45940c56debb6482341af8e768d5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203739
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-04-17 08:04:07 +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 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
Jonathan Clark c93a99c3a1 Reapply "tdf#63011 vcl: Use localized font family names as aliases"
This reverts commit 3b43be508d.

Modifies the original implementation to skip parsing font names when
SAL_NON_APPLICATION_FONT_USE=abort. This recovers the original Windows
testsuite execution time, and otherwise doesn't affect tests since that
environment variable is meant to prevent font fallback.

This change had an outsized effect on Windows test execution time, but
does not seem to have a significant effect on Windows desktop
performance. Out of an abundance of caution, this change also includes
some small optimizations which should reduce the amount of I/O which is
done while parsing localized font names.

Change-Id: Idc80f20d859863e02788a301c1f3af15ab0e8a4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203280
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-04-07 17:19:11 +02:00
Xisco Fauli 3b43be508d Revert "tdf#63011 vcl: Use localized font family names as aliases"
This reverts commit 5257ad4ec1.

Unfortunately it makes the Windows bots in CI to take more
than two hours to complete a "make build unitcheck slowcheck"
instead of the previous average 55 minutes

Change-Id: I578be5bd2c4fc9c15084d5feb5d66cc89d25c83b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203221
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-04 15:39:18 +02:00
Andrea Gelmini 6da6760ed1 Fix typo "then"->"than" + "its" -> "it's"
Change-Id: I824cee5fe1ad6596e99ab0423797cefa29c81139
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202915
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-03-29 09:47:37 +02:00