diff options
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.cxx')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index fd5d02bb6818..3d7922a43cc7 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1259,6 +1259,7 @@ void RTFDocumentImpl::text(OUString& rString) case DESTINATION_MSUPHIDE: case DESTINATION_MTYPE: case DESTINATION_MGROW: + case DESTINATION_INDEXENTRY: m_aStates.top().pDestinationText->append(rString); break; default: @@ -1729,6 +1730,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) case RTF_BKMKEND: m_aStates.top().nDestinationState = DESTINATION_BOOKMARKEND; break; + case RTF_XE: + m_aStates.top().nDestinationState = DESTINATION_INDEXENTRY; + break; case RTF_REVTBL: m_aStates.top().nDestinationState = DESTINATION_REVISIONTABLE; break; @@ -5186,6 +5190,20 @@ int RTFDocumentImpl::popState() Mapper().props(lcl_getBookmarkProperties(m_aBookmarks[aStr], aStr)); } break; + case DESTINATION_INDEXENTRY: + { + if (&m_aStates.top().aDestinationText != m_aStates.top().pDestinationText) + break; // not for nested group + OUString str(m_aStates.top().pDestinationText->makeStringAndClear()); + // dmapper expects this as a field, so let's fake something... + str = "XE \"" + str.replaceAll("\"", "\\\"") + "\""; + singleChar(0x13); + Mapper().utext(reinterpret_cast<sal_uInt8 const*>(str.getStr()), str.getLength()); + singleChar(0x14); + // no result + singleChar(0x15); + } + break; case DESTINATION_FORMFIELDNAME: { if (&m_aStates.top().aDestinationText != m_aStates.top().pDestinationText) |