Commit Graph
8481 Commits
Author SHA1 Message Date
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
Heiko Tietze a435d56867 Related tdf#115805 - Use correct increments for numbering dialogs
Rather than using set_unit() use the function SetFieldUnit() to set
the unit property according the configuration

Change-Id: I1a8638d34d71b509f2d0a52fef8a673c8e112c55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207353
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-07-21 07:46:10 +02:00
Xisco Fauli 208d055212 skia: turn ForceSkiaRaster into ForceSkiaGPU
so unless ForceSkiaGPU is specifically enabled by the user,
hardware accelatarion will be disabled by default.
Some discussion on the topic can be found here
https://gerrit.libreoffice.org/c/core/+/208116/comments/273234df_69198d70
and here
https://gerrit.libreoffice.org/c/core/+/208116/comments/372732df_f989e4f3

In libreoffice-26-2 branch, Vulkan has been put under experimental mode
so it doesn't touch translations,
see https://gerrit.libreoffice.org/c/core/+/208134

Change-Id: Ib7a39d269f24b5ef82752edb238944d3d453153c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208148
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-18 13:00:28 +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 becb1c338e tdf#165689 MacroManagerDialog: Add copy/paste buttons
Adds copy and paste buttons to the Macro Manager dialog so that script
files can be copied with script providers that support the
XCopyableBrowseNode interface. The “copy” button selects the file to be
copied and then the “paste” button works when a destination is selected.

Change-Id: I058b7ed53c837d17723b5f1b4e69f0bc7ae2594f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207738
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-07-15 12:28:50 +02:00
Neil Roberts 2365c64aa3 comphelper: Add helpers for accessing duck-typed methods of XBrowseNode
Implementations of XBrowseNode have a bunch of extra methods which are
accessed by using XPropertySet::getPropertyValue to determine if the
action is possible and then XInvocation::invoke to invoke it. This patch
adds wrappers around checking and invoking these methods. The idea is to
abstract away the actual implementation so that the approach can be
changed in a later patch.

Change-Id: I117ab848391dbb1277f9331d6a93f71c2cb556ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207343
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-07-15 09:05:13 +02:00
Michael Weghorn 447f1f77a0 cui: Don't count entries again in SvxLinguData_Impl::MergeDisplayArray
`nCnt` starts with a value of 0 and is incremented
`nEntries` times (unless there is an early return
in the loop, in which case the value is irrelevant).

That means that the value of `nCnt` is the same
as `nEntries` after the loop.

Just use `nEntries` directly and drop `nCnt` to
simplify this.

Change-Id: If9667875cc2b8bffb421cbf78badd404080e8d71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207963
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-13 14:09:23 +02:00
Michael Weghorn 6c6a33065b cui: Prefix SvxLinguData_Impl members with "m_"
Use the usual "m_" prefix for class members to
distinguish them from local variables.

Change-Id: I9194e72223df84c8fbd896b8b6f93baa3de8b185
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207962
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-13 14:09:15 +02:00
Michael Weghorn eed4e2af19 cui: Drop SvxLinguData_Impl::SetDisplayServiceCount
Access the own class member directly instead.

Change-Id: I6b065e83abeff925b3876b655a39a9d3dd1de6b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207961
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-13 14:09:07 +02:00
Michael Weghorn 1886b0f018 cui: Convert lcl_MergeDisplayArray to a SvxLinguData_Impl method
Instead of passing `this` as the first param in
all callers, convert the static helper into a
class method and drop the extra param.

Change-Id: I4141c1eac68e483f520db880f435c4b64efe8e4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207960
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-13 14:08:59 +02:00
Michael Weghorn cead31a8fa cui: Deduplicate SvxLinguTabPage::FillItemSet logic
SvxLinguTabPage::FillItemSet basically implements
the same logic 4 times, just using a different
table + service name each time.

Extract logic to a new helper method and pass
those as parameters.

