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

fdo#59638 import RTF_LFOLEVEL

Change-Id: Icd0ba0bcbf519a15006af2e0eb176c37766345a3
üst 24ba8068
......@@ -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)
......
......@@ -179,6 +179,7 @@ namespace writerfilter {
DESTINATION_MBOX,
DESTINATION_MEQARR,
DESTINATION_UPR,
DESTINATION_LFOLEVEL,
};
enum RTFBorderState
......
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