diff options
author | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2015-03-25 22:49:13 +0100 |
---|---|---|
committer | Thorsten Behrens <thb@documentfoundation.org> | 2015-03-27 21:15:48 +0000 |
commit | 0a4e9138281bd0a4be59031357c1bf52134d007a (patch) | |
tree | 8a0b218776de7fff15ae53534d72be4e667a50d1 | |
parent | 36275b61fe0f9ecb57a609ab47aa2246649cc21f (diff) |
tdf#56467: improve export of formulas to SVG
tspan element only valid as child of text element
if exporting a selection use top left corner of bounding rect as top left corner of viewbox
export x coordinate of text position for text portions
Change-Id: I8b739085473aa4a48ff3bbbbe8c413c3cddbaebd
Reviewed-on: https://gerrit.libreoffice.org/14992
Reviewed-by: Thorsten Behrens <thb@documentfoundation.org>
Tested-by: Thorsten Behrens <thb@documentfoundation.org>
-rw-r--r-- | filter/source/svg/svgexport.cxx | 4 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index d21260ba4510..ada437d1195e 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -823,8 +823,8 @@ bool SVGFilter::implExportDocument() mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "clipPathUnits", "userSpaceOnUse" ); SvXMLElementExport aClipPathElem( *mpSVGExport, XML_NAMESPACE_NONE, "clipPath", true, true ); { - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "x", OUString::number( 0 ) ); - mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "y", OUString::number( 0 ) ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "x", OUString::number( nDocX ) ); + mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "y", OUString::number( nDocY ) ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "width", OUString::number( nDocWidth ) ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "height", OUString::number( nDocHeight ) ); SvXMLElementExport aRectElem( *mpSVGExport, XML_NAMESPACE_NONE, "rect", true, true ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index f48990578f77..c3b544f4ad43 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1541,7 +1541,7 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos, else aPos = rPos; - if( mbPositioningNeeded ) + if( mbPositioningNeeded || bApplyMapping ) { mbPositioningNeeded = false; maTextPos.setX( aPos.X() ); @@ -3510,7 +3510,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, } else { + maTextWriter.startTextShape(); maTextWriter.writeTextPortion( pA->GetPoint(), aText ); + maTextWriter.endTextShape(); } } } |