Change-Id: If929ee97be7da38de55c735104e5ce296f03a4b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207959
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-13 14:08:51 +02:00
Michael Weghorn 42305c6c1b cui: Drop always true local var in SvxLinguTabPage::FillItemSet
Change-Id: I11cac6dd70d22b08325da04e1586894f095bde5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207958
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-13 14:08:43 +02:00
Michael Weghorn 396c007f91 cui: Prefix SvxLinguTabPage members with "m_"
Use the usual "m_" prefix for class member names,
to distinguish them from local variables.

Change-Id: Ieec720a8420ba11bac20915bcf2a15a2722223d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207957
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-13 14:08:36 +02:00
Ilmari Lauhakangas c8f2e03a4f Revert "tdf#166435 Improve tip of the day"
This reverts commit c7a6961fb0.

Reason for revert: not what the task asked.

Change-Id: I5280fe1091383d44cb0037ba396c8b31f9842e47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207970
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-07-11 11:19:21 +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 8c2d8e1616 cui: Use weld::Entry member directly in callback
Use OfaLanguagesTabPage::m_xDatePatternsED instead of the
callback param, as the callback is only connected
for that member.

This prepares for an upcoming commit that will
change the callback param to weld::TextWidget& to
unify/deduplicate the weld::Entry and weld::TextView
implementations.

Change-Id: I186e6f1958d744c78e3ba60fd5fc6f56633407b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207935
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-10 18:17:15 +02:00
Michael Weghorn 00c0e842c8 cui: Fix indentation in textflowpage.ui
Commit result of running

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

Change-Id: Ib41d60aa8ba3f81fe781fac0761e454be8b47ca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207791
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-09 18:13:49 +02:00
Michael Weghorn f2fc5f75fe cui: Resave optemailpage.ui with glade 3.40
The tab page can be triggered like this:

* start Writer
* "Tools" -> "Options"
* "Internet" -> "Email"

Change-Id: I7f51f9154bc7f1d2734242c470c19965d3838888
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207769
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-09 18:13:23 +02:00
Michael Weghorn aa2260009b tdf#130857 Define widgets in sw "Proxy" options page in order
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.

See

    commit 02692566ad
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Oct 24 17:43:35 2024 +0200

        tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order

for more background.

The tab page can be triggered like this:

* start Writer
* "Tools" -> "Options"
* "Internet" -> "Proxy"

Change-Id: I7f0bbe084dc75a61a0cbedf8184f4ee7aa374e4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207768
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-09 18:13:02 +02:00
Michael Weghorn 739cfaf3b5 cui: Remove unused grid row in optproxypage.ui
Presumably since

    commit 7e5630b7b0
    Date:   Tue Nov 7 12:46:37 2023 +0100

        tdf#146386 cui: remove FTP UI, SvxProxyTabPage

, the row with index 3 in the "grid1" grid is unused.

Move the content from row at index 4 a row up and drop the
unused row.

This also prevents glade 3.40 from automatically inserting
the following placeholders when resaving the file:

    --- a/cui/uiconfig/ui/optproxypage.ui
    +++ b/cui/uiconfig/ui/optproxypage.ui
    @@ -1,5 +1,5 @@
     <?xml version="1.0" encoding="UTF-8"?>
    -<!-- Generated with glade 3.38.2 -->
    +<!-- Generated with glade 3.40.0 -->
     <interface domain="cui">
       <requires lib="gtk+" version="3.24"/>
       <object class="GtkFrame" id="OptProxyPage">
    @@ -323,6 +323,24 @@
             <child>
               <placeholder/>
             </child>
    +        <child>
    +          <placeholder/>
    +        </child>
    +        <child>
    +          <placeholder/>
    +        </child>
    +        <child>
    +          <placeholder/>
    +        </child>
    +        <child>
    +          <placeholder/>
    +        </child>
    +        <child>
    +          <placeholder/>
    +        </child>
    +        <child>
    +          <placeholder/>
    +        </child>
           </object>
         </child>
         <child type="label">

