diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-05-06 21:33:59 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-05-10 12:47:44 +0200 |
commit | da5f9c68a253f28e9c0149e61b5662191a658af2 (patch) | |
tree | 611ef3e24eee83d6b346f680a86548a48c10640e /sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | |
parent | 6670ae80580a5f80d6042b7f9d49308862472c90 (diff) |
tdf#124594 DOCX filter: don't extend margins from effects for rotated shapes
Regression from commit a5a836d8c43dc9cebbbf8af39bf0142de603a7c6 (DOCX
filter: effect extent should be part of the margin, 2014-12-04), the
problem was that extending margins as-is based on the effect extent
values only work correctly in case of non-rotated shapes.
For example, with 90 degree clockwise rotation the top effect extent
should extend the right margin, etc. Fix the bug by limiting this
extension to the non-rotated scenario.
Test the behavior at a layout level, so in case later the effect extent
feature is implemented, it won't be necessary to adjust the test.
(cherry picked from commit 65420c21194a28aeead0238838028b734b663d87)
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
Change-Id: I97271bbb7c079951980b436cb8d8e5e54eeead55
Reviewed-on: https://gerrit.libreoffice.org/71893
Tested-by: Jenkins
Tested-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport13.cxx')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index b8e6324b97ce..e610254b3b83 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -70,6 +70,16 @@ DECLARE_OOXMLEXPORT_TEST(testFrameSizeExport, "floating-tables-anchor.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tblPr/w:tblW", "w", "4000"); } +DECLARE_OOXMLEXPORT_TEST(testTdf124594, "tdf124594.docx") +{ + xmlDocPtr pDump = parseLayoutDump(); + // Without the accompanying fix in place, this test would have failed, as the portion text was + // only "Er horte leise Schritte hinter", which means the 1st line of the 2nd paragraph was + // split into two by a Special portion, i.e. the top margin of the shape was too large. + assertXPath(pDump, "/root/page/body/txt[2]/Text[1]", "Portion", + "Er horte leise Schritte hinter sich. Das bedeutete nichts Gutes. Wer wurde ihm "); +} + DECLARE_OOXMLEXPORT_TEST(testTextInput, "textinput.odt") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); |