summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport/rtfimport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 997e33db4c0e..28517ee7dad1 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -109,6 +109,7 @@ public:
void testFdo52389();
void testFdo49655();
void testFdo52475();
+ void testFdo55493();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -161,6 +162,7 @@ public:
CPPUNIT_TEST(testFdo52389);
CPPUNIT_TEST(testFdo49655);
CPPUNIT_TEST(testFdo52475);
+ CPPUNIT_TEST(testFdo55493);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -852,6 +854,16 @@ void Test::testFdo52475()
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(getRun(getParagraph(1), 3), "CharBackColor"));
}
+void Test::testFdo55493()
+{
+ // The problem was that the width of the PNG was detected as 15,24cm, instead of 3.97cm
+ load("fdo55493.rtf");
+ 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(3969), xShape->getSize().Width);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();