include/oox/export/drawingml.hxx | 5 +++-- oox/source/export/drawingml.cxx | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-)
New commits: commit 28db7d7919524989aff96c33051cceeac4adb2a1 Author: Jacobo Aragunde Pérez <jaragu...@igalia.com> Date: Thu Jan 30 12:23:46 2014 +0100 drawingML: fix transparency of shape solid fill The empty value for transparency in drawingML is 100% and not 0. Change-Id: I5f34f03b9b72cc20e92e32f9c9bc1bdfae73ff55 diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index 000cd4e..08fb539 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/uno/XReference.hpp> #include <tools/poly.hxx> #include <filter/msfilter/escherex.hxx> +#include "oox/drawingml/drawingmltypes.hxx" #ifndef PPTX_EXPORT_ROTATE_CLOCKWISIFY // Our rotation is counter-clockwise and is in 100ths of a degree. // drawingML rotation is clockwise and is in 60000ths of a degree. @@ -120,8 +121,8 @@ public: void WriteLineArrow( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet, sal_Bool bLineStart ); void WriteConnectorConnections( EscherConnectorListEntry& rConnectorEntry, sal_Int32 nStartID, sal_Int32 nEndID ); - void WriteSolidFill( sal_uInt32 nColor, sal_Int32 nAlpha = 0 ); - void WriteSolidFill( OUString sSchemeName, sal_Int32 nAlpha = 0 ); + void WriteSolidFill( sal_uInt32 nColor, sal_Int32 nAlpha = MAX_PERCENT ); + void WriteSolidFill( OUString sSchemeName, sal_Int32 nAlpha = MAX_PERCENT ); void WriteSolidFill( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet ); void WriteGradientFill( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet ); void WriteBlipFill( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet, OUString sURLPropName, sal_Int32 nXmlNamespace ); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index c9eefec..5363df2 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -166,7 +166,7 @@ void DrawingML::WriteColor( sal_uInt32 nColor, sal_Int32 nAlpha ) sColor = sBuf.getStr(); } - if( nAlpha ) + if( nAlpha < MAX_PERCENT ) { mpFS->startElementNS( XML_a, XML_srgbClr, XML_val, sColor.getStr(), FSEND ); mpFS->singleElementNS( XML_a, XML_alpha, XML_val, OString::number(nAlpha), FSEND ); @@ -231,11 +231,11 @@ void DrawingML::WriteSolidFill( Reference< XPropertySet > rXPropSet ) aGrabBag[i].Value >>= aStyleProperties; } - sal_Int32 nAlpha = 0; + sal_Int32 nAlpha = MAX_PERCENT; if( GetProperty( rXPropSet, "FillTransparence" ) ) { - sal_Int32 nTransparency; - rXPropSet->getPropertyValue( "FillTransparence" ) >>= nTransparency; + sal_Int32 nTransparency = 0; + mAny >>= nTransparency; // Calculate alpha value (see oox/source/drawingml/color.cxx : getTransparency()) nAlpha = (MAX_PERCENT - ( PER_PERCENT * nTransparency ) ); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits