summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unoshape.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-06-15 21:46:13 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-06-17 08:56:36 +0200
commitadc295a1b2e1f2ed43e7eb587fc89d7229e0f122 (patch)
treed045a927d1f88d2574bdef441bc1cbc0b81fd16b /svx/source/unodraw/unoshape.cxx
parentd39846bfd16ad9873795149c370a95f42363bfd9 (diff)
Add comphelper::getUnoTunnelImplementation template
Use it instead of classname::getImplementation from UNO3_GETIMPLEMENTATION_* Change-Id: Ifcc8cfcd6369c576250008c76ce31ba79ea3a596 Reviewed-on: https://gerrit.libreoffice.org/74107 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx/source/unodraw/unoshape.cxx')
-rw-r--r--svx/source/unodraw/unoshape.cxx15
1 files changed, 2 insertions, 13 deletions
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 9cd0d2ea520c..929e0350ec22 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -295,17 +295,6 @@ const css::uno::Sequence< sal_Int8 > & SvxShape::getUnoTunnelId() throw()
return theSvxShapeUnoTunnelId::get().getSeq();
}
-
-SvxShape* SvxShape::getImplementation( const uno::Reference< uno::XInterface >& xInt )
-{
- uno::Reference< lang::XUnoTunnel > xUT( xInt, css::uno::UNO_QUERY );
- if( xUT.is() )
- return reinterpret_cast<SvxShape*>(sal::static_int_cast<sal_uIntPtr>(xUT->getSomething( SvxShape::getUnoTunnelId())));
- else
- return nullptr;
-}
-
-
sal_Int64 SAL_CALL SvxShape::getSomething( const css::uno::Sequence< sal_Int8 >& rId )
{
if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
@@ -4100,14 +4089,14 @@ uno::Reference< drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw
/** returns the SdrObject from the given StarOffice API wrapper */
SdrObject* GetSdrObjectFromXShape( const uno::Reference< drawing::XShape >& xShape ) throw()
{
- SvxShape* pShape = SvxShape::getImplementation( xShape );
+ SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape );
return pShape ? pShape->GetSdrObject() : nullptr;
}
SdrObject* SdrObject::getSdrObjectFromXShape( const css::uno::Reference< css::uno::XInterface >& xInt )
{
- SvxShape* pSvxShape = SvxShape::getImplementation( xInt );
+ SvxShape* pSvxShape = comphelper::getUnoTunnelImplementation<SvxShape>( xInt );
return pSvxShape ? pSvxShape->GetSdrObject() : nullptr;
}