summaryrefslogtreecommitdiff
path: root/basic/source/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-01-19 14:47:03 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-01-19 16:07:12 +0000
commit41f659b49250dd62abc141afaa3c73cc63a425e3 (patch)
tree6904d55087ab863a427a02d9db12a4f4e4ce7266 /basic/source/inc
parent52b465e271961a65f356c9a5b354acead3c0a849 (diff)
Base SfxLibrary on WeakComponentImplHelper
...rather than on the deprecated OComponentHelper. The two classes SfxDialogLibrary and SfxScriptLibrary, both deriving from SfxLibrary, had been found to implement their respective queryInterface in a way that is incompatible with the XAggregation protocol inherited via OComponentHelper. It looks like no code actually made use of the XAggregation offered by these Sfx*Library classes, so the easiest fix for those queryInterface implementations appears to switch from OComponentHelper to WeakComponentImplHelper (thereby dropping XAggregation, and thus rendering the existing queryInterface implementations OK). Ideally, SfxLibrary would derive from WeakComponentImplHelper<XInitialization, XStorageBasedLibraryContainer, XLibraryContainerPassword, ...> covering all the UNO interface classes from which it currently derives manually. But changing that manual implementation across SfxLibrary and its SfxDialogLibrary and SfxScriptLibrary derived classes looks tricky, so merely introduce an "empty" WeakComponentImplHelper<> for now and keep all the manual stuff, and leave proper clean up for later. Change-Id: I12dc5bad2c017b8d76ce28ac189e95cf2e3810e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145792 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basic/source/inc')
-rw-r--r--basic/source/inc/namecont.hxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx
index 5875b6369faf..b5a261c2dde1 100644
--- a/basic/source/inc/namecont.hxx
+++ b/basic/source/inc/namecont.hxx
@@ -47,7 +47,6 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/weakref.hxx>
-#include <cppuhelper/component.hxx>
#include <cppuhelper/basemutex.hxx>
#include <rtl/ref.hxx>
#include <comphelper/interfacecontainer3.hxx>
@@ -470,7 +469,7 @@ class SfxLibrary
, public css::container::XContainer
, public css::util::XChangesNotifier
, public ::cppu::BaseMutex
- , public ::cppu::OComponentHelper
+ , public ::cppu::WeakComponentImplHelper<>
{
friend class SfxLibraryContainer;
friend class SfxDialogLibraryContainer;
@@ -550,8 +549,8 @@ public:
// Methods XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override;
- virtual void SAL_CALL acquire() noexcept override { OComponentHelper::acquire(); }
- virtual void SAL_CALL release() noexcept override { OComponentHelper::release(); }
+ virtual void SAL_CALL acquire() noexcept override { WeakComponentImplHelper::acquire(); }
+ virtual void SAL_CALL release() noexcept override { WeakComponentImplHelper::release(); }
// Methods XElementAccess
virtual css::uno::Type SAL_CALL getElementType( ) override;