oox/source/export/drawingml.cxx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-)
New commits: commit 54dfb9ff07a41d9249302ac2ed0a005d0a8114d4 Author: geri1245 <g.tars...@yahoo.com> Date: Wed Dec 6 19:40:59 2017 +0100 tdf#111785 Save hatch background color in pptx format. When exporting to pptx from LO, the background color of the hatching is preserved. The default background, when no hatch background is set is transparent. Change-Id: Ie44c89a9ce54eef49100b3e7b376c27c1a952fcf Reviewed-on: https://gerrit.libreoffice.org/46098 Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> Tested-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 1ec05fa2a2e9..eb19a286e587 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1189,9 +1189,26 @@ void DrawingML::WritePattFill( const Reference< XPropertySet >& rXPropSet ) WriteColor(aHatch.Color); mpFS->endElementNS( XML_a , XML_fgClr ); - // In Writer hatching has no background so use white as a default value. + sal_uInt32 nColor = COL_WHITE; + sal_Int32 nAlpha = 0; + bool isBackgroundFilled = false; + + if ( GetProperty( rXPropSet, "FillBackground" ) ) + { + mAny >>= isBackgroundFilled; + if( isBackgroundFilled ) + { + nAlpha = MAX_PERCENT; + + if( GetProperty( rXPropSet, "FillColor" ) ) + { + mAny >>= nColor; + } + } + } + mpFS->startElementNS( XML_a , XML_bgClr, FSEND ); - WriteColor(COL_WHITE); + WriteColor(nColor, nAlpha); mpFS->endElementNS( XML_a , XML_bgClr ); mpFS->endElementNS( XML_a , XML_pattFill );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits