Kaydet (Commit) c5c3ce5e authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst 993eb829
...@@ -620,6 +620,10 @@ int RTFDocumentImpl::resolvePict(bool bInline) ...@@ -620,6 +620,10 @@ int RTFDocumentImpl::resolvePict(bool bInline)
else else
pStream = m_pBinaryData.get(); pStream = m_pBinaryData.get();
if (!pStream->Tell())
// No destination text? Then we'll get it later.
return 0;
// Store, and get its URL. // Store, and get its URL.
pStream->Seek(0); pStream->Seek(0);
uno::Reference<io::XInputStream> xInputStream(new utl::OInputStreamWrapper(pStream)); uno::Reference<io::XInputStream> xInputStream(new utl::OInputStreamWrapper(pStream));
...@@ -3529,6 +3533,8 @@ int RTFDocumentImpl::popState() ...@@ -3529,6 +3533,8 @@ int RTFDocumentImpl::popState()
if (aState.nFieldStatus == FIELD_INSTRUCTION) if (aState.nFieldStatus == FIELD_INSTRUCTION)
singleChar(0x15); singleChar(0x15);
} }
else if (m_aStates.size() && m_aStates.top().nDestinationState == DESTINATION_PICT)
m_aStates.top().aPicture = aState.aPicture;
else if (bPopShapeProperties) else if (bPopShapeProperties)
{ {
m_aStates.top().aShape = aShape; m_aStates.top().aShape = aShape;
......
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