diff options
author | Daniel Arato (NISZ) <arato.daniel@nisz.hu> | 2021-02-05 12:07:48 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-05-04 19:14:22 +0200 |
commit | 88e6a1bfeac86e0c89d2ff08c908c2b5ae061177 (patch) | |
tree | 1a5ffede7763cdf7d7770ab4a8e4e787c5d7ac69 /sw/source/filter/ww8/docxexport.cxx | |
parent | 30512746c182b52f37f9a818d4e206c98e715cb7 (diff) |
tdf#69635 DOCX: export hidden (shared) headers/footers
Exporting to .docx used to lose all header and footer
content that was not visible in the document at the
moment of saving. This commit forces the DocxExport
class to output all headers and footers even when
the "Same content on left and right pages" option
is turned on.
Change-Id: I6a52f216f1e1b386d887ec614198766670b5bce3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113158
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/source/filter/ww8/docxexport.cxx')
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 6527696bce29..0590fea71d35 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -247,12 +247,13 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFormat& rFormat ) } void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags, - const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const SwFrameFormat& rFirstPageFormat, sal_uInt8 nBreakCode ) + const SwFrameFormat& rFormat, const SwFrameFormat& rLeftHeaderFormat, const SwFrameFormat& rLeftFooterFormat, const SwFrameFormat& rFirstPageFormat, + sal_uInt8 nBreakCode, bool bEvenAndOddHeaders ) { m_nHeadersFootersInSection = 1; // document setting indicating the requirement of EVEN and ODD for both headers and footers - if ( nHeadFootFlags & ( nsHdFtFlags::WW8_FOOTER_EVEN | nsHdFtFlags::WW8_HEADER_EVEN )) + if ( nHeadFootFlags & ( nsHdFtFlags::WW8_FOOTER_EVEN | nsHdFtFlags::WW8_HEADER_EVEN ) && bEvenAndOddHeaders ) m_aSettings.evenAndOddHeaders = true; // Turn ON flag for 'Writing Headers \ Footers' @@ -260,7 +261,7 @@ void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags, // headers if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN ) - WriteHeaderFooter( &rLeftFormat, true, "even" ); + WriteHeaderFooter( &rLeftHeaderFormat, true, "even" ); else if ( m_aSettings.evenAndOddHeaders ) { if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_ODD ) @@ -284,7 +285,7 @@ void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags, // footers if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_EVEN ) - WriteHeaderFooter( &rLeftFormat, false, "even" ); + WriteHeaderFooter( &rLeftFooterFormat, false, "even" ); else if ( m_aSettings.evenAndOddHeaders ) { if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_ODD ) |