diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-09-17 17:08:02 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-10-09 12:10:59 +0200 |
commit | f9c43356d7492d1c7a9d267f47d10e123fe4fe37 (patch) | |
tree | bdedcb85aca7fc68819df53bd9394cbe39ff0ddc /sw/qa | |
parent | f9ad3ce992f9d9d29384612759cb3f4533dbe134 (diff) |
Related: tdf#124600 sw textbox: sync left/right margin of shape to textbox
Writer TextFrames have a default left/right margin; sync from shape to
textbox is needed to have correct layout when a DOCX shape has 0 left or
right margin.
The left margin of the shape was already correct.
(The shape in the docx file was extended to have text.)
(cherry picked from commit ff5f02b9282e19a2a8a68604c588e9487021b0b5)
Change-Id: I832f1bc460f2553bd7f08252d3e21000b4906538
Reviewed-on: https://gerrit.libreoffice.org/80109
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 74fc3dd94adeaac750e4cea08281d912dc5a11ee)
Reviewed-on: https://gerrit.libreoffice.org/80439
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf124600.docx | bin | 15667 -> 15746 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf124600.docx b/sw/qa/extras/ooxmlimport/data/tdf124600.docx Binary files differindex d5dfa313665e..16c4ceb2be5d 100644 --- a/sw/qa/extras/ooxmlimport/data/tdf124600.docx +++ b/sw/qa/extras/ooxmlimport/data/tdf124600.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index a186e34db0f1..008e68839896 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -112,6 +112,17 @@ DECLARE_OOXMLIMPORT_TEST(testTdf124600, "tdf124600.docx") // i.e. the shape had an unexpected left margin, but not in Word. CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(xShape, "HoriOrientPosition")); + + // Make sure that "Shape 1 text" (anchored in the header) has the same left margin as the body + // text. + OUString aShapeTextLeft = parseDump("/root/page/header/txt/anchored/fly/infos/bounds", "left"); + OUString aBodyTextLeft = parseDump("/root/page/body/txt/infos/bounds", "left"); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 1701 + // - Actual : 1815 + // i.e. there was a >0 left margin on the text of the shape, resulting in incorrect horizontal + // position. + CPPUNIT_ASSERT_EQUAL(aBodyTextLeft, aShapeTextLeft); } DECLARE_OOXMLIMPORT_TEST(testTdf120548, "tdf120548.docx") |