/sc/

LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/cppuhelper
AgeCommit message (Collapse)Author
2023-10-19Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: cppuhelperStephan Bergmann
Change-Id: I4c221461c60c5e96b738bb902253984a9b0b312b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158170 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-07loplugin:ostr: automatic rewriteStephan Bergmann
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2023-09-29cid#1537991 Unchecked return valueCaolán McNamara
Change-Id: I303817f007dd0035e64d15b3f9310a06aab18060 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157396 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-12tdf#153109 Use any_of instead of loop to check a rangeParis Oplopoios
Change-Id: Icf65288a7e53257008129b71e8d716b0b0c7f5fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152868 Tested-by: Paris Oplopoios <parisoplop@gmail.com> Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
2023-05-10use WeakComponentImplHelper2 in Bootstrap_MacroExpanderNoel Grandin
Change-Id: I49f051d9c9da46ec877e4f611836c7a3548f9f10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151581 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-10use WeakComponentImplHelper2 in ServiceManagerNoel Grandin
Change-Id: I0f141398effbd2673c02f9d1f4378fd4e67af655 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151580 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-09use WeakComponentImplHelper2 in TypeManagerNoel Grandin
Change-Id: I2358006a069ea4e8cdeeeafb8384ad8d47fba50a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-09copy some comphelper code down into cppuhelperNoel Grandin
Since I want to use them in the cppuhelper too, but comphelper is "above" cppuhelper in the dependency tree. And sharing the code between cppuhelper and the rest of LO across the URE boundary appears to be nigh impossible. Change-Id: I2ebf37746928dc820df43347dc1a2c158f00ec50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151445 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12fix o3tl::equalsAsciiLNoel Grandin
after I got it wrong in both the original commit commit d15a6560bd445cd1931e9fded6ad8ecfdd54211b use more string_view and in the attempted fix commit dd41ea3ec1f579fabb9f674184b52c1be77e2fdb fix for o3tl::equalsAscii thanks to sberg for spotting that Change-Id: Iff12879de823553b2623db48979e9a720302f2d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150240 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-11fix for o3tl::equalsAsciiNoel Grandin
from commit d15a6560bd445cd1931e9fded6ad8ecfdd54211b use more string_view where the new method was named incorrectly Change-Id: Ia4513fa67f5bda8b6cb56e3db22df48b5e3c7283 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-24loplugin:stringadd in c*Noel Grandin
after my patch to merge the bufferadd loplugin into stringadd Change-Id: I66f4ce2fd87c1e12eefb14406e0e17212f68ceff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22OUString::match -> OUString::startsWithStephan Bergmann
(which reads better in combination with the following OUString::endsWithIgnoreAsciiCase) Change-Id: Ia80e3d205e5e3b48f9df43757fb267258ba3f8ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149353 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-22rhbz#2171265 Filter out all non *.rdb filesStephan Bergmann
In that rhbz issue ("Libreoffice cannot start"), it looks like some junk file named /usr/lib64/libreoffice/program/services/services.rdb;63ddcd86 caused soffice.bin to crash early, without any information (cf. a1faf14f74a62ea76141115538d7d30d90c9eeb6 "rhbz#2171265 Report fatal InitApplicationServiceManager failures more reliably"). So, following up on b8c7548527f5fc14fe8fcbe74a749c7e3c10d385 "ignore backup files in services/ directory to avoid debugging grief", extend the set of ignored files to anything starting with "." or not ending in ".rdb" (in any case). Change-Id: I154750465d2128b3ff6493f4ab606072dda61503 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149328 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-20cppuhelper : use BaseMutex instead of OFactoryComponentHelper_MutexArnaud VERSINI
Change-Id: I49ed178310b6d8441d8cfdd208b26b8d13ef39ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149091 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-20cppuhelper : use constexpr OUStringLiteral instead of a functionArnaud VERSINI
Change-Id: Icc25698e4213edbeaae1a997dccbee0ff529ce3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149092 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-13OFactoryComponentHelper's XAggregation is apparently unusedStephan Bergmann
It had been using cppu::OComponentHelper (which derives from XAggregation) ever since b525a3115f54576017a576ff842dede5e2e3545d "initial import", bug e.g. ORegistryFactoryHelper deriving from it implements queryInterface in a way that is incompatible with XAggregation (it should only have forwarded to OFactoryComponentHelper::queryInterface, and rather implemented its logic in an ORegistryFactoryHelper::queryAggregation override). Also, without this commit but instead with a local > diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx > index c8efcab0e604..9011264b3f3a 100644 > --- a/cppuhelper/source/factory.cxx > +++ b/cppuhelper/source/factory.cxx > @@ -241,6 +241,7 @@ class OFactoryComponentHelper > , public OComponentHelper > , public OSingleFactoryHelper > { > + void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } > public: > OFactoryComponentHelper( > const Reference<XMultiServiceFactory > & rServiceManager, `make check` still succeeded for me on Linux, without hitting that injected assert that should have fired if that XAggregation mechanism had been used after all. So switch from OComponentHelper to WeakComponentImplHelper here (which is the simplest implementation helper to use, even if it still needs the non-standard OFactoryComponentHelper::getTypes overriding the non-fitting WeakComponentImplHelper default implementation). Change-Id: I9fc2f4f2ef36bd016f9a943a8efd5e4ac5f3baaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145428 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-13Merge OSingleFactoryHelper into OFactoryComponentHelperStephan Bergmann
Change-Id: I7faf7a3ad54c80bd3c53525c92c26c0f980110f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145423 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-12Don't let OSingleFactoryHelper delegate to derived classes' virtual overridesStephan Bergmann
...as it doesn't make sense that e.g. OFactoryComponentHelper::createInstance checked for bOneInstance, called OSingleFactoryHelper::createInstance, which called [OFactoryComponentHelper::]createInstanceWithContext, which checked for bOneInstance again Change-Id: I53f54079a2ac1af18a6e95f0cb9d7b75c1e46ceb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-12Fix aggregating OFactoryComponentHelper::queryInterfaceStephan Bergmann
4bfc00aca2441082842f91dfba15886258674227 "#67468# factories support XUnloadingPreference now" had added the check for XUnloadingPreference there, but that's already covered by OFactoryComponentHelper::queryAggregation delegating to OSingleFactoryHelper::queryInterface. (And as OFactoryComponentHelper is inheriting XAggregation via OComponentHelper, the only thing that OFactoryComponentHelper::queryInterface shall do is delegate to OComponentHelper::queryInterface.) Change-Id: Iebe507e88791d1e2390d042a8a9c152512ce212a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145420 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>