[Libreoffice-commits] core.git: filter/source
Marco Cecchetti
marco.cecchetti at collabora.com
Fri Jul 1 09:40:47 UTC 2016
filter/source/svg/svgwriter.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 43e8c7632146b1b373b51a3a2e294c43339b18cc
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Tue Jun 14 13:03:06 2016 +0200
lool - bccu#1307 - images must be scaled in a non-uniform way
Change-Id: I4093452d543ba45d8c1a2c1fc0811646e12c23a5
Reviewed-on: https://gerrit.libreoffice.org/26828
Reviewed-by: Marco Cecchetti <mrcekets at gmail.com>
Tested-by: Marco Cecchetti <mrcekets at gmail.com>
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 3fb3f4cd..f43ec10e 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -79,6 +79,7 @@ static const char aXMLAttrTextDecoration[] = "text-decoration";
static const char aXMLAttrXLinkHRef[] = "xlink:href";
static const char aXMLAttrGradientUnits[] = "gradientUnits";
static const char aXMLAttrPatternUnits[] = "patternUnits";
+static const char aXMLAttrPreserveAspectRatio[] = "preserveAspectRatio";
static const char aXMLAttrOffset[] = "offset";
static const char aXMLAttrStopColor[] = "stop-color";
static const char aXMLAttrStrokeLinejoin[] = "stroke-linejoin";
@@ -2666,6 +2667,10 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, OUString::number( aPt.Y() ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, OUString::number( aSz.Width() ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, OUString::number( aSz.Height() ) );
+
+ // the image must be scaled to aSz in a non-uniform way
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrPreserveAspectRatio, "none" );
+
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, aBuffer.makeStringAndClear() );
{
SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemImage, true, true );
More information about the Libreoffice-commits
mailing list