writerfilter: RTF import: ignore \listname destination differently

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

Change-Id: Icd8dd3b5d597f1c4038044ec2eba8b63718e0d3d
This commit is contained in:
Michael Stahl
2014-07-18 23:43:40 +02:00
parent e93f085247
commit ab18e62bd7
2 changed files with 11 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ enum RTFDestinationState
DESTINATION_LISTTABLE,
DESTINATION_LISTPICTURE,
DESTINATION_LISTENTRY,
DESTINATION_LISTNAME,
DESTINATION_LISTOVERRIDETABLE,
DESTINATION_LISTOVERRIDEENTRY,
DESTINATION_LISTLEVEL,

View File

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