Commit Graph
3175 Commits
Author SHA1 Message Date
Noel Grandin 27509505be loplugin:unusedmethods tweak for less noise
Change-Id: Idedd1680b03f6b62ff80ad7d0fd74c11d1675053
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177533
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-29 18:42:08 +01:00
Xisco Fauli 980164fe22 svx: unused return
Change-Id: If747870121e3fc8c2d97b5fc769b2d928a4c3f9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176777
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-11-19 18:03:18 +01:00
Stephan Bergmann d44621c7a7 Adapt to LLVM 20 trunk QualType::isAtLeastAsQualifiedAs change
...in
<https://github.com/llvm/llvm-project/commit/b9d678d22f74ebd6e34f0a3501fb01d3d80984e7>
"[Clang] Use TargetInfo when deciding if an address space is compatible
(#115777)"

Change-Id: Ibe9e4882057edbdcdbd286416c3d317c292b2298
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176760
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-11-19 12:22:57 +01:00
Noel Grandin 193207c5ab improve loplugin passparamsbyref
I think I managed to disable this when I converted it to
use the shared plugin infrastructure.

So fix that, and then make it much smarter to avoid various
false positives.

Change-Id: I0a4657cff3b40a00434924bf764d024dbfd7d5b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176646
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-19 07:46:25 +01:00
Michael Weghorn 62c7d89c6a loplugin:dllprivate: Extend for new qtbase macro
Qt's qtbase commit [1]

    commit cecca90ff23ff27b9396defc21abd472b3fe0003
    Author:     Thiago Macieira <thiago.macieira@intel.com>
    AuthorDate: Tue Oct 1 11:26:30 2024 -0700
    Commit:     Thiago Macieira <thiago.macieira@intel.com>
    CommitDate: Tue Nov 12 17:14:46 2024 -0800

        moc: fix support for generating meta objects for nested private classes

introduced a new QT_OBJECT_GADGET_COMMON macro, causing my
`--enable-qt6` clang plugin build with current qtbase git dev
(as of commit 957e2be00a5c45223a5ef842a5f9f2f7b7be882b)
to fail as follows for classes using the Q_OBJECT macro:

    In file included from /home/michi/development/git/libreoffice/vcl/qt6/QtAccessibleRegistry.cxx:10:
    In file included from /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtAccessibleRegistry.cxx:11:
    In file included from /home/michi/development/git/libreoffice/vcl/inc/qt6/QtXAccessible.hxx:10:
    /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtXAccessible.hxx:27:5: error: declaration nested in DLLPRIVATE declaration redundantly marked as DLLPRIVATE [loplugin:dllprivate]
       27 |     Q_OBJECT
          |     ^~~~~~~~
    /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtmetamacros.h:145:5: note: expanded from macro 'Q_OBJECT'
      145 |     QT_OBJECT_GADGET_COMMON \
          |     ^~~~~~~~~~~~~~~~~~~~~~~
    /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtmetamacros.h:132:5: note: expanded from macro 'QT_OBJECT_GADGET_COMMON'
      132 |     Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtmetamacros.h:98:39: note: expanded from macro 'Q_DECL_HIDDEN_STATIC_METACALL'
       98 | #define Q_DECL_HIDDEN_STATIC_METACALL Q_DECL_HIDDEN
          |                                       ^
    /home/michi/development/git/qt5/qtbase/src/corelib/global/qcompilerdetection.h:190:46: note: expanded from macro 'Q_DECL_HIDDEN'
      190 | #    define Q_DECL_HIDDEN     __attribute__((visibility("hidden")))
          |                                              ^
    /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtXAccessible.hxx:25:7: note: parent declaration is here [loplugin:dllprivate]
       25 | class QtXAccessible : public QObject
          | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       26 | {
          | ~
       27 |     Q_OBJECT
          |     ~~~~~~~~
       28 |
       29 | public:
          | ~~~~~~~
       30 |     QtXAccessible(css::uno::Reference<css::accessibility::XAccessible> xAccessible);
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       31 |
       32 |     /** Reference to the XAccessible.
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       33 |       * This is cleared once it has been passed to the QtAccessibleWidget,
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       34 |       * which then keeps an own reference and takes care of all required
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       35 |       * access to the XAccessible for the Qt a11y bridge. */
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       36 |     css::uno::Reference<css::accessibility::XAccessible> m_xAccessible;
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       37 | };
          | ~
    1 error generated.
    make[1]: *** [/home/michi/development/git/libreoffice/solenv/gbuild/LinkTarget.mk:339: /home/michi/development/git/libreoffice/workdir/CxxObject/vcl/qt6/QtAccessibleRegistry.o] Error 1

Extend the plugin to also take the new macro into account in
addition to Q_OBJECT.

[1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=cecca90ff23ff27b9396defc21abd472b3fe0003

Change-Id: I990f0b25010b3a0f0cc3902f732b93d13bb85d78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176702
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-18 10:17:08 +01:00
Stephan Bergmann 89714f9e3e Fix indentation
...accidentally broken by 16e3b84d2e "Improve
loplugin:dyncastvisibility to check for non-inline key functions"

Change-Id: Ie840803b4223fae76bcd72973b6a072eaa5e1d40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176598
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-11-14 17:13:32 +01:00
Stephan Bergmann 16e3b84d2e Improve loplugin:dyncastvisibility to check for non-inline key functions
This would have caught the issue discussed in
709b1f3ddb "Make sure VCLXPopupMenu has unique
RTTI".  (The commit message talks about RTTI there, while what Clang actually
compared for an optimized implementation of a dynamic_cast to a final class is
vtable pointers, but the overall picture remains the same.  Both RTTI and
vtables are emitted along the key function, and if that is missing or inline,
they are emitted for each dynamic library individually, and as internal symbols
on macOS.)

This commit also addresses all the issues found by the improved
loplugin:dyncastvisibility on Linux.  See the newly added TODO in
compilerplugins/clang/dyncastvisibility.cxx and
86b86ac87e "Give DocumentEventHolder (aka
EventHolder<DocumentEvent>) a key function" for an issue with key functions for
class template instantiations.

