From 4e26dbf214df8a9f76791dd3fc3b52f146e5f12e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 1 Dec 2022 13:59:43 +0100 Subject: Use cppuhelper::ImplInheritanceHelper for toolkit VCLX window classes Change-Id: I102b49608b62b351d6a458b3fd56167b136b24e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143525 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- toolkit/inc/awt/vclxcontainer.hxx | 17 +- toolkit/inc/awt/vclxsystemdependentwindow.hxx | 15 +- toolkit/inc/awt/vclxtopwindow.hxx | 19 +- toolkit/inc/awt/vclxwindows.hxx | 169 ++------- toolkit/source/awt/vclxcontainer.cxx | 26 -- toolkit/source/awt/vclxsystemdependentwindow.cxx | 24 -- toolkit/source/awt/vclxtopwindow.cxx | 24 -- toolkit/source/awt/vclxwindows.cxx | 429 ----------------------- 8 files changed, 35 insertions(+), 688 deletions(-) (limited to 'toolkit') diff --git a/toolkit/inc/awt/vclxcontainer.hxx b/toolkit/inc/awt/vclxcontainer.hxx index d93c967b8365..248f2e6505dd 100644 --- a/toolkit/inc/awt/vclxcontainer.hxx +++ b/toolkit/inc/awt/vclxcontainer.hxx @@ -21,27 +21,18 @@ #include #include -#include +#include #include -class VCLXContainer : public css::awt::XVclContainer, - public css::awt::XVclContainerPeer, - public VCLXWindow +class VCLXContainer : public cppu::ImplInheritanceHelper { public: VCLXContainer(); virtual ~VCLXContainer() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XVclContainer void SAL_CALL addVclContainerListener( const css::uno::Reference< css::awt::XVclContainerListener >& l ) override; void SAL_CALL removeVclContainerListener( const css::uno::Reference< css::awt::XVclContainerListener >& l ) override; diff --git a/toolkit/inc/awt/vclxsystemdependentwindow.hxx b/toolkit/inc/awt/vclxsystemdependentwindow.hxx index 4bab43c494ee..69eba013c67f 100644 --- a/toolkit/inc/awt/vclxsystemdependentwindow.hxx +++ b/toolkit/inc/awt/vclxsystemdependentwindow.hxx @@ -21,26 +21,17 @@ #include -#include +#include #include -class VCLXSystemDependentWindow final : public css::awt::XSystemDependentWindowPeer, - public VCLXWindow +class VCLXSystemDependentWindow final : + public cppu::ImplInheritanceHelper { public: VCLXSystemDependentWindow(); virtual ~VCLXSystemDependentWindow() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XSystemDependentWindowPeer css::uno::Any SAL_CALL getWindowHandle( const css::uno::Sequence< sal_Int8 >& ProcessId, sal_Int16 SystemType ) override; }; diff --git a/toolkit/inc/awt/vclxtopwindow.hxx b/toolkit/inc/awt/vclxtopwindow.hxx index ad07c2780cd7..1913c4594f6d 100644 --- a/toolkit/inc/awt/vclxtopwindow.hxx +++ b/toolkit/inc/awt/vclxtopwindow.hxx @@ -22,34 +22,21 @@ #include #include -#include -#include +#include #include namespace com::sun::star::awt { class XMenuBar; } -typedef ::cppu::ImplHelper2 < css::awt::XTopWindow2, css::awt::XSystemDependentWindowPeer - > VCLXTopWindow_XBase; - -class VCLXTopWindow: public VCLXTopWindow_XBase, - public VCLXContainer +class VCLXTopWindow: public cppu::ImplInheritanceHelper< + VCLXContainer, css::awt::XTopWindow2, css::awt::XSystemDependentWindowPeer > { public: VCLXTopWindow(); virtual ~VCLXTopWindow() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XSystemDependentWindowPeer css::uno::Any SAL_CALL getWindowHandle( const css::uno::Sequence< sal_Int8 >& ProcessId, sal_Int16 SystemType ) override; diff --git a/toolkit/inc/awt/vclxwindows.hxx b/toolkit/inc/awt/vclxwindows.hxx index 46f7b8181c86..ce96248494ea 100644 --- a/toolkit/inc/awt/vclxwindows.hxx +++ b/toolkit/inc/awt/vclxwindows.hxx @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -73,22 +74,13 @@ private: }; // class VCLXMessageBox -class VCLXMessageBox final : public css::awt::XMessageBox, - public VCLXTopWindow +class VCLXMessageBox final : + public cppu::ImplInheritanceHelper { public: VCLXMessageBox(); virtual ~VCLXMessageBox() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XMessageBox void SAL_CALL setCaptionText( const OUString& aText ) override; @@ -112,13 +104,6 @@ public: VCLXFrame(); virtual ~VCLXFrame() override; - // css::uno::XInterface - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XView void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) override; @@ -130,22 +115,12 @@ public: }; // class VCLXDialog -class VCLXDialog final : public css::awt::XDialog2, - public VCLXTopWindow +class VCLXDialog final : public cppu::ImplInheritanceHelper { public: VCLXDialog(); virtual ~VCLXDialog() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XDialog2 virtual void SAL_CALL endDialog( ::sal_Int32 Result ) override; virtual void SAL_CALL setHelpId( const OUString& Id ) override; @@ -176,13 +151,6 @@ public: VCLXTabPage(); virtual ~VCLXTabPage() override; - // css::uno::XInterface - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XView void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) override; @@ -195,7 +163,8 @@ public: virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); } }; -class VCLXMultiPage final : public css::awt::XSimpleTabController, public VCLXContainer +class VCLXMultiPage final : + public cppu::ImplInheritanceHelper { TabListenerMultiplexer maTabListeners; sal_Int32 mTabId; @@ -205,14 +174,6 @@ public: VCLXMultiPage(); virtual ~VCLXMultiPage() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::lang::XComponent void SAL_CALL dispose( ) override; @@ -242,10 +203,11 @@ public: virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); } }; -class VCLXMultiLineEdit final : public css::awt::XTextComponent, - public css::awt::XTextArea, - public css::awt::XTextLayoutConstrains, - public VCLXWindow +class VCLXMultiLineEdit final : public cppu::ImplInheritanceHelper< + VCLXWindow, + css::awt::XTextComponent, + css::awt::XTextArea, + css::awt::XTextLayoutConstrains> { private: TextListenerMultiplexer maTextListeners; @@ -257,15 +219,6 @@ public: VCLXMultiLineEdit(); virtual ~VCLXMultiLineEdit() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { VCLXWindow::acquire(); } - void SAL_CALL release() noexcept override { VCLXWindow::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XTextComponent void SAL_CALL addTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) override; void SAL_CALL removeTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) override; @@ -304,8 +257,7 @@ public: }; // class VCLXProgressBar -class VCLXProgressBar final : public css::awt::XProgressBar - , public VCLXWindow +class VCLXProgressBar final : public cppu::ImplInheritanceHelper { private: sal_Int32 m_nValue; @@ -318,15 +270,6 @@ public: VCLXProgressBar(); virtual ~VCLXProgressBar() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { VCLXWindow::acquire(); } - void SAL_CALL release() noexcept override { VCLXWindow::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XProgressBar void SAL_CALL setForegroundColor( sal_Int32 nColor ) override; void SAL_CALL setBackgroundColor( sal_Int32 nColor ) override; @@ -372,8 +315,8 @@ public: // class VCLXDateField -class VCLXDateField : public css::awt::XDateField, - public VCLXFormattedSpinField +class VCLXDateField : + public cppu::ImplInheritanceHelper { protected: virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override; @@ -381,15 +324,6 @@ public: VCLXDateField(); virtual ~VCLXDateField() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XDateField void SAL_CALL setDate( const css::util::Date& Date ) override; @@ -420,23 +354,14 @@ public: // class VCLXTimeField -class VCLXTimeField final : public css::awt::XTimeField, - public VCLXFormattedSpinField +class VCLXTimeField final : + public cppu::ImplInheritanceHelper { virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override; public: VCLXTimeField(); virtual ~VCLXTimeField() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XTimeField void SAL_CALL setTime( const css::util::Time& Time ) override; css::util::Time SAL_CALL getTime( ) override; @@ -464,22 +389,13 @@ public: // class VCLXNumericField -class VCLXNumericField final : public css::awt::XNumericField, - public VCLXFormattedSpinField +class VCLXNumericField final : + public cppu::ImplInheritanceHelper { public: VCLXNumericField(); virtual ~VCLXNumericField() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XNumericField void SAL_CALL setValue( double Value ) override; double SAL_CALL getValue( ) override; @@ -511,8 +427,8 @@ public: class MetricFormatter; class MetricField; -class VCLXMetricField final : public css::awt::XMetricField, - public VCLXFormattedSpinField +class VCLXMetricField final : + public cppu::ImplInheritanceHelper { /// @throws css::uno::RuntimeException MetricFormatter *GetMetricFormatter(); @@ -523,15 +439,6 @@ public: VCLXMetricField(); virtual ~VCLXMetricField() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XMetricField virtual void SAL_CALL setValue( ::sal_Int64 Value, ::sal_Int16 Unit ) override; virtual void SAL_CALL setUserValue( ::sal_Int64 Value, ::sal_Int16 Unit ) override; @@ -561,22 +468,13 @@ public: }; // class VCLXPatternField -class VCLXPatternField final : public css::awt::XPatternField, - public VCLXFormattedSpinField +class VCLXPatternField final : + public cppu::ImplInheritanceHelper { public: VCLXPatternField(); virtual ~VCLXPatternField() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); } - void SAL_CALL release() noexcept override { OWeakObject::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XPatternField void SAL_CALL setMasks( const OUString& EditMask, const OUString& LiteralMask ) override; @@ -595,7 +493,7 @@ public: }; -class VCLXFileControl final : public css::awt::XTextComponent, public css::awt::XTextLayoutConstrains, public VCLXWindow +class VCLXFileControl final : public cppu::ImplInheritanceHelper { DECL_LINK(ModifyHdl, Edit&, void); void ModifyHdl(); @@ -607,15 +505,6 @@ public: virtual void SetWindow( const VclPtr< vcl::Window > &pWindow ) override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { VCLXWindow::acquire(); } - void SAL_CALL release() noexcept override { VCLXWindow::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XTextComponent void SAL_CALL addTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) override; void SAL_CALL removeTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) override; @@ -645,21 +534,13 @@ public: virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); } }; -class SVTXCurrencyField final : public css::awt::XCurrencyField, public SVTXFormattedField +class SVTXCurrencyField final : + public cppu::ImplInheritanceHelper { public: SVTXCurrencyField(); virtual ~SVTXCurrencyField() override; - // css::uno::XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - void SAL_CALL acquire() noexcept override { SVTXFormattedField::acquire(); } - void SAL_CALL release() noexcept override { SVTXFormattedField::release(); } - - // css::lang::XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // css::awt::XVclWindowPeer void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override; css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override; diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx index 05e321d1b538..5927c1f8e0b0 100644 --- a/toolkit/source/awt/vclxcontainer.cxx +++ b/toolkit/source/awt/vclxcontainer.cxx @@ -18,10 +18,7 @@ */ #include -#include #include -#include -#include #include #include @@ -44,29 +41,6 @@ VCLXContainer::~VCLXContainer() { } -// css::uno::XInterface -css::uno::Any VCLXContainer::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XVclContainer* >(this), - static_cast< css::awt::XVclContainerPeer* >(this) ); - return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXContainer ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXContainer::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXWindow::getTypes() - ); - return aTypeList.getTypes(); -} - // css::awt::XVclContainer void VCLXContainer::addVclContainerListener( const css::uno::Reference< css::awt::XVclContainerListener >& rxListener ) diff --git a/toolkit/source/awt/vclxsystemdependentwindow.cxx b/toolkit/source/awt/vclxsystemdependentwindow.cxx index 37d7f86d9d58..2ba59470a828 100644 --- a/toolkit/source/awt/vclxsystemdependentwindow.cxx +++ b/toolkit/source/awt/vclxsystemdependentwindow.cxx @@ -24,9 +24,6 @@ #endif #include -#include -#include -#include #ifdef MACOSX #include @@ -48,27 +45,6 @@ VCLXSystemDependentWindow::~VCLXSystemDependentWindow() { } -// css::uno::XInterface -css::uno::Any VCLXSystemDependentWindow::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XSystemDependentWindowPeer* >(this) ); - return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXSystemDependentWindow ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXSystemDependentWindow::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXWindow::getTypes() - ); - return aTypeList.getTypes(); -} - css::uno::Any VCLXSystemDependentWindow::getWindowHandle( const css::uno::Sequence< sal_Int8 >& /*ProcessId*/, sal_Int16 SystemType ) { SolarMutexGuard aGuard; diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx index db42fa80277f..7e392675b3f7 100644 --- a/toolkit/source/awt/vclxtopwindow.cxx +++ b/toolkit/source/awt/vclxtopwindow.cxx @@ -30,7 +30,6 @@ #endif #include -#include #include #include @@ -227,28 +226,5 @@ VCLXTopWindow::~VCLXTopWindow() { } -// css::uno::XInterface -css::uno::Any VCLXTopWindow::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet( VCLXTopWindow_XBase::queryInterface( rType ) ); - - if (!aRet.hasValue()) - aRet = VCLXTopWindow_XBase::queryInterface( rType ); - if ( !aRet.hasValue() ) - aRet = VCLXContainer::queryInterface( rType ); - - return aRet; -} - -css::uno::Sequence< sal_Int8 > VCLXTopWindow::getImplementationId() -{ - return css::uno::Sequence(); -} - -css::uno::Sequence< css::uno::Type > VCLXTopWindow::getTypes() -{ - return ::comphelper::concatSequences( VCLXTopWindow_XBase::getTypes(), VCLXContainer::getTypes() ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index eb1421d291a4..8fc6dc0277db 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -24,11 +24,8 @@ #include #include #include -#include #include #include -#include -#include #include #include #include @@ -782,29 +779,6 @@ VCLXCheckBox::VCLXCheckBox() : maActionListeners( *this ), maItemListeners( *th { } -// css::uno::XInterface -css::uno::Any VCLXCheckBox::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XButton* >(this), - static_cast< css::awt::XCheckBox* >(this) ); - return (aRet.hasValue() ? aRet : VCLXGraphicControl::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXCheckBox ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXCheckBox::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXGraphicControl::getTypes() - ); - return aTypeList.getTypes(); -} - css::uno::Reference< css::accessibility::XAccessibleContext > VCLXCheckBox::CreateAccessibleContext() { return getAccessibleFactory().createAccessibleContext( this ); @@ -1089,29 +1063,6 @@ VCLXRadioButton::VCLXRadioButton() : maItemListeners( *this ), maActionListeners { } -// css::uno::XInterface -css::uno::Any VCLXRadioButton::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XRadioButton* >(this), - static_cast< css::awt::XButton* >(this) ); - return (aRet.hasValue() ? aRet : VCLXGraphicControl::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXRadioButton ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXRadioButton::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXGraphicControl::getTypes() - ); - return aTypeList.getTypes(); -} - css::uno::Reference< css::accessibility::XAccessibleContext > VCLXRadioButton::CreateAccessibleContext() { return getAccessibleFactory().createAccessibleContext( this ); @@ -1356,27 +1307,6 @@ VCLXSpinField::VCLXSpinField() : maSpinListeners( *this ) { } -// css::uno::XInterface -css::uno::Any VCLXSpinField::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XSpinField* >(this) ); - return (aRet.hasValue() ? aRet : VCLXEdit::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXSpinField ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXSpinField::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXEdit::getTypes() - ); - return aTypeList.getTypes(); -} - void VCLXSpinField::addSpinListener( const css::uno::Reference< css::awt::XSpinListener > & l ) { SolarMutexGuard aGuard; @@ -2226,27 +2156,6 @@ VCLXMessageBox::~VCLXMessageBox() { } -// css::uno::XInterface -css::uno::Any VCLXMessageBox::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XMessageBox* >(this) ); - return (aRet.hasValue() ? aRet : VCLXTopWindow::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXMessageBox ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXMessageBox::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXTopWindow::getTypes() - ); - return aTypeList.getTypes(); -} - void VCLXMessageBox::setCaptionText( const OUString& rText ) { SolarMutexGuard aGuard; @@ -2314,29 +2223,6 @@ VCLXDialog::~VCLXDialog() SAL_INFO("toolkit", __FUNCTION__); } -// css::uno::XInterface -css::uno::Any VCLXDialog::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XDialog2* >(this), - static_cast< css::awt::XDialog* >(this) ); - return (aRet.hasValue() ? aRet : VCLXTopWindow::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXDialog ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXDialog::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXTopWindow::getTypes() - ); - return aTypeList.getTypes(); -} - void SAL_CALL VCLXDialog::endDialog( ::sal_Int32 i_result ) { SolarMutexGuard aGuard; @@ -2521,13 +2407,6 @@ void SAL_CALL VCLXMultiPage::dispose() maTabListeners.disposeAndClear( aObj ); VCLXContainer::dispose(); } -css::uno::Any SAL_CALL VCLXMultiPage::queryInterface(const css::uno::Type & rType ) -{ - uno::Any aRet = ::cppu::queryInterface( rType, static_cast< awt::XSimpleTabController*>( this ) ); - - return ( aRet.hasValue() ? aRet : VCLXContainer::queryInterface( rType ) ); -} -IMPL_IMPLEMENTATION_ID( VCLXMultiPage ) // css::awt::XView void SAL_CALL VCLXMultiPage::draw( sal_Int32 nX, sal_Int32 nY ) { @@ -2771,8 +2650,6 @@ VCLXTabPage::~VCLXTabPage() { } -IMPL_IMPLEMENTATION_ID( VCLXTabPage ) - // css::awt::XView void SAL_CALL VCLXTabPage::draw( sal_Int32 nX, sal_Int32 nY ) { @@ -2865,14 +2742,6 @@ VCLXFixedHyperlink::~VCLXFixedHyperlink() { } -// css::uno::XInterface -css::uno::Any VCLXFixedHyperlink::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XFixedHyperlink* >(this) ); - return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType )); -} - void VCLXFixedHyperlink::dispose() { SolarMutexGuard aGuard; @@ -2883,19 +2752,6 @@ void VCLXFixedHyperlink::dispose() VCLXWindow::dispose(); } -IMPL_IMPLEMENTATION_ID( VCLXFixedHyperlink ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXFixedHyperlink::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXWindow::getTypes() - ); - return aTypeList.getTypes(); -} - void VCLXFixedHyperlink::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { switch ( rVclWindowEvent.GetId() ) @@ -3167,27 +3023,6 @@ VCLXFixedText::~VCLXFixedText() { } -// css::uno::XInterface -css::uno::Any VCLXFixedText::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XFixedText* >(this) ); - return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXFixedText ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXFixedText::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXWindow::getTypes() - ); - return aTypeList.getTypes(); -} - css::uno::Reference< css::accessibility::XAccessibleContext > VCLXFixedText::CreateAccessibleContext() { return getAccessibleFactory().createAccessibleContext( this ); @@ -3315,27 +3150,6 @@ VCLXScrollBar::VCLXScrollBar() : maAdjustmentListeners( *this ) { } -// css::uno::XInterface -css::uno::Any VCLXScrollBar::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XScrollBar* >(this) ); - return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXScrollBar ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXScrollBar::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXWindow::getTypes() - ); - return aTypeList.getTypes(); -} - css::uno::Reference< css::accessibility::XAccessibleContext > VCLXScrollBar::CreateAccessibleContext() { return getAccessibleFactory().createAccessibleContext( this ); @@ -3806,31 +3620,6 @@ VCLXEdit::VCLXEdit() : maTextListeners( *this ) { } -// css::uno::XInterface -css::uno::Any VCLXEdit::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XTextComponent* >(this), - static_cast< css::awt::XTextEditField* >(this), - static_cast< css::awt::XTextLayoutConstrains* >(this) ); - return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXEdit ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXEdit::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXWindow::getTypes() - ); - return aTypeList.getTypes(); -} - css::uno::Reference< css::accessibility::XAccessibleContext > VCLXEdit::CreateAccessibleContext() { return getAccessibleFactory().createAccessibleContext( this ); @@ -4839,27 +4628,6 @@ css::uno::Reference< css::accessibility::XAccessibleContext > VCLXDateField::Cre return getAccessibleFactory().createAccessibleContext( this ); } -// css::uno::XInterface -css::uno::Any VCLXDateField::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XDateField* >(this) ); - return (aRet.hasValue() ? aRet : VCLXFormattedSpinField::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXDateField ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXDateField::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXFormattedSpinField::getTypes() - ); - return aTypeList.getTypes(); -} - void VCLXDateField::setProperty( const OUString& PropertyName, const css::uno::Any& Value) { SolarMutexGuard aGuard; @@ -5194,27 +4962,6 @@ css::uno::Reference< css::accessibility::XAccessibleContext > VCLXTimeField::Cre return getAccessibleFactory().createAccessibleContext( this ); } -// css::uno::XInterface -css::uno::Any VCLXTimeField::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XTimeField* >(this) ); - return (aRet.hasValue() ? aRet : VCLXFormattedSpinField::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXTimeField ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXTimeField::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXFormattedSpinField::getTypes() - ); - return aTypeList.getTypes(); -} - void VCLXTimeField::setTime( const util::Time& aTime ) { SolarMutexGuard aGuard; @@ -5501,27 +5248,6 @@ VCLXNumericField::~VCLXNumericField() { } -// css::uno::XInterface -css::uno::Any VCLXNumericField::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XNumericField* >(this) ); - return (aRet.hasValue() ? aRet : VCLXFormattedSpinField::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXNumericField ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXNumericField::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXFormattedSpinField::getTypes() - ); - return aTypeList.getTypes(); -} - void VCLXNumericField::setValue( double Value ) { SolarMutexGuard aGuard; @@ -5872,26 +5598,6 @@ MetricField *VCLXMetricField::GetMetricField() return pField; } -// css::uno::XInterface -css::uno::Any VCLXMetricField::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, static_cast< css::awt::XMetricField* >(this) ); - return (aRet.hasValue() ? aRet : VCLXFormattedSpinField::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXMetricField ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXMetricField::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXFormattedSpinField::getTypes() - ); - return aTypeList.getTypes(); -} - // FIXME: later ... #define MetricUnitUnoToVcl(a) (static_cast(a)) @@ -6114,27 +5820,6 @@ VCLXPatternField::~VCLXPatternField() { } -// css::uno::XInterface -css::uno::Any VCLXPatternField::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XPatternField* >(this) ); - return (aRet.hasValue() ? aRet : VCLXFormattedSpinField::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXPatternField ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXPatternField::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXFormattedSpinField::getTypes() - ); - return aTypeList.getTypes(); -} - void VCLXPatternField::setMasks( const OUString& EditMask, const OUString& LiteralMask ) { SolarMutexGuard aGuard; @@ -6304,8 +5989,6 @@ VCLXFrame::~VCLXFrame() { } -IMPL_IMPLEMENTATION_ID( VCLXFrame ) - // css::awt::XView void SAL_CALL VCLXFrame::draw( sal_Int32 nX, sal_Int32 nY ) { @@ -6400,28 +6083,6 @@ void VCLXProgressBar::ImplUpdateValue() pProgressBar->SetValue( static_cast(nPercent) ); } -// css::uno::XInterface -css::uno::Any VCLXProgressBar::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XProgressBar* >(this), - static_cast< css::lang::XTypeProvider* >(this) ); - return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXProgressBar ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXProgressBar::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXWindow::getTypes() - ); - return aTypeList.getTypes(); -} - // css::awt::XProgressBar void VCLXProgressBar::setForegroundColor( sal_Int32 nColor ) { @@ -6595,29 +6256,6 @@ VCLXFileControl::~VCLXFileControl() pControl->GetEdit().SetModifyHdl( Link() ); } -css::uno::Any VCLXFileControl::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XTextComponent* >(this), - static_cast< css::awt::XTextLayoutConstrains* >(this), - static_cast< css::lang::XTypeProvider* >(this) ); - return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXFileControl ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXFileControl::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXWindow::getTypes() - ); - return aTypeList.getTypes(); -} - namespace { void lcl_setWinBits( vcl::Window* _pWindow, WinBits _nBits, bool _bSet ) @@ -7454,27 +7092,6 @@ SVTXCurrencyField::~SVTXCurrencyField() { } -css::uno::Any SVTXCurrencyField::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XCurrencyField* >(this), - static_cast< css::lang::XTypeProvider* >(this) ); - return (aRet.hasValue() ? aRet : SVTXFormattedField::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( SVTXCurrencyField ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > SVTXCurrencyField::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - SVTXFormattedField::getTypes() - ); - return aTypeList.getTypes(); -} - void SVTXCurrencyField::setValue( double Value ) { SolarMutexGuard aGuard; @@ -7721,27 +7338,6 @@ SVTXNumericField::~SVTXNumericField() { } -css::uno::Any SVTXNumericField::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XNumericField* >(this), - static_cast< css::lang::XTypeProvider* >(this) ); - return (aRet.hasValue() ? aRet : SVTXFormattedField::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( SVTXNumericField ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > SVTXNumericField::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - SVTXFormattedField::getTypes() - ); - return aTypeList.getTypes(); -} - css::uno::Reference SVTXNumericField::CreateAccessibleContext() { @@ -7941,31 +7537,6 @@ VCLXMultiLineEdit::~VCLXMultiLineEdit() { } -css::uno::Any VCLXMultiLineEdit::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = ::cppu::queryInterface( rType, - static_cast< css::awt::XTextComponent* >(this), - static_cast< css::awt::XTextArea* >(this), - static_cast< css::awt::XTextLayoutConstrains* >(this), - static_cast< css::lang::XTypeProvider* >(this) ); - return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType )); -} - -IMPL_IMPLEMENTATION_ID( VCLXMultiLineEdit ) - -// css::lang::XTypeProvider -css::uno::Sequence< css::uno::Type > VCLXMultiLineEdit::getTypes() -{ - static const ::cppu::OTypeCollection aTypeList( - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - VCLXWindow::getTypes() - ); - return aTypeList.getTypes(); -} - void VCLXMultiLineEdit::addTextListener( const css::uno::Reference< css::awt::XTextListener > & l ) { maTextListeners.addInterface( l ); -- cgit