summaryrefslogtreecommitdiff
path: root/writerperfect/source/writer/exp/xmltbli.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-11-24 09:13:23 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-11-24 14:02:49 +0100
commited0e7262f859adabc56a4f251f2ef1a66c98c3f5 (patch)
treeaef7bd8e1a2344ee5fc42e26e04370c37b054394 /writerperfect/source/writer/exp/xmltbli.cxx
parenta760ed1560173234ef4bde3f6025b737ced436bb (diff)
EPUB export: handle row height
By handling row styles. Change-Id: Ie845cf9abfb4f6260d9401e81acc6864964b67bb Reviewed-on: https://gerrit.libreoffice.org/45203 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerperfect/source/writer/exp/xmltbli.cxx')
-rw-r--r--writerperfect/source/writer/exp/xmltbli.cxx18
1 files changed, 11 insertions, 7 deletions
diff --git a/writerperfect/source/writer/exp/xmltbli.cxx b/writerperfect/source/writer/exp/xmltbli.cxx
index c698c9d1ce9c..19ea15d502a8 100644
--- a/writerperfect/source/writer/exp/xmltbli.cxx
+++ b/writerperfect/source/writer/exp/xmltbli.cxx
@@ -141,9 +141,18 @@ rtl::Reference<XMLImportContext> XMLTableRowContext::CreateChildContext(const OU
return nullptr;
}
-void XMLTableRowContext::startElement(const OUString &/*rName*/, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
+void XMLTableRowContext::startElement(const OUString &/*rName*/, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs)
{
- mrImport.GetGenerator().openTableRow(librevenge::RVNGPropertyList());
+ librevenge::RVNGPropertyList aPropertyList;
+ for (sal_Int16 i = 0; i < xAttribs->getLength(); ++i)
+ {
+ const OUString &rAttributeName = xAttribs->getNameByIndex(i);
+ const OUString &rAttributeValue = xAttribs->getValueByIndex(i);
+
+ if (rAttributeName == "table:style-name")
+ FillStyles(rAttributeValue, mrImport.GetAutomaticRowStyles(), mrImport.GetRowStyles(), aPropertyList);
+ }
+ mrImport.GetGenerator().openTableRow(aPropertyList);
}
void XMLTableRowContext::endElement(const OUString &/*rName*/)
@@ -189,11 +198,6 @@ rtl::Reference<XMLImportContext> XMLTableContext::CreateChildContext(const OUStr
return nullptr;
}
-void XMLTableContext::startElement(const OUString &/*rName*/, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
-{
- m_bTableOpened = false;
-}
-
void XMLTableContext::endElement(const OUString &/*rName*/)
{
mrImport.GetGenerator().closeTable();