summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-06-11 11:19:19 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-06-11 12:25:30 +0200
commitc5c3ce5e625a31d78a21fbbc339ee30ba99f3044 (patch)
tree00cf5174e2cb9e67c80fb7a2805fa81ee06c8c81 /writerfilter/source/rtftok
parent993eb829f357e64b3042caf1227828ae00fd125f (diff)
fdo#49659 fix RTF import of pictures with inner groups
One would think that with {\pict{\foo1}}, the inner group has no effect in the outer group, but this turns out to be valid, so we should handle it as well. Change-Id: I64b933ad1cd5946f22d27669e9240d9e1875bde3
Diffstat (limited to 'writerfilter/source/rtftok')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index b2a69622863e..c2c1b604e2b7 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -620,6 +620,10 @@ int RTFDocumentImpl::resolvePict(bool bInline)
else
pStream = m_pBinaryData.get();
+ if (!pStream->Tell())
+ // No destination text? Then we'll get it later.
+ return 0;
+
// Store, and get its URL.
pStream->Seek(0);
uno::Reference<io::XInputStream> xInputStream(new utl::OInputStreamWrapper(pStream));
@@ -3529,6 +3533,8 @@ int RTFDocumentImpl::popState()
if (aState.nFieldStatus == FIELD_INSTRUCTION)
singleChar(0x15);
}
+ else if (m_aStates.size() && m_aStates.top().nDestinationState == DESTINATION_PICT)
+ m_aStates.top().aPicture = aState.aPicture;
else if (bPopShapeProperties)
{
m_aStates.top().aShape = aShape;