diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-12-18 23:34:54 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-12-18 23:47:27 +0100 |
commit | 8f73c7615ebe60ef71d6e8b49a0f19ddac6f03a0 (patch) | |
tree | 414ee99cdba615db33611a9df84e518dcb8961d2 /xmloff | |
parent | 0d9c4baf86c502e7cc2b6072a530c6fad2179abe (diff) |
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
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/XMLTextHeaderFooterContext.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextMasterPageExport.cxx | 24 |
2 files changed, 13 insertions, 12 deletions
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx index b1ef76744560..2a711b02fa73 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 fa473ecb52c0..b82cace5934d 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, |