diff options
author | Attila Bakos (NISZ) <bakos.attilakaroly@nisz.hu> | 2021-03-12 14:33:08 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-03-31 14:44:27 +0200 |
commit | b802ab694a8a7357d4657f3e11b571144fa7c7bf (patch) | |
tree | 1c8aba77e9b6aed048d8b49f55ff006c5d099d5f /sw/qa/extras/uiwriter/uiwriter.cxx | |
parent | 3c49a3be592eb515bba100b4a17617136fabbcba (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/qa/extras/uiwriter/uiwriter.cxx')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index e47594a27b42..f56cf50d328d 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -5055,7 +5055,9 @@ void SwUiWriterTest::testTdf92648() SwDoc* pDoc = createDoc("tdf92648.docx"); SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0); // Make sure we have ten draw shapes. - CPPUNIT_ASSERT_EQUAL(sal_Int32(10), SwTextBoxHelper::getCount(pPage)); + // Yes, we have if the left/right pages have different header/footer, + // but if not we have only nine of them: + CPPUNIT_ASSERT_EQUAL(sal_Int32(9), SwTextBoxHelper::getCount(pPage)); // and the text boxes haven't got zero height sal_Int32 nCount = 0; for (const SwFrameFormat* pFormat : *pDoc->GetSpzFrameFormats()) |