[Libreoffice-commits] core.git: 2 commits - filter/source sd/source

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Sat Mar 10 13:32:26 UTC 2018


 filter/source/msfilter/svdfppt.cxx |   15 ++++++---------
 sd/source/filter/eppt/eppt.cxx     |    2 +-
 2 files changed, 7 insertions(+), 10 deletions(-)

New commits:
commit a45a5be4876095e57bf6ce0caef28025cf92e43a
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Sat Mar 10 15:31:09 2018 +0900

    ppt export: fix use of FillBitmap instead of FillBitmapURL
    
    Change-Id: Ic6add7910753649efd74e9b69557a5f4389b34dd
    Reviewed-on: https://gerrit.libreoffice.org/51023
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 217bb4221317..eddc6edbda6b 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -1208,7 +1208,7 @@ void PPTWriter::ImplWriteBackground( css::uno::Reference< css::beans::XPropertyS
         break;
 
         case css::drawing::FillStyle_BITMAP :
-            aPropOpt.CreateGraphicProperties( rXPropSet, "FillBitmapURL", true );
+            aPropOpt.CreateGraphicProperties( rXPropSet, "FillBitmap", true );
         break;
 
         case css::drawing::FillStyle_HATCH :
commit 9844d63c93e56fdb81d8ca6bbb2b67e9aa3a77c4
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Sat Mar 10 15:26:08 2018 +0900

    svdfppt: use FillBitmap and xBitmap instead of Graph.Obj. URL
    
    Change-Id: I9b431a598b6cadab6b345ee41bdc8ed2f94b8d3a
    Reviewed-on: https://gerrit.libreoffice.org/51022
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 21b335dadf53..97032a01a56c 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -7455,21 +7455,18 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
                     eFS = css::drawing::FillStyle_BITMAP;
 
                     const XFillBitmapItem aXFillBitmapItem(pObj->GetMergedItem( XATTR_FILLBITMAP ));
-                    OUString aURL( UNO_NAME_GRAPHOBJ_URLPREFIX);
-                    aURL += OStringToOUString(
-                        aXFillBitmapItem.GetGraphicObject().GetUniqueID(),
-                        RTL_TEXTENCODING_ASCII_US);
-
-                    xPropSet->setPropertyValue("FillBitmapURL", Any( aURL ) );
+                    uno::Reference<graphic::XGraphic> xGraphic = aXFillBitmapItem.GetGraphicObject().GetGraphic().GetXGraphic();
+                    uno::Reference<awt::XBitmap> xBitmap(xGraphic, uno::UNO_QUERY);
+                    xPropSet->setPropertyValue("FillBitmap", uno::makeAny(xBitmap));
 
                     const XFillBmpStretchItem aStretchItem(pObj->GetMergedItem( XATTR_FILLBMP_STRETCH ));
                     const XFillBmpTileItem aTileItem(pObj->GetMergedItem( XATTR_FILLBMP_TILE ));
                     if( aTileItem.GetValue() )
-                        xPropSet->setPropertyValue( "FillBitmapMode", Any( css::drawing::BitmapMode_REPEAT ) );
+                        xPropSet->setPropertyValue("FillBitmapMode", uno::makeAny(drawing::BitmapMode_REPEAT));
                     else if( aStretchItem.GetValue() )
-                        xPropSet->setPropertyValue( "FillBitmapMode", Any( css::drawing::BitmapMode_STRETCH ) );
+                        xPropSet->setPropertyValue("FillBitmapMode", uno::makeAny(drawing::BitmapMode_STRETCH));
                     else
-                        xPropSet->setPropertyValue( "FillBitmapMode", Any( css::drawing::BitmapMode_NO_REPEAT ) );
+                        xPropSet->setPropertyValue("FillBitmapMode", uno::makeAny(drawing::BitmapMode_NO_REPEAT));
                 }
             break;
             default:


More information about the Libreoffice-commits mailing list