[Libreoffice-commits] core.git: vcl/inc vcl/source

Arkadiy Illarionov (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 18 11:18:36 UTC 2019


 vcl/inc/graphic/UnoGraphic.hxx            |    2 --
 vcl/source/graphic/UnoGraphic.cxx         |    7 -------
 vcl/source/graphic/UnoGraphicProvider.cxx |    3 ++-
 3 files changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 086c186209e33faa38403c1d9122fd2e90921b3a
Author:     Arkadiy Illarionov <qarkai at gmail.com>
AuthorDate: Mon Jun 17 22:37:08 2019 +0300
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Jun 18 13:17:29 2019 +0200

    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 at redhat.com>

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 ) )
         {


More information about the Libreoffice-commits mailing list