diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2016-06-14 13:03:06 +0200 |
---|---|---|
committer | Marco Cecchetti <mrcekets@gmail.com> | 2016-07-01 09:40:14 +0000 |
commit | 43e8c7632146b1b373b51a3a2e294c43339b18cc (patch) | |
tree | 16c33f02ca974f3803121d4c2ee9c712db53c9cf /filter | |
parent | sc lok: add LOK_CALLBACK_CELL_VIEW_CURSOR (diff) | |
download | core-43e8c7632146b1b373b51a3a2e294c43339b18cc.tar.gz core-43e8c7632146b1b373b51a3a2e294c43339b18cc.zip |
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@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 3fb3f4cdc9e8..f43ec10e7b00 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 ); |