... for some soltools C programs"
The issues previously seen with current glibc versions are
now addressed differently by
Change-Id: I53d66f280ea82d295a2c2c086f4d02a965a893d7
Author: Stephan Bergmann <stephan.bergmann@collabora.com>
Date: Wed Sep 16 13:08:28 2026 +0200
Adapt loplugins to glibc 2.44 assert macro internals
, so revert the previous workaround again.
This reverts commit 5d72f86b56.
Change-Id: Ide517b9592ee1dbf444f000f48b901d474352c07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211064
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
...which started to cause issues like
> [CXX] sal/osl/all/acceptableaccessdenial.cxx
> engine/sal/osl/all/acceptableaccessdenial.cxx:30:5: error: implicit conversion (IntegralCast) from 'bool' to 'int' [loplugin:implicitboolconversion]
> 30 | assert(acceptableAccessDenials > 0);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/assert.h:139:23: note: expanded from macro 'assert'
> 139 | ? void (1 ? 1 : bool (__VA_ARGS__)) \
> | ^~~~~~~~~~~~~~~~~~
> engine/sal/osl/all/acceptableaccessdenial.cxx:30:5: error: redundant functional cast from 'bool' to 'bool' [loplugin:redundantcast]
> 30 | assert(acceptableAccessDenials > 0);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/assert.h:139:23: note: expanded from macro 'assert'
> 139 | ? void (1 ? 1 : bool (__VA_ARGS__)) \
> | ^~~~~~~~~~~~~~~~~~
and
> [C ] soltools/cpp/_tokens.c
> engine/soltools/cpp/_tokens.c:56:17: error: possibly unwanted implicit conversion when calling bool param [loplugin:pointerbool]
> 56 | assert(trp->bp); // realloc failure is OOM -> no point to handle
> | ~~~~~^~
> /usr/include/assert.h:164:42: note: expanded from macro 'assert'
> 164 | ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
> | ^~~~~~~~~~~
> /usr/include/assert.h:114:40: note: method here [loplugin:pointerbool]
> 114 | extern _Bool __assert_single_arg (_Bool);
> | ~~~~~^
> engine/soltools/cpp/_tokens.c:56:12: error: implicit conversion (PointerToBoolean) of call argument from 'Token *' (aka 'struct token *') to 'bool' [loplugin:implicitboolconversion]
> 56 | assert(trp->bp); // realloc failure is OOM -> no point to handle
> | ^~~~~~~
> /usr/include/assert.h:164:42: note: expanded from macro 'assert'
> 164 | ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
> | ^~~~~~~~~~~
and
> [CPT] compilerplugins/clang/test/consttobool.cxx
> error: 'expected-error' diagnostics seen but not expected:
> Line 72: implicit conversion of constant &"msg"[0] of type 'const char *' to 'bool'; use 'true' instead [loplugin:consttobool]
> 1 error generated.
against glibc-devel-2.44-1.fc45.x86_64
[Cherry-pick note by Michael Weghorn:
clang-format was run on the files modified by this commit
to adhere to code style as mandated by the LibreOffice clang-format rules,
while the Collabora repository that this commit was cherry-picked
from doesn't check clang-format rules any more.
Based on the discussion in
https://gerrit.libreoffice.org/c/core/+/211063/comments/d368cf20_d66d1a50 ,
I'm adding myself as co-author to clarify the cherry-picked commit
contains those additional changes to the original commit by Stephan
from the Collabora main branch.]
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I53d66f280ea82d295a2c2c086f4d02a965a893d7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12738
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ecce89b1fe7f0b1f09c13c46625b33443b1dadfb)
Co-authored-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211063
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
We have added various workarounds for ScPatternAttr use after free
issues since:
commit 2e1f9da8a6
Date: Sat Dec 23 15:52:06 2023 +0100
Decouple ScPatternAttr from SfxItemPool
separated ScPatternAttr from SfxItemPool.
Prior to that an ScPatternAttr was an SfxPoolItem held in the doc's
SfxItemPool which kept every item alive for the document's whole
lifetime, so any raw const ScPatternAttr* was basically safe.
The various workarounds for the new behaviour were:
commit dca19993a4c732e95b9a47e1abdcaad6efbeebe9
Date: Sat Jan 6 14:40:28 2024 +0100
tdf#159042: crash after changing cell style (if direct formatting done)
commit 19437715eb415fe2c40b8b40dbe04ddca28f9a35
Date: Thu Sep 12 12:06:28 2024 +0100
null pattern deref seen in ScViewData::SetEditEngine
commit e384f2e8de9603ee65a3edc6dcb50b07116ee4fc
Date: Mon Mar 10 14:45:22 2025 +0000
crashtesting: crash on reimport of xlsx output of forum-pl-2758.ods
commit 7999585bd8378f1a8d04ea2a9a93a8e0bf4d8eb6
Date: Fri May 9 08:50:17 2025 +0100
crash on null pattern de-ref
commit 1bf9bbea96
Date: Tue Oct 28 16:53:49 2025 +0300
tdf#169115: sc: fix use-after-free bug in ScDocument::FillInfo
commit 9f366af81478ad218dc2ef2e37423a9ebcc84e73
Date: Sat Apr 25 14:47:02 2026 +0200
ScPatternAttr use-after-free
commit 20fe691a18fb35120d0765dd1519acd6d2986c38
Date: Tue Apr 28 08:33:34 2026 +0200
ScPatternAttr use-after-free (2)
This commit picks the class member fields that are still raw
ScPatternAttr* and converts them to CellAttributeHolder:
ScUsedAreaIterator::pPattern and pFoundPattern
ScInputHandler::pLastPattern
LotAttrCol::ENTRY::pPattAttr
ScPatternCache::Entry::pPattern
The CalcAll() workaround from 9f366af81478 then doesn't seem to be needed(?)
A new compiler plugin catches class member fields of raw type
ScPatternAttr pointer.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibb9f28b8fcaa5470c7a82eee52900c2d60434e41
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3163
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 9c7b6313a29067bf0eef12884fc3ce7efb0374e5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209822
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
These classes are only used by the presenter console
implementation in sd/source/console/, so move the
classes there as well, which implies moving them
from Library_sd to Library_sdui and no longer having
to have PresenterHelper.hxx in an sd-wide internal
include directory and there is no more need for
PresenterHelper to be SD_DLLPUBLIC.
In other words: Make clear these are implementation
details of the presenter console, and not used
elsewhere.
Change-Id: Ica2a516215344360f647c121b5f0942a67f54ea3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208744
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This class is unused now after
Change-Id: If15d1519cea179596bd72aaf5354d01f89ccb9e7
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Jul 27 13:38:37 2026 +0200
tdf#172275 tdf#172831 cui: Drop unused SvxConfigPage::m_s{App,File}Name
Drop it.
Change-Id: Ic670d1db42f2262ee67d87b84819bf0aab8d9c30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208673
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
SvxNotebookbarConfigPage is unused since
commit 7312d7d3c9
Date: Wed May 20 15:28:42 2026 +0200
Relates tdf#166641 - Add category labels to Writer's Tabbed Notebookbar
* gla11y-conform
* consistent IDs (gd*/lb* and btn*/bx*)
* consistent layout with grids
* defined spacing of 3px
* defined margins of 6px
* category labels
* redundant Insert sections from Home and Forms from Tools removed
* customization of Notebookbars removed since the new position
of commands is not properly found
and its ctor was dropped in
commit 00aebb5e88
Date: Fri Jun 26 18:55:24 2026 +0200
loplugin:unusedmethods
. Drop the class altogether, along with the code
commented out since the above commit that would
have used it.
Change-Id: I45bcbdcbf89d8f50b18512cde81d7af26e52a2a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208668
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
“psp” stands for PostScript print, there is no PostScript and the class
has nothing to do with printing.
Change-Id: I45ceb4b5deb5ae9cbb731158a5f84f0d716c6036
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208527
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
The FreeType/fontconfig font backend was spread over three directories
mostly for historical reasons. Lets clean this up and consolidate it
under one directory.
helper.cxx holds the psp path helpers, so it goes to print/ next to the
rest of the printing code.
Change-Id: I67d20e3e4bdf71d978a79e672bb31d3dd1460595
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208522
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
The MacroChooser dialog is only run from the ChooseMacro
function.
As mentioned in previous commit
Change-Id: I49b6702c0083014d10c16b6917284cc8cc23d283
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Jul 14 08:53:17 2026 +0200
bactl: Flatten ChooseMacro
, that one only cares about MacroExitCode::Macro_OkRun
and returns early for all other dialog return codes.
Drop the MacroExitCode enum class and use a regular
int return values of RET_OK instead of MacroExitCode::Macro_OkRun
and RET_CLOSE for the others directly instead of casting
back and forth between int and enum class values.
The dialog can be triggered like this:
* start Writer
* "Tools" -> "Macros" -> "Run Macro..."
Change-Id: I49b6702c0083014d10c16b6917284cc8cc23d283
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208061
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
The logic 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
This was (also) used in the dumpState function in
vcl/source/app/lok.cxx for debugging purposes
when using LibreOfficeKit to dump more information
about the vcl::Window hierarchy. Drop the call to
it there, but leave dumping other information
in place there.
Change-Id: I8033516ecdf21f2c1b3a498774ef8ba54a91fdc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206012
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Triggering event processing in the soffice process in
QtFrameGrabber::grabFrame is problematic. To avoid
this, using separated QThread (and QEeventLoop)
Change-Id: Id51c14c09842e7a003b6da665d85f67605fdf697
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199083
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Introduce calculated field infrastructure across the pivot table stack:
cache (ScDPCache::CalculatedField), filtered cache, data sources
(ScSheetDPData, ScDatabaseDPData, ScDPGroupTableData), result
calculation (ScDPTabRes), dimension supplier (ScDPSource), and
save/restore (ScDPDimCalcSaveData). Add new ocDPFieldName opcode
and formula compiler support for pivot field references.
Handle OOXML import/export of pivot calculated fields.
Change-Id: I42d094122d547b8ee9a2b63f809bdb13127f8f01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197913
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga@collabora.com>
Up to now with lots of effort ModelData was held at the
svx::diagram::Point to keep a stripped version of Text and
TextAttributes and also a selective (not complete!)
key/value list of attributes for each shape itself
(fill/line/text/...).
These had to be moved to/rescued from oox::Shape that is
used as helper at import to that model after import, set again
at the oox::Shapes when XShapes had to be re-created, you name
it - very complicated and error-prone, and never complete
by definition.
Nonetheless data in OOXML MSO format, so pretty easy to re-
export if necessary /that's what I was looking at last
changes).
That also meant that all changes done to an XShape/SdrObject
*had* to be somehow transfered to that diagram model data,
too. We have no converters for that at all, target would
be data representation as in OOXML files.
What we *have* is import to our model using oox::Shapes and
ccreating XShapes/SdrObjects, and export XShapes snippets
'direct' to MSO ooxml formats.
Thus I thought about to use what we have, for the cost to
split the model: the DiagramModel *has* to be kept to be
able to re-create the Diagram on structural changes, that
is needed. But the attribute & text data can stay at the
associated XShapes that need to exist and get created
anyways.
That needs reliable identification of the XShapes
belonging to the model. It requires to load that Diagram
initially, using the oox::Shapes which have the complete
attribute model data to create the XShapes.
Remember that there is a 2nd import, from the
ReplacementGraphic which (may) be contained in the MSO
file.
From that moment on changes on those XShapes will be
diagram model changes if attributes get changed.
But they will not need to forward changes to the
DiagramModel in another format.
When re-layouting it means to copy that data from old
XShape to new XShape, before these get deleted. There
may be new XShapes that need to be initialized, too.
For export this means that part of that export will have
to use the XShapes as model data as needed.
This also means that the quality of im/export of
Diagrams will in the future rely on the quality of our
existing im/export snippets for XShape/oox::Shape/oox.
These are developed and in use for a while now and
should have reached a good quality. If we have to
improve these that will always improve im/export
and Diagram stuff then, too.
This change does that big change and looks promising,
doing what it is intended to do. I still have to
experiment, so in master it is still deactivated due
to being too dangerous yet, see last SmartArt change
and mention of ACTIVATE_RECREATE_DIAGRAM_DATADOMS and
it's description.
Change-Id: Ife1591b0d3c8974d90a1004d94f3e6799be85a56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198221
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
The DiagramModel uses 4 mandatory and three optional XMLDoms
for it's data. These get imported, but to get to a roundtrip
we will need to be able to create & save these again.
Last changes prepared this by deleting XMLDoms which were no
longer valid dependent of changes done to that DiagramModel.
When exporting the availability of these gets checked and if
all are there, it gets exported as Diagram (in MSO format,
not yet in ODF). If nothing was changed the original Doms
get exported - untouched.
That test will now try - if e.g. the most important XMLDom
OOXData is missing - to re-create this in that action. The 1st
one which I now implemented that is the OOXData which homes
the Point/Connections/BGFill data (and some more).
Due to this needing testing I for now encapsulated this
to a EnvVar called ACTIVATE_RECREATE_DIAGRAM_DATADOMS, so
this will for now only happen when this is set. Anyways all
that stuff is still behind the 'experimental features' wall.
This is and stays experimental for now.
These are already deep changes which need to get tested and
get to master, opening the path to experiment with it and
refine it. Due to the EnvVar gate no real changes should
happen in master, but due to the changes around it this
will need to be checked this way.
Change-Id: Iabba69b19387e45f1028843a25f3bae1fc4f8fe8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197676
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>