diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-11-04 13:31:45 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-11-04 10:50:50 +0100 |
commit | 491d6ef7f297206b99ce01d4f2d00c75719ef243 (patch) | |
tree | 29c47bdbd956d5db6d52a288c8e4623b334d1f61 | |
parent | 3a9caad863554b1a3465e9eb898f55f516c378d1 (diff) |
Simplify a bit
Change-Id: If30cac2426fe6de498066dbe9ec8465450d7ce0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176001
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | basctl/source/basicide/unomodel.cxx | 36 | ||||
-rw-r--r-- | basctl/source/basicide/unomodel.hxx | 11 |
2 files changed, 2 insertions, 45 deletions
diff --git a/basctl/source/basicide/unomodel.cxx b/basctl/source/basicide/unomodel.cxx index c626134a96c4..595798fc49b8 100644 --- a/basctl/source/basicide/unomodel.cxx +++ b/basctl/source/basicide/unomodel.cxx @@ -68,13 +68,10 @@ public: namespace basctl { -using namespace ::cppu; using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; SIDEModel::SIDEModel( SfxObjectShell *pObjSh ) -: SfxBaseModel(pObjSh) + : cppu::ImplInheritanceHelper<SfxBaseModel, css::lang::XServiceInfo>(pObjSh) { } @@ -82,37 +79,6 @@ SIDEModel::~SIDEModel() { } -uno::Any SAL_CALL SIDEModel::queryInterface( const uno::Type& rType ) -{ - uno::Any aRet = ::cppu::queryInterface ( rType, - // OWeakObject interfaces - static_cast< XInterface* >( static_cast< OWeakObject* >( this ) ), - static_cast< XWeak* > ( this ), - static_cast< XServiceInfo* > ( this ) ); - if (!aRet.hasValue()) - aRet = SfxBaseModel::queryInterface ( rType ); - return aRet; -} - -void SAL_CALL SIDEModel::acquire() noexcept -{ - SolarMutexGuard aGuard; - OWeakObject::acquire(); -} - -void SAL_CALL SIDEModel::release() noexcept -{ - SolarMutexGuard aGuard; - OWeakObject::release(); -} - -uno::Sequence< uno::Type > SAL_CALL SIDEModel::getTypes( ) -{ - return comphelper::concatSequences( - SfxBaseModel::getTypes(), - uno::Sequence { cppu::UnoType<XServiceInfo>::get() }); -} - OUString SIDEModel::getImplementationName() { return u"com.sun.star.comp.basic.BasicIDE"_ustr; diff --git a/basctl/source/basicide/unomodel.hxx b/basctl/source/basicide/unomodel.hxx index 9b0289032660..12414fc57f7f 100644 --- a/basctl/source/basicide/unomodel.hxx +++ b/basctl/source/basicide/unomodel.hxx @@ -24,8 +24,7 @@ namespace basctl { -class SIDEModel : public SfxBaseModel, - public com::sun::star::lang::XServiceInfo +class SIDEModel : public cppu::ImplInheritanceHelper<SfxBaseModel, css::lang::XServiceInfo> { /// @throws css::io::IOException static void notImplemented(); @@ -33,14 +32,6 @@ public: explicit SIDEModel(SfxObjectShell *pObjSh); virtual ~SIDEModel() override; - //XInterface - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) 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; - //XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; |