diff options
author | Bakos Attila <bakos.attilakaroly@nisz.hu> | 2020-06-30 15:03:31 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-07-10 14:44:50 +0200 |
commit | b216fc5b583050cfb1cdf9bd82ec3c1bd2e09d70 (patch) | |
tree | eab1bebbba923457c2a57da3db0615514487da9f /sw | |
parent | bb303e79091f07c7a5b553a4be63fa0034ba2b9c (diff) |
tdf#118701 DOCX import: fix image position on page break
If an image anchored to an empty paragraph only with
section properties, don't remove that paragraph to keep
the image on the page before the page break.
IsLastParaEmpty() tries to move a text cursor over the
empty paragraph marked for deletion. If it contains an
image anchored as a character, the cursor won't reach
the end of the previous paragraph by goLeft(2).
Co-authored-by: Attila Bánhegyi (NISZ)
Change-Id: Ic22c7553948eb06739232d7e35fc49ad14f96518
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97518
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf118701.docx | bin | 0 -> 25229 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport15.cxx | 5 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118701.docx b/sw/qa/extras/ooxmlexport/data/tdf118701.docx Binary files differnew file mode 100644 index 000000000000..654a22709919 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf118701.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx index 9c1fb2c02edf..67e9a9555b24 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx @@ -33,6 +33,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf133334_followPgStyle, "tdf133334_followPgStyle.o CPPUNIT_ASSERT_EQUAL(2, getPages()); } +DECLARE_OOXMLIMPORT_TEST(testTdf118701, "tdf118701.docx") +{ + CPPUNIT_ASSERT_EQUAL_MESSAGE("At least one paragraph is missing from the file!", 3, getParagraphs()); +} + DECLARE_OOXMLEXPORT_TEST(testTdf133370_columnBreak, "tdf133370_columnBreak.odt") { // Since non-DOCX formats ignores column breaks in non-column situations, don't export to docx. |