summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-05-09 14:30:55 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-05-09 14:45:59 +0200
commit831b712d3da08f0050d2ee92c384ad8e6a2e461c (patch)
tree06ae80175a681dd42baef793717e5ad1b1f9f93a /writerfilter/source/rtftok
parentf4f526e08cfe9f938aa3422da80dc60f2e1ec3da (diff)
fdo#49683 implement RTF_KEYWORDS
Use comphelper::string::convertCommaSeparated(), as done in RtfExport::WriteInfo(). Change-Id: Iad4c3c57cf2e16c7256b9853cb1a6a0843463387
Diffstat (limited to 'writerfilter/source/rtftok')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx7
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx1
2 files changed, 8 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 957174ee37da..93b2812bfdc6 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -48,6 +48,7 @@
#include <vcl/svapp.hxx>
#include <filter/msfilter/util.hxx>
#include <filter/msfilter/escherex.hxx>
+#include <comphelper/string.hxx>
#include <doctok/sprmids.hxx> // NS_sprm namespace
#include <doctok/resourceids.hxx> // NS_rtf namespace
@@ -931,6 +932,7 @@ void RTFDocumentImpl::text(OUString& rString)
case DESTINATION_FORMFIELDLIST:
case DESTINATION_DATAFIELD:
case DESTINATION_AUTHOR:
+ case DESTINATION_KEYWORDS:
case DESTINATION_OPERATOR:
case DESTINATION_COMPANY:
case DESTINATION_COMMENT:
@@ -1306,6 +1308,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
case RTF_AUTHOR:
m_aStates.top().nDestinationState = DESTINATION_AUTHOR;
break;
+ case RTF_KEYWORDS:
+ m_aStates.top().nDestinationState = DESTINATION_KEYWORDS;
+ break;
case RTF_OPERATOR:
m_aStates.top().nDestinationState = DESTINATION_OPERATOR;
break;
@@ -3242,6 +3247,8 @@ int RTFDocumentImpl::popState()
m_xDocumentProperties->setPrintDate(lcl_getDateTime(m_aStates));
else if (m_aStates.top().nDestinationState == DESTINATION_AUTHOR && m_xDocumentProperties.is())
m_xDocumentProperties->setAuthor(m_aStates.top().aDestinationText.makeStringAndClear());
+ else if (m_aStates.top().nDestinationState == DESTINATION_KEYWORDS && m_xDocumentProperties.is())
+ m_xDocumentProperties->setKeywords(comphelper::string::convertCommaSeparated(m_aStates.top().aDestinationText.makeStringAndClear()));
else if (m_aStates.top().nDestinationState == DESTINATION_COMMENT && m_xDocumentProperties.is())
m_xDocumentProperties->setGenerator(m_aStates.top().aDestinationText.makeStringAndClear());
else if (m_aStates.top().nDestinationState == DESTINATION_OPERATOR
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 1c7b9ecc9d32..2e23b0d79a26 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -100,6 +100,7 @@ namespace writerfilter {
DESTINATION_REVISIONTIME,
DESTINATION_PRINTTIME,
DESTINATION_AUTHOR,
+ DESTINATION_KEYWORDS,
DESTINATION_OPERATOR,
DESTINATION_COMPANY,
DESTINATION_COMMENT,