From 832612bb6bd013cf68a64e33827158f96e6d03d3 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 21 Jun 2013 10:31:19 +0200 Subject: fdo#43641 testcase Change-Id: I3426c7c23eb23fa7f91320ac036b0eb565bbc330 --- sw/qa/extras/ooxmlimport/data/fdo43641.docx | Bin 0 -> 11966 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 sw/qa/extras/ooxmlimport/data/fdo43641.docx (limited to 'sw') diff --git a/sw/qa/extras/ooxmlimport/data/fdo43641.docx b/sw/qa/extras/ooxmlimport/data/fdo43641.docx new file mode 100644 index 000000000000..90622f817776 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/fdo43641.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 676fbbbf8d2d..4f23d926686c 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -43,6 +43,7 @@ #include #define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L)) +#define EMU_TO_MM100(EMU) (EMU / 360) class Test : public SwModelTestBase { @@ -119,6 +120,7 @@ public: void testN820509(); void testN820788(); void testN820504(); + void testFdo43641(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -205,6 +207,7 @@ void Test::run() {"n820509.docx", &Test::testN820509}, {"n820788.docx", &Test::testN820788}, {"n820504.docx", &Test::testN820504}, + {"fdo43641.docx", &Test::testFdo43641}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1449,6 +1452,16 @@ void Test::testN820504() CPPUNIT_ASSERT_EQUAL(sal_Int32(4040635), getProperty(xStyle, "CharColor")); } +void Test::testFdo43641() +{ + uno::Reference xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference xGroupShape(xDraws->getByIndex(0), uno::UNO_QUERY); + uno::Reference xLine(xGroupShape->getByIndex(1), uno::UNO_QUERY); + // This was 2200, not 2579 in mm100, i.e. the size of the line shape was incorrect. + CPPUNIT_ASSERT_EQUAL(sal_Int32(EMU_TO_MM100(928694)), xLine->getSize().Width); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit