summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/metaact.cxx
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2010-09-15 11:11:04 +0200
committerRadek Doulik <rodo@novell.com>2010-09-15 17:54:14 +0200
commitac58ef65487c17d91e1dd6d10adc9666c434e88b (patch)
tree4b87604f0dd028a3803be7d63018989cbd1be1f8 /vcl/source/gdi/metaact.cxx
parentcc3f43692add98b83f3a344690698c5f7026dcb0 (diff)
emf+-vcl-renderer.diff: emf+ import - use cppcanvas renderer in vcl
Diffstat (limited to 'vcl/source/gdi/metaact.cxx')
-rw-r--r--vcl/source/gdi/metaact.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 94f07b8f17d1..1102569d0844 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -4093,6 +4093,7 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
// SJ: 25.07.06 #i56656# we are not able to mirrorcertain kind of
// comments properly, especially the XPATHSTROKE and XPATHFILL lead to
// problems, so it is better to remove these comments when mirroring
+// FIXME: fake comment to apply the next hunk in the right location
void MetaCommentAction::Scale( double fXScale, double fYScale )
{
if ( ( fXScale != 1.0 ) || ( fYScale != 1.0 ) )
@@ -4126,6 +4127,32 @@ void MetaCommentAction::Scale( double fXScale, double fYScale )
}
delete[] mpData;
ImplInitDynamicData( static_cast<const BYTE*>( aDest.GetData() ), aDest.Tell() );
+ } else if( maComment.Equals( "EMF_PLUS_HEADER_INFO" ) ) {
+ SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
+ SvMemoryStream aDest;
+
+ sal_Int32 nLeft, nRight, nTop, nBottom;
+ sal_Int32 nPixX, nPixY, nMillX, nMillY;
+ float m11, m12, m21, m22, mdx, mdy;
+
+ // read data
+ aMemStm >> nLeft >> nTop >> nRight >> nBottom;
+ aMemStm >> nPixX >> nPixY >> nMillX >> nMillY;
+ aMemStm >> m11 >> m12 >> m21 >> m22 >> mdx >> mdy;
+
+ // add scale to the transformation
+ m11 *= fXScale;
+ m12 *= fXScale;
+ m22 *= fYScale;
+ m21 *= fYScale;
+
+ // prepare new data
+ aDest << nLeft << nTop << nRight << nBottom;
+ aDest << nPixX << nPixY << nMillX << nMillY;
+ aDest << m11 << m12 << m21 << m22 << mdx << mdy;
+
+ // save them
+ ImplInitDynamicData( static_cast<const BYTE*>( aDest.GetData() ), aDest.Tell() );
}
}
}