The tab page can be triggered like this:

* start Writer
* "Tools" -> "Options"
* "Internet" -> "Proxy"

Change-Id: I82e54fafc5e9c10272a4a86ef1c7fcd419731b1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207767
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-09 18:12:53 +02:00
Michael Weghorn a222b1573e tdf#130857 cui: Put pixbuf + text into same col in Chart "Default Colors" page
Don't use two separate columns, but put the pixbuf
showing the currently selected color and the text
into the same column. This avoids extra space
between the color in the first column and the
text in the second column seen when using qt6
with native widgets enabled in a WIP branch
where support for the "Tools" -> "Options" dialog
is enabled.

The tab page can be triggered like this:

* start Writer
* "Tools" -> "Options"
* "Charts" -> "Default Colors"

For gtk3, this depends on previous commit

    Change-Id: I5c3a29790f593f07c04f23deb8bc993a893a00db
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jul 8 11:34:57 2026 +0200

        tdf#130857 gtk weld: Consider expander image col in TreeView::do_insert

because otherwise the pixbuf showing the color would no longer
be visible.

Change-Id: I9727a508cd18ad48814a054432c376b5ca3d6038
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207765
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-09 18:12:35 +02:00
Michael Weghorn 5a3841b96c cui: Rename pixbuf cell renderer to avoid confusion
The name of "cellrenderertext1" initially made me think
this is a GtkCellRendererText, but it is actually a
GtkCellRendererPixbuf. Rename it to avoid confusion.

The tab page using this UI file can be triggered like this:

* start Writer
* "Tools" -> "Options"
* "Charts" -> "Default Colors"

Change-Id: Ifbc79a65e1149360c7e73c0b6b48ead79c16c152
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207762
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-09 18:12:10 +02:00
Michael Weghorn 19a2084c12 cui: Resave databaselinkdialog.ui with glade 3.40
The dialog can be triggered like this:

* start Writer
* "Tools" -> "Options"
* "LibreOfficeDev Base" -> "Databases"
* press the "New..." button

Change-Id: I16f61f3d7c6a3da7714f52e7677ea212a2bd25d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207693
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-07 10:20:30 +02:00
Michael Weghorn 578d263ac2 cui: Resave dbregisterpage.ui with glade 3.40
The tab page can be triggered like this:

* start Writer
* "Tools" -> "Options"
* "LibreOfficeDev Base" -> "Databases"

Change-Id: I8d4be20a6437542c68187d9ec2fe691ff0a3c96a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207692
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-07 10:20:22 +02:00
Michael Weghorn 5ca6876fe8 tdf#130857 Define widgets in "Fonts" options page in order
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.

See

    commit 02692566ad
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Oct 24 17:43:35 2024 +0200

        tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order

for more background.

The tab page can be triggered like this:

* start Writer
* "Tools" -> "Options"
* "LibreOfficeDev" -> "Fonts"

Change-Id: Ib7ae30a47f78f319a113ef3ecd2184daa00c29b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207598
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-05 11:11:38 +02:00
László Németh 5da16bdc79 tdf#172674 offapi cui sw xmloff: add hyphenation slider feature
To solve the trade-off between better spacing and less hyphenation,
support hyphenation level and its user interface, the hyphenation
slider, like DTP software do.

Add new paragraph property com::sun::star::text::ParaHyphenationLevel

The hyphenation slider is the basic interface of DTP software to adjust
single (or all) paragraphs using better word spacing (i.e. more
hyphenation) or less hyphenation (i.e. worse word spacing). It allows 1)
to choose the best from the near equally good layouts and 2) to solve an
extreme bad layout (caused by words without hyphenation or other corner
cases).

– 50% hyphenation level means disabled hyphenation, if minimum
  and maximum word spacing settings allow to break the line within
  words (default interoperability value).

– 100% hyphenation level means using extra hyphenation only if that
  results better word spacing in the line, than breaking within words.

