diff options
author | Daniel Arato (NISZ) <arato.daniel@nisz.hu> | 2021-09-27 12:49:57 +0200 |
---|---|---|
committer | Balazs Varga <varga.balazs3@nisz.hu> | 2021-10-01 12:30:52 +0200 |
commit | 8da3586cff9cc11cf5db985d19851f21f0d42eb8 (patch) | |
tree | 33ff78393fc23c0c1fd54227ee44c1b747d37eed /sw/qa | |
parent | 732b3fd5bdf17f09b5f9304b470b741e5483eab1 (diff) |
tdf#141220 sw: fix textbox popped out of off-page shape
When you moved it downwards off the page it was anchored to,
the textbox inside a shape used to appear exactly one page above
the shape it was supposed to follow. This is hopefully fixed by
the present commit.
Regression from c9eb53f200225f2ee6ca695e1326843a487aee51
(tdf#135198 sw editing: text box fell out of its shape).
Change-Id: Ib388292ca26444daa1900417347824059ee03f07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122687
Reviewed-by: László Németh <nemeth@numbertext.org>
Reviewed-by: Balazs Varga <varga.balazs3@nisz.hu>
Tested-by: Balazs Varga <varga.balazs3@nisz.hu>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/layout/data/tdf141220.docx | bin | 0 -> 10459 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout2.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf141220.docx b/sw/qa/extras/layout/data/tdf141220.docx Binary files differnew file mode 100644 index 000000000000..a65bdd4b8a51 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf141220.docx diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 91cb32016942..8c2624b1a389 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -1419,6 +1419,18 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf127118) assertXPath(pXmlDoc, "/root/page[2]/body/tab/row[1]/cell[1]/txt[1]", "WritingMode", "VertBTLR"); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf141220) +{ + createSwDoc(DATA_DIRECTORY, "tdf141220.docx"); + + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + sal_Int32 nShapeTop + = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject/bounds", "top").toInt32(); + sal_Int32 nTextBoxTop = getXPath(pXmlDoc, "//anchored/fly/infos/bounds", "top").toInt32(); + // Make sure the textbox stays inside the shape. + CPPUNIT_ASSERT_LESS(static_cast<sal_Int32>(15), nTextBoxTop - nShapeTop); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf121509) { auto pDoc = createSwDoc(DATA_DIRECTORY, "Tdf121509.odt"); |