diff options
Diffstat (limited to 'writerperfect/source/writer/exp/xmlimp.cxx')
-rw-r--r-- | writerperfect/source/writer/exp/xmlimp.cxx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx index 9ef9afa837c1..5c22a5f911d7 100644 --- a/writerperfect/source/writer/exp/xmlimp.cxx +++ b/writerperfect/source/writer/exp/xmlimp.cxx @@ -339,6 +339,7 @@ void XMLOfficeDocContext::HandleFixedLayoutPage(const FixedLayoutPage &rPage, bo XMLImport::XMLImport(const uno::Reference<uno::XComponentContext> &xContext, librevenge::RVNGTextInterface &rGenerator, const OUString &rURL, const uno::Sequence<beans::PropertyValue> &rDescriptor, const std::vector<FixedLayoutPage> &rPageMetafiles) : mrGenerator(rGenerator), mxContext(xContext), + mbIsInPageSpan(false), mrPageMetafiles(rPageMetafiles) { uno::Sequence<beans::PropertyValue> aFilterData; @@ -595,6 +596,37 @@ void XMLImport::setDocumentLocator(const uno::Reference<xml::sax::XLocator> &/*x { } +void XMLImport::HandlePageSpan(const librevenge::RVNGPropertyList &rPropertyList) +{ + OUString sMasterPageName; + OUString sLayoutName; + + if (rPropertyList["style:master-page-name"]) + sMasterPageName = OStringToOUString(rPropertyList["style:master-page-name"]->getStr().cstr(), RTL_TEXTENCODING_UTF8); + else if (!GetIsInPageSpan()) + sMasterPageName = "Standard"; + + if (sMasterPageName.getLength()) + { + librevenge::RVNGPropertyList &rMasterPage = GetMasterStyles()[sMasterPageName]; + if (rMasterPage["style:page-layout-name"]) + { + sLayoutName = OStringToOUString(rMasterPage["style:page-layout-name"]->getStr().cstr(), RTL_TEXTENCODING_UTF8); + } + } + + if (sLayoutName.getLength()) + { + librevenge::RVNGPropertyList &rPageLayout = GetPageLayouts()[sLayoutName]; + + if (GetIsInPageSpan()) + GetGenerator().closePageSpan(); + + GetGenerator().openPageSpan(rPageLayout); + SetIsInPageSpan(true); + } +} + } // namespace exp } // namespace writerperfect |