summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorAttila Bakos (NISZ) <bakos.attilakaroly@nisz.hu>2021-03-12 14:33:08 +0100
committerLászló Németh <nemeth@numbertext.org>2021-03-31 14:44:27 +0200
commitb802ab694a8a7357d4657f3e11b571144fa7c7bf (patch)
tree1c8aba77e9b6aed048d8b49f55ff006c5d099d5f /sw/inc
parent3c49a3be592eb515bba100b4a17617136fabbcba (diff)
tdf#141158 DOCX: import discarded headers/footers
Before the inactive DOCX headers/footers lost during import time. Now it can be restored by disabling the options “Same content on left and right pages” and “Same content on first page” on the Header and the Footer panes of the Page style. This is for improving the interoperability with other Office programs, e.g. supporting DOCX text document templates better. Follow-up of commit f5dc6b11d2218d94c9effe7a1ab418d0133da5e3 (tdf#140117 sw UI: keep headers/footers when inactive). To start the py-UItest run: $ make UITest_writer_tests7 UITEST_TEST_NAME="tdf141158.TestTdf141158.test_tdf141158" Note: In spite of this patch implements the left/first/first_left page header/footer stash at import time, the left one works correctly at now. This is because the first pages have different page styles so changing the right page style will restore the hidden header/footer content. For this problem further improvements are planned, exactly in the filter part. Number of unit tests had to be modified, because before these headers and footers were dropped. Co-developed-with: Daniel Arato (NISZ) Change-Id: I3dd452a648bc465710698707c083734dc762ed94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112580 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/pagedesc.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 0d29eb0ca6e3..4178361349d6 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -223,6 +223,12 @@ public:
/// Used to restore hidden header/footer formats.
const SwFrameFormat* GetStashedFrameFormat(bool bHeader, bool bLeft, bool bFirst) const;
+ /// Checks if the pagedescriptor has a stashed format according to the parameters or not.
+ bool HasStashedFormat(bool bHeader, bool bLeft, bool bFirst);
+
+ /// Gives the feature of removing the stashed format by hand if it is neccessarry.
+ void RemoveStashedFormat(bool bHeader, bool bLeft, bool bFirst);
+
/// Same as WriteUseOn(), but the >= HeaderShare part of the bitfield is not modified.
inline void SetUseOn( UseOnPage eNew );
inline UseOnPage GetUseOn() const;