Blame SOURCES/0074-fdo-72850-ODF-export-don-t-export-spurious-style-dis.patch

f0633d
From 854866140bff2ae4c587c7adc9b3170f06135437 Mon Sep 17 00:00:00 2001
f0633d
From: Michael Stahl <mstahl@redhat.com>
f0633d
Date: Wed, 18 Dec 2013 23:34:54 +0100
f0633d
Subject: [PATCH 074/109] fdo#72850: ODF export: don't export spurious
f0633d
 style:display="false"
f0633d
f0633d
... on style:header-left, style:header-first, style:footer-left,
f0633d
style:footer-first.
f0633d
f0633d
(regression from d92345561c998f7382cf9ef0fdcd29096f978435)
f0633d
f0633d
Change-Id: I48c51fcd2b07ae8b0e3ec2c1087a388c6900b366
f0633d
(cherry picked from commit 8f73c7615ebe60ef71d6e8b49a0f19ddac6f03a0)
f0633d
Reviewed-on: https://gerrit.libreoffice.org/7141
f0633d
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
f0633d
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
f0633d
---
f0633d
 xmloff/source/text/XMLTextHeaderFooterContext.cxx |  1 +
f0633d
 xmloff/source/text/XMLTextMasterPageExport.cxx    | 24 +++++++++++------------
f0633d
 2 files changed, 13 insertions(+), 12 deletions(-)
f0633d
f0633d
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
f0633d
index ba423dc..335d95b 100644
f0633d
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
f0633d
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
f0633d
@@ -54,6 +54,7 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( SvXMLImport& rImport, sa
f0633d
     bLeft( bLft ),
f0633d
     bFirst( bFrst )
f0633d
 {
f0633d
+    // NOTE: if this ever handles XML_DISPLAY attr then beware of fdo#72850 !
f0633d
     if( bLeft || bFirst )
f0633d
     {
f0633d
         Any aAny;
f0633d
diff --git a/xmloff/source/text/XMLTextMasterPageExport.cxx b/xmloff/source/text/XMLTextMasterPageExport.cxx
f0633d
index aafe94a..cb3b2f5 100644
f0633d
--- a/xmloff/source/text/XMLTextMasterPageExport.cxx
f0633d
+++ b/xmloff/source/text/XMLTextMasterPageExport.cxx
f0633d
@@ -128,18 +128,18 @@ void XMLTextMasterPageExport::exportMasterPageContent(
f0633d
         sal_Bool bHeader = sal_False;
f0633d
         aAny >>= bHeader;
f0633d
 
f0633d
-        sal_Bool bHeaderFirst = sal_False;
f0633d
+        sal_Bool bHeaderFirstShared = sal_False;
f0633d
         if( bHeader )
f0633d
         {
f0633d
             aAny = rPropSet->getPropertyValue( sFirstShareContent );
f0633d
-            aAny >>= bHeaderFirst;
f0633d
+            aAny >>= bHeaderFirstShared;
f0633d
         }
f0633d
 
f0633d
-        sal_Bool bHeaderLeft = sal_False;
f0633d
+        sal_Bool bHeaderLeftShared = sal_False;
f0633d
         if( bHeader )
f0633d
         {
f0633d
             aAny = rPropSet->getPropertyValue( sHeaderShareContent );
f0633d
-            aAny >>= bHeaderLeft;
f0633d
+            aAny >>= bHeaderLeftShared;
f0633d
         }
f0633d
 
f0633d
         if( xHeaderText.is() )
f0633d
@@ -154,7 +154,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
f0633d
 
f0633d
         if( xHeaderTextFirst.is() && xHeaderTextFirst != xHeaderText )
f0633d
         {
f0633d
-            if( !bHeaderFirst )
f0633d
+            if (bHeaderFirstShared)
f0633d
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
f0633d
                                           XML_DISPLAY, XML_FALSE );
f0633d
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
f0633d
@@ -164,7 +164,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
f0633d
 
f0633d
         if( xHeaderTextLeft.is() && xHeaderTextLeft != xHeaderText )
f0633d
         {
f0633d
-            if( !bHeaderLeft )
f0633d
+            if (bHeaderLeftShared)
f0633d
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
f0633d
                                           XML_DISPLAY, XML_FALSE );
f0633d
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
f0633d
@@ -176,18 +176,18 @@ void XMLTextMasterPageExport::exportMasterPageContent(
f0633d
         sal_Bool bFooter = sal_False;
f0633d
         aAny >>= bFooter;
f0633d
 
f0633d
-        sal_Bool bFooterFirst = sal_False;
f0633d
+        sal_Bool bFooterFirstShared = sal_False;
f0633d
         if( bFooter )
f0633d
         {
f0633d
             aAny = rPropSet->getPropertyValue( sFirstShareContent );
f0633d
-            aAny >>= bFooterFirst;
f0633d
+            aAny >>= bFooterFirstShared;
f0633d
         }
f0633d
 
f0633d
-        sal_Bool bFooterLeft = sal_False;
f0633d
+        sal_Bool bFooterLeftShared = sal_False;
f0633d
         if( bFooter )
f0633d
         {
f0633d
             aAny = rPropSet->getPropertyValue( sFooterShareContent );
f0633d
-            aAny >>= bFooterLeft;
f0633d
+            aAny >>= bFooterLeftShared;
f0633d
         }
f0633d
 
f0633d
         if( xFooterText.is() )
f0633d
@@ -202,7 +202,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
f0633d
 
f0633d
         if( xFooterTextFirst.is() && xFooterTextFirst != xFooterText )
f0633d
         {
f0633d
-            if( !bFooterFirst )
f0633d
+            if (bFooterFirstShared)
f0633d
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
f0633d
                                           XML_DISPLAY, XML_FALSE );
f0633d
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
f0633d
@@ -212,7 +212,7 @@ void XMLTextMasterPageExport::exportMasterPageContent(
f0633d
 
f0633d
         if( xFooterTextLeft.is() && xFooterTextLeft != xFooterText )
f0633d
         {
f0633d
-            if( !bFooterLeft )
f0633d
+            if (bFooterLeftShared)
f0633d
                 GetExport().AddAttribute( XML_NAMESPACE_STYLE,
f0633d
                                           XML_DISPLAY, XML_FALSE );
f0633d
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
f0633d
-- 
f0633d
1.8.4.2
f0633d