– Between 50% and 100% hyphenation level, use extra hyphenation only if
  its weighted word spacing is better, than breaking the line between
  words (weighting grows with the hyphenation level).

– Between 0% and 50% hyphenation level it means disabled hyphenation
  with increased desired and maximum word spacing, depending on the
  hyphenation level. At %0, the desired word spacing is enlarged to the
  original maximum word spacing, while maximum word spacing is enlarged
  by a single space.

For example, the original 4-page unit test document with the default 50%
hyphenation level contains 14 hyphenations. 100% hyphenation level
results in 22 hyphenations, while 0% only results in 8 hyphenations.

– sw/qa/extras/layout/data/tdf167648_minimum.fodt,
  sw/qa/extras/layout/data/tdf169168_minimum.fodt: set maximum
  word-spacing to 100% from 101% to limit the original unit test only
  for minimum letter spacing.

More information: LO/COOL Book & Typography projects:

https://www.numbertext.org/typography/

https://www.numbertext.org/book/

Follow-up to commit cf104be5cb "tdf#119908
tdf#166113 cool#15973 sw smart justify: fix DOCX hyphenation",
commit d572576dd6
"tdf#119908 cool#15973 sw smart justify: fix "smart" hyphenation",
commit 529755f091
"tdf#166113 sw smart justify: adjust algorithm for interoperability" and
commit 7d08767b89 "tdf#130088 tdf#119908
smart justify: fix DOCX line count + compat opt."

Change-Id: I84b3893ea6c5cd4eff74a73514722285e7071392
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207545
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
2026-07-04 17:11:37 +02:00
Michael Weghorn 2dca1c0f02 weld: Rename TreeView *_column_clicked methods to *_column_header_clicked
Rename weld::TreeView::connect_column_clicked
and weld::TreeView::signal_column_clicked to make
clear that they are not about a click anywhere in a
column, but about the column *header* being clicked.

The GTK 4 doc for the corresponding
GtkTreeViewColumn::clicked signal [1] by which the API
was apparently inspired is clear about this:

> Emitted when the column’s header has been clicked.

[1] https://docs.gtk.org/gtk4/signal.TreeViewColumn.clicked.html

Change-Id: I0b4b337b5ca938bb1526d9857ed2b0b244daf23c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207591
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-03 22:26:00 +02:00
Justin Luth 05fba68cce tdf#153961 cui para style: don't show unused AutoFirst or Contextual
This fixes a 4.2 regression from
324141f21b
where Hide = TRUE ;
was set to <property name="visible">True</property>

In Impress and Draw, although they do have paragraph styles,
they do not support an Automatic first line indent.
So don't show that option when the tab is loaded in Draw/Impress.

The same is true for contextual spacing's
'Do not add space between paragraphs of the same style'.

Prior to 4.2, for Writer it seems to be an implementation error
that contextual spacing was not enabled on paragraph styles,
only on direct paragraph properties.
So I enabled it now - as per SvxStdParagraphTabPage::PageCreated.

Change-Id: If68a511e515b928d04d14ef231ecb01cfc8377ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207480
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-06-30 12:52:41 +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
Bogdan Buzea c7a6961fb0 tdf#166435 Improve tip of the day
Change-Id: I9087d4d35579a91c7c7abcf1a98b57a4b38f0927
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205886
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-06-29 16:07:50 +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
Heiko Tietze c3f6e2f497 Related tdf#115805 - Do not change units in Calc's border dialog
Probably introduced to avoid nonsense values like km all settings
was rejected and mm used. We should allow users to full configuration
and km was removed from the list anyway.

Change-Id: I4e71218334f2ba7cb52b5663c12c7314b6c7a063
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207354
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-06-27 09:37:20 +02:00
Michael Weghorn 248c870340 cui: Update comments referring to method in SvxLinguTabPage
Update comment according the the refactor/rename done in

    commit 7cc0abf8c4
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Feb 21 17:42:54 2025 +0100

        cui: Simplify and rename SvxLinguTabPage::HideGroups

