From ab18e62bd7a0a05970323509a2ce22a94c70b7bf Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 18 Jul 2014 23:43:40 +0200 Subject: [PATCH] writerfilter: RTF import: ignore \listname destination differently This adds a skeleton for \listname but not immediately obvious what it should do... Change-Id: Icd8dd3b5d597f1c4038044ec2eba8b63718e0d3d --- writerfilter/source/rtftok/rtfcontrolwords.hxx | 1 + writerfilter/source/rtftok/rtfdocumentimpl.cxx | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/writerfilter/source/rtftok/rtfcontrolwords.hxx b/writerfilter/source/rtftok/rtfcontrolwords.hxx index f89e4cfe3860..b55c2f2f485d 100644 --- a/writerfilter/source/rtftok/rtfcontrolwords.hxx +++ b/writerfilter/source/rtftok/rtfcontrolwords.hxx @@ -33,6 +33,7 @@ enum RTFDestinationState DESTINATION_LISTTABLE, DESTINATION_LISTPICTURE, DESTINATION_LISTENTRY, + DESTINATION_LISTNAME, DESTINATION_LISTOVERRIDETABLE, DESTINATION_LISTOVERRIDEENTRY, DESTINATION_LISTLEVEL, diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index d8e12d0be435..5946642e33cd 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -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++));