summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-06-17 22:37:08 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-06-18 13:17:29 +0200
commit086c186209e33faa38403c1d9122fd2e90921b3a (patch)
tree644fb864858b8e3c0c7a407c4ff879ac418c91da
parent485e048c391da38f883adfbef920069bd7af2305 (diff)
tdf#39593 Remove Graphic::getImplementation
Replace with comphelper::getUnoTunnelImplementation. Change-Id: Ic0e2e78fea575af6da4870fbd372f2148a328e26 Reviewed-on: https://gerrit.libreoffice.org/74203 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--vcl/inc/graphic/UnoGraphic.hxx2
-rw-r--r--vcl/source/graphic/UnoGraphic.cxx7
-rw-r--r--vcl/source/graphic/UnoGraphicProvider.cxx3
3 files changed, 2 insertions, 10 deletions
diff --git a/vcl/inc/graphic/UnoGraphic.hxx b/vcl/inc/graphic/UnoGraphic.hxx
index 0bef26bcbd86..5728debf6a47 100644
--- a/vcl/inc/graphic/UnoGraphic.hxx
+++ b/vcl/inc/graphic/UnoGraphic.hxx
@@ -44,8 +44,6 @@ public:
using ::unographic::GraphicDescriptor::init;
void init( const ::Graphic& rGraphic ) throw();
- static const ::Graphic* getImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace ) throw();
-
protected:
// XInterface
diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx
index 4fe9d88ada8e..b13860caa734 100644
--- a/vcl/source/graphic/UnoGraphic.cxx
+++ b/vcl/source/graphic/UnoGraphic.cxx
@@ -181,13 +181,6 @@ uno::Sequence<sal_Int8> SAL_CALL Graphic::getMaskDIB()
}
}
-const ::Graphic* Graphic::getImplementation( const uno::Reference< uno::XInterface >& rxIFace )
- throw()
-{
- uno::Reference< lang::XUnoTunnel > xTunnel( rxIFace, uno::UNO_QUERY );
- return( xTunnel.is() ? reinterpret_cast< ::Graphic* >( xTunnel->getSomething( ::Graphic::getUnoTunnelId() ) ) : nullptr );
-}
-
sal_Int64 SAL_CALL Graphic::getSomething( const uno::Sequence< sal_Int8 >& rId )
{
return( ( rId.getLength() == 16 && 0 == memcmp( ::Graphic::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ?
diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx
index d7dcee4b183c..eed36dbc0fe6 100644
--- a/vcl/source/graphic/UnoGraphicProvider.cxx
+++ b/vcl/source/graphic/UnoGraphicProvider.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/text/GraphicCrop.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <comphelper/fileformat.h>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <sal/log.hxx>
@@ -805,7 +806,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG
{
const uno::Reference< XInterface > xIFace( rxGraphic, uno::UNO_QUERY );
- const ::Graphic* pGraphic = ::unographic::Graphic::getImplementation( xIFace );
+ const ::Graphic* pGraphic = comphelper::getUnoTunnelImplementation<::Graphic>( xIFace );
if( pGraphic && ( pGraphic->GetType() != GraphicType::NONE ) )
{