The std::map<sal_uInt16, OUString> members of SvxShapeCommandsMap
use ascending integers for the key, i.e. keys start with 0
and go up to N-1 if N is the number of elements.
Vector elements can be accessed by index as well, so switch to
using std::vector to simplify the logic.
To be safe, add an index check in
DefaultShapesPanel::ShapeSelectHdl
(std::map::operator[]() would implicitly insert a new
element when called with a non-existing key.) and
switch to std::vector::at() that performs bounds checks.
Change-Id: I0afc8d53a98d529b0d30344fccedd2167b5f595c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211731
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The previous variable names (n1, n2, n3, a4) provided no context about
the mathematical operations being performed during unit conversion.
This commit replaces them with descriptive names (nSourceValue,
nMultiplier, nDivisor, aBigValue) to clearly reflect their roles.
Additionally, inline comments were added to explain the BigInt fallback
path and the manual round-to-nearest integer division logic, making
the function significantly easier to read and maintain.
Change-Id: I7f83842a486861fc53173b41febfad6f766efbbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203682
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
commit 09c6204b63
Date: Thu Feb 29 17:15:23 2024 +0100
tdf#81880 Search the Gallery
dropped the `maThemeSelectionHandler` member, but left this
code using it, but commented out. Drop it, as it's no longer
relevant.
Change-Id: I50c8f255a2eb993497aafe20b5bafab18054b682
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211743
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The regression was when clicking on Pages, it was impossible to type a range.
But following https://bugs.documentfoundation.org/show_bug.cgi?id=173496#c17
from Heiko, if we use placeholder instead + keep what the user may typed,
it simplifies the pb.
So here are the changes:
- display placeholder when clicking "Pages" except if user typed something.
Also preserve what the user typed whatever it happens then (e.g. changing page
orientation)
=> change UI test to correspond to the whole change abovev
- add a delay mechanism for the preview when on Pages.
Indeed, when typing first character, placeholder was still in background for a brief time
+ there was a slight lag when typing a character
These changes have been proposed by GPT 5.6 Luna but I could test them
and make UITest_calc_dialogs is ok for me (we'll see on Jenkins).
Change-Id: Ifa57a8d1fded24cc03ed8f0589828931e897d641
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211738
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Update helpcontent2 from branch 'master'
to c081e947a6b2e424325c60058a40042510e1807a
- tdf#173835 Select All Sheets also select hidden sheets
- Correct capitalization of "Select All Sheets" command like in UI
- Add some precision about the hidden sheets which are also selected
Change-Id: I154b5de6c298a7933a2398c09e7af9d3938649d1
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211777
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Otherwise, all remaining listeners will be checked, leading to
performance issues when closing a document with many objects like formulas.
Change-Id: I99b4b536e40af8a9045c7da6356cca87d3c88b02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211697
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
When building with `--with-java`, `jar --date=` gets an empty value on
the BSDs due to "date: illegal option -- d" and causes build failure.
All the BSDs use `date -r EPOCH` and the `date` in macOS is derived from
BSD's. `date -d @EPOCH` is GNU coreutils syntax.
Claude Code (Opus 5.5) was used to analyze the issue and to draft the
first fix.
Change-Id: I5c28c58985f0fdf2a44a608000b9d14ebd33a6ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211765
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
In the same way that
Change-Id: I188f812f2d03fa8cbd97ffaaab3081094809887e
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Oct 1 10:29:15 2026 +0200
chart2: Port "Chart Type" dialog from ValueSet to weld::IconView
had done for the "Chart Type" dialog, also port the chart
sidebar from using the custom ValueSet widget to weld::IconView.
This helps to be more consistent with other platform/toolkit
widgets and reduces custom logic.
It can be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* while the chart is still selected, open the "Properties"
sidebar deck
Change-Id: I858dda4b9d5bf62291ee3b0c76b13ee92221f9e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211660
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.
The dialog can e.g. be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* right-click on one of the bars in the chart to open
the context menu
* activate the "Chart Type..." menu item
The Python script mentioned in the commit message of
commit 327679b2fb
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Jul 8 15:50:59 2026 +0200
tdf#130857 Define widgets in Calc "General" options page in order
was used to reorder the GtkGrid children automatically.
Change-Id: Iafe15ceba9e7c8b7651114e538b9ca20915c2367
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211659
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Port the widget to select the chart subtype in the "Chart Type"
dialog from using a ValueSet widget to using weld::IconView.
This helps to be more consistent with other platform/toolkit
widgets and reduces custom logic.
Adjust indices used to account for the fact that
weld::IconView indices are 0-based while the ValueSet ones
are 1-based.
The dialog can be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* right-click on one of the bars in the chart to open
the context menu
* activate the "Chart Type..." menu item
The chart sidebar (ChartTypePanel) will also be ported
in an upcoming commit.
Change-Id: I188f812f2d03fa8cbd97ffaaab3081094809887e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211658
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Simplify drawing a line of N pixels height by drawing a
filled rectangle of that height, instead of drawing N lines
with a height of 1 pixel each.
The popup for configuring the line thickness that uses
this code can be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* select the chart wall in the chart
* open the "Properties" sidebar deck
* in the "Line" section of that sidebar deck, click on the
"Thickness" button/combobox
Change-Id: Ie5f3bb7c25cfddaf17f3b181f6d0cac4723e1459
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211711
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
`aLineEnd` uses the same calculation for the Y coordinate as `aLineStart`.
Simplify and make that more obvious by reusing the already calculated
one from `aLineStart`
Change-Id: I7e12c6fcf526d50dcd6d1d9dc19805cc01837c2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211710
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Inline the logic when called with a non-zero param
to the only caller that passes a non-zero value.
Rename to LineWidthValueSet::UnselectItems and stop
passing any param for the callers previously passing
a zero parameter.
This will also make it a bit more straight-forward
to port away from the custom LineWidthValueSet to using
a weld::TreeView in an upcoming commit.
The popup for configuring the line thickness that uses
this code can be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* select the chart wall in the chart
* open the "Properties" sidebar deck
* in the "Line" section of that sidebar deck, click on the
"Thickness" button/combobox
Change-Id: Ieed1323cd8d82c498a676c4408754880f61a8fcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211709
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Instead of tracking the currently selected entry via
LineWidthValueSet::nSelItem in addition to using the
selection logic of the ValueSet base class, drop that
separate member and use the existing ValueSet logic
to determine what item is selected.
This will also make it a bit more straight-forward
to port away from the custom LineWidthValueSet to using
a weld::TreeView in an upcoming commit.
The popup for configuring the line thickness that uses
this code can be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* select the chart wall in the chart
* open the "Properties" sidebar deck
* in the "Line" section of that sidebar deck, click on the
"Thickness" button/combobox
Change-Id: Ie45eb1233b70c7a5ff814ade3fde774e2eb983b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211708
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This is used for the popup that allows configuring the
line thickness which can be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* select the chart wall in the chart
* open the "Properties" sidebar deck
* in the "Line" section of that sidebar deck, click on the
"Thickness" button/combobox
Change-Id: Ib06e95f19d33e983c9641e920572cd57a3272b5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211707
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Port the "Style Presets" panel in Writer's experimental
"Design" sidebar panel from using a custom ValueSet
widget to using weld::IconView.
This helps to be more consistent with other platform/toolkit
widgets and reduces custom logic.
The UI can be triggered like this:
* start Writer
* in "Tools" -> "Options" -> "Advanced", enable experimental
features (and restart as needed)
* open the sidebar
* switch to the "Design" sidebar panel
Change-Id: I5ac862254c2e09f8ad595eff1623d9f2f5f9b676
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211705
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
+ convert datetime to ISO format
Result:
<!-- Doc.Information -->
<!-- Printed: by Firstname Lastname on 2026-10-01T21:31:34,817333179 -->
For the change of lcl_AddStamp, I used GPT 5.6 Luna.
Change-Id: Ia73e9c00f17653aa5ab491c4bbc1d3d933105836
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211696
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Exporting a hyperlink laid out down the page, over more than one line,
produced link annotations a PDF/UA validator rejects: on a vertical page
whose link wraps, two of the three annotations carried no structure
element, and veraPDF reported both under ISO 14289-1 7.18.5:
A Link annotation is an Artifact or is nested within null tag
(standard type = null) instead of Link
Export a document whose hyperlink ends in a ruby and runs over several
lines down the page to PDF with tagged PDF enabled, then run veraPDF
over the result in PDF/UA-1 mode to see it.
An annotation is tied to a structure element by the text painted inside
it, so one holding no text of any line is tied to nothing. That is what
the region CalcFrameRects returns can hand out: it covers the selection
in whatever rectangles fall out of inverting the pieces it was built
from, and one of those can span several lines while another holds a ruby
and none of the text beside it.
Let CalcFrameRects return those pieces as well, and the holes it cuts
afterwards, and take the shape from the pieces and the area from the
region: the pieces follow the lines and, once the overlapping ones are
joined, no longer overlap each other, so every part of the region falls
in exactly one of them. What tdf#157816 requires still decides each
part, and the parts a piece has left are joined unless the join would
reach over a hole - a fly, a drop cap - that the selection excludes on
purpose.
Every annotation now holds text of the lines it covers, so every one of
them is tagged, and a ruby sits inside the rectangle of the line that
carries it. The narrowing to a portion's band, the growing over a ruby
portion and the joining of tiling rectangles that
Ide896d00c7619b772802762e85abfb6e2cf7ef0a ("tdf#163240 sw: let a link's
rectangle cover the ruby it ends in") added are all gone. On the
horizontal document that change was measured against, the exported
rectangles are the same to the last digit.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I9faf2bc10af491576cc2f4ba5f3e3433eb03d16c
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13767
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e77b1d25d3601315f80169e4e811d74ef2ff0374)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211704
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
A ruby makes its line taller than the line's own text, so for a
hyperlink that ends inside one the selection region for that line was
split into two rectangles: the band holding the line's text, which runs
on under the ruby's base, and above it a band reaching only as far as
the ruby begins. Neither covered the phonetic annotation standing above
the base. Each became a link annotation in the exported PDF, so clicking
the phonetic annotation did nothing, while a 6.9pt annotation stood over
blank space carrying no structure element, which veraPDF reported under
ISO 14289-1 7.18.5:
A Link annotation is an Artifact or is nested within null tag
(standard type = null) instead of Link
Export a document whose hyperlink ends in a ruby to PDF with tagged PDF
enabled, then run veraPDF over the result in PDF/UA-1 mode to see it.
The same document with its text running down the page draws the clause
twice.
The rectangle a hit test returns for a character is as tall as the whole
line, ruby and all, so GetCursorRectsContainingText, which
6593d680e2 (tdf#157816 sw: PDF export:
filter out links on empty space, fields, 2023-11-02) added to drop a
rectangle holding no text, kept the empty band. Ask for the real height
and the comparison narrows to the band of the portion the character is
in. Dropping the empty band would leave the phonetic annotation
uncovered, so grow the surviving rectangle over the ruby as well, using
the extent GetCharRect reports for a position inside a ruby portion.
Where the text runs down the page a band's height is measured along X,
which the real height carries as a negative height, so narrow across the
line there instead. The region split still hands such a line back in
pieces, and the piece holding the ruby holds none of the line's text, so
nothing paints in it and nothing tags it. Pieces that tile one strip of
a line are therefore joined into one annotation. Where the text wraps
onto a further line the pieces no longer tile, and such a page keeps an
annotation a validator rejects.
veraPDF no longer reports 7.18.5, in either writing direction, for a
line that does not wrap, and the phonetic annotation is inside the
link's rectangle. An annotation is a plain box, so a ruby over part of a
link raises that line's whole rectangle, and a link ending partway
through a ruby's base widens it to the end of that base.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ide896d00c7619b772802762e85abfb6e2cf7ef0a
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13704
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 3c9aede98b24d272e6dfcae0f3b898777fa89d44)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211703
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
/src/libreoffice/sw/source/core/table/swtable.cxx:2347:73: runtime error: member call on address 0x5ae75cdc3ea0 which does not point to an object of type 'SwNode'
#0 0x5ae73cde0805 in SwTable::GetTableNode() const /src/libreoffice/sw/source/core/table/swtable.cxx:2347:73
#1 0x5ae73cddf1d6 in SwTable::SwClientNotify(SwModify const&, SfxHint const&) /src/libreoffice/sw/source/core/table/swtable.cxx:329:39
#2 0x5ae73be96db9 in SwModify::CallSwClientNotify(SfxHint const&) const /src/libreoffice/sw/source/core/attr/calbck.cxx:276:20
#3 0x5ae73be96f81 in sw::BroadcastingModify::CallSwClientNotify(SfxHint const&) const /src/libreoffice/sw/source/core/attr/calbck.cxx:297:15
#4 0x5ae73c389203 in SwDoc::IsUsed(sw::BroadcastingModify const&) const /src/libreoffice/sw/source/core/doc/poolfmt.cxx:108:13
#5 0x5ae73c472533 in SwDoc::GetUniqueTableName() const /src/libreoffice/sw/source/core/docnode/ndtbl.cxx:4265:38
#6 0x5ae73c46dc3b in SwDoc::InsertTable(SwInsertTableOptions const&, SwPosition const&, unsigned short, unsigned short, short, SwTableAutoFormat const*, std::__1::vector<unsigned short, std::__1::allocator<unsigned short>> const*, bool, bool, rtl::OUString const&) /src/libreoffice/sw/source/core/docnode/ndtbl.cxx:379:22
#7 0x5ae73ba4ba51 in WW8TabDesc::CreateSwTable() /src/libreoffice/sw/source/filter/ww8/ww8par2.cxx:2415:30
#8 0x5ae73ba595f0 in SwWW8ImplReader::StartTable(int) /src/libreoffice/sw/source/filter/ww8/ww8par2.cxx:3428:23
a tracked deletion applied at import ran from one cell to two cells
later, and removed the whole section of the cell between them while
the table still listed that cell
a range that ends in another table, runs into a cell from outside, or
ends in a nested table leaves a box without its cell in the same way
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I1f07e0e1784d88e47feb97bce4490ba3db83e7cb
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13647
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 898c0e4329e20e3bc2988cc1f576bad1074fff4f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211701
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Following up to
commit 6296615b8d (master-android)
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Sep 29 14:20:18 2026 +0200
tdf#173695 svx: Ensure minimum height for ColorWindow
and
commit 5c53840b57
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Sep 30 10:15:59 2026 +0200
tdf#173695 svx: Increase min height for ColorWindow icon view to 250
, switch from using a minimum height of 250 to using
that as the fixed height.
The idea of using a minimum size was to still allow
using more space for the ColorWindow when a palette
with a lot of colors is initially selected.
However, the fact that the size of the popup differs
depending on what palette is initiallly selected is
considered confusing/as a bug, so instead use a fixed
height after all, see discussion in tdf#173695 for
more details/background.
A fixed height was also used when SvxColorValueSet
was still used in ColorWindow, i.e. before
commit a4d5983b4e
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Jun 5 11:48:54 2026 +0200
tdf#130857 Port ColorWindow from SvxColorValueSet to ColorIconView
By then, the size could more easily be optimized to
just fit the colors of the "Standard" palette. With
weld::IconView being used now, the exact spacing can
differ depending on what toolkit/theme/style is used, see
the above-mentioned 5c53840b57
for more details.
Which properties are evaluated in the .ui file
depends on the weld implementation.
While the GTK implementation evaluates
GtkScrolledWindow::min-content-height
and GtkScrolledWindow::max-content-height, the vcl one
doesn't do that. Also set GtkWidget::height-request so
the fixed height also applies for that one.
Change-Id: I7c49218872610bcf345b35849d664f85d29fdc47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211678
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The justification section of the dialog is all disabled whenever the
chosen alignment is something other than “justify”. When the value is
changed the sensitivity of all of the controls is updated, except that
the update for the label for letter spacing was missing. This looked
weird on the dialog.
Change-Id: Ibc774402ce72f820f14ea8265b20cb0113f84be9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211675
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Changes SwUnoCursor::operator* to use shared_ptr::operator* so that it
will assert that the pointer is not null. This should help catch cases
that were relying on undefined behaviour to get a pointer to the
returned reference.
Change-Id: If90db9404a34fb08bfef506eb00ebd99fb82406b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211698
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>