summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-02-17 17:25:50 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-02-18 08:57:07 +0100
commitcea0ceff755d57ad3feaffda9cff82f742ea7b82 (patch)
treed130d986be437aeafd15afb3d21e33b1e06c9d52 /oox/source
parent75ab4bed721e1f4dfff22419867303a2f1b38354 (diff)
remove use of FillBitmapURL and use FillBitmap as the alternative
This is under the ongoing work to get rit of all usage of GraphicObject URLs Change-Id: I900e435ac36a4012ec36a2f0c1d909982c82660a Reviewed-on: https://gerrit.libreoffice.org/49895 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/export/drawingml.cxx27
1 files changed, 20 insertions, 7 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 52807f28be3d..f71e0879effb 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1220,12 +1220,25 @@ void DrawingML::WriteBlipFill( const Reference< XPropertySet >& rXPropSet, const
{
if ( GetProperty( rXPropSet, sURLPropName ) )
{
- OUString aURL;
- mAny >>= aURL;
- bool bWriteMode = false;
- if( sURLPropName == "FillBitmapURL" || sURLPropName == "BackGraphicURL")
- bWriteMode = true;
- WriteBlipFill( rXPropSet, aURL, nXmlNamespace, bWriteMode );
+ if (mAny.has<uno::Reference<awt::XBitmap>>())
+ {
+ uno::Reference<awt::XBitmap> xBitmap;
+ xBitmap = mAny.get<uno::Reference<awt::XBitmap>>();
+ uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
+ if (xBitmap.is() && xGraphic.is())
+ {
+ WriteXGraphicBlipFill(rXPropSet, xGraphic, nXmlNamespace, true);
+ }
+ }
+ else
+ {
+ OUString aURL;
+ mAny >>= aURL;
+ bool bWriteMode = false;
+ if( sURLPropName == "FillBitmapURL" || sURLPropName == "BackGraphicURL")
+ bWriteMode = true;
+ WriteBlipFill( rXPropSet, aURL, nXmlNamespace, bWriteMode );
+ }
}
}
@@ -3135,7 +3148,7 @@ void DrawingML::WriteFill( const Reference< XPropertySet >& xPropSet )
WriteGradientFill( xPropSet );
break;
case FillStyle_BITMAP :
- WriteBlipFill( xPropSet, "FillBitmapURL" );
+ WriteBlipFill( xPropSet, "FillBitmap" );
break;
case FillStyle_HATCH :
WritePattFill( xPropSet );