Using &* can be problematic if the pointer is null. In this case it
probably doesn’t matter, but using unique_ptr::get() is probably easier
to understand anyway. This also paves the way for a later compiler
plugin to check for this.
Change-Id: If0ece4548b44080acf6db7f8c0ac37922d1a197c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211749
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Using &* to get the pointer out of a unique_ptr can be problematic if
the pointer is null. In this case that probably can’t happen, but either
way using get() makes the code easier to understand. This also paves the
way for a compiler plugin to detect this in a later patch.
Change-Id: Ib5291002581565e227dd6ca30570ecee63ef7cba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211748
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
This fixes a 26.8 regression from
commit 4fb31ea85f.
Over the years we keep battling people who want to add borders
to tables by default. This last time was even worse
since it applies an entire table style,
and table styles simply have never worked well.
So do NOT default to infuriating results.
Change-Id: I804ddbf14b8d4b609793bbb4bd1fa7be3f905358
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211927
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
You can remove a table style by Ctrl-clicking on the selected one.
(Probably nobody will find this - it probably needs a help tip.)
This was kind-of working before 26.8 (when chosing 'None')
but not as 'nice'.
Then at least it STOPPED applying the style when new changes are made.
I assume that a lot of the work that when into table styles
in 26.8 made it so that with this patch's change,
the existing format is cleared to nothing as the style is removed.
Clearing the existing seems like a good thing to me.
Change-Id: I174b3e8a408995500598937bbb548250c80bc40f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211925
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
This fixes a 26.8 regression from
commit 513bfbd476
With the table style deselected (via Ctrl-click),
pressing the OK button caused LibreOffice to crash.
Change-Id: If79d0c0bbd8c1b3f269ebb0b712f39a00b1f4fab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211924
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
This fixes a 26.8 regression from
commit 4fb31ea85f.
It looks like it was a mistake to not include it here in the first place,
but doubly so when a table style is deselected (via Ctrl-click).
In that case, if the user pressed the edit button,
LibreOffice would crash because of an attempted -1 index access.
Change-Id: I98038dad3693fba26d17022bec75bd201340c1cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211923
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
This fixes a regression from
commit 4fb31ea85f
When you de-select a table style in Table - AutoFormat Styles,
then the checkboxes below were left enabled despite a -1 index,
so the rename and renew buttons would crash.
Change-Id: I3c9601476f874116e43387ee40e934932a44b311
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211922
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
This fixes a 26.8 regression from
commit 4fb31ea85f.
When Table - AutoFormat styles has the style de-selected (via a Ctrl-click),
then SelFormatHdl would call UpdateChecks and crash
when GetData tried to access an index of -1.
Change-Id: I2302436d19ef99584cdb7c4e41738894756e9e8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211921
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
This fixes a 26.8 regression from
commit 4fb31ea85f.
Over the years we keep battling people who want to add borders
to tables by default. This last time was even worse
since it applies an entire table style,
and table styles simply have never worked well.
So do NOT default to infuriating results.
Note that this depends on the prior patch
to prevent LO from crashing...
Change-Id: I639286ac1f66883f3dd3f41a3d027a75e9ac1d97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211918
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
This fixes a 26.8 regression that can cause LO to crash,
from commit 2f16debb36.
A -1 is possible!
Hold down the Ctrl key to deselect the selected table style.
Since GetData requires a valid index, the -1 crashes the lookup.
The assert was added by Caolan just to silence warnings.
It OUGHT to be possible to have a -1,
so we desperately need to handle it.
One side effect of the -1 is that the preview window
needs to be updated. So that change is included in this patch.
It basically ends up being a partial revert of 2f16debb36.
P.S. I don't know how m_xTAutoFormat would already have a value,
but that has been like that since introduction,
so I decided not to fiddle with it.
But surely you cannot run the OKHdl more than once...
Change-Id: Ieae175072c17b20e79a139b434eae2fed09ca655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211917
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
With this new version, the build started to fail with
error: ‘XML_Size XML_GetCurrentColumnNumber(XML_Parser)’ is deprecated: please use XML_GetCurrentColumnNumber64 instead [-Werror=deprecated-declarations]
so we need to check the expat version in case the system expat
is older than 2.9
Also add 0001-fix-XML_GE-is-not-defined-evaluates-to-0-Werror-unde.patch
to fix
error: "XML_GE" is not defined, evaluates to 0 [-Werror=undef]
1087 | # if XML_GE == 1
| ^~~~~~
cc1plus: all warnings being treated as errors
Change-Id: If4f1d652941b7766ed94b65a6eaa018f37c89387
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211867
Tested-by: Jenkins
Tested-by: René Engelhard <rene@debian.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
I would like to turn this into an easyhack but first I want
to revert
commit 42190cd153
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Mon Mar 31 12:38:35 2025 +0200
Revert "Move SingleSelectQueryComposer.java tests to C++"
This reverts commit d1ec7e9077.
To avoid deadlocks on jenkins.
and see where CI deadlocks
Change-Id: I99a4b0ac035421cd255c51f69946b52d6ae6635f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211888
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
CppunitTest_oox_shape failed in the gerrit_linux_gcc_main and
gerrit_linux_clang_dbgutil_main builds like
oox/qa/unit/shape.cxx:1170:testPieTextArea::TestBody
double equality assertion failed
- Expected: 6673
- Actual : 6691
- Delta : 10
The test from 2ac8858b10699c897dd530c8b1434bd9604a4aff (tdf#149918 fix
pie in presetShapeDefinitions.xml, 2026-10-06) checked the BoundRect of
the shape, which includes the ink of its text; text layout changes merged
meanwhile probably moved that ink. Check the text frame that the preset
defines instead; it does not depend on fonts or line metrics.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ica16e4457cc150e9115dfc9994abd3f801778621
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14447
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 0bcc06cdc592bf7c9828b694b00acb7fed07eccf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211889
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* Update translations from branch 'master'
to eb0ac524bb996151fdbc4e78ec1f28effbc0c5b9
- update translations for master
and force-fix errors using pocheck
Change-Id: If8145fd30a2efc5506f32661c464cbd1603c154a
Both callers in subclasses pass the own frame. Use it
directly instead of requiring that callers pass it explicitly.
Change-Id: I5e40e86a0f6b4e76838234aacc32de71aad8ef22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211746
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
All of the 3 QtGraphicsBase subclasses
(QtGraphicsBackend, QtGraphics, QtSvpGraphics)
have their own QtFrame* member.
Deduplicate by moving it to the shared QtGraphicsBase
base class and adding a protected getter.
This will also allow having more QtFrame-related
logic directly in the base class in the future.
(An upcoming commit will get rid of the need to
pass the frame to QtGraphicsBase::ImplGetResolution
and it might e.g. also help to centralize new logic for
QtGraphics and QtSvpGraphics suggested to be added in pending
Gerrit changes [1] and [2].)
[1] https://gerrit.libreoffice.org/c/core/+/210650/6
[2] https://gerrit.libreoffice.org/c/core/+/210651/8
Change-Id: Ie6775b7dae0f1c8a68169ddbd746d3244b01e200
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211745
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
When an empty PPTX presentation was opened and saved,
its Title and Content layout/master slide lost its
autofit setting.
Original slide master had <a:normAutofit/> element
in its placeholders, which turned into <a:noAutofit/>.
This happened, because on import the inherited property
got overwritten by the default no autofit.
Change-Id: If9842d4c53eb283b9497b46198aaea4911413bc9
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14276
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit afe4932986453513ea1a50b1143de3827f39c0ed)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211865
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Avoid deleting fly formats one by one while the document is destroyed
since DeleteAndDestroyAll removes all fly formats at once in
SwDoc::~SwDoc afterwards.
Change-Id: Ie62ead75a3ba1cdfa47d072c329e8d9fec9387ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211864
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
* Update helpcontent2 from branch 'master'
to 5cb7c905920ce835f1a171c73e42b510eae6d63d
- tdf#152689 Set Like operator as a VBA operator
+ Some refactor
+ Added "VBA" for StrConv
+ The Like operator works even without "Option VBASupport 1". However, the implementation was carried to match VBA, and restricted the patterns to VBA compatible.
Change-Id: I1cbe5d9a67a27da561eb8a64b5dc6103bd036fe3
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211892
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Tested-by: Jenkins
Using &* can be problematic if the pointer is null. In this case I don’t
think it matters, but using UnoCursorPointer::get() is probably easier
to understand anyway. This also paves the way for a later compiler
plugin to check for this.
Change-Id: I01f77acc36cd1f96c6b438b9d6db005d0b08416a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211755
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Using &* can be problematic if the pointer is null. In this case I don’t
think it matters, but using UnoCursorPointer::get() is probably easier
to understand anyway. This also paves the way for a later compiler
plugin to check for this.
Change-Id: Ic825149a64e945ad623d1a23ee8ca24655182b3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211754
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
> clang++: /home/sberg/github.com/llvm/llvm-project/clang/lib/AST/ExprConstant.cpp:22171: bool clang::Expr::isCXX11ConstantExpr(const ASTContext &, APValue *) const: Assertion `!isValueDependent() && "Expression evaluator can't be called on a dependent expression."' failed.
as seen at engine/sc/qa/unit/ucalc_pivottable.cxx:269
> CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected data range.",
> static_cast<SCCOL>(FieldCount - 1), nCol2);
since 94299df72efeddb3d5af31396f5008300d66a90d "sc: Use #SPILL! error if the
pivot table output is blocked"
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I83f7949a7458ce030c13e94e2d9682ae080cc763
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1895
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit c3dec06e55716011a69d7b47163747007e05d905)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211834
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
+ rename "Freeze" to "Panes"
+ split Options into "View" for and "Options" for the last four commands
+ Remove "Function List" and replace it by "Styles"
Change-Id: Id662c3f09454f4a15a2593bff86b523c8d235997
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211823
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
The last caller of ValueSet::SetItemData and
ValueSet::GetItemData was ported away from
using ValueSet in
Change-Id: I423e80bba9e81a98e80652f6486970d40286362e
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Oct 2 12:36:17 2026 +0200
svx: Switch to weld::TreeView in LineWidthPopup
. Drop the now unused methods and the corresponding
ValueSetItem::mpData member that could previously be used
to store custom data in an item.
Similar logic still exists in weld::IconView
and weld::TreeView, which should generally be preferred
over using the custom ValueSet widget.
Change-Id: I7d58ff933cb78a1157d3628096a17f68ddf2034d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211737
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Instead of using a custom ValueSet subclass to
draw images and text next to them for selection
in the line width popup, use a weld::TreeView with
two columns: one for the image, and one for the text.
This is similar to what
commit b185d34642
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Nov 28 14:12:04 2025 +0100
tdf#168120 sc: Switch to weld::TreeView in CellLineStyleControl
did elswhere.
Adjust indices used to account for the fact that
weld::TreeView indices are 0-based while the ValueSet ones
are 1-based.
The special "Last custom value" entry so far was
using two separate images, depending on whether
or not it was enabled/sensitive or not: If it is
disabled, a greyed out variant of the image was used.
With the switch to weld::TreeView, leave that up
to the TreeView by simply enabling/disabling the
corresponding row using weld::TreeView::set_sensitive
for the corresponding row.
Drop the now unused LineWidthValueSet.
This switch to weld::TreeView reduces custom widget
logic and custom drawing and makes this more consistent
with other widgets used elsewhere (e.g. like for the
one mentioned in the commit above, the usual font
is used now as well, and it also aligns the behavior
more with that one.)
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: I423e80bba9e81a98e80652f6486970d40286362e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211735
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The expected numbers are what PowerPoint for Windows shows.
The tests cover: the same startAt on every paragraph, a new startAt
or numbering type, plain and unnumbered paragraphs between items,
nested lists, and startAt from a:lstStyle.
Change-Id: I75d9bfc88ca2e1d73442b28fb039c20fc1f907be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211783
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
PowerPoint writes the same startAt on every paragraph of a list, and
since tdf#168406 each startAt restarted it: 2. 2. 2. instead of 2. 3. 4.
Restart only when a list begins at that level or its numbering type or
startAt changes, a missing startAt being startAt="1". Paragraphs without
a bullet of their own, also without a:pPr, take it from a:lstStyle. Don't
set the restart flag in a:lstStyle itself: every paragraph inherits it.
An unnumbered paragraph ends the lists at its level and deeper.
Change-Id: I26720a6ba54a8050cfb6e0ba892096039c391c36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211632
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Tested-by: Jenkins