diff options
author | Florian Reuter <freuter@novell.com> | 2011-05-04 11:39:42 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-05-04 17:41:30 +0200 |
commit | 771799c23ec2b132ac3dd6979485ee8fa30a5ce4 (patch) | |
tree | b05736bbc2e46b05c42827cc81f69bee3e90ba5c /editeng | |
parent | 43b8894cc276e85a4e7d4a3502388dec6ab74261 (diff) |
external-apm-header.diff: fix WMF scaling in RTF import, n#417818
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/rtf/rtfgrf.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx index 85f398fbc529..7b8a08c16823 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; } |