Kaydet (Commit) 771799c2 authored tarafından Florian Reuter's avatar Florian Reuter Kaydeden (comit) Cédric Bosdonnat

external-apm-header.diff: fix WMF scaling in RTF import, n#417818

üst 43b8894c
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <svtools/rtfkeywd.hxx> #include <svtools/rtfkeywd.hxx>
#include <svtools/rtftoken.h> #include <svtools/rtftoken.h>
#include <svtools/filter.hxx> #include <svtools/filter.hxx>
#include <svtools/wmf.hxx>
#include <editeng/svxrtf.hxx> #include <editeng/svxrtf.hxx>
...@@ -492,9 +493,15 @@ sal_Bool SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) ...@@ -492,9 +493,15 @@ sal_Bool SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
} }
String sTmpStr; 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 ); pTmpFile->Seek( STREAM_SEEK_TO_BEGIN );
bValidBmp = 0 == pGF->ImportGraphic( rGrf, sTmpStr, *pTmpFile, bValidBmp = 0 == pGF->ImportGraphic( rGrf, sTmpStr, *pTmpFile, nImportFilter, NULL, 0, pAPMHeader );
nImportFilter );
} }
delete pTmpFile; delete pTmpFile;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment