[Libreoffice-commits] core.git: filter/source
Chr. Rossmanith
ChrRossmanith at gmx.de
Sun Nov 26 19:57:49 UTC 2017
filter/source/svg/svgwriter.cxx | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
New commits:
commit c4c4c7e37462eddb3da0b9150a7edfdccfb0aa55
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date: Wed Nov 22 22:30:00 2017 +0100
svg export: more compact format for rotate()
translate(<cx>, <cy>) rotate(<rotate-angle>) translate(-<cx>, -<cy>) can
be expressed more compact as rotate(<rotate-angle> <cx> <cy>)
Change-Id: I156cc8b43eea8c97167c8ae38b367d1bcbb203bd
Reviewed-on: https://gerrit.libreoffice.org/45146
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Christina Roßmanith <ChrRossmanith at web.de>
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 824f21be6ccd..83f4e8ec2580 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1228,13 +1228,10 @@ void SVGTextWriter::startTextShape()
if( rFont.GetOrientation() )
{
Point aRot( maTextPos );
- OUString aTransform =
- "translate(" + OUString::number( aRot.X() ) +
- "," + OUString::number( aRot.Y() ) + ") rotate(" +
- OUString::number( rFont.GetOrientation() * -0.1 ) +
- ") translate(" + OUString::number( -aRot.X() ) +
- "," + OUString::number( -aRot.Y() ) + ")";
-
+ OUString aTransform = "rotate(" +
+ OUString::number( rFont.GetOrientation() * -0.1 ) + " " +
+ OUString::number( aRot.X() ) + " " +
+ OUString::number( aRot.Y() ) + ")";
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform );
}
@@ -2568,13 +2565,10 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
if( rFont.GetOrientation() )
{
Point aRot( aPos );
- OUString aTransform =
- "translate(" + OUString::number( aRot.X() ) +
- "," + OUString::number( aRot.Y() ) + ") rotate(" +
- OUString::number( rFont.GetOrientation() * -0.1 ) +
- ") translate(" + OUString::number( -aRot.X() ) +
- "," + OUString::number( -aRot.Y() ) + ")";
-
+ OUString aTransform = "rotate(" +
+ OUString::number( rFont.GetOrientation() * -0.1 ) + " " +
+ OUString::number( aRot.X() ) + " " +
+ OUString::number( aRot.Y() ) + ")";
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform );
}
More information about the Libreoffice-commits
mailing list