Hi,
See
http://cgit.freedesktop.org/libreoffice/core/commit/?id=831b712
Regression from 3.4; backported patch attached.
Thanks,
Miklos
From fd3269945e68e1d0848f30949f2e6947e338e240 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@suse.cz>
Date: Wed, 9 May 2012 14:30:55 +0200
Subject: [PATCH] fdo#49683 implement RTF_KEYWORDS
Use comphelper::string::convertCommaSeparated(), as done in
RtfExport::WriteInfo().
Change-Id: Iad4c3c57cf2e16c7256b9853cb1a6a0843463387
---
writerfilter/Library_rtftok.mk | 1 +
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 7 +++++++
writerfilter/source/rtftok/rtfdocumentimpl.hxx | 1 +
3 files changed, 9 insertions(+), 0 deletions(-)
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,
--
1.7.7
Context
- [REVIEW:3-5] fdo#49683 implement RTF_KEYWORDS · Miklos Vajna
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.