diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-03-01 17:02:59 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-03-01 17:53:56 +0100 |
commit | 2f82a08d3565239c2bfe8d21fbebd89bd4657708 (patch) | |
tree | 430e083225638eb3e541659040b1d251a0c74d6a /writerfilter | |
parent | 24ba80686c9028b4f6dd1f63bfe905c029068b11 (diff) |
fdo#59638 import RTF_LFOLEVEL
Change-Id: Icd0ba0bcbf519a15006af2e0eb176c37766345a3
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 17 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index fdc8bb8a3fdc..6ef8009b4909 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1239,6 +1239,10 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) case RTF_LIST: m_aStates.top().nDestinationState = DESTINATION_LISTENTRY; break; + case RTF_LFOLEVEL: + m_aStates.top().nDestinationState = DESTINATION_LFOLEVEL; + m_aStates.top().aTableSprms.clear(); + break; case RTF_LISTOVERRIDETABLE: m_aStates.top().nDestinationState = DESTINATION_LISTOVERRIDETABLE; break; @@ -4196,7 +4200,18 @@ int RTFDocumentImpl::popState() aState.aTableAttributes.set(NS_ooxml::LN_CT_Lvl_ilvl, pInnerValue); RTFValue::Pointer_t pValue(new RTFValue(aState.aTableAttributes, aState.aTableSprms)); - m_aStates.top().aListLevelEntries.set(NS_ooxml::LN_CT_AbstractNum_lvl, pValue, false); + if (m_aStates.top().nDestinationState != DESTINATION_LFOLEVEL) + m_aStates.top().aListLevelEntries.set(NS_ooxml::LN_CT_AbstractNum_lvl, pValue, false); + else + m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_NumLvl_lvl, pValue); + } + else if (aState.nDestinationState == DESTINATION_LFOLEVEL) + { + RTFValue::Pointer_t pInnerValue(new RTFValue(m_aStates.top().nListLevelNum++)); + aState.aTableAttributes.set(NS_ooxml::LN_CT_NumLvl_ilvl, pInnerValue); + + RTFValue::Pointer_t pValue(new RTFValue(aState.aTableAttributes, aState.aTableSprms)); + m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Num_lvlOverride, pValue); } // list override table else if (aState.nDestinationState == DESTINATION_LISTOVERRIDEENTRY) diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index a26d3ff7679e..c7affd7fe032 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -179,6 +179,7 @@ namespace writerfilter { DESTINATION_MBOX, DESTINATION_MEQARR, DESTINATION_UPR, + DESTINATION_LFOLEVEL, }; enum RTFBorderState |