summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2025-02-07browsebox a11y: Drop IAccessibleBrowseBox ifaceMichael Weghorn
Switch BrowseBox::m_pAccessible from a Reference to the IAccessibleBrowseBox iface to a Reference to the specific AccessibleBrowseBoxAccess subclass and drop the IAccessibleBrowseBox interface. Change-Id: Iecc518232eceecc922b69b8c3a4c89f27e6e4c3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181207 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-05loplugin:unusedmethodsNoel Grandin
Change-Id: I76e97a932fb6c6d26dc6ad1b9a45dde2dfd7b0a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181182 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-02-05loplugin:unusedfieldsNoel Grandin
Change-Id: I7c23234f25872fccc0cecc3bdcbae7d47d15951a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181180 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2025-02-05loplugin:unnecessaryvirtualNoel Grandin
Change-Id: I9fc9554f659beea6041b8c64f915c853478aebd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181179 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2025-02-05loplugin:mergeclasses updateNoel Grandin
Change-Id: Ifb7918120ce827c438784faa5fa7b15dcc126e93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181178 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-02-04vcl: Merge LclHeaderTabListBox into SvHeaderTabListBoxMichael Weghorn
By now LclHeaderTabListBox is the only SvHeaderTabListBox subclass and SvHeaderTabListBox is not used by itself. Merge the former into the latter to make the class hierarchy a little less complex. The "plain" SvHeaderTabListBox or other subclasses used to be used in the past, but that is no longer the case, see e.g. commit 4e07b178f58b1dabbb48bc9f26155b8270a4a72d Date: Tue Feb 18 10:16:40 2020 +0000 weld WatchWindow panel which eliminated one use. Copy the comment about the default NotifyStartDrag implementation in the base class being weird from vcl/inc/treeglue.hxx but also leave it there, as it applies for the LclTabListBox class that is still there just the same. Change-Id: I658332a9675a9c67c7250f2577a6eb1a0cc491f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181022 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-24N32BitTcMask is unnecessaryNoel Grandin
The remaining usage site can use N32BitTcXrgb Change-Id: I97c0a7e97d45dfcb4726b197159ca2f197b43713 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-01-23Revert "ScanlineDirection is unnecessary"Noel Grandin
This reverts commit a525438eb62f59801899c5ea45e451963b2ec248 Author: Noel Grandin <noelgrandin@collabora.co.uk> Date: Wed Jan 22 09:50:43 2025 +0200 fix GDI and Quartz backends and commit 828a0dcdf6fd1600baaf3103583633006a90d9f9 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Jan 16 08:23:19 2025 +0200 ScanlineDirection is unnecessary because macOS uses bottom-up coordinate system, and I could not find a way to make the bitmaps stored top-down. Change-Id: Idc05b7473eca5fae0e33d634117de810146da3b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180603 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-01-16ScanlineDirection is unnecessaryNoel Grandin
we always use top-down data now. (which indicates that the Windows OpenGL code has bitrotted a little and has probably been broken for some time). Change-Id: Ic16893d5cf7d2a3f9045b5aa77d4ad2ebc4fe432 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180331 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2025-01-13Adapt compilerplugins to recent LLVM 20 trunk changeStephan Bergmann
<github.com/llvm/llvm-project/commit/cfe26358e3051755961fb1f3b46328dc2c326895> "Reapply '[clang] Avoid re-evaluating field bitwidth'" Change-Id: Ic31d5cd8251d0f83e7589e2f00e3c34789c75bad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180150 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-01-02jsdialog: use single static registerSzymon Kłos
followup for commit 13af671fda1317175a93fd747e5455ce897ed167 jsdialog: share code for widget registry this way we avoid modyfying compilerplugins every time we add new thing we need to remember Change-Id: I6b750175e7dcb31d62666f53c9275a2c5d879150 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178344 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179622 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins
2025-01-02bump copyright year to 2025Xisco Fauli
Change-Id: Id2d0597ed86a5f798eec22dde5b954c06442a2a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179610 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-12-27merge SwSidebarItem and SwAnnotationItem classesNoel Grandin
Because the separation is not doing useful. Which reveals that SwAnnotationWin::ChangeSidebarItem was doing some very dodgy object slicing when assigning to mrSidebarItem. Fix that by using a pointer in SwAnnotationWin instead. Change-Id: I516dfaac7066d8f1effe351ef388c03dd1127fd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179445 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
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>