From 4af40aa6331403e40d9dd6682fc36ae9503ccfec Mon Sep 17 00:00:00 2001 From: Takeshi Kurosawa Date: Tue, 18 Jan 2011 19:04:49 +0900 Subject: [PATCH 1/2] Fix rendering order of fill and text The SVG export filter exports shapes (and their shadow) at first, then exports texts (and their shadow). This causes the inverted order of shadows (shadows of texts overlap shapes). Although, the filter exports shapes and texts separately from the initial revision. http://cgit.freedesktop.org/libreoffice/filters/diff/filter/source/svg/svgexport.cxx?id=d70fe3aea5ab065ab938cbd50366846f449fa7fa I can't find any reason to do so. Make the filter export all contents at once. --- filter/source/svg/svgexport.cxx | 18 ++---------------- 1 files changed, 2 insertions(+), 16 deletions(-) diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 93d073e..fd1495e 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -674,22 +674,8 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape ) if( rMtf.GetActionCount() ) { - if( ( aShapeType.lastIndexOf( B2UCONST( "drawing.OLE2Shape" ) ) != -1 ) || - ( aShapeType.lastIndexOf( B2UCONST( "drawing.GraphicObjectShape" ) ) != -1 ) ) - { - SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE ); - mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_ALL); - } - else - { - // write geometries - SvXMLElementExport aGeometryExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE ); - mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_FILL ); - - // write text separately - SvXMLElementExport aTextExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE ); - mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_TEXT ); - } + SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "g", TRUE, TRUE ); + mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf, SVGWRITER_WRITE_ALL); } } -- 1.7.1