[Libreoffice-commits] core.git: writerperfect/source
Miklos Vajna
vmiklos at collabora.co.uk
Tue Aug 8 15:08:08 UTC 2017
writerperfect/source/writer/EPUBPackage.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 6db0cc7b5c55ee06b33c5a537b881a884adc1fa4
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Aug 8 15:29:20 2017 +0200
EPUB export: write XML attributes
Which means that for a hello world, only the CSS part is missing.
Change-Id: I0a19eade8505e273f93a5078e689f6f9c2b00dab
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()));
}
More information about the Libreoffice-commits
mailing list