[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - filter/source

Chr. Rossmanith ChrRossmanith at gmx.de
Sun Apr 5 03:27:03 PDT 2015


 filter/source/svg/svgexport.cxx |    4 ++--
 filter/source/svg/svgwriter.cxx |    4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit f6a67357ab8f827ba934eb40f79fcc58391f909a
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date:   Wed Mar 25 22:49:13 2015 +0100

    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 at documentfoundation.org>
    Tested-by: Thorsten Behrens <thb at documentfoundation.org>
    Reviewed-on: https://gerrit.libreoffice.org/15087
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index ca9d495..7d0914a 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 6d2efba..89ae3e3 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();
                         }
                     }
                 }


More information about the Libreoffice-commits mailing list