summaryrefslogtreecommitdiff
path: root/basic/source/uno
AgeCommit message (Collapse)Author
2022-12-14loplugin:unocast (basic::SfxScriptLibraryContainer)Stephan Bergmann
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: I962b2a11a6407a543fb8b4ad972128d59f62a8a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144142 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-25Fold OldBasicPassword into basic::SfxScriptLibraryContainerStephan Bergmann
Change-Id: Iaeaf30f63760185a2b1dd72feb980b94d9931d55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143253 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-31clang-tidy modernize-pass-by-value in basicNoel Grandin
Change-Id: I9034ab95a4ccb58e36e77d911dd33cc50857c03a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135176 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-25elide some OUString allocationNoel Grandin
Change-Id: Ia21421731dadc1d0e65da182471eb2b8d799782b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134918 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-10tdf#121740 dont bother checking for VBA librariesNoel Grandin
speeds up loading by 2% Change-Id: I63bf7ea2ab8087d6bb60b655fdf7718532050b89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134114 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-10move creation of xParser to where it is usedNoel Grandin
Change-Id: I03511a8c7b01b0abb69b276b900bf712549e5873 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134113 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05Just use Any ctor instead of makeAny in basicStephan Bergmann
Change-Id: I21d9679064c4e68a1492d3550f083c3c91b5b43b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133848 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-29use more string_view in INetURLObjectNoel Grandin
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-27cid#738565 Uninitialized scalar fieldCaolán McNamara
Change-Id: I17a675d3b7468e528faef89de7ea862de37a57db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133504 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-25tdf#75263 - Export VBA-Project using detected charset on importAndreas Heinisch
Change-Id: Ia1f1bb31e077dcb4293c1106ac324a25a975a656 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133064 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-12-03replace comphelper::OListenerContainer with OInterfaceContainerHelper3Noel Grandin
OInterfaceContainerHelper3 is in wide use and can do the same thing with less ceremony Change-Id: I5252738d6b7bda6245c66da46352944ead79bd52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126271 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-27use more OInterfaceContainerHelper3 in NameContainerNoel Grandin
Change-Id: I75cb302156ea93fe0b545b22ca85a0c537cce760 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125919 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29Prepare for removal of non-const operator[] from Sequence in basicMike Kaganski
Change-Id: If048bc301c38ac5ac5412a7d8f69231705088a50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124343 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-14tdf#42982: improve UNO API error reporting4k5h1t
Change-Id: I1252c89f23e70eb88744585bb2abd4fe3794e1d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121918 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-08-02convert #defines to OUStringLiteralNoel Grandin
mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-24fix leak in dbaccessNoel Grandin
when loading form controls Change-Id: Ifa731ca1c7bc16579ce03d256691a50ccfbeb82b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116050 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-28use string_view in INetURLObject::encodeNoel Grandin
Change-Id: Ib686c6872388b02c8939d3b65f6bd25cda348bc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-26loplugin:flattenNoel
Change-Id: Ib7a895fba66f8dc9b6501e61631c02694053b7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113157 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-08tdf#42982: improve UNO API error reportingViKrAm-Bais
Change-Id: I20080d81e0b08e6e0dcd421bd75cb7d796e97ea7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112149 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-26loplugin:refcounting in basicNoel
Change-Id: Idbee5b35215f794e6785925dafb6f160caa24a22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111541 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-22loplugin:refcounting in basicNoel
Change-Id: I0c1e41436ddae176695a90c120303727aa3bc2ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111306 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-17tdf#42982 updated RunTimeException with 2nd argument(pointer)vipbuoy
Change-Id: I52dd9b9808e5fd61d07d4f8a6642124230ede23f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110971 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-16loplugin:referencecasting in basctl..binaryurpNoel
Change-Id: I3fbc287cf76e453e2c464837d2431ff19501fde3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110968 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-20improve some IllegalArgumentException messagesNoel
Change-Id: Id88f2a82bf2651e8b5895aa330f32b71ff5b0e48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109546 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-09fix coverity parse errorsCaolán McNamara
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26New loplugin:stringliteralvarStephan Bergmann
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-13tdf#123936 Formatting files in module basic with clang-formatPhilipp Hofer
Change-Id: I87736d6f1a1d069c990b4e7b9ca291634ab4fb44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105646 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-05BASIC : use std::make_unique instead of std::unique_ptr ( new ... )Arnaud Versini
Change-Id: Ic907f4711685539b6a89411e704845617cc5f04d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105375 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-21use tools::Long in basegfx..chart2Noel
Change-Id: Ide4014348d51f0b5f59e1e91b8d41c7748853254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104608 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-01loplugin:reducevarscope in basctl,basicNoel
Change-Id: I32595921bf5ed26699bced3637302692c407d624 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103760 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-24Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: Iae7db8b7627c5e4715860eafda8df98d2cb8f781 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103308 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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-05-15use for-range on Sequence in basctl..canvasNoel Grandin
Change-Id: Idad3d8fbe785c7b1b8b287a3227372adb2757de8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94260 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-19loplugin:flatten in basicNoel Grandin
Change-Id: Icb8e3cda312b50c9a9f12f96bec1c746f41c8979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92483 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-14loplugin:buriedassign in b*Noel Grandin
Change-Id: Ic20f46105a30b54bc5a991b4070e6c8edb15376e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92189 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-30OSL_ASSERT->assert in basicNoel Grandin
Change-Id: I8abe14706e9c6d1323d5d66a8b700ddaa2803f2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91333 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-18sal_Char->char in avmedia..basicNoel Grandin
Change-Id: Ied1331d979539ef1183da64c55351b57d24f4a4f Reviewed-on: https://gerrit.libreoffice.org/85371 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-12tdf#42949 Fix IWYU warnings in basic/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I325149be2ea7697b5b4a2ce4a662edd2f8be6e50 Reviewed-on: https://gerrit.libreoffice.org/82312 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): basicStephan Bergmann
Change-Id: I174b057e29e5c0d56534fb1d2b6240880c7ddf2b Reviewed-on: https://gerrit.libreoffice.org/76695 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-19loplugin:referencecasting in avmedia..basicNoel Grandin
Change-Id: I6790b2e3902d64fb6f714f031affa221dbaba014 Reviewed-on: https://gerrit.libreoffice.org/75934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-14loplugin:logexceptionnicely in accessibility..basicNoel Grandin
Change-Id: I6e0b95b40e3d62db36352f3ea916f79f3dbc9084 Reviewed-on: https://gerrit.libreoffice.org/74018 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-10an uno -> a unoCaolán McNamara
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d Reviewed-on: https://gerrit.libreoffice.org/72105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-12loplugin:sequentialassign in accessiblity..canvasNoel Grandin
Change-Id: I984717138ac85c1af5fc363fda06f5c2b5497965 Reviewed-on: https://gerrit.libreoffice.org/70641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-19pretty up logging of exceptionsNoel Grandin
Add exceptionToString() and getCaughtExceptionAsString() methods in tools. Use the new methods in DbgUnhandledException() Add special-case case code for most of the exceptions that contain extra fields, so all of the relevant data ends up in the log Change-Id: I376f6549b4d7bd480202f8bff17a454657c75ece Reviewed-on: https://gerrit.libreoffice.org/67857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08loplugin:indentation in basctl..bridgesNoel Grandin
Change-Id: Ie4e27466c4258c6f774a3ebb82ec3a88c28fd753 Reviewed-on: https://gerrit.libreoffice.org/67525 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>