summaryrefslogtreecommitdiff
path: root/writerperfect/source/writer
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-11-27 08:27:05 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-11-27 12:39:58 +0100
commit944cc09cf76cea46d9f6bd7be14c64f74fe64403 (patch)
tree948168ace52e54e96b1d8de9c8146409e016b35e /writerperfect/source/writer
parentcb682e03bd8f1ae852135dc7a68d6926d9356405 (diff)
EPUB export: fix char props of <text:sequence> characters
These are typically inherited from parent, <text:sequence> is similar to e.g. <text:span> in this regard. Change-Id: Ic84f6e2e4fc6866ffca23eef2c932ee63e6978ca Reviewed-on: https://gerrit.libreoffice.org/45314 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerperfect/source/writer')
-rw-r--r--writerperfect/source/writer/exp/txtparai.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/writerperfect/source/writer/exp/txtparai.cxx b/writerperfect/source/writer/exp/txtparai.cxx
index 75144f5a1f19..b1359953e325 100644
--- a/writerperfect/source/writer/exp/txtparai.cxx
+++ b/writerperfect/source/writer/exp/txtparai.cxx
@@ -58,19 +58,26 @@ namespace exp
class XMLTextSequenceContext : public XMLImportContext
{
public:
- XMLTextSequenceContext(XMLImport &rImport);
+ XMLTextSequenceContext(XMLImport &rImport, const librevenge::RVNGPropertyList &rPropertyList);
void SAL_CALL characters(const OUString &rChars) override;
+
+private:
+ librevenge::RVNGPropertyList m_aPropertyList;
};
-XMLTextSequenceContext::XMLTextSequenceContext(XMLImport &rImport)
+XMLTextSequenceContext::XMLTextSequenceContext(XMLImport &rImport, const librevenge::RVNGPropertyList &rPropertyList)
: XMLImportContext(rImport)
{
+ // Inherit properties from parent.
+ librevenge::RVNGPropertyList::Iter itProp(rPropertyList);
+ for (itProp.rewind(); itProp.next();)
+ m_aPropertyList.insert(itProp.key(), itProp()->clone());
}
void XMLTextSequenceContext::characters(const OUString &rChars)
{
- mrImport.GetGenerator().openSpan(librevenge::RVNGPropertyList());
+ mrImport.GetGenerator().openSpan(m_aPropertyList);
OString sCharU8 = OUStringToOString(rChars, RTL_TEXTENCODING_UTF8);
mrImport.GetGenerator().insertText(librevenge::RVNGString(sCharU8.getStr()));
@@ -349,7 +356,7 @@ rtl::Reference<XMLImportContext> CreateParagraphOrSpanChildContext(XMLImport &rI
if (rName == "draw:frame")
return new XMLTextFrameContext(rImport);
if (rName == "text:sequence")
- return new XMLTextSequenceContext(rImport);
+ return new XMLTextSequenceContext(rImport, rTextPropertyList);
return nullptr;
}