[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source
Armin Le Grand
alg at apache.org
Wed Jan 22 14:08:22 PST 2014
vcl/source/gdi/impgraph.cxx | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
New commits:
commit b5797deea72476fbcec4315f1f18249fd39bbaea
Author: Armin Le Grand <alg at apache.org>
Date: Wed Jan 22 20:25:16 2014 +0000
i123983 Corrected Graphic Metafile fallback creator
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index afa97e5..d427e96 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -710,22 +710,21 @@ const GDIMetaFile& ImpGraphic::ImplGetGDIMetaFile() const
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.WindStart();
+ pThat->maMetaFile.SetPrefSize(maEx.GetPrefSize());
+ pThat->maMetaFile.SetPrefMapMode(maEx.GetPrefMapMode());
}
return maMetaFile;
More information about the Libreoffice-commits
mailing list