summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2024-12-17[API CHANGE] a11y: Drop UNO service to create a11y contextsMichael Weghorn
Drop the com.sun.star.accessibility.GetStandardAccessibleFactoryService UNO service that was used to create instances of the a11y classes for (mainly vcl) widgets. The service was needed to break a dependency cycle. However, with Change-Id: Ib46c87446dc9121d3b8e735e0e5a40594da73cc5 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Dec 17 12:04:04 2024 +0100 a11y: Merge accessibility module into vcl and all the preparatory commits in place, there is no more dependency cycle, as the a11y classes for vcl widgets no longer depend on any modules "above" vcl. Therefore, drop the UNO service and the abstract vcl::IAccessibleFactory class and other related classes. Make all methods in the AccessibleFactory class (that was previously subclassing the abstract IAccessibleFactory) static helper methods, and call them directly. The UNO service dropped in this commit was introduced in commit 1af510e95147374e5289ae1c12f1f280931919f4 Date: Wed Feb 21 11:30:47 2024 +0200 Create an UNO service to do the symbol lookup in toolkit::AccessibilityClient and its documentation was already clearly stating that it's only meant for LibreOffice internal use: > /** > The toolkit module uses this to get a pointer to the AccessibleFactory from the acc module. > Because we have a dependency in our modules that goes the "wrong" way. > > @since LibreOffice 24.8 > > @internal > > ATTENTION: This is marked <em>internal</em> and does not > have the <em>published</em> flag, which means it is subject to > change without notice and should not be used outside the LibreOffice core. > */ Change-Id: Ib97396a4bad486d9530361dd851ad3ee0f9681b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178689 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-12-10jsdialog: share code for widget registrySzymon Kłos
- move all helpers for widgets registration into separate file - share code for Widgets, Menu and Popup register Change-Id: I3449721d7e436ff4459edb7990c1af860b78054f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177738 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178205 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-12-04loplugin:unusedfieldsNoel Grandin
Change-Id: Iac4a64af74c92cbd76335faa62e51fa80ef21789 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-29loplugin:unusedmethods tweak for less noiseNoel Grandin
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-19svx: unused returnXisco Fauli
Change-Id: If747870121e3fc8c2d97b5fc769b2d928a4c3f9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176777 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-11-19Adapt to LLVM 20 trunk QualType::isAtLeastAsQualifiedAs changeStephan Bergmann
...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-19improve loplugin passparamsbyrefNoel Grandin
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-18loplugin:dllprivate: Extend for new qtbase macroMichael Weghorn
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-14Fix indentationStephan Bergmann
...accidentally broken by 16e3b84d2e04cc3e976b59ca4cecd59ca1577cbc "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-14Improve loplugin:dyncastvisibility to check for non-inline key functionsStephan Bergmann
This would have caught the issue discussed in 709b1f3ddb87303a2dec6155dbe0106369c151ed "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 86b86ac87ea0cc90249f156494c98c3c93e4f3fc "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-13new loplugin:reftotempNoel Grandin
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-13ignore OUStringChar in loplugin:rangedforcopyMike Kaganski
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-07loplugin:passstuffbyref make some small improvementsNoel Grandin
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-06ignore TypedWhichId in loplugin:rangedforcopyNoel Grandin
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-05Fix implementation of loplugin::isDerivedFromStephan Bergmann
...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-04new loplugin:staticconstexprNoel Grandin
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-10-22move vcl::DeleteOnDeinit to toolsNoel Grandin
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-09-06drop unused eventtesting cmd line optionCaolán McNamara
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-08-29tdf#161826 - Add uniform Glow effect for texts in shapesBalazs Varga
- 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-25cid#1608296 silence Overflowed integer argumentCaolán McNamara
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-15merge CntUnencodedStringItem into SfxStringItemNoel Grandin
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-12fix clang crashNoel Grandin
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-05loplugin:redundantcast fix crashNoel Grandin
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-07-26android, compilerplugins: fix issues found by Ruff linterIlmari Lauhakangas
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-09loplugin:unusedenumconstantsNoel Grandin
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-09loplugin:unnecessaryvirtualNoel Grandin
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-09loplugin:unusedenumconstants update for new clang AST nodeNoel Grandin
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-06-29Fix "lets" -> "let's"Andrea Gelmini
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-28Fix "lets" -> "let's"Andrea Gelmini
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-28improve lifecycle of SdrItemPoolNoel Grandin
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-26Missing includesStephan Bergmann
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-20loplugin:unusedfieldsNoel Grandin
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-19Fix typoAndrea Gelmini
Change-Id: Ic19939f0601ec60ca002da9aa02d0974f2db9ca7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169216 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2024-06-18NFC cleanup duplicate entry in clang/buriedassign.cxxJustin Luth
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-05-31Avoid --enable-compiler-plugins=debug loplugin:overrideparam TODO warningStephan Bergmann
> 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-27False loplugin:staticmethods with LLVM 19 trunkStephan Bergmann
> 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-21tdf#158803 compilerplugins: remove semicolons; improve membership checksLeonard Sasse
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-11Drop now unused SdOptionsZoom classGabor Kelemen
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-11Drop now unused SdOptionsLayout, SdOptionsLayoutItem classesGabor Kelemen
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-09loplugin:mergeclasses updateNoel Grandin
(*) 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-05Avoid loplugin:noexceptmove failure with recent Clang 19 trunkStephan Bergmann
> 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-04replace createFromAscii with OUString literals in swNoel Grandin
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-03fix crash in CertificateChooser for GPGMoritz Duge
mvUserData is still needed to keep it's content from being deleted. Revert "Drop unused instance variable." This reverts commit 687ae6ca01177a04f9ea715a1f1cd70f385a0840. 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-02Drop unused instance variable.Moritz Duge
Change-Id: Iee32e4348526e54e0cc45a54e55eddb6479248e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166968 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-04-28Drop CacheConfiguration in favor of officecfgGabor Kelemen
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-23loplugin:singlevalfieldsNoel Grandin
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-22loplugin:constantparam filter out workdir/ stuff earlierNoel Grandin
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-19loplugin:constantparamNoel Grandin
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-19loplugin:unusedfields update for new clang AST nodesNoel Grandin
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-19Adapt to Clang 19 trunk isUnnamedBitfield -> isUnnamedBitField renameStephan Bergmann
<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>