There seems to be an idiom used throughout the LibreOffice code where
lastIndexOf is called and then the returned index is checked to see if
it covers the entire end of the string. This should be equivalent to
just calling endsWith but it’s slightly less efficient because
lastIndexOf will pointlessly continue searching other places in the
string if the end doesn’t match.
Change-Id: I4c2c6dd750d41ffabf5d27011c22a4bbb5e32777
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204300
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
* UpdateCharts calls InvalidateTable internally
* This code was a copy-paste from UpdateCharts_
Change-Id: Iffe02b30cae7464c0a5e186d7834b22d06d21296
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204338
Tested-by: Jenkins
Reviewed-by: Jakub Trzebiatowski <ubap.dev@gmail.com>
* Update helpcontent2 from branch 'master'
to 8b9d6582cf42fc3898e4bbed700e1bf263bc69ec
- tdf#171816 Change the link to Acces2Base in Help
Change-Id: Ice15286c61268fe70010b83a559139904d1a883a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/204340
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Replaced the anonymous namespace in vcl/source/outdev/map.cxx with
explicit static declarations for translation-unit local functions.
- Renamed getCorrectedUnit() to lcl_getCorrectedUnit() to match the
standard lcl_ prefix convention for local functions.
- Explicitly marked lcl_getCorrectedUnit() and lcl_calcConversionMapRes()
as static.
- Updated all corresponding call sites to reflect the renamed function.
Change-Id: I6a489a50f3f12d2797ecfb4c46dfed8dede70b1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203269
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Moved the declaration of the sal_uInt16 i loop counter directly into
the for loop initializers across several polygon conversion methods
in vcl/source/outdev/map.cxx. This reduces the scope of the variables
to the loops themselves, cleaning up the code and following modern C++
practices.
Affected functions include:
- ImplLogicToDevicePixel()
- LogicToPixel() (both overloads)
- PixelToLogic() (both overloads)
Change-Id: I5f7f46d786c2e7e34c8277acee689820c5f74305
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196481
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Call RenameTableReference for all formulas in SwDoc::SetTableName to
update formulas when a table is renamed.
Change-Id: Ie91410e5d9a9800492c0b6138231121a7528719f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203803
Reviewed-by: Jakub Trzebiatowski <ubap.dev@gmail.com>
Tested-by: Jenkins
Add a method for updating table references inside formulas.
Example:
Formula: =<Table1.A1> + <Table2.B1>
Renaming "Table1" to "NewTable"
Result: =<NewTable.A1> + <Table2.B1>
Note: Tables with a dot ('.') in their name may not update correctly.
See: tdf#171783
Change-Id: I4f3695afcd7003b8253ae2f9247f193245e21f07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203802
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Added ToggleSinglePageSheetsHdl in impdialog.hxx and implemented it in
impdialog.cxx following the pattern of ToggleAddStreamHdl. The handler
disables all range widgets when 'Whole sheet export' is active, as it
overrides sheet selection entirely. A new variable
bDialogUsedThisSession was introduced that checks if the user had used
the dialog to export as pdf once in the current session. This was done
so as to always initialize the 'whole sheet export' to false on dialog
pop up for first time on current session, and then to persist the user
selected state throughout the sesssion and reset on session restart.
Also added a test to check for the disabling of range field in
calc_tests4 folder under the method test_singlePageSheetsDisablesRange.
Change the following files:
filter/source/pdf/impdialog.cxx
filter/source/pdf/impdialog.hxx
sc/qa/uitest/calc_tests4/tdf129162_singlepagesheets_disables_range_options.py
Change-Id: I81390ff1d173ac05d7178440775efa1dbbf106bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202286
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
the existing one already handles both cases, and the difference only
mattered for wsl where the configure step is run in a different
environment (the wsl distro container) than the build, so configure
needs to see the paths as seen from within wsl vs the build then needs
to have windows paths.
For cygwin the configure and build env are the same, so if configure
step can see it, then also the build (and vice versa) - however
AC_PATH_PROGS still only treats a path starting with / as valid, so also
change the $formatted_path_unix to unix-style for cygwin.
Change-Id: I20caf864d7759cc261a01d4de43daa60bf459606
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204109
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
* Update translations from branch 'master'
to 92a5bf090c8e6ff3f19567b1a4f9faa7f97830dd
- update translations for master
and force-fix errors using pocheck
Change-Id: I9ec60d8c463d2bbee61602421d55244fe505a38d
* Update helpcontent2 from branch 'master'
to ee8dd71b9bb5cc9130a3251d65578ca814397894
- tdf#168783 text orientation in page tab of page style dialog
+ removal of the outdated screenshot
+ Note: preview of vertical orientation is wrong, character should be rotated.
Change-Id: Ie443c661c274b7569d521a163f704329e255188f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/204310
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
also tdf#137440 and tdf#102780
EMF files with pre-shaped text (e.g. Arabic) use ETO_GLYPH_INDEX in
EMR_EXTTEXTOUTW records. The string data in these records contains
font-specific glyph indices (16-bit IDs), not Unicode codepoints.
Previously, emfio read these glyph indices as Unicode text via
read_uInt16s_ToOUString, then passed them to DrawText which creates
a MetaTextArrayAction. On playback, VCL/HarfBuzz would shape these
fake "characters" again, producing double-shaped garbage output.
Fix this by detecting ETO_GLYPH_INDEX and rendering the pre-shaped
glyphs as filled polypolygon outlines, bypassing text shaping entirely.
Implementation:
- Add OutputDevice::GetGlyphOutlines() as a new VCL public API that
takes raw glyph IDs and returns per-glyph B2DPolyPolygon outlines
by calling LogicalFontInstance::GetGlyphOutline() directly. This is
needed because LogicalFontInstance is in VCL's private headers and
not accessible from emfio.
- Add MtfTools::DrawGlyphs() in emfio that mirrors the DrawText()
setup (position/DX/DY mapping, font/color/alignment MetaActions)
but instead of emitting MetaTextArrayAction, it obtains glyph
outlines via GetGlyphOutlines() on a VirtualDevice, positions each
glyph using the DX/DY array, and emits the combined result as a
filled MetaPolyPolygonAction with the text color.
- Branch in emfreader.cxx: when ETO_GLYPH_INDEX is set on the Unicode
variant (EMR_EXTTEXTOUTW), read glyph indices as sal_uInt16 values
and call DrawGlyphs() instead of DrawText().
- Since glyph indices are font-specific, DrawGlyphs() checks font
availability via IsFontAvailable() before rendering. If the required
font is not installed, it returns false and the code falls back to
the standard DrawText() path (same as before this change).
- Remove the stale SAL_WARN_IF for ETO_PDY|ETO_GLYPH_INDEX, since
both flags are now handled.
Change-Id: Ib6e0a0b1accfe61ff871c391d02f4c529764438c
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/318
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit b260c2a6d8313c80720e34a366f01bcd0e429f47)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204245
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Writer
* "Insert" -> "Chart"
* right-click underneath the legend to open context menu
* select the "Insert Titles..." context menu entry
* type "TITLE" for the "X axis" field and confirm with OK
* select the new "TITLE" title of the X axis
* right-click on it to open the context menu
* select the "Format Title..." context menu entry
to trigger the "X Axis Title" dialog
Prior to this commit, the dialog would already show up,
but the content of the "Alignment" tab page newly declared as
supported in this commit would be missing when use of
native Qt widgets was enabled.
Change-Id: I333a2d41220a1a9708c0621196d8546b44f06482
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204219
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This UI file is used for the "Alignment" tab
of the chart dialog for the X/Y Axis title that can be
triggered like this:
* start Writer
* "Insert" -> "Chart"
* right-click underneath the legend to open context menu
* select the "Insert Titles..." context menu entry
* type "TITLE" for the "X axis" field and confirm with OK
* select the new "TITLE" title of the X axis
* right-click on it to open the context menu
* select the "Format Title..." context menu entry
to trigger the "X Axis Title" dialog
Change-Id: I92826df1c9f2e719ff147a09ae2d3d005e9529ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204218
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Writer
* "Insert" -> "Chart"
* double-click on the Y axis to open the "Y Axis" dialog
Prior to this commit, the dialog would already show up,
but the content of the 3 tab pages newly declared as
supported in this commit would be missing when use of
native Qt widgets was enabled.
Change-Id: I207065d46b784145dec98fd3e0d10ec8842925fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204217
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This UI file is used for the "Label" tab
of the chart dialog for the X/Y Axis that can be
triggered like this:
* start Writer
* "Insert" -> "Chart"
* double-click on the Y axis to open the "Y Axis" dialog
Change-Id: I7e563c0163d946ebecd059db4ff6b2a0fbc6abb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204216
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This UI file is used for the "Scale" tab
of the chart dialog for the X/Y Axis that can be
triggered like this:
* start Writer
* "Insert" -> "Chart"
* double-click on the Y axis to open the "Y Axis" dialog
Change-Id: I2c3f538aea3b3d94e2079952e80a32803cc6e0e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204215
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This UI file is used for the "Positioning" tab
of the chart dialog for the X/Y Axis that can be
triggered like this:
* start Writer
* "Insert" -> "Chart"
* double-click on the Y axis to open the "Y Axis" dialog
Change-Id: I77e466e454d8fe74f04af32723795aa54d44a5cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204214
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Writer
* "Insert" -> "Chart"
* double-click on the legend to open the "Legend" dialog
Prior to this commit, the dialog would already show up,
but the content of the "Position" tab page would be
missing when use of native Qt widgets was enabled.
Change-Id: Ibd3d5c9b9a9ae2335ac9f59d7929c08753685f70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204213
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This UI file is used for the "Position" tab page
in the chart "Legend" dialog that can be triggered
like this:
* start Writer
* "Insert" -> "Chart"
* double-click on the legend to open the "Legend" dialog
Change-Id: Iba5aa5d09cda6bc318cbb5627a9074dba7ad5729
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204212
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Writer
* "Insert" -> "Chart"
* double-click on a bar in the chart to open the
"Data Series" dialog.
The SchAttribTabDlg class implementing this dialog
also implements various other dialogs and always
uses the same "modules/schart/ui/attributedialog.ui"
.ui file.
As a consequence, other dialogs implemented by this
class may temporarily be not fully functional with
qt6 and SAL_VCL_QT_USE_WELDED_WIDGETS=1 until all
.ui files used by those as well are supported.
The plan is to look further into these in the near
future.
Change-Id: I2229146a309d0cb88da0e74d58c30008e28d3b3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204211
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Instead of hard-coding a size based on the icon size
for the icon views in ChartColorPalettes, rather let
the toolkit allocate a proper size.
Tweak some properties in the .ui file to achieve
proper auto-sizing.
Maybe, hard-coding the size was done because before
commit 478b712ea1
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Aug 7 09:45:15 2025 +0200
tdf#167658 vcl: Honor GtkIconView::columns + calc size
, the vcl implementation didn't take the column count
set in the .ui file into account when the original
code was was introduced in
commit a26c93a630
Date: Sun Aug 10 22:33:37 2025 +0200
chart color palettes: switch from drawingarea to IconView
.
In any case, it seems unnecessary now, and not hard-coding
the size e.g. results in all rows being visible at once
when using the gen vcl plugin for the following dialog,
instead of showing only part of them and using a scrollbar
despite there being plenty of space below the icon view.
Steps to trigger a dialog using this:
* start Writer
* "Insert" -> "Chart"
* double-click on a bar in the chart to open the
"Data Series" dialog.
* switch to the "Color Palette" tab
Now, all rows are shown at once for both, the gtk3
and the gen vcl plugins.
The code is also used in the chart palette popup
that can be triggered like this (and whose .ui
file is also tweaked in this commit a bit):
* start Writer
* "Insert" -> "Chart"
* click on a bar in the chart
* switch to the "Properties" sidebar deck
* in the "Colors" section, click on the arrow
of the button to open the popup
This commit also prepares for supporting the
dialog mentioned above with native Qt widgets
in an upcoming commit.
Change-Id: Ibf1cb597bc93f29033ab76432ca08af0b029cc0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204209
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Impress
* select the title text box
* right-click on the border to open the context menu
* select the "Area..." context menu entry
Change-Id: Ie832e930b2466b7955f3d11ef0f9c4f1fffa5f0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204207
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
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.
A dialog using this UI file for the "Shadowing" tab
page can be triggered like this:
* start Impress
* select the title text box
* right-click on the border to open the context menu
* select the "Edit Style..." context menu entry
Change-Id: If57bb3d9b26532b907e3a5e8f606476c17c9d3ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204206
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Impress
* select the title text box
* right-click on the border to open the context menu
* select the "Edit Style..." context menu entry
Change-Id: Ibab6aae23b2d75373923030a2a1907e2eb844d9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204205
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
However, restore
<property name="label" translatable="no"></property>
for GtkMenuButton that got lost on resave, to avoid
unwanted side-effects.
This UI file is used for the "Shadowing" tab page
in the dialog that can be triggered like this:
* start Impress
* select the title text box
* right-click on the border to open the context menu
* select the "Edit Style..." context menu entry
Change-Id: Ie28644af49e9f5812e9e20d07a7e29e6d131835c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204204
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Set the "accepts-tab" property to false for the GtkTextViews
so pressing the tab key moves focus to the next field in the
dialog, instead of inserting a literal tab character.
This simplifies using the dialog when using the keyboard only.
For the VCL and GTK implementations, pressing Ctrl+Tab
would previously be needed to move focus, which is less
intuitive.
Setting the property does not technically prevent inserting
tabs, they could still be inserted by copy-pasting
text containing tabs; just pressing the tab key while
the text view has focus won't insert them any more.
This is in the "Envelope" tab page of the "Envelope"
dialog that can be triggered like this:
* start Writer
* "Insert" -> "Envelope..."
Change-Id: I1d67a19fbabc876cce8b00eba29ef7e60cfbc954
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204189
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This means that native Qt widgets are used for this dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Writer
* "Insert" -> "Envelope..."
Change-Id: I66cfcbb4736374570e492288326ebfb4b70bdf51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204188
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This UI file is used for the "Envelope" tab
page of Writer's "Insert" -> "Envelope..."
dialog.
Change-Id: Id8c406ccf6d9f4d72c1d96a89402200f82a2eb5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204187
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>