Change-Id: I33304c4ad495aaaede607672318b9e694f8ae41b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207313
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-26 10:46:12 +02:00
Michael Weghorn 62e774db5c tdf#130857 Define widgets in AutoCorrect "Localized Options" page in order
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.

See

    commit 02692566ad
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Oct 24 17:43:35 2024 +0200

        tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order

for more background.

The tab page can be triggered like this:

* start Writer
* "Tools" -> "AutoCorrect" -> "AutoCorrect Options..."
* switch to the "Localized Options" tab

Change-Id: I577cf7d00360c0951669775d4749e0b94b345845
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207312
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-26 10:46:04 +02:00
Michael Weghorn 454b7e1b8a tdf#130857 Define widgets in AutoCorrect "Replace" page in order
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.

See

    commit 02692566ad
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Oct 24 17:43:35 2024 +0200

        tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order

for more background.

The tab page can be triggered like this:

* start Writer
* "Tools" -> "AutoCorrect" -> "AutoCorrect Options..."
* switch to the "Replace" tab

Change-Id: I3372ab86e710b72936c88f5e120bc82215a0f36d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207311
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-26 10:45:57 +02:00
Michael Weghorn bbf734abee tdf#130857 Drop extra toggle renderer in MS Office Load/Save options
Only a single checkbox is actually used in the first
column ("[L]") in this dialog, so drop the other one
and corresponding model columns.

Before

    Change-Id: Ic5bbe4ab71ba255ba16bb0a9176ee4c3a8827fe8
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jun 24 16:36:20 2026 +0200

        tdf#130857 gtk weld: Don't interpret toggle renderer by itself as expander col

, a single toggle renderer in the first column would
have been interpreted as enabling the special expander toggle
column feature for the gtk3 implementation and thus it couldn't
have been used for the weld API column index 0, but that is
possible now without requiring another dummy renderer in the .ui file.

The use of multiple same renderers in the first column
was identified by ui-rules-enforcer with upcoming commit

    Change-Id: I637e50477ce41a7ceca8f9cf5830e383b5393c69
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jun 25 11:15:58 2026 +0200

        tdf#130857 ui-rules-enforcer: Check column doesn't have multiple same renderers

in place.

The tab page can be triggered like this:

* start Writer
* "Tools" -> "Options"
* "Load/Save" -> "Microsoft Office"

Change-Id: I4d7ce5b0472e3a22c441b49dcd54ba2b068702e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207308
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-26 10:45:35 +02:00
Michael Weghorn 6fde9ba9cd cui: Resave wordcompletionpage.ui with glade 3.40
The tab page can be triggered like this:

* start Writer
* "Tools" -> "AutoCorrect" -> "AutoCorrect Options..."
* switch to the "Word Completion" tab

Change-Id: I03c639e19805639b8165017466e0fdae492f71ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207306
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-26 10:45:00 +02:00
Michael Weghorn f573c93248 cui: Resave acorexceptpage.ui with glade 3.40
The tab page can be triggered like this:

* start Writer
* "Tools" -> "AutoCorrect" -> "AutoCorrect Options..."
* switch to the "Exceptions" tab

Change-Id: Iea7ae02c36f398f75d684391d9420bb93ad49889
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207305
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-26 10:44:52 +02:00
Michael Weghorn a90a39560d tdf#130857 Drop extra toggle renderer in AutoCorrect "Localized Options"
Only a single checkbox is actually used in the first
column ("[M]") in this dialog, so drop the other one
and corresponding model columns.

Before

    Change-Id: Ic5bbe4ab71ba255ba16bb0a9176ee4c3a8827fe8
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jun 24 16:36:20 2026 +0200

        tdf#130857 gtk weld: Don't interpret toggle renderer by itself as expander col

, a single toggle renderer in the first column would
have been interpreted as enabling the special expander toggle
column feature for the gtk3 implementation and thus it couldn't
have been used for the weld API column index 0, but that is
possible now without requiring another dummy renderer in the .ui file.

