diff options
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/tree/drawtreevisiting.cxx | 11 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/drawtreevisiting.hxx | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index 5f1bb429ce8a..c68af3c37d86 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -212,7 +212,9 @@ void DrawXmlEmitter::visit( ParagraphElement& elem, const std::list< Element* >: void DrawXmlEmitter::fillFrameProps( DrawElement& rElem, PropertyMap& rProps, - const EmitContext& rEmitContext ) + const EmitContext& rEmitContext, + bool bWasTransformed + ) { double rel_x = rElem.x, rel_y = rElem.y; @@ -223,7 +225,7 @@ void DrawXmlEmitter::fillFrameProps( DrawElement& rElem, const GraphicsContext& rGC = rEmitContext.rProcessor.getGraphicsContext( rElem.GCId ); - if( rGC.Transformation.isIdentity() ) + if( rGC.Transformation.isIdentity() || bWasTransformed ) { rProps[ USTR( "svg:x" ) ] = convertPixelToUnitString( rel_x ); rProps[ USTR( "svg:y" ) ] = convertPixelToUnitString( rel_y ); @@ -350,7 +352,10 @@ void DrawXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* >:: } PropertyMap aProps; - fillFrameProps( elem, aProps, m_rEmitContext ); + // PDFIProcessor transforms geometrical objects, not images and text + // so we need to tell fillFrameProps here that the transformation for + // a PolyPolyElement was already applied (aside form translation) + fillFrameProps( elem, aProps, m_rEmitContext, true ); rtl::OUStringBuffer aBuf( 64 ); aBuf.appendAscii( "0 0 " ); aBuf.append( convPx2mmPrec2(elem.w)*100.0 ); diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.hxx b/sdext/source/pdfimport/tree/drawtreevisiting.hxx index b499db1ca811..75ce72eeaf79 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.hxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.hxx @@ -101,7 +101,9 @@ namespace pdfi void fillFrameProps( DrawElement& rElem, PropertyMap& rProps, - const EmitContext& rEmitContext ); + const EmitContext& rEmitContext, + bool bWasTransformed = false + ); public: const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator(); |