summaryrefslogtreecommitdiff
path: root/extensions
AgeCommit message (Collapse)Author
2020-08-14loplugin:simplifybool moreNoel Grandin
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14tdf#135526 ranges overflowing to become negativeCaolán McNamara
the properties panel uses huge min/maxes which can overflow when the number of digits changes Change-Id: Idbb998a065ce8f2b918fceea2076b794cbde3368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100731 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-13use OUStringLiteral in SfxItemPropertyMapEntryNoel Grandin
Change-Id: I4f05b6a35010e661ea77f3e4b83302d2ec74d227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100405 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-13loplugin:stringstatic also look for local staticsNoel Grandin
Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-07Make use of std string_viewStephan Bergmann
Change-Id: Ic4b330b7d046ba77e51d32d156501a18e3782985 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100313 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-06result of MnemonicGenerator::CreateMnemonic was unusedCaolán McNamara
since... commit 93257759580e6df10cc9eddbf1800a17d61cfc48 Date: Tue Jul 30 15:38:52 2013 +0200 convert vcl/mnemonic.hxx from XubString to OUString Change-Id: I2df7a6b29aa30ad5ad936b524061aeaef837ca9d Change-Id: I82d7d4f038762592086f4a8bc38d12d18529ccc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100256 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-05Ensure cp target directory existsStephan Bergmann
<https://ci.libreoffice.org/job/gerrit_windows/71710/console> > cp: cannot create regular file 'C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/CustomTarget/extensions/source/activex/SOActionsApproval.cxx': No such file or directory [...] > make[1]: *** [C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/extensions/CustomTarget_so_activex_x64.mk:22: C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/CustomTarget/extensions/source/activex/SOActionsApproval.cxx] Error 1 makes it look like this has been missing all along? Change-Id: Ifa685808942f05c539950311a4d800be0894c8ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100122 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-08-04loplugin:elidestringvar (clang-cl)Stephan Bergmann
...plus ensuing loplugin:unnecessaryparen in vcl/source/treelist/transfer.cxx Change-Id: I1abf2e0c589c2c124399c1337f5dd703ee7d04a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100094 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-04Improved loplugin:staticanonymous -> redundantstatic redux, clang-clStephan Bergmann
Change-Id: Ie6dc22edbcfdf05ab8d7d668cb7cc33b5b747995 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100100 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-04loplugin:simplifybool (clang-cl)Stephan Bergmann
Change-Id: Ib53c1d0d11962067d3a18dab453a6530398bc5a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100093 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-30loplugin:unusedmethodsNoel Grandin
and tweak the plugin a little to speed it up Change-Id: Ia59456232602184c4f1b5d1d75ad94a9a2e2d0be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99799 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-27extensions/dbp: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: Ifc0cd058dd1ad0f2b66657a6a4287049ebcbebe5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-27extensions/WinUserInfo: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I16e7da267af4d6e45522b502515cebe52352b2f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99460 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-25loplugin:constantparamNoel Grandin
Change-Id: Ic0079cf1d5d2463963b1be08a59cb93db6f12870 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99417 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-25loplugin:unusedmethodsNoel Grandin
Change-Id: I3a35c988b1c55b16958172ed5ef4e2d5cb410e55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99413 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-23extensions/scanner: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: Ibf8247cb0321e6c1125a6ee49cdabdc8d4218b22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99325 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-23extensions/updateui: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I3380e987be8bf24005676705e26f3135c83d2b2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99324 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-23extensions/updatefeed: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I1e0303f3fa6295de1f1970bcf8da1edbabb330d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99323 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-23extensions/ldap: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I159eb26fd69151065080d3f70a6fc9df0104068f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99273 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22extensions/prop: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I89d2c8d0b2bf960b3de1853c69fa64ff41b484ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99185 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-21Fix uses of char16_t*/wchar_t* stream insertersStephan Bergmann
...that are helpfully deleted in C++20, as now implemented at least by VS 2019 16.6.4 when using --with-latest-c++ Change-Id: Iaf80f793e73fc90768bb146c9cf3d300d6747c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99170 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-16compact namespace: editeng-filterNoel Grandin
Change-Id: I240bff8de9489d3c0c9c9be6b31ce7e15661bff8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98922 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16drop m_xFormatter during disposingCaolán McNamara
Change-Id: Iac3e04e9f3a0efa0a8bf241f7ea6bbc6703b862f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98899 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-16extensions/bib: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I022d29f4c39f79ed8e0fafe0687e95088279e046 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-15replace TimeSpinButton with FormattedSpinButtonCaolán McNamara
with a TimeFormatter rather than have duplicate functionality Change-Id: I99f1f2aabee5f81485f97755ba3675870317cfb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98791 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-14set max rangeCaolán McNamara
Change-Id: Idb44062f91f63a6936d532e59ce3e3347f43ebd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98713 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-08loplugin:redundantstatic (extensions/updatecheck(config|job))Julien Nabet
Change-Id: Icf0769ab24c8a7c470b1fdf6363204d004c51fb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98297 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-05adjust FormattedSpinButton to be driven by an EntryFormatterCaolán McNamara
so we can have the same backend driving the FormattedSpinButtons as a FormattedEntry Change-Id: I07a472315a04787eb5fcf992cde8f758af742156 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97860 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-03loplugin:redundantstatic (extensions/updatecheckui)Julien Nabet
Change-Id: I71144d4b61592cb1157057fe0cc6044d07957447 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97830 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: extensionsStephan Bergmann
Change-Id: Ifce7b61cc5bd0901c7ee43712dc236f5aec47edc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97560 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-24use more std::container::insert instead of std::copyNoel Grandin
which is both more compact code, and more efficient, since the insert method can do smarter resizing Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-08loplugin:elidestringvar in extensionsJulien Nabet
Change-Id: Ica6d1a6480d122d508d1b87c2a6102f55363b995 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95790 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-06-08Use o3tl::safeCoInitializeEx/safeCoUninitializeReinit (extensions/updatecheck)Julien Nabet
Change-Id: I009664b9c8f1c302d5a90e7014f612dcd3602f63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95664 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-06-07New loplugin:elidestringvarStephan Bergmann
Quoting compilerplugins/clang/elidestringvar.cxx (and see there for a rationale): "Find cases where a variable of a string type (at least for now, only OUString) is initialized with a literal value (incl. as an empty string) and used only once." (This commit includes fixes that become necessary in code changed after the preceding "Upcoming loplugin:elidestringvar" commits.) As a follow-up TODO, uses of the explicit OUString( sal_Unicode value ) ctor where value is char or char16_t literal should be detected too, so that e.g. one_quote would have been treated like two_quote in 4b85108773f9851f358a4daa8869eeadc638d103 "Upcoming loplugin:elidestringvar: sc" > --- a/sc/source/core/tool/compiler.cxx > +++ b/sc/source/core/tool/compiler.cxx > @@ -1902,9 +1902,8 @@ void ScCompiler::CheckTabQuotes( OUString& rString, > if( bNeedsQuote ) > { > const OUString one_quote('\''); > - const OUString two_quote("''"); > // escape embedded quotes > - rString = rString.replaceAll( one_quote, two_quote ); > + rString = rString.replaceAll( one_quote, "''" ); > } > break; > } Change-Id: I7b74f1735a07540e3d789df1d14c84081c824b6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95696 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-05have just one way to set expander imageCaolán McNamara
Change-Id: Ic07709a864620c6146616c8e0a1417343c0937de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95590 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-04loplugin:simplifypointertobool improve (2)Noel Grandin
to look for the x.get() == null pattern, which can be simplified to !x Change-Id: I0eddf93257ab53ab31949961d7c33ac2dd7288ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95400 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-03Upcoming loplugin:elidestringvar: extensionsStephan Bergmann
Change-Id: I318eebbdc79c503b10570061a298eb76d6555540 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95402 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-03loplugin:simplifypointertobool improveNoel Grandin
to look for the x.get() != null pattern, which can be simplified to x I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29loplugin:simplifybool in dbaccess..frameworkNoel Grandin
Change-Id: I0d73bb7d8d3fde426edc0a10c0750758b68aceb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29Prefer CoInitializeEx instead of CoInitialize (2)Julien Nabet
As https://docs.microsoft.com/fr-fr/windows/win32/api/objbase/nf-objbase-coinitialize?redirectedfrom=MSDN advised. Moreover, it'll make concurrency model explicit Change-Id: I8eaa7c0ba4e0c5131b178596cf5310df92ff41ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95093 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-27Avoid calling osl_closeFile, osl_freeProcessHandle on null argumentsStephan Bergmann
See the discussion in the comment at <https://gerrit.libreoffice.org/c/core/+/ 94658/7#message-4afcb072d281450932788a9e8ea88cf2c6798e29> "Fix leak in extensions/updatecheck". Change-Id: I2314d108addbb4ef90762e5d5676c1d2480e1264 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94978 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-27Revert "Revert 'Fix leak in extensions/updatecheck'"Stephan Bergmann
This reverts commit f7a77ec55a94bcac13cde7c7e7644d70771b6098. Reason for revert: The original 05ab836cf3001093a6e375bcb3e4654bbedcfa52 "Fix leak in extensions/updatecheck" had not been wrong per se. The comment at <https://gerrit.libreoffice.org/c/core/+/94658/7# message-4afcb072d281450932788a9e8ea88cf2c6798e29> said "It shouldn't matter in practice". So the issue that comment raised can easily be either ignored completely or addressed in a follow-up commit. Change-Id: I75afaba57e3a6ba4fcce526481ff0df94360d929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94681 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-24Revert "Fix leak in extensions/updatecheck"Julien Nabet
This reverts commit 05ab836cf3001093a6e375bcb3e4654bbedcfa52 since it's wrong Reason for revert: <INSERT REASONING HERE> Change-Id: Ibdc97c6507fb081e34fdaabd65f61a01057300f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94676 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-23nospin hack no longer in useCaolán McNamara
Change-Id: Ib855c429ac936f9b7bb219ad4729f99b0625ec37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94734 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-23Fix leak in extensions/updatecheckJulien Nabet
Change-Id: I693d32c6f1136dbe500b5390954fc77444144dbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94658 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-22Prefer CoInitializeEx instead of CoInitializeJulien Nabet
As https://docs.microsoft.com/fr-fr/windows/win32/api/objbase/nf-objbase-coinitialize?redirectedfrom=MSDN advised. Moreover, it'll make concurrency model explicit Change-Id: I247a49248bf45beb64a7985a7c0d078ee48efe2d Change-Id: I6e755fd516d9fb2dd2a9df0c66d9afd6070447ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94669 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-22move InterimItemWindow to vclCaolán McNamara
Change-Id: If0a4a14708810c44d087b51961f2ecb3fda4df23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94649 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-21loplugin:sequenceloopNoel Grandin
Change-Id: Ib785e6c581785fc4a477be38788a6544032b6ff0
2020-05-20use for-range on Sequence in e*Noel Grandin
Change-Id: I77dc12356ee45b1dee9acaf8a73dea81588822d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94554 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>