diff options
-rw-r--r-- | compilerplugins/clang/implinheritancehelper.cxx | 4 | ||||
-rw-r--r-- | include/svx/fmdpage.hxx | 12 | ||||
-rw-r--r-- | include/svx/unopage.hxx | 7 | ||||
-rw-r--r-- | reportdesign/source/core/inc/ReportDrawPage.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/inc/unopage.hxx | 7 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 27 | ||||
-rw-r--r-- | svx/source/form/fmdpage.cxx | 20 | ||||
-rw-r--r-- | svx/source/unodraw/unopage.cxx | 6 | ||||
-rw-r--r-- | sw/inc/unodraw.hxx | 6 |
10 files changed, 19 insertions, 72 deletions
diff --git a/compilerplugins/clang/implinheritancehelper.cxx b/compilerplugins/clang/implinheritancehelper.cxx index fb24ed96f2dd..1eb1db60a90b 100644 --- a/compilerplugins/clang/implinheritancehelper.cxx +++ b/compilerplugins/clang/implinheritancehelper.cxx @@ -74,6 +74,10 @@ bool ImplInheritanceHelper::VisitCXXRecordDecl(const CXXRecordDecl* cxxRecordDec .Namespace("pcr") .GlobalNamespace()) return true; + if (loplugin::DeclCheck(cxxRecordDecl).Class("SdDrawPage").GlobalNamespace()) + return true; + if (loplugin::DeclCheck(cxxRecordDecl).Class("SdMasterPage").GlobalNamespace()) + return true; // check if this class extends cppu::WeakImplHelper if (!loplugin::isDerivedFrom(cxxRecordDecl, [](Decl const* decl) -> bool { diff --git a/include/svx/fmdpage.hxx b/include/svx/fmdpage.hxx index 3842e8b0b02e..e7f3732cad1c 100644 --- a/include/svx/fmdpage.hxx +++ b/include/svx/fmdpage.hxx @@ -21,14 +21,14 @@ #include <com/sun/star/form/XFormsSupplier2.hpp> #include <svx/unopage.hxx> -#include <comphelper/uno3.hxx> #include <svx/svxdllapi.h> // SvxFmDrawPage -class SVXCORE_DLLPUBLIC SvxFmDrawPage :public SvxDrawPage - ,public css::form::XFormsSupplier2 +typedef cppu::ImplInheritanceHelper<SvxDrawPage, css::form::XFormsSupplier2> SvxFmDrawPage_Base; + +class SVXCORE_DLLPUBLIC SvxFmDrawPage : public SvxFmDrawPage_Base { protected: @@ -44,14 +44,8 @@ public: SvxFmDrawPage( SdrPage* pPage ); virtual ~SvxFmDrawPage() noexcept override; - // UNO binding - DECLARE_UNO3_AGG_DEFAULTS(SvxFmDrawPage, SvxDrawPage) - - virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& aType ) override; virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; - // XFormsSupplier virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL getForms() override; diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx index 4bc4c1ff7438..fc6860aa9274 100644 --- a/include/svx/unopage.hxx +++ b/include/svx/unopage.hxx @@ -32,7 +32,7 @@ #include <svx/svdobjkind.hxx> #include <rtl/ref.hxx> -#include <cppuhelper/implbase7.hxx> +#include <cppuhelper/implbase.hxx> #include <comphelper/servicehelper.hxx> #include <memory> @@ -48,7 +48,7 @@ class SvxShapeConnector; enum class SdrInventor : sal_uInt32; class SVXCORE_DLLPUBLIC SvxDrawPage : protected cppu::BaseMutex, - public ::cppu::WeakAggImplHelper7< css::drawing::XDrawPage, + public ::cppu::WeakImplHelper< css::drawing::XDrawPage, css::drawing::XShapeGrouper, css::drawing::XShapes2, css::drawing::XShapes3, @@ -97,9 +97,6 @@ class SVXCORE_DLLPUBLIC SvxDrawPage : protected cppu::BaseMutex, UNO3_GETIMPLEMENTATION_DECL( SvxDrawPage ) - // XInterface - virtual void SAL_CALL release() noexcept override; - // XShapes virtual void SAL_CALL add( const css::uno::Reference< css::drawing::XShape >& xShape ) override; virtual void SAL_CALL remove( const css::uno::Reference< css::drawing::XShape >& xShape ) override; diff --git a/reportdesign/source/core/inc/ReportDrawPage.hxx b/reportdesign/source/core/inc/ReportDrawPage.hxx index b4c10d93eb6c..0a10693d30b1 100644 --- a/reportdesign/source/core/inc/ReportDrawPage.hxx +++ b/reportdesign/source/core/inc/ReportDrawPage.hxx @@ -22,6 +22,7 @@ #include <svx/unopage.hxx> #include <com/sun/star/report/XSection.hpp> +#include <cppuhelper/weakref.hxx> namespace reportdesign { diff --git a/sd/source/ui/inc/unopage.hxx b/sd/source/ui/inc/unopage.hxx index 9a684b2cb496..b62ce21cc579 100644 --- a/sd/source/ui/inc/unopage.hxx +++ b/sd/source/ui/inc/unopage.hxx @@ -110,9 +110,6 @@ public: // XInterface virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - virtual void SAL_CALL release() noexcept override; - - css::uno::Any SAL_CALL queryAggregation(css::uno::Type const & rType) override; // XShapeCombiner virtual css::uno::Reference< css::drawing::XShape > SAL_CALL combine( const css::uno::Reference< css::drawing::XShapes >& xShapes ) override; @@ -181,8 +178,6 @@ public: virtual void SAL_CALL acquire() noexcept override; virtual void SAL_CALL release() noexcept override; - css::uno::Any SAL_CALL queryAggregation(css::uno::Type const & rType) override; - // XTypeProvider virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; @@ -240,8 +235,6 @@ public: virtual void SAL_CALL acquire() noexcept override; virtual void SAL_CALL release() noexcept override; - css::uno::Any SAL_CALL queryAggregation(css::uno::Type const & rType) override; - // XTypeProvider virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 42ed20634499..f91a6aaa816b 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -44,6 +44,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/diagnose_ex.hxx> +#include <comphelper/sequence.hxx> #include <sfx2/infobar.hxx> #include <sfx2/dispatch.hxx> diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 17080d0532b2..c7f35d08f1f1 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -512,12 +512,8 @@ rtl::Reference<SdrObject> SdGenericDrawPage::CreateSdrObject_( const Reference< } // XInterface -Any SAL_CALL SdGenericDrawPage::queryInterface( const uno::Type & rType ) +Any SdGenericDrawPage::queryInterface(const uno::Type & rType) { - return SvxFmDrawPage::queryInterface(rType); -} - -css::uno::Any SdGenericDrawPage::queryAggregation(css::uno::Type const & rType) { Any aAny; if (rType == cppu::UnoType<beans::XPropertySet>::get()) @@ -564,7 +560,7 @@ css::uno::Any SdGenericDrawPage::queryAggregation(css::uno::Type const & rType) return Any( Reference< XAnimationNodeSupplier >( this ) ); } else - return SvxFmDrawPage::queryAggregation( rType ); + return SvxFmDrawPage::queryInterface( rType ); return aAny; } @@ -1880,13 +1876,6 @@ void SdGenericDrawPage::SetHeight( sal_Int32 nHeight ) refreshpage( &rDoc, ePageKind ); } -// XInterface -void SdGenericDrawPage::release() noexcept -{ - - OWeakAggObject::release(); -} - // XComponent void SdGenericDrawPage::disposing() noexcept { @@ -2069,10 +2058,6 @@ SdDrawPage::~SdDrawPage() noexcept // XInterface Any SAL_CALL SdDrawPage::queryInterface( const uno::Type & rType ) { - return SdGenericDrawPage::queryInterface(rType); -} - -css::uno::Any SdDrawPage::queryAggregation(css::uno::Type const & rType) { if( rType == cppu::UnoType<drawing::XMasterPageTarget>::get() ) { return Any( Reference< drawing::XMasterPageTarget >( this ) ); @@ -2087,7 +2072,7 @@ css::uno::Any SdDrawPage::queryAggregation(css::uno::Type const & rType) { } } - return SdGenericDrawPage::queryAggregation( rType ); + return SdGenericDrawPage::queryInterface( rType ); } void SAL_CALL SdDrawPage::acquire() noexcept @@ -2670,10 +2655,6 @@ SdMasterPage::~SdMasterPage() noexcept // XInterface Any SAL_CALL SdMasterPage::queryInterface( const uno::Type & rType ) { - return SdGenericDrawPage::queryInterface(rType); -} - -css::uno::Any SdMasterPage::queryAggregation(css::uno::Type const & rType) { ::SolarMutexGuard aGuard; throwIfDisposed(); @@ -2691,7 +2672,7 @@ css::uno::Any SdMasterPage::queryAggregation(css::uno::Type const & rType) { GetPage() && GetPage()->GetPageKind() != PageKind::Handout) ) aAny <<= Reference< presentation::XPresentationPage >( this ); else - return SdGenericDrawPage::queryAggregation( rType ); + return SdGenericDrawPage::queryInterface( rType ); return aAny; } diff --git a/svx/source/form/fmdpage.cxx b/svx/source/form/fmdpage.cxx index dbf8ccc001aa..7f5c8a9c303e 100644 --- a/svx/source/form/fmdpage.cxx +++ b/svx/source/form/fmdpage.cxx @@ -28,7 +28,7 @@ using ::com::sun::star::uno::Any; using ::com::sun::star::form::XFormsSupplier2; SvxFmDrawPage::SvxFmDrawPage( SdrPage* pInPage ) : - SvxDrawPage( pInPage ) + SvxFmDrawPage_Base( pInPage ) { } @@ -41,24 +41,6 @@ css::uno::Sequence< sal_Int8 > SAL_CALL SvxFmDrawPage::getImplementationId() return css::uno::Sequence<sal_Int8>(); } -Any SAL_CALL SvxFmDrawPage::queryAggregation( const css::uno::Type& _rType ) -{ - Any aRet = ::cppu::queryInterface ( _rType - , static_cast< XFormsSupplier2* >( this ) - , static_cast< XFormsSupplier* >( this ) - ); - if ( !aRet.hasValue() ) - aRet = SvxDrawPage::queryAggregation( _rType ); - - return aRet; -} - -css::uno::Sequence< css::uno::Type > SAL_CALL SvxFmDrawPage::getTypes( ) -{ - return comphelper::concatSequences(SvxDrawPage::getTypes(), - css::uno::Sequence { cppu::UnoType<css::form::XFormsSupplier2>::get() }); -} - rtl::Reference<SdrObject> SvxFmDrawPage::CreateSdrObject_( const css::uno::Reference< css::drawing::XShape > & xDescr ) { OUString aShapeType( xDescr->getShapeType() ); diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 846e41ae590f..38c8d85365a0 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -82,12 +82,6 @@ SvxDrawPage::~SvxDrawPage() noexcept } } -// XInterface -void SvxDrawPage::release() noexcept -{ - OWeakAggObject::release(); -} - // XComponent void SvxDrawPage::disposing() noexcept { diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index 3353843219e9..02deab879ee5 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -30,17 +30,17 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/drawing/XShapes.hpp> -#include <cppuhelper/implbase.hxx> -#include <cppuhelper/implbase2.hxx> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/drawing/HomogenMatrix3.hpp> +#include <com/sun/star/uno/XAggregation.hpp> +#include <cppuhelper/implbase.hxx> class SdrMarkList; class SdrView; class SwDoc; class SwXShape; -typedef cppu::AggImplInheritanceHelper2 +typedef cppu::ImplInheritanceHelper < SvxFmDrawPage, css::container::XEnumerationAccess, |