diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-06-21 10:31:19 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-06-21 10:43:51 +0200 |
commit | 832612bb6bd013cf68a64e33827158f96e6d03d3 (patch) | |
tree | 4c6c355ffeab41f6c9eab1e3d041a80e90e8c3c3 /sw | |
parent | 76a90e69d15104f76193647050948528caf6ff8d (diff) |
fdo#43641 testcase
Change-Id: I3426c7c23eb23fa7f91320ac036b0eb565bbc330
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/fdo43641.docx | bin | 0 -> 11966 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/fdo43641.docx b/sw/qa/extras/ooxmlimport/data/fdo43641.docx Binary files differnew file mode 100644 index 000000000000..90622f817776 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/fdo43641.docx 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 <bordertest.hxx> #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<sal_Int32>(xStyle, "CharColor")); } +void Test::testFdo43641() +{ + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xGroupShape(xDraws->getByIndex(0), uno::UNO_QUERY); + uno::Reference<drawing::XShape> 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(); |