summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-03-25 17:38:20 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-03-26 11:14:58 +0100
commit11d344f6271e4171f8006c2cb29372f612cbdc00 (patch)
treed85f1699c24abe7537d019eb3df0ec36d4065fcc /sw
parent9436ab24a7d08540a7c192df86956d53673c9a08 (diff)
tdf#122717: fix handling of zero width/height lines
The code was introduced in 627c2469843c9461b665c4571f1214aca7fc36a4 < tdf#96674 drawingML import: fix handling of zero width/height lines > and later on removed by 36bade04d3780bc54c51b46bb0b63e69789658a5 < tdf106792 Get rid of SvxShapePolyPolygonBezier > with the comment "I doubt that the additional code to make a line not exactly hor/ver is needed. Checked and it is not needed, thus removed the change from tdf#96674 in shape.cxx." it turned out, it's still needed Change-Id: Ib64ee17227e3e588e94381abeabe5a2ff2e0b7d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113102 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 3e4eb070787d4d44b3bdc95046e5b231dbbef42b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113119 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf122717.docxbin0 -> 4940 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx13
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf122717.docx b/sw/qa/extras/ooxmlimport/data/tdf122717.docx
new file mode 100644
index 000000000000..9a2098272c75
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf122717.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 2a267e5fb6ed..49713ada5e8b 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1413,6 +1413,19 @@ DECLARE_OOXMLIMPORT_TEST(testTdf96674, "tdf96674.docx")
CPPUNIT_ASSERT(aActualSize.Height > 0);
}
+DECLARE_OOXMLIMPORT_TEST(testTdf122717, "tdf122717.docx")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ CPPUNIT_ASSERT(xShape.is());
+ awt::Size aActualSize(xShape->getSize());
+ // Without the fix in place, this test would have failed with
+ // - Expected: 2
+ // - Actual : 8160
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aActualSize.Width);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8160), aActualSize.Height);
+
+}
+
DECLARE_OOXMLIMPORT_TEST(testTdf98882, "tdf98882.docx")
{
sal_Int32 nFlyHeight = parseDump("//fly/infos/bounds", "height").toInt32();