summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-06-01 20:50:37 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-06-03 09:32:50 +0200
commit09c657ebe69fe1c2516a10a4452996870f4237d2 (patch)
tree1e0d6154aa3674599994bd8a4a90e1e4a83af813 /svx
parent675a3928e1cab27cf310c316be65acdbb764ed65 (diff)
tdf#39593 use UNO3_GETIMPLEMENTATION* macros
Change-Id: I4e9af3b43a5baf19e100f42b3f37a2ade89ada5d Reviewed-on: https://gerrit.libreoffice.org/73320 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx39
-rw-r--r--svx/source/fmcomp/fmgridif.cxx39
2 files changed, 2 insertions, 76 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 1a15f61459db..832852576472 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -57,7 +57,6 @@
#include <svx/svdview.hxx>
#include <tools/diagnose_ex.h>
#include <cppuhelper/queryinterface.hxx>
-#include <comphelper/servicehelper.hxx>
#include "AccessibleEmptyEditSource.hxx"
#include <algorithm>
@@ -1002,43 +1001,7 @@ void SAL_CALL
}
// lang::XUnoTunnel
-namespace
-{
- class theAccessibleShapeImplementationId : public rtl::Static< UnoTunnelIdInit, theAccessibleShapeImplementationId > {};
-}
-
-const uno::Sequence< sal_Int8 >&
- AccessibleShape::getUnoTunnelImplementationId()
- throw()
-{
- return theAccessibleShapeImplementationId::get().getSeq();
-}
-
-
-AccessibleShape*
- AccessibleShape::getImplementation( const uno::Reference< uno::XInterface >& rxIFace )
- throw()
-{
- uno::Reference< lang::XUnoTunnel > xTunnel( rxIFace, uno::UNO_QUERY );
- AccessibleShape* pReturn = nullptr;
-
- if( xTunnel.is() )
- pReturn = reinterpret_cast< AccessibleShape* >( xTunnel->getSomething( getUnoTunnelImplementationId() ) );
-
- return pReturn;
-}
-
-
-sal_Int64 SAL_CALL
- AccessibleShape::getSomething( const uno::Sequence< sal_Int8 >& rIdentifier )
-{
- sal_Int64 nReturn( 0 );
-
- if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) )
- nReturn = reinterpret_cast< sal_Int64 >( this );
-
- return nReturn;
-}
+UNO3_GETIMPLEMENTATION_IMPL(AccessibleShape)
// IAccessibleViewForwarderListener
void AccessibleShape::ViewForwarderChanged()
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 86946e76cdec..6863595afb0b 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -50,7 +50,6 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
-#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
@@ -1079,43 +1078,7 @@ FmXGridPeer::~FmXGridPeer()
setColumns(Reference< XIndexContainer > ());
}
-namespace
-{
- class theFmXGridPeerImplementationId : public rtl::Static< UnoTunnelIdInit, theFmXGridPeerImplementationId > {};
-}
-
-const Sequence< sal_Int8 >& FmXGridPeer::getUnoTunnelImplementationId() throw()
-{
- return theFmXGridPeerImplementationId::get().getSeq();
-}
-
-
-FmXGridPeer* FmXGridPeer::getImplementation( const Reference< XInterface >& _rxIFace ) throw()
-{
- FmXGridPeer* pReturn = nullptr;
- Reference< XUnoTunnel > xTunnel(_rxIFace, UNO_QUERY);
- if (xTunnel.is())
- pReturn = reinterpret_cast<FmXGridPeer*>(xTunnel->getSomething(getUnoTunnelImplementationId()));
-
- return pReturn;
-}
-
-
-sal_Int64 SAL_CALL FmXGridPeer::getSomething( const Sequence< sal_Int8 >& _rIdentifier )
-{
- sal_Int64 nReturn(0);
-
- if ( (_rIdentifier.getLength() == 16)
- && (0 == memcmp( getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ))
- )
- {
- nReturn = reinterpret_cast<sal_Int64>(this);
- }
- else
- nReturn = VCLXWindow::getSomething(_rIdentifier);
-
- return nReturn;
-}
+UNO3_GETIMPLEMENTATION2_IMPL(FmXGridPeer, VCLXWindow);
// XEventListener