diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2011-02-04 16:18:43 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2011-02-04 16:18:43 +0100 |
commit | 2661d7a5a1ce33f8cea9f9fb1132b49e08282a93 (patch) | |
tree | c1ae1bc86e906ac8c9b1eac7e47dcf4f486b4a58 /sdext/source | |
parent | 128adf7e5c06fff378c8d72b44ec4be1e462984f (diff) |
vcl119: #i105133# tell fillFrameProps whether to apply transformation (thanks joekidd)
Diffstat (limited to 'sdext/source')
-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(); |