diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2011-07-13 13:25:21 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2011-07-29 17:32:39 +0200 |
commit | de2548311ef3fff3797d6286eaf114e8b54e6b76 (patch) | |
tree | e5b3bf098bb0fe0202b1059b0ecffff517bc07ab | |
parent | 8a5ccb7c5017a670d80724b6f32e2004368eee9b (diff) |
implement RTF_OPERATOR
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 11 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 9c1f35730..bd7071c8b 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -25,6 +25,7 @@ * instead of those above. */ +#include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <com/sun/star/util/DateTime.hpp> #include <editeng/borderline.hxx> @@ -633,6 +634,7 @@ void RTFDocumentImpl::text(OUString& rString) case DESTINATION_FORMFIELDLIST: case DESTINATION_DATAFIELD: case DESTINATION_AUTHOR: + case DESTINATION_OPERATOR: m_aDestinationText.append(rString); break; default: bRet = false; break; @@ -959,6 +961,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) case RTF_AUTHOR: m_aStates.top().nDestinationState = DESTINATION_AUTHOR; break; + case RTF_OPERATOR: + m_aStates.top().nDestinationState = DESTINATION_OPERATOR; + break; case RTF_LISTTEXT: // Should be ignored by any reader that understands Word 97 through Word 2007 numbering. case RTF_NONESTTABLES: @@ -2425,6 +2430,12 @@ int RTFDocumentImpl::popState() m_xDocumentProperties->setPrintDate(lcl_getDateTime(m_aStates)); else if (m_aStates.top().nDestinationState == DESTINATION_AUTHOR) m_xDocumentProperties->setAuthor(m_aDestinationText.makeStringAndClear()); + else if (m_aStates.top().nDestinationState == DESTINATION_OPERATOR) + { + uno::Reference<beans::XPropertyContainer> xUserDefinedProperties = m_xDocumentProperties->getUserDefinedProperties(); + xUserDefinedProperties->addProperty(OUString(RTL_CONSTASCII_USTRINGPARAM("Operator")), beans::PropertyAttribute::REMOVEABLE, + uno::makeAny(m_aDestinationText.makeStringAndClear())); + } // See if we need to end a track change RTFValue::Pointer_t pTrackchange = RTFSprm::find(m_aStates.top().aCharacterSprms, NS_ooxml::LN_trackchange); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 8213907de..fe2bed886 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -102,7 +102,8 @@ namespace writerfilter { DESTINATION_CREATIONTIME, DESTINATION_REVISIONTIME, DESTINATION_PRINTTIME, - DESTINATION_AUTHOR + DESTINATION_AUTHOR, + DESTINATION_OPERATOR }; enum RTFBorderState |