[Libreoffice-commits] .: editeng/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Wed May 4 08:58:48 PDT 2011
editeng/source/rtf/rtfgrf.cxx | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 2667875fa3bca56a179121a5078b348e97f378ee
Author: Florian Reuter <freuter at novell.com>
Date: Wed May 4 11:39:42 2011 +0200
external-apm-header.diff: fix WMF scaling in RTF import, n#417818
diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx
index 6c9d9b1..81a1d8e 100644
--- a/editeng/source/rtf/rtfgrf.cxx
+++ b/editeng/source/rtf/rtfgrf.cxx
@@ -36,6 +36,7 @@
#include <svtools/rtfkeywd.hxx>
#include <svtools/rtftoken.h>
#include <svtools/filter.hxx>
+#include <svtools/wmf.hxx>
#include <editeng/svxrtf.hxx>
@@ -492,9 +493,15 @@ sal_Bool SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
}
String sTmpStr;
+ WMF_APMFILEHEADER aAPMHeader;
+ aAPMHeader.left=0;
+ aAPMHeader.top=0;
+ aAPMHeader.right=rPicType.nWidth;
+ aAPMHeader.bottom=rPicType.nHeight;
+
+ WMF_APMFILEHEADER *pAPMHeader=(aAPMHeader.right>0 && aAPMHeader.bottom>0?&aAPMHeader:NULL);
pTmpFile->Seek( STREAM_SEEK_TO_BEGIN );
- bValidBmp = 0 == pGF->ImportGraphic( rGrf, sTmpStr, *pTmpFile,
- nImportFilter );
+ bValidBmp = 0 == pGF->ImportGraphic( rGrf, sTmpStr, *pTmpFile, nImportFilter, NULL, 0, pAPMHeader );
}
delete pTmpFile;
}
More information about the Libreoffice-commits
mailing list