summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-08-08 15:29:20 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-08-08 17:07:17 +0200
commit6db0cc7b5c55ee06b33c5a537b881a884adc1fa4 (patch)
treec1ead2a8be4086a4d640738a05530a95568037ff /writerperfect
parent44d7a396125da74078c9a09a3fec2242b8bd4ec7 (diff)
EPUB export: write XML attributes
Which means that for a hello world, only the CSS part is missing. Change-Id: I0a19eade8505e273f93a5078e689f6f9c2b00dab
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/writer/EPUBPackage.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/writerperfect/source/writer/EPUBPackage.cxx b/writerperfect/source/writer/EPUBPackage.cxx
index 7589dae19722..520fece6d9ca 100644
--- a/writerperfect/source/writer/EPUBPackage.cxx
+++ b/writerperfect/source/writer/EPUBPackage.cxx
@@ -59,11 +59,16 @@ void EPUBPackage::openXMLFile(const char *pName)
mxOutputWriter->startDocument();
}
-void EPUBPackage::openElement(const char *pName, const librevenge::RVNGPropertyList &/*rAttributes*/)
+void EPUBPackage::openElement(const char *pName, const librevenge::RVNGPropertyList &rAttributes)
{
assert(mxOutputWriter.is());
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
+
+ librevenge::RVNGPropertyList::Iter it(rAttributes);
+ for (it.rewind(); it.next();)
+ pAttributeList->AddAttribute(OUString::fromUtf8(it.key()), OUString::fromUtf8(it()->getStr().cstr()));
+
mxOutputWriter->startElement(OUString::fromUtf8(pName), uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}