Change-Id: Ia19155efb1d23692c92b9c97ff17f18ae7a1f3ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176576
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-11-14 12:49:22 +01:00
Noel Grandin fb745b54d2 new loplugin:reftotemp
look for places where we are taking a reference (i.e. "&") to a
temporary object, which is misleading.

Change-Id: Id0eb4dce3f1ca559f86e02edcbea3ca17bea8e76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175978
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-13 13:08:16 +01:00
Mike Kaganski 55d2fdf4ba ignore OUStringChar in loplugin:rangedforcopy
where using a "&" in a for loop is overkill, and may even not be
the type of range elements

Change-Id: Idba3d84fc52d50a15d917576e07bbac754127126
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176480
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-13 08:54:04 +01:00
Noel Grandin 5fdfc074c9 loplugin:passstuffbyref make some small improvements
Change-Id: Ib14a2e6b41165887fcf99c3d155850faa8564822
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176218
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-07 17:20:09 +01:00
Noel Grandin 0269fb72e8 ignore TypedWhichId in loplugin:rangedforcopy
where using a "&" in a for loop is overkill

Change-Id: Ic0d14f6d19c50b49cf7ce3bf2166d546a4d2685b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176130
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-06 15:18:15 +01:00
Stephan Bergmann 25673aaeda Fix implementation of loplugin::isDerivedFrom
...where clang::CXXRecordDecl::forallBases is documented as:  "This routine
returns false if the class has non-computable base classes."  So, presumably
since
<https://github.com/llvm/llvm-project/commit/bf099f4682bf088aaa49b2c72fb1ef3250213fbb>
"[llvm][ADT] Structured bindings for move-only types in `StringMap` (#114676)"
changed

> -template <std::size_t I, typename ValueTy>
> -struct tuple_element<I, llvm::StringMapEntry<ValueTy>>
> -    : std::conditional<I == 0, llvm::StringRef, ValueTy> {};
> +template <std::size_t Index, typename ValueTy>
> +struct std::tuple_element<Index, llvm::StringMapEntry<ValueTy>>
> +    : std::tuple_element<Index, std::pair<llvm::StringRef, ValueTy>> {};

