diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-02-29 16:14:34 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-02-29 16:41:56 +0100 |
commit | 44f7c5ddf9d730c899f480ca644ddc29c7de9dc6 (patch) | |
tree | f51f0d9eb9df4e84cbee64183ee762b7f8da205c | |
parent | bd2b353f66e4bb2e76c115eb8028c1d0ba59a468 (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.
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 73420102e9bb..fbe257c68fbe 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2887,6 +2887,7 @@ int RTFDocumentImpl::popState() bool bListLevelEnd = false; bool bListOverrideEntryEnd = false; bool bLevelTextEnd = false; + bool bLevelNumbersEnd = false; RTFShape aShape; RTFPicture aPicture; bool bPopShapeProperties = false; @@ -3027,6 +3028,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 @@ -3303,6 +3306,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; |