summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAttila Bakos (NISZ) <bakos.attilakaroly@nisz.hu>2021-02-18 13:42:00 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-03-01 12:58:04 +0100
commit2b20826a6a5d06a9e47c90918375a40465567716 (patch)
tree845475ddbffceb671b6ae2fc5b211bf298618db7 /sw
parent4bf14305dfa22a3e4084b630b6924a718d7da3ce (diff)
tdf#136570 OOXML import: fix height of OLE objects
e.g. OLE icons or math formulas by skipping unset border properties. Regression from 636d16efe45a55c1a5a7a451c46fbb8618bf0393 (tdf#135653 OOXML import: fix OLE background color). Change-Id: I64bd68037d063de81fbb302b90d65b77af50a622 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111119 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit ca7855c24af858f52a11a593761ee9e6b9d6ba79) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111581 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/extras/layout/data/tdf138465min.docxbin0 -> 19431 bytes
-rw-r--r--sw/qa/extras/layout/layout2.cxx16
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf138465min.docx b/sw/qa/extras/layout/data/tdf138465min.docx
new file mode 100755
index 000000000000..d576a54f281f
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf138465min.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index 46ce68a04572..ff07375bfabb 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -488,6 +488,22 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf126425)
assertXPath(pXmlDoc, "//textarray", 14);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testUnusedOLEprops)
+{
+ CPPUNIT_ASSERT(createDoc("tdf138465min.docx"));
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ CPPUNIT_ASSERT(pXmlDoc);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: >300
+ // - Actual : 142
+ // i.e. the formula squashed
+ CPPUNIT_ASSERT_GREATEREQUAL(
+ double(300),
+ getXPath(pXmlDoc, "/root/page/body/txt[2]/anchored/fly/notxt/infos/bounds", "height")
+ .toDouble());
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf123268)
{
SwDoc* pDoc = createDoc("tdf123268.odt");