The use of multiple same renderers in the first column
was identified by ui-rules-enforcer with upcoming commit

    Change-Id: I637e50477ce41a7ceca8f9cf5830e383b5393c69
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jun 25 11:15:58 2026 +0200

        tdf#130857 ui-rules-enforcer: Check column doesn't have multiple same renderers

in place.

The tab page can be triggered like this:

* start Writer
* "Tools" -> "AutoCorrect" -> "AutoCorrect Options..."
* switch to the "Localized Options" tab

Change-Id: I730f5c0da3b59827b629d6cbce435340ae04da66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207304
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-26 10:44:45 +02:00
Michael Weghorn e227b67ac9 tdf#130857 Drop extra toggle renderer in AutoCorrect "Options" page
Only a single checkbox is actually used in the first
column ("[L]") in this dialog, so drop the other one
and corresponding model columns.

Before

    Change-Id: Ic5bbe4ab71ba255ba16bb0a9176ee4c3a8827fe8
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jun 24 16:36:20 2026 +0200

        tdf#130857 gtk weld: Don't interpret toggle renderer by itself as expander col

, a single toggle renderer in the first column would
have been interpreted as enabling the special expander toggle
column feature for the gtk3 implementation and thus it couldn't
have been used for the weld API column index 0, but that is
possible now without requiring another dummy renderer in the .ui file.

The use of multiple same renderers in the first column
was identified by ui-rules-enforcer with upcoming commit

    Change-Id: I637e50477ce41a7ceca8f9cf5830e383b5393c69
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jun 25 11:15:58 2026 +0200

        tdf#130857 ui-rules-enforcer: Check column doesn't have multiple same renderers

in place.

The tab page can be triggered like this:

* start Writer
* "Tools" -> "AutoCorrect" -> "AutoCorrect Options..."
* switch to the "Options" tab

Change-Id: I6db75571098de91f549404d0b9255b55ee4829d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207302
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-26 10:44:28 +02:00
Michael Weghorn 3a0365013b cui: Resave applyautofmtpage.ui with glade 3.40
The tab page using it can be triggered like this:

* start Writer
* "Tools" -> "AutoCorrect" -> "AutoCorrect Options..."
* switch to the "Options" tab

Change-Id: Id6dc5f4ab634c50293b03ee40db793b44f025f31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207301
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-26 10:44:20 +02:00
Michael Weghorn 3d7cd4e6d7 cui: Resave percentdialog.ui with glade 3.40
The dialog can be triggered like this:

* start Writer
* "Tools" -> "AutoCorrect" -> "AutoCorrect Options..."
* switch to the "Options" tab
* click on the "Combine single line paragraphs if line
  length greater than 50%" entry in the treeview
* click the "Edit..." button

Change-Id: I9474244cb35fe9bd967bd42dba5018690e407065
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207299
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-26 10:44:04 +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
Xisco Fauli df45e0f245 Revert "cui: blind fix for crash in SvxAppearanceTabPage::SvxAppearanceTabPage"
This reverts commit b68b3123c2.

Reason for revert: it didn't fix the crash and it's happening in
LibreOffice 26.2.4: https://crashreport.libreoffice.org/stats/version/26.2.4.2

Change-Id: I48ada843137bbe34b781744495a66daab86900af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207293
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-25 23:57:22 +02:00
Michael Weghorn cf20240cc1 tdf#130857 Simplify toggle button handling in "Fonts" options page
Similar to previous

    Change-Id: I9dcf3911ed252902df0a89adde73f8ce466ea6ca
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jun 24 17:27:55 2026 +0200

        tdf#130857 Simplify toggle button handling in Java options page

, simplify the handling of toggle buttons in the treeview
also for the "Fonts" option page.

The special toggle button column at index -1, enabled
by the call to weld::TreeView::enable_toggle_columns
isn't actually used, so drop that call and the corresponding
renderer and model columns in the .ui file.

