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>
which simplifies O[U]String expressions like
A = A + foo
into
A += foo
mostly because then they get spotted by other string plugins.
Change-Id: I2b81b701144acdf18743b52cb0befa7f90fd9528
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194191
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This should whittle down this absolutely massive file and make it easier
to read and understand.
Change-Id: If2246b0b06ca5d1e9e92d45df2c8b3cfc1628178
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190883
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
inspired by
commit 4888f6f3f5
Author: Neil Roberts <bpeeluk@yahoo.co.uk>
Date: Sun Oct 26 16:26:47 2025 +0100
tdf#166488 Fix local variable used to store char from SvxCharacterMap
Look for places narrowing a sal_UCS4 value and thus losing information.
I dont actually fix anything here, just change some types to use the sal_UCS4 typedef,
and add some TODO comments.
Change-Id: Iaea7ba647889efcdaafe5138d4e4806849514f02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193384
Tested-by: Jenkins
Reviewed-by: Neil Roberts <bpeeluk@yahoo.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Use a struct for that, and its 'insert' method, to avoid repeating code,
and make the logic more transparent.
Change-Id: I90fd4879e1b680ededc3aa4692fb6f59eeb5916c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191144
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
...<https://github.com/llvm/llvm-project/commit/88438ba1f37fa4e0c2db203cd5556e52c9c34c08>
"[clang] AST: fix getAs canonicalization of leaf types (#155028)", which started
to cause
> [CPT] compilerplugins/clang/test/redundantfcast.cxx
> error: 'expected-error' diagnostics expected but not seen:
> File compilerplugins/clang/test/redundantfcast.cxx Line 77 (directive at compilerplugins/clang/test/redundantfcast.cxx:78): redundant functional cast from 'const tools::Polygon' to 'tools::Polygon' in construct expression [loplugin:redundantfcast]
> error: 'expected-error' diagnostics seen but not expected:
> File compilerplugins/clang/test/redundantfcast.cxx Line 77: redundant functional cast from 'const tools::Polygon' to 'tools::Polygon' [loplugin:redundantfcast]
> File compilerplugins/clang/test/redundantfcast.cxx Line 221: redundant functional cast from 'const Primitive2DContainer' to 'Primitive2DContainer' [loplugin:redundantfcast]
> error: 'expected-note' diagnostics expected but not seen:
> File compilerplugins/clang/test/redundantfcast.cxx Line 20: in call to method here [loplugin:redundantfcast]
> File compilerplugins/clang/test/redundantfcast.cxx Line 27: in call to method here [loplugin:redundantfcast]
> File compilerplugins/clang/test/redundantfcast.cxx Line 38: in call to method here [loplugin:redundantfcast]
> 6 errors generated.
> make[1]: *** [solenv/gbuild/LinkTarget.mk:338: workdir/CxxObject/compilerplugins/clang/test/redundantfcast.o] Error 1
Change-Id: I2538d419b7921d5617b03de646c83973184ee1ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190527
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
At least some IDEs are confused by our multitude of `tools` namespaces,
and show errors like `namespace "tools" is ambiguous`.
This removes one such namespace. The idea is to drop all but the one
in /tools (that has tools::Long and tools::Rectangle).
Change-Id: I338b995a29fcfa7142933c195750292593a364ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189959
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
At least some IDEs are confused by our multitude of `tools` namespaces,
and show errors like `namespace "tools" is ambiguous`.
This removes one such namespace. The idea is to drop all but the one
in /tools (that has tools::Long and tools::Rectangle).
Change-Id: Ib404ba7c66085a01861cd62507a479e91aa68e49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189953
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
At least some IDEs are confused by our multitude of `tools` namespaces,
and show errors like `namespace "tools" is ambiguous`.
This removes one such namespace. The idea is to drop all but the one
in /tools (that has tools::Long and tools::Rectangle).
Change-Id: I75fc4835ec76dca698be1983dbc0a935b3f765eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189949
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
At least some IDEs are confused by our multitude of `tools` namespaces,
and show errors like `namespace "tools" is ambiguous`.
This removes one such namespace. The idea is to drop all but the one
in /tools (that has tools::Long and tools::Rectangle).
Change-Id: I6077f50ad0fcc49abfadc75d9948ab63df829ff9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189948
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
and
cid#1659699 Overflowed return value
cid#1659759 Overflowed return value
cid#1659922 Overflowed return value
cid#1660190 Overflowed return value
cid#1660286 Overflowed return value
cid#1660457 Overflowed return value
Change-Id: Ie9fffe4994b10ed3d4feb14eaf7950e3f01714ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189927
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
...<https://github.com/llvm/llvm-project/commit/91cdd35008e9ab32dffb7e401cdd7313b3461892>
"[clang] Improve nested name specifier AST representation (#147835)".
For one, clang::TypeDecl::getTypeForDecl no longer works for TagDecls, so the
loplugin::TypeCheck ctor taking a TypeDecl started to fail at runtime. So heed
the advice given in the comment to clang::TypeDecl::getTypeForDecl and instead
"ckeck out ASTContext::getTypeDeclType or one of...", which means that we now
need to transport a clang::ASTContext to all those places that want to create
such a loplugin::TypeCheck.
For another, clang::TagType::getDecl ("renamed to `getOriginalDecl`" for now) no
longer returns one dedicated Decl per type (so its results could be compared for
equality), so wrap that in compat::getDecl to do an additional getCanonicalDecl.
(But note how that requires an additional compat::getDefinitionOrSelf across the
various loplugins' isWarnUnusedType implementations, to check for any attributes
on the actual definitions rather than on whatever first declarations happen to
be considered the canonical decls.)
And the visitor's TraverseDecltypeTypeLoc takes an additional bool
TraverseQualifier parameter now, so adapt the sharedvisitor machinery
accordingly.
Plus some bespoke fixes across various loplugins.
loplugin:indentation is hit by
<https://github.com/llvm/llvm-project/issues/153540> "Clang getBeginLoc of some
CXXConstructExpr has moved past namespace prefix" (which would cause false
> core/dbaccess/source/core/recovery/subcomponentrecovery.cxx:546:18: error: statement mis-aligned compared to neighbours [loplugin:indentation]
> 546 | rtl::Reference( new SubComponentLoader( xController, xDocDefinition ) );
> | ^
> core/dbaccess/source/core/recovery/subcomponentrecovery.cxx:545:13: note: measured against this one [loplugin:indentation]
> 545 | Reference< XController > xController( m_xDocumentUI, UNO_QUERY_THROW );
> | ^
etc.), so is disabled for Clang 22 for now, until that bug is fixed.
(Various diagnostics are slightly different now, leading to some more
expected-error-re variation in the tests. And loplugin::refcounting no longer
duplicates its warnings, which is probably a feature and not a bug.)
Change-Id: I9fe152e47ee571ad57c7c57f0eaa9c10e620f03e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189694
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
(This was meant to address the
> // [-loplugin:stringstatic] false positive: the initializer is not a constant expression
> static const OUString path = comphelper::LibreOfficeKit::isActive()
> ? utl::CreateTempURL(nullptr, true)
> : GetStandardEmbeddedFontsRoot();
from 49509ba522 "LOK: Set up directory for
temporary embedded font files", but which has meanwhile been removed with
d5b0462581 "LOK: make sure to have trailing slash
in GetEmbeddedFontsRoot()", anyway.)
Change-Id: I97aa0f20502caa1ab4f6074a2b403e25add489a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189671
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
in order to simplify code.
The flexibility provided by the ConfigurableSettings template
is not really necessary for the simple settings VCL has
Drop this now that keys that actually used them are migrated
to VCL/VCLSettings
Change-Id: I39609cd5f0ccda7f451bc6457a42b05b585b9b10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187007
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Rename files accordingly after the class
was renamed in previous commit
Change-Id: I33210b47cda5f71820a3c0fa657e4c3548d45732
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Jun 25 10:15:23 2025 +0200
a11y: Rename OAccessibleComponentHelper to OAccessible
Change-Id: I1d38d124af685960c0170601e930da516ce2ead3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186953
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>