summaryrefslogtreecommitdiff
path: root/writerperfect/source/writer/exp/txtparai.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-11-27 08:26:34 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-11-27 12:39:23 +0100
commitcb682e03bd8f1ae852135dc7a68d6926d9356405 (patch)
treefc87e8a09caa27d744fc16c13ecd4880e6ffeeaa /writerperfect/source/writer/exp/txtparai.cxx
parentb0e226b58a261ccfe24137048c11bdf7af7c5265 (diff)
EPUB export: handle sequence fields
Just emit their expanded content for now. Change-Id: Ibca40d201dde9c8d6ef920b5213f786f64d7c027 Reviewed-on: https://gerrit.libreoffice.org/45313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerperfect/source/writer/exp/txtparai.cxx')
-rw-r--r--writerperfect/source/writer/exp/txtparai.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/writerperfect/source/writer/exp/txtparai.cxx b/writerperfect/source/writer/exp/txtparai.cxx
index 82d0b8ab6e3d..75144f5a1f19 100644
--- a/writerperfect/source/writer/exp/txtparai.cxx
+++ b/writerperfect/source/writer/exp/txtparai.cxx
@@ -54,6 +54,30 @@ namespace writerperfect
namespace exp
{
+/// Handler for <text:sequence>.
+class XMLTextSequenceContext : public XMLImportContext
+{
+public:
+ XMLTextSequenceContext(XMLImport &rImport);
+
+ void SAL_CALL characters(const OUString &rChars) override;
+};
+
+XMLTextSequenceContext::XMLTextSequenceContext(XMLImport &rImport)
+ : XMLImportContext(rImport)
+{
+}
+
+void XMLTextSequenceContext::characters(const OUString &rChars)
+{
+ mrImport.GetGenerator().openSpan(librevenge::RVNGPropertyList());
+
+ OString sCharU8 = OUStringToOString(rChars, RTL_TEXTENCODING_UTF8);
+ mrImport.GetGenerator().insertText(librevenge::RVNGString(sCharU8.getStr()));
+
+ mrImport.GetGenerator().closeSpan();
+}
+
/// Handler for <text:span>.
class XMLSpanContext : public XMLImportContext
{
@@ -324,6 +348,8 @@ rtl::Reference<XMLImportContext> CreateParagraphOrSpanChildContext(XMLImport &rI
return new XMLTabContext(rImport, rTextPropertyList);
if (rName == "draw:frame")
return new XMLTextFrameContext(rImport);
+ if (rName == "text:sequence")
+ return new XMLTextSequenceContext(rImport);
return nullptr;
}