Before

    Change-Id: Ic5bbe4ab71ba255ba16bb0a9176ee4c3a8827fe8
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jun 24 16:36:20 2026 +0200

        tdf#130857 gtk weld: Don't interpret toggle renderer by itself as expander col

, a single toggle renderer in the first column would
have been interpreted as enabling the special expander toggle
column feature for the gtk3 implementation and thus it couldn't
have been used for the weld API column index 0, but that is
possible now without requiring another dummy renderer in the .ui file.

Change-Id: I2a4cb2b1b41ae341c6a559598a2e4f416e9b0fde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207257
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-25 18:24:49 +02:00
Michael Weghorn 74390411fc tdf#130857 Simplify toggle button handling in Java options page
As outlined in previous commit

    Change-Id: Ic5bbe4ab71ba255ba16bb0a9176ee4c3a8827fe8
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jun 24 16:36:20 2026 +0200

        tdf#130857 gtk weld: Don't interpret toggle renderer by itself as expander col

:

> This will be used in upcoming commits to simplify/streamline
> existing UI like the one in the Java options page
> (SvxJavaOptionsPage) where the .ui file
> (cui/uiconfig/ui/optadvancedpage.ui) contains
> two toggle renderers in the first column, but only
> one of them is actually used and the implementation
> in SvxJavaOptionsPage only makes use of column indices
> -1 (for the special toggle column), 1 (for the "Vendor"
> column) and 2 (for the "Version" column) and the
> other renderer is not used in practice.
> Presumably, the special toggle button feature was only
> used because using it was mandatory in the past to be
> able to use radio buttons at all.
> That is no longer the case since
>
>     Change-Id: I098feb474162d61c5452c3496293a420118e2f4f
>     Author: Michael Weghorn <m.weghorn@posteo.de>
>     Date:   Wed Jun 24 15:42:40 2026 +0200
>
>         tdf#130857 weld: Have separate method to set treeview toggle button type
>
> , so move forward with the intention to make the whole
> mapping between cell renderers in the .ui file, columns
> in the .ui file and column indices in the weld API
> more straightforward/less confusing
> (e.g. by being able to drop renderers in the .ui file
> that have no actual equivalent in the implementation
> of the UI using the treeview).

