summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-03-24 13:04:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-05 14:45:33 +0100
commit3e59fa4f3ba1408939e4f937cea29fa614f84b37 (patch)
tree0ea6faadb38fa40c8d13406f28053db6777f1038
parenteff7424629df3fa30afb35c56d9605e77c69241e (diff)
fdo#47036 fix RTF import of shapes inside text frames at the start of the doc
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index aca451979100..16d5c754c804 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3266,6 +3266,12 @@ int RTFDocumentImpl::popState()
Mapper().startShape(xShape);
Mapper().endShape();
}
+ else if (m_aStates.top().nDestinationState == DESTINATION_SHAPE && m_aStates.top().aFrame.inFrame())
+ {
+ m_aStates.top().resetFrame();
+ parBreak();
+ m_bNeedPap = true;
+ }
// See if we need to end a track change
RTFValue::Pointer_t pTrackchange = m_aStates.top().aCharacterSprms.find(NS_ooxml::LN_trackchange);
@@ -3493,6 +3499,11 @@ RTFFrame::RTFFrame(RTFParserState* pParserState)
void RTFFrame::setSprm(Id nId, Id nValue)
{
+ if (m_pParserState->m_pDocumentImpl->getFirstRun())
+ {
+ m_pParserState->m_pDocumentImpl->checkFirstRun();
+ m_pParserState->m_pDocumentImpl->setNeedPar(false);
+ }
switch (nId)
{
case NS_sprm::LN_PDxaWidth: