summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-10-27 12:31:04 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-10-27 13:04:20 +0200
commit7b60f3f1335ddf105b77e2cd5c6743a7419d985c (patch)
tree01f58d94503ea1a955379dabbeda859a81278ff1 /writerfilter/source
parenta7cc5039769838924c7b07da0e7532d84f79d302 (diff)
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/source')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx6
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)
{