Drop the extra toggle renderer, stop calling
weld::TreeView::enable_toggle_columns and and use a column
index of 0 for the first column instead of the special
index of -1 for the "expander toggle column" that was
previously enabled using weld::TreeView::enable_toggle_columns.
(The use of toggle buttons is now solely enabled by
calling
weld::TreeView::set_toggle_button_type(weld::ColumnToggleType::Radio),
so the call to weld::TreeView::enable_toggle_columns is no longer
needed for that.

Dropping the extra toggle renderer from the first column
also avoids triggering the
"Using the same role multiple times in one column is not supported"
assert in QtBuilder::enableTreeViewColumnDataRole
previously seen when experimenting with adding support for this
Java options dialog for native widgets with the qt6 vcl plugin.

The dialog tab page can be triggered like this:

* "Tools" -> "Options"
* "LibreOfficeDev" -> "Advanced"

Change-Id: I9dcf3911ed252902df0a89adde73f8ce466ea6ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207255
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-25 18:24:33 +02:00
Michael Weghorn 14cfde3c60 tdf#130857 weld: Have separate method to set treeview toggle button type
So far, weld::TreeView::enable_toggle_buttons was doing
two things:

* enable a special "toggle button column" to be accessed
  with a special column index of -1 in the weld::TreeView
  API (as documented)

* switch the type of *all* toggle buttons used in all cells/columns
  of the TreeView to the type passed as a parameter
  (not only set the type of the toggle buttons for the
  special toggle button column at index -1)

Untangle these 2 things by splitting this to two methods:

* weld::TreeView::enable_toggle_buttons now only enables
  the special toggle button column at index -1.

* The new weld::TreeView::set_toggle_button_type sets
  the type of all toggle buttons used in the table.

This makes the API clearer and will allow using one of the
two without necessarily also using the other, which will
allow further simplification/improvements in upcoming
commits.

It could also make it easier to support only setting
the type of single columns to use radio buttons in the
future (i.e. have one column using radio buttons and
another one using check buttons in the same table), but
that would require further rework in the underlying
toolkit-specific implementations (in particular the vcl one).

One case where mixing the two things together results
in non-optimal behavior is the "Assign Styles" dialog
with the vcl implementation:

While the special toggle column with index -1 isn't
actually used, the SwAddStylesDlg_Impl ctor still
calls weld::TreeView::enable_toggle_buttons, presumably
only to enable the use of radio buttons for the actually
used toggle columns at the end.
As a consequence, the style names in the first column
are indented for no good reason (but only to leave space
for drawing the toggle buttons for the special toggle
button column that was enabled without actually being
needed).
This will be adjusted in an upcoming commit.

Initially, just replace all callers of
weld::TreeView::enable_toggle_buttons passing
weld::ColumnToggleType::Radio for the type with
calls to both methods, to keep the existing behavior
and be able to further look into further improvements
separately.

Change-Id: I098feb474162d61c5452c3496293a420118e2f4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207250
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-25 18:23:52 +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 775587d503 Related tdf#171924 Make macro manager dialog track document like run dialog
The Macro Manager dialog now keeps track of which XModel every node in
the tree is coming from just like the Run Macro and Organize Macros
dialogs. That way it can determine whether a macro should be runnable
based on whether it’s in a document rather than whether the user happens
to be looking at a document that has macros. This also fixes a problem
where the run button would not work from the start center.

The UI test is heavily copied from the UI test for the run macro dialog.

Change-Id: I8a47234511fa78ba7d2f97f78f42df8f58416cbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207244
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-06-25 10:55:05 +02:00
Michael Weghorn 245f0e5d81 cui a11y: Set a11y names for icons in HangulHanjaConversionDialog
With previous commit

    Change-Id: I1ab202cc0d3b5a6ff5d220f4b8e90c578f591158
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Jun 19 22:21:48 2026 +0200

        tdf#172513 ko char conv: Preserve char represented by >1 UTF-16 code unit

in place, the issue of invalid UTF-16 strings being used
is fixed now, so set a11y names for the icons in the IconView.

Without that fix for tdf#172513 in place,
passing invalid UTF-16 strings to
GtkInstanceIconView::set_accessible_name
would have resulted in asserts when trying to convert them
to UTF-8 strings as mentioned in the commit message of

    Change-Id: Id2e3fea69b3effdd162ad9e0907d38543e415d5e
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Jun 19 16:34:48 2026 +0200

        tdf#130857 cui: Port HangulHanjaConversionDialog from ValueSet to IconView

that introduced the use of the weld::IconView:

> No accessible name is set for the icons yet, to avoid
> triggering an assertion when using the gtk3 vcl
> plugin. This is blocked by preexisting bug tdf#172513
> ("Korean Hangul/Hanja conversion may suggest/result in
> invalid Unicode characters") because the use of invalid
> UTF-16 strings would result in those asserts being triggered.
>
> Pending/suggested solution for that one:
> https://gerrit.libreoffice.org/c/core/+/207017
>
> Setting the accessible name will be implemented in a separate
> commit on top of that change.
> However, the switch to IconView without setting an accessible
> name cannot be considered a regression either, as non was
> set for the previous implementation based on ValueSet either,
> so only names like "Item 1", "Item 2" etc. would be used that
> don't give much of a clue what characters what character was
> actually selected.

The dialog can be triggered like this:

* start Writer
* paste text "한글맞춤법" into the document
* select the text and set the language to "Korean (RoK")
* "Tools" -> "Language" -> "Hangul/Hanja Conversion..."

Change-Id: Ica181fa2ddac4e3307b8c6491fdeb94ede8dfd3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207097
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-24 19:05:14 +02:00