From ed0e7262f859adabc56a4f251f2ef1a66c98c3f5 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 24 Nov 2017 09:13:23 +0100 Subject: EPUB export: handle row height By handling row styles. Change-Id: Ie845cf9abfb4f6260d9401e81acc6864964b67bb Reviewed-on: https://gerrit.libreoffice.org/45203 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- writerperfect/source/writer/exp/xmltbli.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'writerperfect/source/writer/exp/xmltbli.cxx') 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 XMLTableRowContext::CreateChildContext(const OU return nullptr; } -void XMLTableRowContext::startElement(const OUString &/*rName*/, const css::uno::Reference &/*xAttribs*/) +void XMLTableRowContext::startElement(const OUString &/*rName*/, const css::uno::Reference &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 XMLTableContext::CreateChildContext(const OUStr return nullptr; } -void XMLTableContext::startElement(const OUString &/*rName*/, const css::uno::Reference &/*xAttribs*/) -{ - m_bTableOpened = false; -} - void XMLTableContext::endElement(const OUString &/*rName*/) { mrImport.GetGenerator().closeTable(); -- cgit v1.2.3