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>
We used to have two duplicating sets: smart pointer-like VclPtr::reset,
and Reference-style VclPtr::set / VclPtr::clear. There is no need in
this duplication. Further, in ScopedVclPtr, reset is hidden / removed
to avoid skipping disposeAndClear; but the twin functions are kept
accessible, possibly as an overlook.
This change drops Reference-style VclPtr::set / VclPtr::clear, and
unifies on VclPtr::reset, which looks more consistent with the class
nature (it is closer to shared_ptr, than to uno::Reference). Doing
that uncovered one place, where a ScopedVclPtr was used incorrectly:
clear() was used for NotebookbarPopup::m_pParent in NotebookbarPopup
dtor. I assume then, that the correct class needed here is VclPtr.
Change-Id: I0746075c58d793fabdce1bc357afea8ee455cd8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185553
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
OAccessibleWrapper and a couple of related classes
is only used by AccessibleControlShape inside svx,
so move it there from comphelper.
Use the same "accessibility" namespace as other
classes there.
Those classes used to be used elsewhere as well before
commit 39e0bdb686
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Mar 3 17:42:03 2025 +0100
tdf#163989 vcl a11y: Rework toolbar item window a11y
Change-Id: Ie56357d943084b34f202510b13e8bb17e07bc125
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185639
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Don't intersperse the method implementations of the weld::Widget
based RoadmapWizardMachine with those for the vcl::Window based
RoadmapWizard, but move the RoadmapWizardMachine ones to a separate
source file, to make the distinction clearer.
Also rename the roadmapwizard.hxx header to roadmapwizardmachine.hxx
accordingly, as it contains the declaration of the RoadmapWizardMachine
class whose method implementatons are now in the new source file
called roadmapwizardmachine.cxx.
Change-Id: I4aa2933c496c0a26a70ef3027f45c87d1a0b61bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185466
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>