diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-08-08 15:25:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-08-08 18:32:32 +0200 |
commit | 009a24d64f775aabf7fc6307117ada45226df9a5 (patch) | |
tree | 47377f9f8eb952367e391c35803fe70153f2d408 /dbaccess | |
parent | 1e13ee5273848306cc6000d90e9f48593ea39bd8 (diff) |
simplify ODatabaseDocument inheritance
no need to use two different ImplHelpers here
Change-Id: I1c871f8e0e49ff8a0a540e8051f3a89a54130322
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155457
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 20 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.hxx | 11 |
2 files changed, 5 insertions, 26 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index e40c295d9b51..043f3144d3a2 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -197,28 +197,12 @@ Any SAL_CALL ODatabaseDocument::queryInterface( const Type& _rType ) ) return Any(); - Any aReturn = ODatabaseDocument_OfficeDocument::queryInterface(_rType); - if (!aReturn.hasValue()) - aReturn = ODatabaseDocument_Title::queryInterface(_rType); - return aReturn; -} - -void SAL_CALL ODatabaseDocument::acquire( ) noexcept -{ - ODatabaseDocument_OfficeDocument::acquire(); -} - -void SAL_CALL ODatabaseDocument::release( ) noexcept -{ - ODatabaseDocument_OfficeDocument::release(); + return ODatabaseDocument_OfficeDocument::queryInterface(_rType); } Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( ) { - Sequence< Type > aTypes = ::comphelper::concatSequences( - ODatabaseDocument_OfficeDocument::getTypes(), - ODatabaseDocument_Title::getTypes() - ); + Sequence< Type > aTypes = ODatabaseDocument_OfficeDocument::getTypes(); // strip XEmbeddedScripts and XScriptInvocationContext if we have any form/report // which already contains macros. In this case, the database document itself is not diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx index bd458d1b9259..6278aa039a63 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.hxx +++ b/dbaccess/source/core/dataaccess/databasedocument.hxx @@ -148,16 +148,13 @@ typedef cppu::PartialWeakComponentImplHelper< css::frame::XModel3 , css::document::XEventsSupplier , css::frame::XLoadable , css::document::XDocumentRecovery + , css::frame::XTitle + , css::frame::XTitleChangeBroadcaster + , css::frame::XUntitledNumbers > ODatabaseDocument_OfficeDocument; -typedef ::cppu::ImplHelper3< css::frame::XTitle - , css::frame::XTitleChangeBroadcaster - , css::frame::XUntitledNumbers - > ODatabaseDocument_Title; - class ODatabaseDocument :public ModelDependentComponent // ModelDependentComponent must be first! ,public ODatabaseDocument_OfficeDocument - ,public ODatabaseDocument_Title { enum InitState { @@ -299,8 +296,6 @@ public: // XInterface virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override; - virtual void SAL_CALL acquire( ) noexcept override; - virtual void SAL_CALL release( ) noexcept override; // XTypeProvider virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; |