[Libreoffice-commits] core.git: xmloff/source

Michael Stahl Michael.Stahl at cib.de
Wed Jun 27 07:05:41 UTC 2018


 xmloff/source/text/XMLTextMasterPageExport.cxx |   40 ++++++++++++-------------
 1 file changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 7e2240c384c405bb14207f0cb26bff3e4357fcb6
Author: Michael Stahl <Michael.Stahl at cib.de>
Date:   Tue Jun 26 13:44:34 2018 +0200

    OFFICE-3789 xmloff: ODF export: fix footer-first order inconsistency
    
    Reorder footer-left/footer-first so that they are valid wrt. ODF 1.3
    draft schema.  The schema was changed to add footer-first after
    footer-left, but the filter wrote footer-first before footer-left.
    
    Change-Id: I48b7ed932729ec2c94e17e6f3d4797926c9811ee
    Reviewed-on: https://gerrit.libreoffice.org/56482
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx
index 3c60880c6e18..278194551661 100644
--- a/xmloff/source/text/XMLTextMasterPageExport.cxx
+++ b/xmloff/source/text/XMLTextMasterPageExport.cxx
@@ -150,16 +150,6 @@ void XMLTextMasterPageExport::exportMasterPageContent(
             exportHeaderFooterContent( xHeaderText, false );
         }
 
-        if( xHeaderTextFirst.is() && xHeaderTextFirst != xHeaderText )
-        {
-            if (bHeaderFirstShared)
-                GetExport().AddAttribute( XML_NAMESPACE_STYLE,
-                                          XML_DISPLAY, XML_FALSE );
-            SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT,
-                                        XML_HEADER_FIRST, true, true );
-            exportHeaderFooterContent( xHeaderTextFirst, false );
-        }
-
         if( xHeaderTextLeft.is() && xHeaderTextLeft != xHeaderText )
         {
             if (bHeaderLeftShared)
@@ -170,6 +160,16 @@ void XMLTextMasterPageExport::exportMasterPageContent(
             exportHeaderFooterContent( xHeaderTextLeft, false );
         }
 
+        if( xHeaderTextFirst.is() && xHeaderTextFirst != xHeaderText )
+        {
+            if (bHeaderFirstShared)
+                GetExport().AddAttribute( XML_NAMESPACE_STYLE,
+                                          XML_DISPLAY, XML_FALSE );
+            SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT,
+                                        XML_HEADER_FIRST, true, true );
+            exportHeaderFooterContent( xHeaderTextFirst, false );
+        }
+
         aAny = rPropSet->getPropertyValue( sFooterOn );
         bool bFooter = false;
         aAny >>= bFooter;
@@ -198,16 +198,6 @@ void XMLTextMasterPageExport::exportMasterPageContent(
             exportHeaderFooterContent( xFooterText, false );
         }
 
-        if( xFooterTextFirst.is() && xFooterTextFirst != xFooterText )
-        {
-            if (bFooterFirstShared)
-                GetExport().AddAttribute( XML_NAMESPACE_STYLE,
-                                          XML_DISPLAY, XML_FALSE );
-            SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT,
-                                        XML_FOOTER_FIRST, true, true );
-            exportHeaderFooterContent( xFooterTextFirst, false );
-        }
-
         if( xFooterTextLeft.is() && xFooterTextLeft != xFooterText )
         {
             if (bFooterLeftShared)
@@ -217,6 +207,16 @@ void XMLTextMasterPageExport::exportMasterPageContent(
                                         XML_FOOTER_LEFT, true, true );
             exportHeaderFooterContent( xFooterTextLeft, false );
         }
+
+        if( xFooterTextFirst.is() && xFooterTextFirst != xFooterText )
+        {
+            if (bFooterFirstShared)
+                GetExport().AddAttribute( XML_NAMESPACE_STYLE,
+                                          XML_DISPLAY, XML_FALSE );
+            SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT,
+                                        XML_FOOTER_FIRST, true, true );
+            exportHeaderFooterContent( xFooterTextFirst, false );
+        }
     }
 }
 


More information about the Libreoffice-commits mailing list