diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-10-11 16:48:55 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-10-11 21:25:14 +0200 |
commit | 5ef0f1dc9a70c20fe6879832b782a0c34724353f (patch) | |
tree | 2eb500a00440b25e2a207c037f069037aeffd2ed /writerfilter | |
parent | unowinreg.dll is needed on all platforms (diff) | |
download | core-5ef0f1dc9a70c20fe6879832b782a0c34724353f.tar.gz core-5ef0f1dc9a70c20fe6879832b782a0c34724353f.zip |
fdo#55493 fix RTF import of specific PNG image
The image was special in that the resulting Graphic's
GetPrefMapMode().GetMapUnit() wasn't MAP_PIXEL.
Change-Id: I681e344a042721b99f6cb2e599f9c65156d219a4
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index d56307fbe803..d0d0b7f893b1 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -653,7 +653,10 @@ int RTFDocumentImpl::resolvePict(bool bInline) Graphic aGraphic = GraphicObject(aURLBS.copy(RTL_CONSTASCII_LENGTH(aURLBegin))).GetTransformedGraphic(); Size aSize(aGraphic.GetPrefSize()); MapMode aMap(MAP_100TH_MM); - aSize = Application::GetDefaultDevice()->PixelToLogic( aSize, aMap ); + if (aGraphic.GetPrefMapMode().GetMapUnit() == MAP_PIXEL) + aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMap); + else + aSize = OutputDevice::LogicToLogic(aSize, aGraphic.GetPrefMapMode(), aMap); m_aStates.top().aPicture.nWidth = aSize.Width(); m_aStates.top().aPicture.nHeight = aSize.Height(); } |