summaryrefslogtreecommitdiff
path: root/writerperfect/source/writer
diff options
context:
space:
mode:
Diffstat (limited to 'writerperfect/source/writer')
-rw-r--r--writerperfect/source/writer/EPUBExportFilter.cxx2
-rw-r--r--writerperfect/source/writer/exp/txtparai.cxx16
2 files changed, 15 insertions, 3 deletions
diff --git a/writerperfect/source/writer/EPUBExportFilter.cxx b/writerperfect/source/writer/EPUBExportFilter.cxx
index ee15b88adbc1..8a8e14c72ce8 100644
--- a/writerperfect/source/writer/EPUBExportFilter.cxx
+++ b/writerperfect/source/writer/EPUBExportFilter.cxx
@@ -36,7 +36,7 @@ sal_Bool EPUBExportFilter::filter(const uno::Sequence<beans::PropertyValue> &rDe
// file, the flat ODF filter has access to the doc model, everything else
// is in-between.
EPUBPackage aPackage(mxContext, rDescriptor);
- libepubgen::EPUBTextGenerator aGenerator(&aPackage, libepubgen::EPUB_SPLIT_METHOD_PAGE_BREAK, /*version=*/30);
+ libepubgen::EPUBTextGenerator aGenerator(&aPackage, libepubgen::EPUB_SPLIT_METHOD_HEADING, /*version=*/30);
uno::Reference<xml::sax::XDocumentHandler> xExportHandler(new exp::XMLImport(aGenerator));
uno::Reference<lang::XInitialization> xInitialization(mxContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.Writer.XMLOasisExporter", mxContext), uno::UNO_QUERY);
diff --git a/writerperfect/source/writer/exp/txtparai.cxx b/writerperfect/source/writer/exp/txtparai.cxx
index 8abf113dad52..02e4f78c1ef5 100644
--- a/writerperfect/source/writer/exp/txtparai.cxx
+++ b/writerperfect/source/writer/exp/txtparai.cxx
@@ -62,9 +62,21 @@ XMLImportContext *XMLParaContext::CreateChildContext(const OUString &rName, cons
return nullptr;
}
-void XMLParaContext::startElement(const OUString &/*rName*/, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
+void XMLParaContext::startElement(const OUString &/*rName*/, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs)
{
- mrImport.GetGenerator().openParagraph(librevenge::RVNGPropertyList());
+ librevenge::RVNGPropertyList aPropertyList;
+ for (sal_Int16 i = 0; i < xAttribs->getLength(); ++i)
+ {
+ const OUString &rAttributeName = xAttribs->getNameByIndex(i);
+ if (rAttributeName != "text:style-name")
+ {
+ OString sName = OUStringToOString(rAttributeName, RTL_TEXTENCODING_UTF8);
+ OString sValue = OUStringToOString(xAttribs->getValueByIndex(i), RTL_TEXTENCODING_UTF8);
+ aPropertyList.insert(sName.getStr(), sValue.getStr());
+ }
+ }
+
+ mrImport.GetGenerator().openParagraph(aPropertyList);
}
void XMLParaContext::endElement(const OUString &/*rName*/)