diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-10-27 12:31:04 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-10-27 13:04:20 +0200 |
commit | 7b60f3f1335ddf105b77e2cd5c6743a7419d985c (patch) | |
tree | 01f58d94503ea1a955379dabbeda859a81278ff1 /writerfilter | |
parent | ignore spaces while reading RTF image data (diff) | |
download | core-7b60f3f1335ddf105b77e2cd5c6743a7419d985c.tar.gz core-7b60f3f1335ddf105b77e2cd5c6743a7419d985c.zip |
fdo#42407 fix RTF import of WMF images inside textframes
Since commit f4f4a899, we send the external header of WMF images to the
importer, but that seems to be cause problems with this document. To be
on the safe side, revert this only for pictures inside textframes.
Change-Id: I7e443beb9ca4261abf3e3a1257270d6c70b85918
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 66313f6a716a..7950e290f5c5 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -641,7 +641,11 @@ int RTFDocumentImpl::resolvePict(bool bInline) aExtHeader.mapMode = m_aStates.top().aPicture.eWMetafile; aExtHeader.xExt = m_aStates.top().aPicture.nWidth; aExtHeader.yExt = m_aStates.top().aPicture.nHeight; - OUString aGraphicUrl = m_pGraphicHelper->importGraphicObject(xInputStream, &aExtHeader); + WMF_EXTERNALHEADER* pExtHeader = &aExtHeader; + uno::Reference<lang::XServiceInfo> xServiceInfo(m_aStates.top().aDrawingObject.xShape, uno::UNO_QUERY); + if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame")) + pExtHeader = 0; + OUString aGraphicUrl = m_pGraphicHelper->importGraphicObject(xInputStream, pExtHeader); if (m_aStates.top().aPicture.nStyle == BMPSTYLE_PNG) { |