From ea2603200b46f460f34c930770d69db74a164bde Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 6 May 2013 13:01:27 +0200 Subject: fdo#42144 WW8 export: avoid writing pointless empty footers Regression from 1348288905ffa75d3634eee4392ba4660d28cdb9 (mismerge, I guess), when header was enabled, actually empty footer was exported, even in case footer was disabled. (cherry picked from commit 4144cd5a851466778004af9de98dbcfb019067bb) Conflicts: sw/qa/extras/ww8export/ww8export.cxx Change-Id: Ied55dc2a9f0faef87689c07935a47db384d37e1a Reviewed-on: https://gerrit.libreoffice.org/3797 Reviewed-by: Bosdonnat Cedric Tested-by: Bosdonnat Cedric --- sw/source/filter/ww8/wrtw8sty.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index f002c1ff4226..d83718145192 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -1182,7 +1182,7 @@ void WW8_WrPlcSepx::OutHeaderFooter( WW8Export& rWrt, bool bHeader, else if ( rWrt.bWrtWW8 ) { pTxtPos->Append( rCpPos ); - if (rWrt.bHasHdr && nBreakCode!=0) + if ((bHeader? rWrt.bHasHdr : rWrt.bHasFtr) && nBreakCode!=0) { rWrt.WriteStringAsPara( aEmptyStr ); // Empty paragraph for empty header/footer rWrt.WriteStringAsPara( aEmptyStr ); // a CR that WW8 needs for end of the stream -- cgit v1.2.3