writerfilter/Library_rtftok.mk                 |    1 +
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    7 +++++++
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |    1 +
 3 files changed, 9 insertions(+)

New commits:
commit f644f31c8edf3e39b23d8cc4d4b484cca8e99910
Author: Miklos Vajna <vmik...@suse.cz>
Date:   Wed May 9 14:30:55 2012 +0200

    fdo#49683 implement RTF_KEYWORDS
    
    Use comphelper::string::convertCommaSeparated(), as done in
    RtfExport::WriteInfo().
    
    Change-Id: Iad4c3c57cf2e16c7256b9853cb1a6a0843463387
    
    Signed-off-by: Luboš Luňák <l.lu...@suse.cz>

diff --git a/writerfilter/Library_rtftok.mk b/writerfilter/Library_rtftok.mk
index 1afdd27..c58b077 100644
--- a/writerfilter/Library_rtftok.mk
+++ b/writerfilter/Library_rtftok.mk
@@ -48,6 +48,7 @@ $(eval $(call gb_Library_add_defs,rtftok,\
 ))
 
 $(eval $(call gb_Library_add_linked_libs,rtftok,\
+       comphelper \
        cppu \
        cppuhelper \
        oox \
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 1d45cb3..1250855 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -45,6 +45,7 @@
 #include <vcl/graph.hxx>
 #include <svtools/grfmgr.hxx>
 #include <vcl/svapp.hxx>
+#include <comphelper/string.hxx>
 
 #include <doctok/sprmids.hxx> // NS_sprm namespace
 #include <doctok/resourceids.hxx> // NS_rtf namespace
@@ -981,6 +982,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:
@@ -1357,6 +1359,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;
@@ -3256,6 +3261,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 84ac9f3..fa21c81 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,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to