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

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Fri Mar 16 08:53:15 UTC 2018


 vcl/source/graphic/UnoGraphicProvider.cxx |   28 ----------------------------
 1 file changed, 28 deletions(-)

New commits:
commit f4facca39726c7a8d43ced8f4d88d58aa116c443
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Thu Mar 15 20:26:58 2018 +0900

    Remove XGraphic creation with Grap.Obj. URL in GraphicProvider
    
    Change-Id: Ie51be332df88791cb13c3835582acc0a4e7250f9
    Reviewed-on: https://gerrit.libreoffice.org/51332
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx
index 1c4595e7aeda..abb85ac6aac0 100644
--- a/vcl/source/graphic/UnoGraphicProvider.cxx
+++ b/vcl/source/graphic/UnoGraphicProvider.cxx
@@ -54,8 +54,6 @@ using namespace com::sun::star;
 
 namespace {
 
-#define UNO_NAME_GRAPHOBJ_URLPREFIX                             "vnd.sun.star.GraphicObject:"
-
 class GraphicProvider : public ::cppu::WeakImplHelper< css::graphic::XGraphicProvider2,
                                                         css::lang::XServiceInfo >
 {
@@ -85,7 +83,6 @@ protected:
 private:
 
     static css::uno::Reference< css::graphic::XGraphic > implLoadMemory( const OUString& rResourceURL );
-    static css::uno::Reference< css::graphic::XGraphic > implLoadGraphicObject( const OUString& rResourceURL );
     static css::uno::Reference< css::graphic::XGraphic > implLoadRepositoryImage( const OUString& rResourceURL );
     static css::uno::Reference< css::graphic::XGraphic > implLoadBitmap( const css::uno::Reference< css::awt::XBitmap >& rBitmap );
     static css::uno::Reference< css::graphic::XGraphic > implLoadStandardImage( const OUString& rResourceURL );
@@ -128,26 +125,6 @@ uno::Sequence< sal_Int8 > SAL_CALL GraphicProvider::getImplementationId()
     return css::uno::Sequence<sal_Int8>();
 }
 
-
-uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadGraphicObject( const OUString& rResourceURL )
-{
-    uno::Reference< ::graphic::XGraphic >   xRet;
-    if( rResourceURL.startsWith( UNO_NAME_GRAPHOBJ_URLPREFIX ) )
-    {
-        // graphic manager url
-        OUString aTmpStr( rResourceURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 ) );
-        OString aUniqueID(OUStringToOString(aTmpStr,
-            RTL_TEXTENCODING_UTF8));
-        GraphicObject aGrafObj(aUniqueID);
-        // I don't call aGrafObj.GetXGraphic because it will call us back
-        // into implLoadMemory ( with "private:memorygraphic" test )
-        ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic;
-        pUnoGraphic->init( aGrafObj.GetGraphic() );
-        xRet = pUnoGraphic;
-    }
-    return xRet;
-}
-
 uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadMemory( const OUString& rResourceURL )
 {
     uno::Reference< ::graphic::XGraphic >   xRet;
@@ -287,8 +264,6 @@ uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDesc
     else if( !aURL.isEmpty() )
     {
         uno::Reference< ::graphic::XGraphic > xGraphic( implLoadMemory( aURL ) );
-        if( !xGraphic.is() )
-            xGraphic = implLoadGraphicObject( aURL );
 
         if ( !xGraphic.is() )
             xGraphic = implLoadRepositoryImage( aURL );
@@ -387,9 +362,6 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
     {
         xRet = implLoadMemory( aPath );
 
-        if( !xRet.is() )
-            xRet = implLoadGraphicObject( aPath );
-
         if ( !xRet.is() )
             xRet = implLoadRepositoryImage( aPath );
 


More information about the Libreoffice-commits mailing list