Drop ValueSet forward declarations from headers
not actually using the class.
Forward-declare the class in cui/source/inc/numpages.hxx
which actually uses it, but didn't forward-declare it
or include the header yet, but previously got the forward-declaration
from an included header.
Change-Id: I8876ad47eb362f581aa41ee4a61a85c4093a1dd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211881
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Let FontNameBox::LoadMRUEntries simply return the
entries loaded from the file instead of applying
them to the combobox right away.
Let the only caller FontNameBox::Fill do the insertion,
which also unifies the two different code paths of
either reinserting the existing entries or setting
the ones loaded from the file a bit more.
While at it, also rename the local `rEntries`
variable to `aEntries`, to make clear this is
not actually a reference (as the `r` prefix
previously suggested).
Change-Id: I89c14f2bcd34c4b6b4decf33e98bef54e7b31cf0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211536
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
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>
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>
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
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>
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>
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
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>
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
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: I47ea75ca8aedc7409a262fc72afcfbc0accef4ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199050
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
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: Ib2fe4a6b5e34ad8ae2194ba85249ca25ed16e9d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196435
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This is in preparation of moving code out of weld.hxx
to separate headers/source files, in order to make it
easier to keep an overview and to avoid having to
recompile ~all UI code when anything changes.
Also move weldutils.cxx to a new vcl/source/weld
directory.
Change-Id: Ia75b42f21e560dd248307282a522f186a64cd742
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195777
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
test drive the new bin/find-unneeded-includes --fwdecl mode
with iwyu 0.23 instead of 0.21, this seems to find more unneeded
fw declarations
Change-Id: I451e571c70eb74f46c799753e3c5a53c0110da36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179707
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
so when scrolling through fonts that might not have the original or
explicitly picked style, then on moving to the next font that does have
that style, then the original bold/italic/etc gets picked again.
Change-Id: If818a116ed4ab248cb67f60845acad2cd4eeb8ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173071
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
a) announce Preview when a 'selected' font preview is requested
b) move EndPreview to when the dropdown popups down, rather than listen
to ESC
Change-Id: I68916769150c23c0ec18aae084cdf3cafb7352a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160609
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
e.g. in page style dialog, footnote page, line menubutton,
if theme changes from light<->dark while the dialog remains open
Change-Id: If8ca8b2cf9c4e4d620ce0ea1c92c50accbc8ebcb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148981
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
no need for the indirection, which is out by one anyway, perhaps
from some time that the "none" entry was in the list vs a separate
widget as it is now
Change-Id: I028e03260f500473b42847ee748d7af8a4791ccd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142397
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Dialog was changed in d73602dc51 to fit
vertical size on small screens by placing Western/CJK/CTL into a notebook.
But for CJK and CTL it's required to have Western fonts visible in parallel.
* dual solution for western with nocjk and cjk dropped
western scales to the dialog width if no CJK nor CTL is enabled
* CJK and CTL placed in a notebook, Western as well for proper alignment
* font names are presented in lists but size and style per simple dropdowns
* info text sized at 80%
* variables renamed to keep track of controls (old names kept in l10n descriotion)
* UITests adjusted for variable names and tab positioning
Change-Id: I45b40e9bc37565f6364f1dfc1b5d837270fe4644
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134666
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
The OutputDevice::GetDevFontSize() function is only used for
non-scalable (bitmap) fonts. We have stopped supporting bitmap fonts
since LO 5.3, see tdf#103514: Support for bitmap-only fonts on Windows
has been removed (Khaled Hosny)
I found the following when removing PhysicalFontFace::SetBitmapSize():
1. as mnHeight and mnWidth and not set by anyone, I realized I could
remove them, which meant removing GetHeight() and GetWidth()
2. PhysicalFontFamily::GetFontHeights() populates heights from the
collection of font faces into a sorted vector of font heights taken
from PhysicalFontFace. As this no longer exists this function
serves no purpose, it has been removed.
3. PhysicalFontFamily::GetDeviceFontSizeList() calls upon
PhysicalFontFace::GetFontHeights(). This function takes this sorted
list of font heights, and then populates and returns a new list of
sizes (or rather, heights). As the heights aren't available any
more, this function is also unneeded, so it has been removed.
4. OutputDevice::GetDevFontSizeCount() calls upon
PhysicalFontFamily::GetDeviceFontSizeList(). This function has the
side effect of initializing the list of fonts.
5. When I checked what calls on GetDevFontSizeCount(), there is only
one caller - FontList::GetSizeAry() in svtools. The function returns
a standard font size list if the family name is empty, or there are
no font sizes (via OutputDevice::GetDevFontSizeCount()). As this
will *always* be empty (see chain above) then this function just
needs to always return a standard font size list.
Thus OutputDevice::GetDevFontSizeCount() and GetFontSizeList() are
no longer called upon by anything, so they can be removed.
6. svtool's FontList::GetSizeAry() no longer uses the FontMetric
parameter, so this has been removed from the function signature, and
cleanup done of the function that calls upon it in svtools,
framework, editeng, and desktop. A number of variables that were no
longer used due to this change were also removed.
7. This change removed the need for the mpSizeAry unique_ptr in
FontList. ImplFontListFontMetric::GetDevice() and mpDevice could
also be removed as it was no longer used anywhere.
8. After simplifying GetSizeAry(), it turns out it was the same as
GetStdSizeAry(), so removed FontList::GetSizeAry() and used
FontList::GetStdSizeAry() in its place.
9. Changing to use GetStdSizeAry() revealed that FontSizeBox::Fill()
no longer used the pFontMetric paramter, so this was removed, and
call sites updated.
10. Due to change to Fill():
a. SvxFontSizeBox_Base::UpdateFont() no longer uses the
const css::awt::FontDescriptor& rCurrentFont parameter, so
removed this. This also removed the member variable
m_aCurrentFont
b. SvxCharNamePage::FillSizeBox_Impl() had a number of newly
unused variables removed.
c. SwStdFontTabPage::Reset() and
SwStdFontTabPage::LoseFocusHdl() had a number of newly unused
variables removed.
Change-Id: If840e240155c36ed351c63e3136b5b44bb058697
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121932
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
similar to what we ended up with in DateControl in
svtools/source/brwbox/ebbcontrols.cxx
Change-Id: I37c843ff7e1e8e39b318db80fe590ce5f796f46a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119082
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Make 'GetLineStyleName' a static method of 'SvtLineListBox'
and use it to retrieve and set the names for the items used
in the "Border Style" dropdown button in Calc's formatting
toolbar.
This ensures that the corresponding names are available as
tooltips and for screen readers.
Change-Id: I6b775e1bcd62deefd8a8a6a778dcee426bf3a1f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111905
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
not just newly created one.
you can only restore back to a text-only view, not a text+(icon/whatever) view
Change-Id: Ic3becd7a942ee6b1dbabb57eebf1e25d1b626fdb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97972
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>