diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-11-30 17:15:35 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-11-30 17:25:15 +0100 |
commit | 7baca04727fbd3297c6e4b9815bf2a4695175e2e (patch) | |
tree | 83b7b687d5feee4ef88e109f9ece36d8c38b41ac /sw | |
parent | 8063e36115a11ddf3db05928db9287947beee74d (diff) |
fdo#57708 testcase
Change-Id: I5064cb9bb9700483eac4d56a56e671a392e82f73
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/fdo57708.rtf | 8 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo57708.rtf b/sw/qa/extras/rtfimport/data/fdo57708.rtf new file mode 100644 index 000000000000..54a757925eab --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo57708.rtf @@ -0,0 +1,8 @@ +{\rtf1\ansi\ansicpg1250\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset238 Metrostyle Extended;}}{\colortbl;\red0\green0\blue0;}{\info{\title }{\author Crystal Reports}{\doccomm Powered By Crystal}{\company Crystal Decisions}}{\*\userprops {\propname Business Objects Context Information}\proptype30{\staticval 01734361CD07C3C85B968AA4B2781C480C308DEB5E1F83247788228D3179576779474C0EDA07FA11789515F5C58418E566CFBE6A992AA227B056A18BF687A22CF4C7A2A60E137F6E64ADB5B69ED3464CA2298397B1C63A46E7CA415DF52DCCA4B3EE086B2778F5C67ADA7979DE0AB40BE865BD20C51228AC3938C7268BEB053}{\propname Business Objects Context Information1}\proptype30{\staticval 196223CE7A2CA417EF871437DC7F0AFC626}}
+\paperw11904\paperh16834\margl1416\margr849\margt849\margb849\gutter0\windowctrl\ftnbj\viewkind1\viewscale100\sectd\linex0\sbknone
+\sect {\shp{\*\shpinst\shpleft1416\shptop879\shpright2719\shpbottom2138\shpfhdr0\shpbxpage\shpbypage\shpwr3\shpwrk0\shpfblwtxt1{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fBehindDocument}{\sv 1}}{\sp{\sn fLockAspectRatio}{\sv 0}}{\sp{\sn fPreferRelativeResize}{\sv 0}}{\sp{\sn pib}{\sv {\pict\wmetafile6\picw1303\pich1259\picwgoal1303\pichgoal1259\picscalex100\picscaley100 89504e470d0a1a0a0000000d4948445200000010000000100802000000909168360000015049444154789c9592c14a02511486bf99714ccb322d7521140541cb
+6a11448b164150fb8a363d41f4083d40cba0655044d0a637a837682fd1a6a2488b10b23475bcb77b671c491dc1cee23077e67cf7fcff39139252f29f08b59e3e
+1dae8b4c45998ff501a82e070f5cbd3366733acb5c6fa609fc0872651236df0deeca7d002a6cc33d1b941a146ab49ca937e37610e0c590c5c92b67f926a07243
+b293613f8b1108a8a84aadb01575c9799edd0c895010a0ae71048e77b99b6a92e53861a387a48a6033c5d208c297a43ca8a3697601d217b010632dd9a9f34be0
+9968021698bea4c76ab72f5dd0d6216c3211e1bec2a0c5e59bce9303baa770c7bd38aca7d729692bcd4d512b53bb3b7cc2f45dd604ab098e67b499366025ce5e
+96a317fd2162e2d76bbbb725bdcd80b12a603aca4581e7aade97e14ec2916ca719ed96e4c54692f5241f755de7019641eacfaff10b469261dc6a800dd30000000049454e44ae426082}}}}}{\pard \pvpg\phpg\posx2969\posy1070\absw7935\absh-423\qc\vertalt\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920{\ltrch\f0 \b\i0\ul0\strike0\fs35 \cf1 PM1 TEST\par}}}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index a201c36f30c6..7853fc35190f 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -126,6 +126,7 @@ public: void testFdo52989(); void testFdo48442(); void testFdo55525(); + void testFdo57708(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -202,6 +203,7 @@ void Test::run() {"fdo52989.rtf", &Test::testFdo52989}, {"fdo48442.rtf", &Test::testFdo48442}, {"fdo55525.rtf", &Test::testFdo55525}, + {"fdo57708.rtf", &Test::testFdo57708}, }; for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) { @@ -929,6 +931,16 @@ void Test::testFdo55525() CPPUNIT_ASSERT_EQUAL(sal_Int16(1016), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position); } +void Test::testFdo57708() +{ + // There were two issues: the doc was of 2 pages and the picture was missing. + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + // Two objects: a picture and a textframe. + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xDraws->getCount()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |