summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2015-03-25 22:49:13 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2015-04-05 10:26:39 +0000
commitf6a67357ab8f827ba934eb40f79fcc58391f909a (patch)
treed8f084b4eddb46918a867b8fea87fbe784c2d546
parent79156011a5fb4383a6b61aa0590d52c24ad6b154 (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> Reviewed-on: https://gerrit.libreoffice.org/15087 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--filter/source/svg/svgexport.cxx4
-rw-r--r--filter/source/svg/svgwriter.cxx4
2 files changed, 5 insertions, 3 deletions
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index ca9d4953d35a..7d0914a87665 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -826,8 +826,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 6d2efbad1713..89ae3e39514f 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1540,7 +1540,7 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
else
aPos = rPos;
- if( mbPositioningNeeded )
+ if( mbPositioningNeeded || bApplyMapping )
{
mbPositioningNeeded = false;
maTextPos.setX( aPos.X() );
@@ -3509,7 +3509,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
else
{
+ maTextWriter.startTextShape();
maTextWriter.writeTextPortion( pA->GetPoint(), aText );
+ maTextWriter.endTextShape();
}
}
}