Author: alg
Date: Wed Jan 22 20:25:16 2014
New Revision: 1560499
URL: http://svn.apache.org/r1560499
Log:
i123983 Corrected Graphic Metafile fallback creator
Modified:
openoffice/trunk/main/vcl/source/gdi/impgraph.cxx
Modified: openoffice/trunk/main/vcl/source/gdi/impgraph.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/gdi/impgraph.cxx?rev=1560499&r1=1560498&r2=1560499&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/gdi/impgraph.cxx (original)
+++ openoffice/trunk/main/vcl/source/gdi/impgraph.cxx Wed Jan 22 20:25:16 2014
@@ -710,22 +710,21 @@ const GDIMetaFile& ImpGraphic::ImplGetGD
pThat->maEx = maSvgData->getReplacement();
}
- VirtualDevice aVirDev;
- const Size aSizePixel(maEx.GetSizePixel());
-
- pThat->maMetaFile.Record(&aVirDev);
-
+ // #123983# directly create a metafile with the same PrefSize and
PrefMapMode
+ // the bitmap has, this will be an always correct metafile
if(maEx.IsTransparent())
{
- aVirDev.DrawBitmapEx(Point(), maEx);
+ pThat->maMetaFile.AddAction(new MetaBmpExScaleAction(Point(),
maEx.GetPrefSize(), maEx));
}
else
{
- aVirDev.DrawBitmap(Point(), maEx.GetBitmap());
+ pThat->maMetaFile.AddAction(new MetaBmpScaleAction(Point(),
maEx.GetPrefSize(), maEx.GetBitmap()));
}
- pThat->maMetaFile.Stop();
- pThat->maMetaFile.SetPrefSize(aSizePixel);
+ pThat->maMetaFile.Stop();
+ pThat->maMetaFile.WindStart();
+ pThat->maMetaFile.SetPrefSize(maEx.GetPrefSize());
+ pThat->maMetaFile.SetPrefMapMode(maEx.GetPrefMapMode());
}
return maMetaFile;