summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Reuter <freuter@novell.com>2011-05-04 11:39:42 +0200
committerC├ędric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-05-04 17:41:30 +0200
commit2667875fa3bca56a179121a5078b348e97f378ee (patch)
tree62ef8195d76a6c4709ea3857b67e198022e8bf73
parente1828af013931fca58a054cb7d010e94612fe1b0 (diff)
external-apm-header.diff: fix WMF scaling in RTF import, n#417818
-rw-r--r--editeng/source/rtf/rtfgrf.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx
index 6c9d9b18bb..81a1d8e356 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;
}