Kaydet (Commit) ab18e62b authored tarafından Michael Stahl's avatar Michael Stahl

writerfilter: RTF import: ignore \listname destination differently

This adds a skeleton for \listname but not immediately obvious what it
should do...

Change-Id: Icd8dd3b5d597f1c4038044ec2eba8b63718e0d3d
üst e93f0852
...@@ -33,6 +33,7 @@ enum RTFDestinationState ...@@ -33,6 +33,7 @@ enum RTFDestinationState
DESTINATION_LISTTABLE, DESTINATION_LISTTABLE,
DESTINATION_LISTPICTURE, DESTINATION_LISTPICTURE,
DESTINATION_LISTENTRY, DESTINATION_LISTENTRY,
DESTINATION_LISTNAME,
DESTINATION_LISTOVERRIDETABLE, DESTINATION_LISTOVERRIDETABLE,
DESTINATION_LISTOVERRIDEENTRY, DESTINATION_LISTOVERRIDEENTRY,
DESTINATION_LISTLEVEL, DESTINATION_LISTLEVEL,
......
...@@ -1097,6 +1097,7 @@ void RTFDocumentImpl::text(OUString& rString) ...@@ -1097,6 +1097,7 @@ void RTFDocumentImpl::text(OUString& rString)
case DESTINATION_FONTENTRY: case DESTINATION_FONTENTRY:
case DESTINATION_STYLESHEET: case DESTINATION_STYLESHEET:
case DESTINATION_STYLEENTRY: case DESTINATION_STYLEENTRY:
case DESTINATION_LISTNAME:
case DESTINATION_REVISIONTABLE: case DESTINATION_REVISIONTABLE:
case DESTINATION_REVISIONENTRY: case DESTINATION_REVISIONENTRY:
{ {
...@@ -1156,6 +1157,10 @@ void RTFDocumentImpl::text(OUString& rString) ...@@ -1156,6 +1157,10 @@ void RTFDocumentImpl::text(OUString& rString)
else else
SAL_INFO("writerfilter", "no RTF style type defined, ignoring"); SAL_INFO("writerfilter", "no RTF style type defined, ignoring");
break; break;
case DESTINATION_LISTNAME:
// TODO: what can be done with a list name?
m_aStates.top().aDestinationText.makeStringAndClear();
break;
case DESTINATION_REVISIONTABLE: case DESTINATION_REVISIONTABLE:
case DESTINATION_REVISIONENTRY: case DESTINATION_REVISIONENTRY:
m_aAuthors[m_aAuthors.size()] = m_aStates.top().aDestinationText.makeStringAndClear(); m_aAuthors[m_aAuthors.size()] = m_aStates.top().aDestinationText.makeStringAndClear();
...@@ -1494,6 +1499,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) ...@@ -1494,6 +1499,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
case RTF_LIST: case RTF_LIST:
m_aStates.top().nDestinationState = DESTINATION_LISTENTRY; m_aStates.top().nDestinationState = DESTINATION_LISTENTRY;
break; break;
case RTF_LISTNAME:
m_aStates.top().nDestinationState = DESTINATION_LISTNAME;
break;
case RTF_LFOLEVEL: case RTF_LFOLEVEL:
m_aStates.top().nDestinationState = DESTINATION_LFOLEVEL; m_aStates.top().nDestinationState = DESTINATION_LFOLEVEL;
m_aStates.top().aTableSprms.clear(); m_aStates.top().aTableSprms.clear();
...@@ -5563,6 +5571,8 @@ int RTFDocumentImpl::popState() ...@@ -5563,6 +5571,8 @@ int RTFDocumentImpl::popState()
m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_LevelText_val, pValue); m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_LevelText_val, pValue);
} }
break; break;
case DESTINATION_LISTNAME:
break;
case DESTINATION_LISTLEVEL: case DESTINATION_LISTLEVEL:
{ {
RTFValue::Pointer_t pInnerValue(new RTFValue(m_aStates.top().nListLevelNum++)); RTFValue::Pointer_t pInnerValue(new RTFValue(m_aStates.top().nListLevelNum++));
......
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