summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2023-11-15Extend a loplugin:ostr check from OUString to OStringStephan Bergmann
Change-Id: I0776ab0ab376d6181461d2c144a4107b06233829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159470 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-15Add back test for struct initializationStephan Bergmann
...that had been removed as part of f99bee8103ad82dac2e53e114527399c4af5485c "Delete OUString UTF-16 string literal ctor/assignment op" Change-Id: I22423306ab35dcb580ecc90daea3219b6c1578b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159446 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-15loplugin:unusedmethodsNoel Grandin
Change-Id: I1e125bbd388953491b3f869641484fea737d39ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159423 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-14loplugin:unusedfieldsNoel Grandin
Change-Id: I5869e9974c37b1b525d316367f1dc5051d8aa197 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159404 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-14Adapt compilerplugins/clang/test/fieldcast.cxx to clang-clStephan Bergmann
...where loplugin:locking2 is disabled Change-Id: Id58cbedab191c59b901ef1a0e0dd82b8f8438c4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159400 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-11loplugin:fieldcast improvementsNoel Grandin
reduce false positives, and also check reinterpret_cast Change-Id: Ia6f214393f28451d18c16b764a3c2b149d29ba8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-09Fix typoAndrea Gelmini
Change-Id: I3933be04cacda3dd271c20b2248561da85a069b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159190 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-08Adapt expected diagnostic output to clang-cl and the MSVC standard libraryStephan Bergmann
Change-Id: Ie416e4170280b9f05ecac359655e71f65a525592 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159131 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08Adapt compilerplugins/clang/test/locking2.cxx to clang-clStephan Bergmann
...where loplugin:locking2 is disabled Change-Id: Ie6a241ac49670e47001cba67c7af9996623a23ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159109 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08Adapt loplugin:stringconcatliterals to clang-clStephan Bergmann
...whose handling of PredefinedExpr (representing `__func__`) deliberately differs in IgnoreParens and IgnoreParenImpCasts, see the comment in StringConcatLiterals::isStringLiteral Change-Id: I8b001d65369adc3d2a2c47e0cf32578a72ef4eec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159111 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08new loplugin:fieldcastNoel Grandin
new plugin to look for class fields that are always cast to some subtype, which indicates that they should probably just be declared to be that subtype. Perform one of the suggested improvements in xmlsecurity/ Change-Id: Ia68df422c37f05cbcf9c02ba5d0853f8eca4f120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159063 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-06Adapt to various Clang 18 trunk enum reworkStephan Bergmann
<https://github.com/llvm/llvm-project/commit/a9070f22a29e28f7d6f83c24a8dd88f3a94969ae> "[clang][NFC] Refactor `CXXConstructExpr::ConstructionKind`", <https://github.com/llvm/llvm-project/commit/c23aaa410358b9f9c364ddaaeb6b2069b185a99b> "[clang][NFC] Refactor `CharacterLiteral::CharacterKind`", <https://github.com/llvm/llvm-project/commit/3e6ce58701a3a8463b53fb3fd2023c02b4e90554> "[clang][NFC] Refactor `StringLiteral::StringKind`", <https://github.com/llvm/llvm-project/commit/edd690b02e16e991393bf7f67631196942369aed> "[clang][NFC] Refactor `TagTypeKind` (#71160)" Change-Id: Ice802f6d662494781ad22fcf11ea5006de918254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158983 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-06lok: notebookbar: handle multiple sessionsSzymon Kłos
This fixes regression from commit db5a78c8ab1eae30e442151f07b0dc4dcd017550 lok: notebookbar: don't recreate toolbars too often When we had 2 sessions with notebookbar and one of them switched to compact mode - other session's notebookbar didn't work. Before previous change we recreated notebookbar and its welded wrapper on every StateMethod call for LOK case. So when it become destroyed we made it working again. But now we need to introduce better management and not rely on single instence we get from SystemWindow. Also it's bad idea to rely 100% on SfxNotebookBar::IsActive in LOK case as when other view will turn notebookbar off, but QueryState will be trigerred in our session - we will think that it should be destroyed (it reads config state which is shared between views). So trust only "true" value (it happens after calling SID_TOOLBAR_MODE), but destroy notebookbar only after explicit call of SfxNotebookBar::CloseMethod. It seems to have good result when tested with multiple views in Online. Maybe we can track Notebookbar state per view later to make things simpler in LOK case. Change-Id: Ie739c6441ca05884b0ef20bff23751467706b562 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158936 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-11-05loplugin:ostr: Warn about literals that could be string_viewStephan Bergmann
...inspired by d4f4a401861e7c908b6ab7f72563d5ab911edcf0 "This function takes a string view - no need in OUString literal", but this found no further cases Change-Id: I1429950afdb6fff8ed1d28f5fbb4c445fb6bfb12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158954 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-04Adapt to Clang 18 trunk Linkage reworkStephan Bergmann
<https://github.com/llvm/llvm-project/commit/8775947633bf189e1847707932b1015f04640ea0> "[clang][NFC] Refactor clang::Linkage" Change-Id: I35e3a3c7e3de29e4f3b9ee8dfc34e39ba2aa1c70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158919 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-03Suppress loplugin:redundantfcast also around C++20 CXXParenListInitExprStephan Bergmann
...which is used by <https://github.com/llvm/llvm-project/commit/95a4c0c83554c025ef709a6805e67233d0dedba0> "[clang] Reland parenthesized aggregate init patches" for the __cpp_aggregate_paren_init feature implemented since Clang 16, and which had caused bogus warnings in patch set 1 of <https://gerrit.libreoffice.org/c/core/+/158838/1> "tdf#157028 vcl: PDF export: inline OBJR dictionaries" Change-Id: Id4118ce8d53902388ca3a80ad03f12b59e3a35e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158842 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-02Fix typoStephan Bergmann
...spotted by Ilmari Change-Id: I7414d77d91a4d11d16de1417e60cddf72a0746c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158782 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-02Adapt to Clang 18 trunk ElaboratedTypeKeyword reworkStephan Bergmann
<https://github.com/llvm/llvm-project/commit/4ad2ada5216ee2bb3c334a3233a9ab51f2521b82> "[clang][NFC] Refactor ElaboratedTypeKeyword" Change-Id: I1ee6592fe76bb484441ca859986e7217eaba58f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158764 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-01new loplugin:fieldcanbelocalNoel Grandin
Change-Id: I33fe8afcbba1d461bee98c92507c878e4e5d41d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158756 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-21Extended loplugin:ostr: Automatic rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
Change-Id: I8c08bf41b96d4a6085e7d72cb39e629efa556d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158300 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-15Repurpose loplugin:stringstatic for O[U]String vars that can be constexprStephan Bergmann
...now that warning about O[U]String vars that could be O[U]StringLiteral is no longer useful Change-Id: I389e72038171f28482049b41f6224257dd11f452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-14get_iter_abs_pos doesn't neeed to be virtualCaolán McNamara
Change-Id: If69768ffac37aa7b39a806b3c67ad8cbdafc5d2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157981 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-12loplugin:unusedmethodsNoel Grandin
Change-Id: I27782fb4b912d8b0d5f19cbe296c2a3b98b2bfd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157818 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-11__cpp_char8_t is generally available nowStephan Bergmann
...after 1eef07805021b7ca26a1a8894809b6d995747ba1 "Bump baseline to C++20" Change-Id: I75509f3731357e0e3ae73c3774abd6e4070f605b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157806 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11Delete OUString UTF-16 string literal ctor/assignment opStephan Bergmann
...that have been made unused by 7ef3d937415185ef66e32dd3043783eddcd03db5 "loplugin:ostr: Rewrite some uses of O[U]String to use ""_ostr/u""_ustr literals". (And which means we can remove the relevant code from that plugin again.) (This also found a handful of remaining uses that had been hard for the plugin to discover, along the lines of > std::map<OUString, int> m = {{u"foo", 0}}; being represented by a > DeclStmt 0xdaca578 <line:103:5, col:50> > `-VarDecl 0xdac9150 <col:5, col:49> col:29 s11 'std::map<OUString, int>':'std::map<rtl::OUString, int>' cinit destroyed > `-ExprWithCleanups 0xdaca548 <col:35, col:49> 'std::map<OUString, int>':'std::map<rtl::OUString, int>' > `-CXXConstructExpr 0xdaca508 <col:35, col:49> 'std::map<OUString, int>':'std::map<rtl::OUString, int>' 'void (initializer_list<value_type>, const std::less<rtl::OUString> &, const allocator_type &)' list std::initializer_list > |-CXXStdInitializerListExpr 0xdaca480 <col:35, col:49> 'initializer_list<value_type>':'std::initializer_list<std::pair<const rtl::OUString, int>>' > | `-MaterializeTemporaryExpr 0xdaca468 <col:35, col:49> 'const std::pair<const rtl::OUString, int>[1]' xvalue > | `-CXXBindTemporaryExpr 0xdaca448 <col:35, col:49> 'const std::pair<const rtl::OUString, int>[1]' (CXXTemporary 0xdaca448) > | `-InitListExpr 0xdac9df0 <col:35, col:49> 'const std::pair<const rtl::OUString, int>[1]' > | `-CXXConstructExpr 0xdaca408 <col:36, col:48> 'const std::pair<const rtl::OUString, int>' 'void (const char16_t (&)[4], int &&) noexcept(_S_nothrow_constructible<const char16_t (&)[4], int>())' list > | |-StringLiteral 0xdac91b8 <col:38> 'const char16_t[4]' lvalue u"foo" > | `-MaterializeTemporaryExpr 0xdaca3f0 <col:46> 'int' xvalue > | `-IntegerLiteral 0xdac91d8 <col:46> 'int' 0 > |-CXXDefaultArgExpr 0xdaca498 <<invalid sloc>> 'const std::less<rtl::OUString>':'const std::less<rtl::OUString>' lvalue > `-CXXDefaultArgExpr 0xdaca4b8 <<invalid sloc>> 'const allocator_type':'const std::allocator<std::pair<const rtl::OUString, int>>' lvalue Clang AST.) Change-Id: I496fe9d4d5e1a033cb7b27b4e04b303f8ddbed4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157756 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-09Add -rpath when building analyzer executable on macOSStephan Bergmann
...as at least with LLVM 18 trunk, the generated executable references @rpath/libclang-cpp.dylib but didn't actually contain an LC_RPATH Change-Id: Ida643903aa4566853ea9541553f0dfc9c3243d4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157706 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-09Avoid a false loplugin:casttovoid on macOSStephan Bergmann
...involving conditional preprocessed code at > vcl/skia/SkiaHelper.cxx:265:13: error: unnecessary cast to void [loplugin:casttovoid] > 265 | (void)blockDisable; > | ^~~~~~~~~~~~~~~~~~ > vcl/skia/SkiaHelper.cxx:286:22: note: first consumption is here [loplugin:casttovoid] > 286 | if (!blockDisable && !DefaultMTLDeviceIsSupported()) > | ^~~~~~~~~~~~ Change-Id: I222d72d240852be2d64fe08d345f00d137cd5a63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157707 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-07loplugin:ostr: Rewrite some uses of O[U]String to use ""_ostr/u""_ustr literalsStephan Bergmann
This is a first cut at rewriting uses of OUString constructed from u"..." as u"..."_ustr. It covers the same changes as <https://gerrit.libreoffice.org/c/core/+/155412/6/> "WIP: Delete OUString UTF-16 string literal ctor/assignment op", but does so with automatic rewriting (see e0c33ec15f53a01fa3ee07489871bbe09bb5c9c3 "loplugin:ostr: automatic rewrite", plus a handful of 002b0a9d5793e07609f953b9961b04bcab7a7e3f "loplugin:ostr: manual modifications" where automatic rewriting wasn't set up to handle macro bodies). The compilation-time impact of all those changes appears to be negligible: For some Windows build of mine, just touching the files that would be affected by 002b0a9d5793e07609f953b9961b04bcab7a7e3f and e0c33ec15f53a01fa3ee07489871bbe09bb5c9c3 (but without actually applying those changes yet) and doing `time /opt/lo/bin/make -O check screenshot PKGFORMAT= gb_SUPPRESS_TESTS=x`, three times in a row reported sample real times of 21m15.438s 23m17.840s 23m41.529s and repeating all that with the two changes actually applied reported sample real times of 22m43.547s 21m42.687s 23m1.813s The plugin itself is already prepared to do further rewrites (see the TODOs), which will be done in follow-up commits. Change-Id: I408ecf056dce1b9da683d7c377b8d9058df1558d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157676 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-24loplugin:unusedmethodsNoel Grandin
Change-Id: I231b80cb0779d92bba32da67f6878c07d757c967 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-23tdf#105303: Drop html export wizardXisco Fauli
Done during the conference hackfest Change-Id: I765e6dc839a98038c4071c8444ce3db9293c8a6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157173 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-09-19loplugin:unusedfieldsNoel Grandin
Change-Id: Ic102ae992fc2fbfd187149b9d20bf1d2202ba5c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157042 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-17remove unnecessary dynamic_cast around SwXTextNoel Grandin
Unusually, we cannot use rtl::Reference to hold SwXText, because rtl::Reference assumes that its pointee is a subclass of OWeakObject, which SwXText is not (and we cannot make it so because the UNO bridge does not support virtual base classes). So we have to use css::uno::Reference<SwXText> and carve out an exception in loplugin:refcounting. Change-Id: If3a1307e30fdcd3b47aa665252be081fb5063400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-15loplugin, merge weakobject into weakbaseNoel Grandin
and make them support virtual bases, even though the bridge code does not support that (yet) Change-Id: I247e795391fa452dea2922869b15ab043eb2bdd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156941 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-14Improve Plugin::checkIdenticalDefaultArgumentsStephan Bergmann
...to avoid > In file included from /home/sbergman/lo/core/cui/source/factory/cuiexp.cxx:20: > /home/sbergman/lo/core/cui/source/factory/dlgfact.hxx:524:116: fatal error: TODO: Unexpected 'IdenticalDefaultArgumentsResult::Maybe' [loplugin:overrideparam] > 524 | const OUString& rName, const OUString& rDesc, const OUString& rTitle = "") override; > | ^~ > /home/sbergman/lo/core/include/svx/svxdlg.hxx:380:116: note: TODO: second argument is here [loplugin:overrideparam] > 380 | const OUString& rName, const OUString& rDesc, const OUString& rTitle = "" ) = 0; > | ^~ > MaterializeTemporaryExpr 0x7f6fd76d4218 'const OUString':'const class rtl::OUString' lvalue > `-CXXBindTemporaryExpr 0x7f6fd76d41f8 'const OUString':'const class rtl::OUString' (CXXTemporary 0x7f6fd76d41f8) > `-CXXConstructExpr 0x7f6fd76d41b8 'const OUString':'const class rtl::OUString' 'void (const char &[1], typename libreoffice_internal::ConstCharArrayDetector<const char[1], libreoffice_internal::Dummy>::Type)' > |-StringLiteral 0x7f6fd76d3e48 'const char[1]' lvalue "" > `-CXXDefaultArgExpr 0x7f6fd76d4170 'libreoffice_internal::Dummy':'struct rtl::libreoffice_internal::Dummy' > MaterializeTemporaryExpr 0x7f6fe30b5f58 'const OUString':'const class rtl::OUString' lvalue > `-CXXBindTemporaryExpr 0x7f6fe30b5f38 'const OUString':'const class rtl::OUString' (CXXTemporary 0x7f6fe30b5f38) > `-CXXConstructExpr 0x7f6fe30b5ef8 'const OUString':'const class rtl::OUString' 'void (const char &[1], typename libreoffice_internal::ConstCharArrayDetector<const char[1], libreoffice_internal::Dummy>::Type)' > |-StringLiteral 0x7f6fe30b48f8 'const char[1]' lvalue "" > `-CXXDefaultArgExpr 0x7f6fe30b5ea8 'libreoffice_internal::Dummy':'struct rtl::libreoffice_internal::Dummy' after c7a608a6691c790783c63f504010bc796c36af25 "tdf#155503 Add title to document title dialog" in an --enable-compiler-plugins=debug build. (Instead of trying to inspect deeper into the code that compares two StringLiteral directly in Plugin::checkIdenticalDefaultArguments, it looked simpler to just extend structurallyIdentical.) Change-Id: Ie1eecff210413f0a29213d867aad249420c1c278 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156916 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-05SvxDrawPage does not need to use aggregationNoel Grandin
we use custom subclasses when we want to modify behaviour Change-Id: I1aef9e87c76ea97f1868134f5e1ac0e317b5c698 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-29Fix typoAndrea Gelmini
Change-Id: I76773e5273579536aef330d5eb83887bba7e7be8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156247 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-08-28Adapt loplugin:unnecessaryparen to user-defined string literalsStephan Bergmann
Change-Id: Ieab59fa456bce13145b61cb5e8b2fb9ff9b4c573 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156193 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-08-28new loplugin:optionalboolNoel Grandin
which warns against using the 'operator bool' conversion of std::optional<bool> which can lead to interesting bugs The bugs that this plugin have been submitted independantly, so this change is just using has_value() in relevant places. Change-Id: I259b837feeecddcb8cd1d7e5db1e85bf505907cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155978 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-26Drop glm dependency from vclGabor Kelemen
Serious use of glm was removed from vcl in commit db89f53c31af997b9bf422b0e784afba8d62a42e remove OpenGL VCL backend code This is a bit of leftover from that Change-Id: I019279cd0cc804d3fa4535a651704bccca38b9db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155909 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-08-22tdf#146619 Remove unused includes from sal/qaGabor Kelemen
also drop now-unused osl_Condition_Const.h Change-Id: I40beb5b1ad49c126a126bb444d5f66703664d56d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155820 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-08-19loplugin: new global analysis locking2Noel Grandin
look for methods where we don't need to guard access to the field, because the field is never modified Change-Id: I62c33cc3f52881557515765d3733c4afc78547aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155836 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-08loplugin:unnecessarygetstr fix false +Noel Grandin
encountering when we need to pass a std::string to an OString Change-Id: I91d2aa1f20e7c2407c708c9ce4ae82fb52934c85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-04Avoid "function 'testDynamicCast()::S1::~S1' has internal linkage...Stephan Bergmann
...but is not defined" Change-Id: Ib1350d5d34eef0d544ca8f436ae63c693b7d2f5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155354 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-08-03move SwVirtPageNumInfo to SfxHintBjoern Michaelsen
- also remove now obsolete GetInfo overrides Change-Id: Iaac75ed2e53daead06242ce4620fd2b879909e02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155061 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-07-31loplugin:stringconstant: Catch some O[U]String::getStr anti-patternsStephan Bergmann
Change-Id: I36bc86fcffc3c10fe44e60d779c9aa48eeed00f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154749 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-07-27vcl gtk3: Introduce AT-SPI2 tests for the GTK3 accessibility layerColomban Wendling
Add tests for the GTK3 accessibility platform layer. These tests compare the internal LO representation with what is visible to the platform, and thus the user's accessibility tools. In most cases the tests are fairly trivial as LO's internals are not far off AT-SPI2's expectations. There are however notable exceptions like for example the text attributes, that have a wildly different representation and require more complex checks matching what LO's platform layer does, the other way around. These tests use libatspi2 directly, but as the C API is awful to work with regarding resource management, there are wrappers to handle the complexity using RAII. The resulting API is fairly trivial to use. As these tests require using the GTK3 VCL plugin and for the a11y tree to be visible to AT-SPI2, they are run under XVFB using a separate dbus session through dbus-launch. Working on this has already lead to reporting and/or solving some issues: * https://gerrit.libreoffice.org/c/core/+/151303 * https://gerrit.libreoffice.org/c/core/+/151650 * https://gerrit.libreoffice.org/c/core/+/152456 * https://gerrit.libreoffice.org/c/core/+/152457 * https://bugs.documentfoundation.org/show_bug.cgi?id=155625 * https://bugs.documentfoundation.org/show_bug.cgi?id=155705 * https://gerrit.libreoffice.org/c/core/+/152748 Only a subset of the a11y APIs are covered for the moment, but the current state should make it easy to extend upon. Change-Id: I1a047864ce8dc1f1bc3056ad00159f7fd5e5b7d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153069 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-07-25loplugin:unusedfieldsNoel Grandin
Change-Id: If9c76b9c500a5bee0fbf20a44597a250b7fa2af0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154808 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-23Drop --enable-float-device-pixel configure optionKhaled Hosny
This does nothing now, as we are now always using doubles for VCL glyph coordinates. Change-Id: I87e4e3057dbc54a2ecf0924d3d6a408cf519f842 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154631 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-21loplugin:unusedmethodsNoel Grandin
Change-Id: Id2bbe63ca8d4255fd883798581ac7fa1fda7dba9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>