xmloff/source/text/XMLTextHeaderFooterContext.cxx |    1 
 xmloff/source/text/XMLTextMasterPageExport.cxx    |   24 +++++++++++-----------
 2 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 854866140bff2ae4c587c7adc9b3170f06135437
Author: Michael Stahl <mst...@redhat.com>
Date:   Wed Dec 18 23:34:54 2013 +0100

    fdo#72850: ODF export: don't export spurious style:display="false"
    
    ... on style:header-left, style:header-first, style:footer-left,
    style:footer-first.
    
    (regression from d92345561c998f7382cf9ef0fdcd29096f978435)
    
    Change-Id: I48c51fcd2b07ae8b0e3ec2c1087a388c6900b366
    (cherry picked from commit 8f73c7615ebe60ef71d6e8b49a0f19ddac6f03a0)
    Reviewed-on: https://gerrit.libreoffice.org/7141
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>
    Tested-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx 
b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index ba423dc..335d95b 100644
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -54,6 +54,7 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( 
SvXMLImport& rImport, sa
     bLeft( bLft ),
     bFirst( bFrst )
 {
+    // NOTE: if this ever handles XML_DISPLAY attr then beware of fdo#72850 !
     if( bLeft || bFirst )
     {
         Any aAny;
diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx 
b/xmloff/source/text/XMLTextMasterPageExport.cxx
index aafe94a..cb3b2f5 100644
--- a/xmloff/source/text/XMLTextMasterPageExport.cxx
+++ b/xmloff/source/text/XMLTextMasterPageExport.cxx
@@ -128,18 +128,18 @@ void XMLTextMasterPageExport::exportMasterPageContent(
         sal_Bool bHeader = sal_False;
         aAny >>= bHeader;
 
-        sal_Bool bHeaderFirst = sal_False;
+        sal_Bool bHeaderFirstShared = sal_False;
         if( bHeader )
         {
             aAny = rPropSet->getPropertyValue( sFirstShareContent );
-            aAny >>= bHeaderFirst;
+            aAny >>= bHeaderFirstShared;
         }
 
-        sal_Bool bHeaderLeft = sal_False;
+        sal_Bool bHeaderLeftShared = sal_False;
         if( bHeader )
         {
             aAny = rPropSet->getPropertyValue( sHeaderShareContent );
-            aAny >>= bHeaderLeft;
+            aAny >>= bHeaderLeftShared;
         }
 
         if( xHeaderText.is() )
@@ -154,7 +154,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
 
         if( xHeaderTextFirst.is() && xHeaderTextFirst != xHeaderText )
         {
-            if( !bHeaderFirst )
+            if (bHeaderFirstShared)
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                           XML_DISPLAY, XML_FALSE );
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
@@ -164,7 +164,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
 
         if( xHeaderTextLeft.is() && xHeaderTextLeft != xHeaderText )
         {
-            if( !bHeaderLeft )
+            if (bHeaderLeftShared)
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                           XML_DISPLAY, XML_FALSE );
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
@@ -176,18 +176,18 @@ void XMLTextMasterPageExport::exportMasterPageContent(
         sal_Bool bFooter = sal_False;
         aAny >>= bFooter;
 
-        sal_Bool bFooterFirst = sal_False;
+        sal_Bool bFooterFirstShared = sal_False;
         if( bFooter )
         {
             aAny = rPropSet->getPropertyValue( sFirstShareContent );
-            aAny >>= bFooterFirst;
+            aAny >>= bFooterFirstShared;
         }
 
-        sal_Bool bFooterLeft = sal_False;
+        sal_Bool bFooterLeftShared = sal_False;
         if( bFooter )
         {
             aAny = rPropSet->getPropertyValue( sFooterShareContent );
-            aAny >>= bFooterLeft;
+            aAny >>= bFooterLeftShared;
         }
 
         if( xFooterText.is() )
@@ -202,7 +202,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
 
         if( xFooterTextFirst.is() && xFooterTextFirst != xFooterText )
         {
-            if( !bFooterFirst )
+            if (bFooterFirstShared)
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                           XML_DISPLAY, XML_FALSE );
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
@@ -212,7 +212,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
 
         if( xFooterTextLeft.is() && xFooterTextLeft != xFooterText )
         {
-            if( !bFooterLeft )
+            if (bFooterLeftShared)
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                           XML_DISPLAY, XML_FALSE );
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to