Kaydet (Commit) 2661d7a5 authored tarafından Philipp Lohmann [pl]'s avatar Philipp Lohmann [pl]

vcl119: #i105133# tell fillFrameProps whether to apply transformation (thanks joekidd)

üst 128adf7e
...@@ -212,7 +212,9 @@ void DrawXmlEmitter::visit( ParagraphElement& elem, const std::list< Element* >: ...@@ -212,7 +212,9 @@ void DrawXmlEmitter::visit( ParagraphElement& elem, const std::list< Element* >:
void DrawXmlEmitter::fillFrameProps( DrawElement& rElem, void DrawXmlEmitter::fillFrameProps( DrawElement& rElem,
PropertyMap& rProps, PropertyMap& rProps,
const EmitContext& rEmitContext ) const EmitContext& rEmitContext,
bool bWasTransformed
)
{ {
double rel_x = rElem.x, rel_y = rElem.y; double rel_x = rElem.x, rel_y = rElem.y;
...@@ -223,7 +225,7 @@ void DrawXmlEmitter::fillFrameProps( DrawElement& rElem, ...@@ -223,7 +225,7 @@ void DrawXmlEmitter::fillFrameProps( DrawElement& rElem,
const GraphicsContext& rGC = const GraphicsContext& rGC =
rEmitContext.rProcessor.getGraphicsContext( rElem.GCId ); rEmitContext.rProcessor.getGraphicsContext( rElem.GCId );
if( rGC.Transformation.isIdentity() ) if( rGC.Transformation.isIdentity() || bWasTransformed )
{ {
rProps[ USTR( "svg:x" ) ] = convertPixelToUnitString( rel_x ); rProps[ USTR( "svg:x" ) ] = convertPixelToUnitString( rel_x );
rProps[ USTR( "svg:y" ) ] = convertPixelToUnitString( rel_y ); rProps[ USTR( "svg:y" ) ] = convertPixelToUnitString( rel_y );
...@@ -350,7 +352,10 @@ void DrawXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* >:: ...@@ -350,7 +352,10 @@ void DrawXmlEmitter::visit( PolyPolyElement& elem, const std::list< Element* >::
} }
PropertyMap aProps; 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 ); rtl::OUStringBuffer aBuf( 64 );
aBuf.appendAscii( "0 0 " ); aBuf.appendAscii( "0 0 " );
aBuf.append( convPx2mmPrec2(elem.w)*100.0 ); aBuf.append( convPx2mmPrec2(elem.w)*100.0 );
......
...@@ -101,7 +101,9 @@ namespace pdfi ...@@ -101,7 +101,9 @@ namespace pdfi
void fillFrameProps( DrawElement& rElem, void fillFrameProps( DrawElement& rElem,
PropertyMap& rProps, PropertyMap& rProps,
const EmitContext& rEmitContext ); const EmitContext& rEmitContext,
bool bWasTransformed = false
);
public: public:
const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator(); const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment