summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-02-29 16:14:34 +0100
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-03-20 12:16:54 +0100
commit0361e92cb000371e6e3463a853b375bdeec984f5 (patch)
treeb51177d6af69db84457c5be3290e243bc5f29fce
parent39a7666cc0ac056bb682c89163a8d2155f57b775 (diff)
Related: fdo#46662 fix RTF import of leveltext destination
After leveltext is imported, the levelnumbers group modifies the contents of the previous group, but this modification was lost when the stack was popped. Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 824615da20d7..4299e5a8fcc8 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2891,6 +2891,7 @@ int RTFDocumentImpl::popState()
bool bListLevelEnd = false;
bool bListOverrideEntryEnd = false;
bool bLevelTextEnd = false;
+ bool bLevelNumbersEnd = false;
RTFShape aShape;
RTFPicture aPicture;
bool bPopShapeProperties = false;
@@ -3031,6 +3032,8 @@ int RTFDocumentImpl::popState()
aBuf.append(aOrig.copy(i, 1));
}
pValue->setString(aBuf.makeStringAndClear());
+ aSprms = m_aStates.top().aTableSprms;
+ bLevelNumbersEnd = true;
}
else if (m_aStates.top().nDestinationState == DESTINATION_SHAPEPROPERTYNAME
|| m_aStates.top().nDestinationState == DESTINATION_SHAPEPROPERTYVALUE
@@ -3307,6 +3310,8 @@ int RTFDocumentImpl::popState()
RTFValue::Pointer_t pValue(new RTFValue(aAttributes));
m_aStates.top().aTableSprms->push_back(make_pair(NS_ooxml::LN_CT_Lvl_lvlText, pValue));
}
+ else if (bLevelNumbersEnd)
+ m_aStates.top().aTableSprms = aSprms;
else if (bPopShapeProperties)
{
m_aStates.top().aShape = aShape;