summaryrefslogtreecommitdiff
path: root/include/toolkit
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-06-04 02:29:43 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-06-04 09:06:43 +0200
commit32eeb405d7fd6788aaa34e1bf8a04388d7a3958f (patch)
tree4bcb859baf3d570846228eb522e055879c92e24e /include/toolkit
parentbb847b448f8b04e40ba66e7feab42f2b697383b4 (diff)
tdf#39593 remove IMPL_XUNOTUNNEL* macros
Replace with UNO3_GETIMPLEMENTATION* macros. Replace single usage of IMPL_XUNOTUNNEL_MINIMAL with it's body. Change-Id: I7d4ad76399b999ebb2178ecf57edcf6bd2aa6c3e Reviewed-on: https://gerrit.libreoffice.org/73424 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/toolkit')
-rw-r--r--include/toolkit/awt/vclxbitmap.hxx5
-rw-r--r--include/toolkit/awt/vclxdevice.hxx5
-rw-r--r--include/toolkit/awt/vclxfont.hxx5
-rw-r--r--include/toolkit/awt/vclxgraphics.hxx5
-rw-r--r--include/toolkit/awt/vclxmenu.hxx5
-rw-r--r--include/toolkit/awt/vclxpointer.hxx5
-rw-r--r--include/toolkit/awt/vclxregion.hxx5
-rw-r--r--include/toolkit/awt/vclxwindow.hxx5
-rw-r--r--include/toolkit/helper/macros.hxx27
9 files changed, 16 insertions, 51 deletions
diff --git a/include/toolkit/awt/vclxbitmap.hxx b/include/toolkit/awt/vclxbitmap.hxx
index cc83653e751a..22b339f96194 100644
--- a/include/toolkit/awt/vclxbitmap.hxx
+++ b/include/toolkit/awt/vclxbitmap.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/XDisplayBitmap.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>
#include <vcl/bitmapex.hxx>
@@ -55,9 +56,7 @@ public:
void SAL_CALL release() throw() override { OWeakObject::release(); }
// css::lang::XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
- static VCLXBitmap* GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
- sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
+ UNO3_GETIMPLEMENTATION_DECL(VCLXBitmap)
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxdevice.hxx b/include/toolkit/awt/vclxdevice.hxx
index 18dbcbd3b4f3..b99b5bce6b7f 100644
--- a/include/toolkit/awt/vclxdevice.hxx
+++ b/include/toolkit/awt/vclxdevice.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
#include <vcl/virdev.hxx>
#include <vcl/vclptr.hxx>
@@ -57,9 +58,7 @@ public:
void SAL_CALL release() throw() override { OWeakObject::release(); }
// css::lang::XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
- static VCLXDevice* GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
- sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
+ UNO3_GETIMPLEMENTATION_DECL(VCLXDevice)
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxfont.hxx b/include/toolkit/awt/vclxfont.hxx
index e7cd07b13443..921da596009e 100644
--- a/include/toolkit/awt/vclxfont.hxx
+++ b/include/toolkit/awt/vclxfont.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/awt/XFont2.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>
#include <vcl/font.hxx>
@@ -64,9 +65,7 @@ public:
void SAL_CALL release() throw() override { OWeakObject::release(); }
// css::lang::XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
- static VCLXFont* GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
- sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
+ UNO3_GETIMPLEMENTATION_DECL(VCLXFont)
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxgraphics.hxx b/include/toolkit/awt/vclxgraphics.hxx
index 3fc82faef25d..1482bad16b3e 100644
--- a/include/toolkit/awt/vclxgraphics.hxx
+++ b/include/toolkit/awt/vclxgraphics.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/XGraphics2.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
#include <vcl/font.hxx>
@@ -89,9 +90,7 @@ public:
void SAL_CALL release() throw() override { OWeakObject::release(); }
// css::lang::XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
- static VCLXGraphics* GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
- sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
+ UNO3_GETIMPLEMENTATION_DECL(VCLXGraphics)
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxmenu.hxx b/include/toolkit/awt/vclxmenu.hxx
index 97b28432a74b..61f5b7385604 100644
--- a/include/toolkit/awt/vclxmenu.hxx
+++ b/include/toolkit/awt/vclxmenu.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>
@@ -87,9 +88,7 @@ public:
void SAL_CALL release() throw() override { OWeakObject::release(); }
// css::lang::XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
- static VCLXMenu* GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
- sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
+ UNO3_GETIMPLEMENTATION_DECL(VCLXMenu)
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxpointer.hxx b/include/toolkit/awt/vclxpointer.hxx
index f986077e76cd..ab210d2b545b 100644
--- a/include/toolkit/awt/vclxpointer.hxx
+++ b/include/toolkit/awt/vclxpointer.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/XPointer.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <osl/mutex.hxx>
@@ -48,9 +49,7 @@ public:
PointerStyle GetPointer() const { return maPointer; }
// css::lang::XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
- static VCLXPointer* GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
- sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
+ UNO3_GETIMPLEMENTATION_DECL(VCLXPointer)
// css::awt::XPointer
void SAL_CALL setType( sal_Int32 nType ) override;
diff --git a/include/toolkit/awt/vclxregion.hxx b/include/toolkit/awt/vclxregion.hxx
index 82ec095be43a..b91e40fd70b1 100644
--- a/include/toolkit/awt/vclxregion.hxx
+++ b/include/toolkit/awt/vclxregion.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/XRegion.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>
@@ -55,9 +56,7 @@ public:
void SAL_CALL release() throw() override { OWeakObject::release(); }
// css::lang::XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
- static VCLXRegion* GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
- sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
+ UNO3_GETIMPLEMENTATION_DECL(VCLXRegion)
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx
index 651594b46e66..fa76b5f253b5 100644
--- a/include/toolkit/awt/vclxwindow.hxx
+++ b/include/toolkit/awt/vclxwindow.hxx
@@ -33,6 +33,7 @@
#include <com/sun/star/awt/XDockableWindow.hpp>
#include <com/sun/star/awt/XStyleSettingsSupplier.hpp>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <tools/gen.hxx>
@@ -134,9 +135,7 @@ public:
void notifyWindowRemoved( vcl::Window const & _rWindow );
// css::lang::XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
- static VCLXWindow* GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace );
- sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
+ UNO3_GETIMPLEMENTATION_DECL(VCLXWindow)
// css::lang::XEventListener
virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx
index cf50d53c15be..13d106391820 100644
--- a/include/toolkit/helper/macros.hxx
+++ b/include/toolkit/helper/macros.hxx
@@ -22,33 +22,6 @@
#include <sal/log.hxx>
#include <osl/diagnose.h>
-#include <comphelper/servicehelper.hxx>
-
-#define IMPL_XUNOTUNNEL_MINIMAL( ClassName ) \
-sal_Int64 ClassName::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) \
-{ \
- if( ( rIdentifier.getLength() == 16 ) && ( memcmp( ClassName::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) == 0 ) ) \
- { \
- return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this)); \
- } \
- return 0; \
-} \
-namespace \
-{ \
- class the##ClassName##UnoTunnelId : public rtl::Static< UnoTunnelIdInit, the##ClassName##UnoTunnelId> {}; \
-} \
-const css::uno::Sequence< sal_Int8 >& ClassName::GetUnoTunnelId() throw() \
-{ \
- return the##ClassName##UnoTunnelId::get().getSeq(); \
-}
-
-#define IMPL_XUNOTUNNEL( ClassName ) \
-IMPL_XUNOTUNNEL_MINIMAL( ClassName ) \
-ClassName* ClassName::GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace ) \
-{ \
- css::uno::Reference< css::lang::XUnoTunnel > xUT( rxIFace, css::uno::UNO_QUERY ); \
- return xUT.is() ? reinterpret_cast<ClassName*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething( ClassName::GetUnoTunnelId() ))) : nullptr; \
-}
#define IMPL_IMPLEMENTATION_ID( ClassName ) \
css::uno::Sequence< sal_Int8 > ClassName::getImplementationId() \