in LLVM's llvm/include/llvm/ADT/StringMapEntry.h, our !forallBases check here
started to trivially always be true for that struct tuple_element
specialization, so the isDerivedFrom check in
CheckFileVisitor::VisitCXXRecordDecl in
compilerplugins/clang/sharedvisitor/analyzer.cxx started to erroneously be true
for that struct, so it started to generate
compilerplugins/clang/sharedvisitor/*.plugininfo files with bogus extra

> InfoVersion:1
> ClassName:tuple_element
> InfoEnd

content, which in turn caused the generated
compilerplugins/clang/sharedvisitor/sharedvisitor.cxx to contain lots of

> #include "tuple_element.cxx"

and other nonsense, which caused the build to break with

> [CXX] compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
> lo/core/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx:20:10: fatal error: 'tuple_element.cxx' file not found
>    20 | #include "tuple_element.cxx"
>       |          ^~~~~~~~~~~~~~~~~~~

etc.

(And now spelling out the implementation of forAnyBase here also reveals that
BaseCheckSubclass will never be called with a null BaseDefinition, so the code
handling that has been removed.)

Change-Id: I8a6e42260eae86852ec37a80d058777653fac394
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176042
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-11-05 12:47:54 +01:00
Noel Grandin 5de73f04f3 new loplugin:staticconstexpr
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04 08:51:00 +01:00
Noel Grandin 19bc8856c4 move vcl::DeleteOnDeinit to tools
so we can fix a shutdown use-after-free in sot.

Change-Id: I32f83bd94627d72d7bee7ea2ebd6ab77a7f78435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175335
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-22 08:01:19 +02:00
Caolán McNamara 1da035600a drop unused eventtesting cmd line option
Change-Id: I90edb80f3b414cbe0a81ecccbf1080106708a131
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172933
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-06 12:25:32 +02:00
Balazs Varga 3eac847927 tdf#161826 - Add uniform Glow effect for texts in shapes
- Add new text Glow effect properties for shapes

- Using TextGlowPrimitive for rendering uniform text glow in shapes

- Add/allow new UI Glow Effect for texts in shapes on sidebar
  (Only for Impress/Draw and Calc)

- Import/Export ooxml files with Glow effect on texts in shapes
  (Only PPTX/XLSX)

- Import/Export odf files with Glow effect on texts in shapes

- Add unit test for glow text attributes in ODF

- Add uni tests for OOXML import/export

Note: Also this patch effects on
tdf#144061 - Effects: Allow GLOW to apply to Text (as we have for shapes)

Change-Id: I16586c01654f197f532129e4e06aa2ef9f214395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172216
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-08-29 19:59:24 +02:00
Caolán McNamara 26b8818481 cid#1608296 silence Overflowed integer argument
and

cid#1606815 Overflowed integer argument
cid#1606617 Overflowed integer argument

Change-Id: I4569190edd9b8d65e9b080a7ad0fac391f4a657e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172348
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-25 17:36:28 +02:00
Noel Grandin fb282d552f merge CntUnencodedStringItem into SfxStringItem
which simplifies the hierarhcy.
We never allocate such a thing, we always allocate subclasses, and it
has no real meaning by itself.

Change-Id: Ie6b716c9ea6ca0efe0ae4f39ac345608c45534f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171890
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-15 16:07:05 +02:00
Noel Grandin ed887c85ef fix clang crash
with clang version 17.0.6 on openSUSE 15.6 we seem to be getting a crash
here (originally reported to me by mmeeks)

Change-Id: I7b0b1b986a7f66af988e58d4fec019b9e29a64da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171754
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-12 19:13:07 +02:00
Noel Grandin 3ad3ff5b28 loplugin:redundantcast fix crash
found while working on a patch

Change-Id: Ic8a960c033d1841fc7c4af89b10f4b672996cb7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171473
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-05 14:36:49 +02:00
Ilmari Lauhakangas c5823a2e27 android, compilerplugins: fix issues found by Ruff linter
Change-Id: Idab013bf2ff1f274a07911ec8b545cd26142139c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171050
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-07-26 18:45:56 +02:00
Noel Grandin 02786af7ea loplugin:unusedenumconstants
Change-Id: Ifd22f5cc618137d715f78f0a04550256987752ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170186
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-07-09 18:56:13 +02:00
Noel Grandin 44f42499e2 loplugin:unnecessaryvirtual
Change-Id: Ibacb8bd52f5a9838540a68d238c3ed76eff6571b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170184
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-09 15:19:44 +02:00
Noel Grandin beb9959896 loplugin:unusedenumconstants update for new clang AST node
Change-Id: I5838f4fded09ad0f4eabc2dbf38ac2eb5c60777e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170182
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-09 14:25:04 +02:00
Andrea Gelmini 102cbf4626 Fix "lets" -> "let's"
Change-Id: I01968fc18b093dbbc27213f01c3da38ae151c62c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169748
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Tested-by: Jenkins
2024-06-29 17:22:12 +02:00
Andrea Gelmini 16d58ad8d3 Fix "lets" -> "let's"
Change-Id: Ibe6cbbd618aab5c145913235dc90fec3c98cd504
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169723
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-06-28 22:23:17 +02:00
Noel Grandin b17171b949 improve lifecycle of SdrItemPool
I ran into a problem where this global object would be destroyed and
then resurrected during shutdown.
Rather than make the existing code more complex, extend the existing
vcl::DeleteOnDeinit code and re-use that here.

Change-Id: Ib63739f57f489b1131111e9bab1db5fba7fd17bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169697
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-06-28 17:38:31 +02:00
Stephan Bergmann d44784a24a Missing includes
Change-Id: I519cdb9b5a1c475a1d36293b77c85c250baf3c3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169520
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-06-26 13:31:14 +02:00
Noel Grandin 86a827da7c loplugin:unusedfields
Change-Id: I4bc67811e228b4806db9f9b9bf9fb0de0eb36de2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169263
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-06-20 14:03:21 +02:00
Andrea Gelmini d09a6808fe Fix typo
Change-Id: Ic19939f0601ec60ca002da9aa02d0974f2db9ca7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169216
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-06-19 23:03:02 +02:00
Justin Luth 4376c6db01 NFC cleanup duplicate entry in clang/buriedassign.cxx
amid lots of junk, found by   sed -i -f ref.sed */*/*.cxx
--------------------ref.sed --------------------
{
N;
s#\([^\n]*\n\)\1#\1#g;
P;
D;
-------------------------------------------------

Change-Id: I2788c098d91b149a3728fd597ee227078ccfc038
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169059
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2024-06-18 00:20:49 +02:00
Stephan Bergmann de4708fcaf Avoid --enable-compiler-plugins=debug loplugin:overrideparam TODO warning
> cui/source/factory/dlgfact.hxx:531:116: fatal error: TODO: Unexpected 'IdenticalDefaultArgumentsResult::Maybe' [loplugin:overrideparam]
>   531 |                                             const OUString& rName, const OUString& rDesc, const OUString& rTitle = u""_ustr) override;
>       |                                                                                                                    ^~~~~~~~
> include/svx/svxdlg.hxx:380:116: note: TODO: second argument is here [loplugin:overrideparam]
>   380 |                                             const OUString& rName, const OUString& rDesc, const OUString& rTitle = u""_ustr ) = 0;
>       |                                                                                                                    ^~~~~~~~
> MaterializeTemporaryExpr 0x1732504d0 'const OUString':'const class rtl::OUString' lvalue
> `-ImplicitCastExpr 0x1732504b8 'const OUString':'const class rtl::OUString' <NoOp>
>   `-CXXBindTemporaryExpr 0x173250498 'OUString':'class rtl::OUString' (CXXTemporary 0x173250498)
>     `-UserDefinedLiteral 0x173250468 'OUString':'class rtl::OUString'
>       `-ImplicitCastExpr 0x173250450 'OUString (*)(void)' <FunctionToPointerDecay>
>         `-DeclRefExpr 0x173250430 'OUString (void)' lvalue Function 0x14a24f188 'operator""_ustr' 'OUString (void)'
> MaterializeTemporaryExpr 0x14a250658 'const OUString':'const class rtl::OUString' lvalue
> `-ImplicitCastExpr 0x14a250640 'const OUString':'const class rtl::OUString' <NoOp>
>   `-CXXBindTemporaryExpr 0x14a250620 'OUString':'class rtl::OUString' (CXXTemporary 0x14a250620)
>     `-UserDefinedLiteral 0x14a2505f0 'OUString':'class rtl::OUString'
>       `-ImplicitCastExpr 0x14a2505d8 'OUString (*)(void)' <FunctionToPointerDecay>
>         `-DeclRefExpr 0x14a24f298 'OUString (void)' lvalue Function 0x14a24f188 'operator""_ustr' 'OUString (void)'

(Unfortunately, there appears to be no way to get at the actual string literal
content here to check it for equality, so keep returning Maybe for now.)

Change-Id: I4beac3c7f17a689488a41efe5da0554af7beff65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168246
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-05-31 12:27:51 +02:00
Stephan Bergmann 7306424085 False loplugin:staticmethods with LLVM 19 trunk
> In file included from libreofficekit/source/gtk/lokdocview.cxx:26:
> In file included from include/vcl/event.hxx:28:
> In file included from include/vcl/outdev.hxx:30:
> In file included from include/vcl/bitmap.hxx:31:
> In file included from include/vcl/region.hxx:26:
> In file included from include/basegfx/polygon/b2dpolypolygon.hxx:27:
> In file included from include/basegfx/range/b2drange.hxx:27:
> In file included from include/basegfx/point/b2dpoint.hxx:27:
> include/basegfx/tuple/Size2D.hxx:30:10: error: this member function can be declared static [loplugin:staticmethods]
>    30 |     TYPE getWidth() const { return Tuple2D<TYPE>::getX(); }
>       |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/basegfx/tuple/Size2D.hxx:32:10: error: this member function can be declared static [loplugin:staticmethods]
>    32 |     TYPE getHeight() const { return Tuple2D<TYPE>::getY(); }
>       |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/basegfx/tuple/Size2D.hxx:34:10: error: this member function can be declared static [loplugin:staticmethods]
>    34 |     void setWidth(TYPE const& rWidth) { Tuple2D<TYPE>::setX(rWidth); }
>       |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/basegfx/tuple/Size2D.hxx:36:10: error: this member function can be declared static [loplugin:staticmethods]
>    36 |     void setHeight(TYPE const& rHeight) { Tuple2D<TYPE>::setY(rHeight); }
>       |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

...but no idea why exactly that started to hit me just now

Change-Id: Ibb2b57b54b07461a50375ee64670ff21e4670b8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168082
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-05-27 09:40:00 +02:00
Leonard Sasse 52b08068c9 tdf#158803 compilerplugins: remove semicolons; improve membership checks
Change-Id: Ifd5fdee23e5adba2b5a667f74c38ba6fb28f54b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165446
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-05-21 11:40:31 +02:00
Gabor Kelemen c2ec1708ea Drop now unused SdOptionsZoom class
Change-Id: I73100a18f9edb37bb93b7612e7e34fdf510a5308
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166630
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-05-11 21:09:01 +02:00
Gabor Kelemen 9921b0b99a Drop now unused SdOptionsLayout, SdOptionsLayoutItem classes
Change-Id: I5d4e77f8377eead4581f590a4cc160a3fa97e2a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166601
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-05-11 09:01:58 +02:00
Noel Grandin bd3d2daa20 loplugin:mergeclasses update
(*) remove some debugging code
(*) loosen constraints a little so I can see if there are more
interesting opportunities
(*) rename some local vars to make it read better
(*) strip const/& modifiers from types before comparing
(*) ignore vars/fields that are references, they do indicate that a
class was instantiated

Change-Id: I66014b8f0aa24c2e3ca34af75b75e6cd6c939ea6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167383
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-05-09 15:19:37 +02:00
Stephan Bergmann 7a895ec420 Avoid loplugin:noexceptmove failure with recent Clang 19 trunk
> CallExpr 0x7fae572c85e0 '<dependent type>'
> `-UnresolvedMemberExpr 0x7fae572c8580 '<bound member function type>' lvalue
>   `-DeclRefExpr 0x7fae572c8560 'WeakReference<reference_type>' lvalue ParmVar 0x7fae572c76d0 'rWeakRef' 'WeakReference<reference_type> &&'
> In file included from tools/source/ref/ref.cxx:21:
> include/tools/weakbase.hxx:52:5: error: what's up doc? [loplugin:noexceptmove]
>    52 |     rWeakRef.reset();
>       |     ^~~~~~~~~~~~~~~~

Change-Id: I5693fda3c4e5afb02e6229bcb8ea952a62f0e363
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167157
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-05-05 22:30:56 +02:00
Noel Grandin 05e3d24602 replace createFromAscii with OUString literals in sw
and adjust the loplugin:stringstatic to cope with OUString that
is also declared in a header as extern, in which case we cannot
mark it as constexpr.

Change-Id: I108aa3ff8cb06a9a6d345cd951883b52dd0318f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167106
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-04 12:28:35 +02:00
Moritz Duge 3bb9b0565a fix crash in CertificateChooser for GPG
mvUserData is still needed to keep it's content from being deleted.

Revert "Drop unused instance variable."

This reverts commit 687ae6ca01.

Change-Id: I689cfdaf8d4d62a3b53ff7fb318dc8c70b9e1c2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167020
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2024-05-03 15:39:52 +02:00
Moritz Duge 687ae6ca01 Drop unused instance variable.
Change-Id: Iee32e4348526e54e0cc45a54e55eddb6479248e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166968
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-05-02 08:41:17 +02:00
Gabor Kelemen 924d7b64f0 Drop CacheConfiguration in favor of officecfg
Also the key path was wrong in SlsCacheConfiguration.cxx:
MultiPaneGUI/SlideSorter/PreviewCache
but in Impress.xcs we have
MultiPaneGUI/SlideSorterBar/PreviewCache
hierarchy so this may actually now start to work :)

Change-Id: I4b552be713e6e157edb45692ba78101429aa1c85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166755
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-04-28 17:08:29 +02:00
Noel Grandin 246ef0b8ea loplugin:singlevalfields
Change-Id: I4d7b38c90d73a00f4dbc8ad7318fe4573328ed46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166503
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-23 11:28:55 +02:00
Noel Grandin 55c8095703 loplugin:constantparam filter out workdir/ stuff earlier
Change-Id: I5b90bd855a74b03d534ce64689361b7417293a6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166422
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-22 13:26:57 +02:00
Noel Grandin c04c38f484 loplugin:constantparam
Change-Id: I58e31ffdfc87a15e82bce54afd47ff3906159707
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166293
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-19 21:26:52 +02:00
Noel Grandin 5c6cdc5d5a loplugin:unusedfields update for new clang AST nodes
Change-Id: Icc47093ab13123e9cb2866434796c7d6e8eb38d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166291
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-19 20:32:18 +02:00
Stephan Bergmann 495dddd2f5 Adapt to Clang 19 trunk isUnnamedBitfield -> isUnnamedBitField rename
<github.com/llvm/llvm-project/commit/3d56ea05b6c746a7144f643bef2ebd599f605b8b>
"[clang][NFC] Fix FieldDecl::isUnnamedBitfield() capitalization"

Change-Id: I198e19c00774ba111a441be2afe0b2a992cd6f0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166268
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-19 07:47:03 +02:00
Noel Grandin 828c1999e0 move writerfilter inside sw
writerfilter wants to convert incoming RTF and OOXML files into
writer's document model. But it currently has to do so by
manipulating the limited subset that we expose through the UNO
API.

This is both slower and less accurate than having access
to the full document model.

So move it inside, and then we can strip out various hacks, and
optimise imports.

Change-Id: Ie1114d28130ef5f9a786531bc552cb8ee7768015
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165953
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-18 09:16:12 +02:00
Stephan Bergmann fd7caefaac -Werror,-Wunused-but-set-variable
Change-Id: I4e4d3c810e9d37fd4b87d3307c2ba906923aa63b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165882
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-08 10:48:45 +02:00
Stephan Bergmann f1697d2b1e -Werror,-Wunused-but-set-variable
...ever since the code got introduced in
4f5b3e4bd5 "In O[U]StringBuffer, make string_view
params replacements for OUString ones"

Change-Id: If2032db027f45c60f7c92b796a0a10d23f26b6e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165881
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-08 09:50:46 +02:00