diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-02-18 14:33:55 +0100 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-02-18 17:32:44 +0100 |
commit | 8e285728e634b8a2dafcfe87cd1fa7810791df5e (patch) | |
tree | 8c8860dbfee3dd7981ef5a0dc1a290d27385292c /sw | |
parent | c9b1fd63452325ee5cb6d003e9fc8315d1ca104e (diff) |
ooxml unit tests: merge two tests
Change-Id: Ie37ec829ddeeaeb8882c1a566cc80419edcfa170
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 11 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/dml-shape-fillbitmapcrop.docx | bin | 33037 -> 0 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 23 |
3 files changed, 5 insertions, 29 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index a588ce0dee70..fd304c00a2c3 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -110,8 +110,7 @@ protected: "math-mso2k7.docx", "ImageCrop.docx", "test_GIF_ImageCrop.docx", - "test_PNG_ImageCrop.docx", - "dml-shape-fillbitmapcrop.docx" + "test_PNG_ImageCrop.docx" }; std::vector<const char*> vBlacklist(aBlacklist, aBlacklist + SAL_N_ELEMENTS(aBlacklist)); @@ -2991,10 +2990,10 @@ DECLARE_OOXMLEXPORT_TEST(testDMLShapeFillBitmapCrop, "dml-shape-fillbitmapcrop.d // 1st shape has some cropping text::GraphicCrop aGraphicCropStruct = getProperty<text::GraphicCrop>(getShape(1), "GraphicCrop"); - CPPUNIT_ASSERT_EQUAL( sal_Int32( 454 ), aGraphicCropStruct.Left ); - CPPUNIT_ASSERT_EQUAL( sal_Int32( 367 ), aGraphicCropStruct.Right ); - CPPUNIT_ASSERT_EQUAL( sal_Int32( -454 ), aGraphicCropStruct.Top ); - CPPUNIT_ASSERT_EQUAL( sal_Int32( -367 ), aGraphicCropStruct.Bottom ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(m_bExported ? 454 : 455 ), aGraphicCropStruct.Left ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(m_bExported ? 367 : 368 ), aGraphicCropStruct.Right ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(m_bExported ? -454 : -455 ), aGraphicCropStruct.Top ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(m_bExported ? -367 : -368 ), aGraphicCropStruct.Bottom ); // 2nd shape has no cropping aGraphicCropStruct = getProperty<text::GraphicCrop>(getShape(2), "GraphicCrop"); diff --git a/sw/qa/extras/ooxmlimport/data/dml-shape-fillbitmapcrop.docx b/sw/qa/extras/ooxmlimport/data/dml-shape-fillbitmapcrop.docx Binary files differdeleted file mode 100644 index 6c401bae9399..000000000000 --- a/sw/qa/extras/ooxmlimport/data/dml-shape-fillbitmapcrop.docx +++ /dev/null diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 7d9e4f523135..f264f0c92dcf 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1817,29 +1817,6 @@ DECLARE_OOXMLIMPORT_TEST(testDMLGroupShapeParaAdjust, "dml-groupshape-paraadjust CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), getProperty<sal_Int16>(getRun(getParagraphOfText(7, xText), 1), "ParaAdjust")); } -DECLARE_OOXMLIMPORT_TEST(testDMLShapeFillBitmapCrop, "dml-shape-fillbitmapcrop.docx") -{ - // The same test can be found in ooxmlexport, but some rouding made on crop values so we can't test import and - // export with the same values. - - // 1st shape has some cropping - text::GraphicCrop aGraphicCropStruct = getProperty<text::GraphicCrop>(getShape(1), "GraphicCrop"); - - CPPUNIT_ASSERT_EQUAL( sal_Int32( 455 ), aGraphicCropStruct.Left ); - CPPUNIT_ASSERT_EQUAL( sal_Int32( 368 ), aGraphicCropStruct.Right ); - CPPUNIT_ASSERT_EQUAL( sal_Int32( -455 ), aGraphicCropStruct.Top ); - CPPUNIT_ASSERT_EQUAL( sal_Int32( -368 ), aGraphicCropStruct.Bottom ); - - // 2nd shape has no cropping - aGraphicCropStruct = getProperty<text::GraphicCrop>(getShape(2), "GraphicCrop"); - - CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), aGraphicCropStruct.Left ); - CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), aGraphicCropStruct.Right ); - CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), aGraphicCropStruct.Top ); - CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), aGraphicCropStruct.Bottom ); - -} - DECLARE_OOXMLIMPORT_TEST(testPictureWithSchemeColor, "picture-with-schemecolor.docx") { // At the start of the document, a picture which has a color specified with a color scheme, lost |