diff options
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/rtfimport/data/fdo52989.rtf | 12 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 11 |
2 files changed, 23 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo52989.rtf b/sw/qa/extras/rtfimport/data/fdo52989.rtf new file mode 100644 index 000000000000..513f868e0c5c --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo52989.rtf @@ -0,0 +1,12 @@ +{\rtf1 +{\*\shppict +{\pict\picw1\pich2\jpegblip +89504e470d0a1a0a0000000d4948445200000010000000100802000000909168360000015049444154789c9592c14a02511486bf99714ccb322d7521140541cb +6a11448b164150fb8a363d41f4083d40cba0655044d0a637a837682fd1a6a2488b10b23475bcb77b671c491dc1cee23077e67cf7fcff39139252f29f08b59e3e +1dae8b4c45998ff501a82e070f5cbd3366733acb5c6fa609fc0872651236df0deeca7d002a6cc33d1b941a146ab49ca937e37610e0c590c5c92b67f926a07243 +b293613f8b1108a8a84aadb01575c9799edd0c895010a0ae71048e77b99b6a92e53861a387a48a6033c5d208c297a43ca8a3697601d217b010632dd9a9f34be0 +9968021698bea4c76ab72f5dd0d6216c3211e1bec2a0c5e59bce9303baa770c7bd38aca7d729692bcd4d512b53bb3b7cc2f45dd604ab098e67b499366025ce5e +96a317fd2162e2d76bbbb725bdcd80b12a603aca4581e7aade97e14ec2916ca719ed96e4c54692f5241f755de7019641eacfaff10b469261dc6a800dd30000000049454e44ae426082 +} +} +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 4da71c68b5e3..b0e3ab364673 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -122,6 +122,7 @@ public: void testLeftmarginDefault(); void testDppolyline(); void testFdo56512(); + void testFdo52989(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -195,6 +196,7 @@ void Test::run() {"leftmargin-default.rtf", &Test::testLeftmarginDefault}, {"dppolyline.rtf", &Test::testDppolyline}, {"fdo56512.rtf", &Test::testFdo56512}, + {"fdo52989.rtf", &Test::testFdo52989}, }; for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) { @@ -895,6 +897,15 @@ void Test::testFdo56512() CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange->getString()); } +void Test::testFdo52989() +{ + // Same as n#192129, but for JPEG files. + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference<drawing::XShape> xShape(xDraws->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(423), xShape->getSize().Width); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |