summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorAttila Szűcs <szucs.attila3@nisz.hu>2020-09-14 14:16:27 +0200
committerLászló Németh <nemeth@numbertext.org>2020-09-18 13:47:29 +0200
commit25302321097afbde034196f1b6b00892fafbee1b (patch)
tree78d6f801f29c66b466e58284b93336405b0d557e /sw/qa/extras
parent8de58b6fd63302544affb90df347323b82b7d259 (diff)
tdf#135035 DOCX import: fix auto width of frame in column
In compatibility mode FRAME_AUTOWIDTH_WITH_MORE_PARA no frames should be wider as the column it is anchored to, if the frame width is set to automatic. If there is a paragraph in the frame, that is longer then the parent width of frame, then the frame width will be set to the same size as its parents width. Co-authored-by: Tibor Nagy (NISZ) Change-Id: Ie5e7e94fd58219eb944ad9163b1ff2c1e7171858 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102671 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/layout/data/tdf135035.docxbin13527 -> 13724 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf135035.odtbin9070 -> 9562 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx4
3 files changed, 4 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf135035.docx b/sw/qa/extras/layout/data/tdf135035.docx
index f314f29d2b8b..acd7b1493899 100644
--- a/sw/qa/extras/layout/data/tdf135035.docx
+++ b/sw/qa/extras/layout/data/tdf135035.docx
Binary files differ
diff --git a/sw/qa/extras/layout/data/tdf135035.odt b/sw/qa/extras/layout/data/tdf135035.odt
index 479dab14c937..bf84ec4457ee 100644
--- a/sw/qa/extras/layout/data/tdf135035.odt
+++ b/sw/qa/extras/layout/data/tdf135035.odt
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 008419887c75..5c7bfdab7ab3 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -4425,17 +4425,21 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf135035)
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
sal_Int32 nFly1Width = getXPath(pXmlDoc, "(//fly)[1]/infos/prtBounds", "width").toInt32();
sal_Int32 nFly2Width = getXPath(pXmlDoc, "(//fly)[2]/infos/prtBounds", "width").toInt32();
+ sal_Int32 nFly3Width = getXPath(pXmlDoc, "(//fly)[3]/infos/prtBounds", "width").toInt32();
sal_Int32 nParentWidth = getXPath(pXmlDoc, "(//txt)[1]/infos/prtBounds", "width").toInt32();
CPPUNIT_ASSERT_EQUAL(nParentWidth, nFly2Width);
+ CPPUNIT_ASSERT_EQUAL(nParentWidth, nFly3Width);
CPPUNIT_ASSERT_LESS(nParentWidth / 2, nFly1Width);
createDoc("tdf135035.odt");
pXmlDoc = parseLayoutDump();
nFly1Width = getXPath(pXmlDoc, "(//fly)[1]/infos/prtBounds", "width").toInt32();
nFly2Width = getXPath(pXmlDoc, "(//fly)[2]/infos/prtBounds", "width").toInt32();
+ nFly3Width = getXPath(pXmlDoc, "(//fly)[3]/infos/prtBounds", "width").toInt32();
nParentWidth = getXPath(pXmlDoc, "(//txt)[1]/infos/prtBounds", "width").toInt32();
CPPUNIT_ASSERT_LESS(nParentWidth / 2, nFly2Width);
CPPUNIT_ASSERT_LESS(nParentWidth / 2, nFly1Width);
+ CPPUNIT_ASSERT_GREATER(nParentWidth, nFly3Width);
}
CPPUNIT_PLUGIN_IMPLEMENT();