sc/CppunitTest_sc_bugfix_test.mk | 2 ++ sc/CppunitTest_sc_filters_test.mk | 2 ++ sc/qa/unit/bugfix-test.cxx | 6 ++---- sc/qa/unit/filters-test.cxx | 24 ++++++++++++------------ sc/qa/unit/helper/qahelper.cxx | 2 +- sc/qa/unit/helper/qahelper.hxx | 2 +- 6 files changed, 20 insertions(+), 18 deletions(-)
New commits: commit 1115281560a7e204386c21fe78b8c84ce42b2017 Author: David Tardon <dtar...@redhat.com> Date: Wed Nov 9 16:26:56 2016 +0100 make MS Excel 2003 XML filter tests great again! Change-Id: Ica8a5a2f6046eabf4fa8081db0aa50ade23b5b3a diff --git a/sc/CppunitTest_sc_bugfix_test.mk b/sc/CppunitTest_sc_bugfix_test.mk index 8d07cf1..d6af092 100644 --- a/sc/CppunitTest_sc_bugfix_test.mk +++ b/sc/CppunitTest_sc_bugfix_test.mk @@ -77,6 +77,8 @@ $(eval $(call gb_CppunitTest_use_components,sc_bugfix_test,\ embeddedobj/util/embobj \ eventattacher/source/evtatt \ filter/source/config/cache/filterconfig1 \ + filter/source/xmlfilteradaptor/xmlfa \ + filter/source/xsltfilter/xsltfilter \ forms/util/frm \ framework/util/fwk \ i18npool/source/search/i18nsearch \ diff --git a/sc/CppunitTest_sc_filters_test.mk b/sc/CppunitTest_sc_filters_test.mk index 4d46b68..012da5f 100644 --- a/sc/CppunitTest_sc_filters_test.mk +++ b/sc/CppunitTest_sc_filters_test.mk @@ -80,6 +80,8 @@ $(eval $(call gb_CppunitTest_use_components,sc_filters_test,\ embeddedobj/util/embobj \ eventattacher/source/evtatt \ filter/source/config/cache/filterconfig1 \ + filter/source/xmlfilteradaptor/xmlfa \ + filter/source/xsltfilter/xsltfilter \ forms/util/frm \ framework/util/fwk \ i18npool/util/i18npool \ diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx index aedcea6..692e2a8 100644 --- a/sc/qa/unit/bugfix-test.cxx +++ b/sc/qa/unit/bugfix-test.cxx @@ -89,7 +89,7 @@ public: void testTdf98657(); void testTdf88821(); void testTdf88821_2(); - // void testRhbz1390776(); + void testRhbz1390776(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testTdf64229); @@ -101,7 +101,7 @@ public: CPPUNIT_TEST(testTdf98657); CPPUNIT_TEST(testTdf88821); CPPUNIT_TEST(testTdf88821_2); - // CPPUNIT_TEST(testRhbz1390776); + CPPUNIT_TEST(testRhbz1390776); CPPUNIT_TEST_SUITE_END(); private: uno::Reference<uno::XInterface> m_xCalcComponent; @@ -271,7 +271,6 @@ void ScFiltersTest::testTdf88821_2() xDocSh->DoClose(); } -#if 0 void ScFiltersTest::testRhbz1390776() { ScDocShellRef xDocSh = loadDoc("rhbz1390776.", FORMAT_XLS_XML); @@ -281,7 +280,6 @@ void ScFiltersTest::testRhbz1390776() xDocSh->DoClose(); } -#endif ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "/sc/qa/unit/data" ) diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index f383c68..ff0b8f4 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -73,7 +73,7 @@ public: void testContentLotus123(); void testContentDIF(); void testContentXLSB(); - //void testContentXLS_XML(); + void testContentXLS_XML(); void testSharedFormulaXLS(); void testSharedFormulaXLSX(); void testSheetNamesXLSX(); @@ -95,7 +95,7 @@ public: CPPUNIT_TEST(testContentLotus123); CPPUNIT_TEST(testContentDIF); CPPUNIT_TEST(testContentXLSB); - //CPPUNIT_TEST(testContentXLS_XML); + CPPUNIT_TEST(testContentXLS_XML); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testSharedFormulaXLSX); CPPUNIT_TEST(testSheetNamesXLSX); @@ -230,7 +230,7 @@ void testContentImpl(ScDocument& rDoc, sal_Int32 nFormat ) //same code for ods, ASSERT_DOUBLES_EQUAL_MESSAGE("=C1+C2", 11.0, fValue); //check merged cells import - if (nFormat != FORMAT_LOTUS123 && nFormat != FORMAT_DIF) + if (nFormat != FORMAT_LOTUS123 && nFormat != FORMAT_DIF && nFormat != FORMAT_XLS_XML) { SCCOL nCol = 4; SCROW nRow = 1; @@ -317,15 +317,15 @@ void ScFiltersTest::testContentXLSB() xDocSh->DoClose(); } -// void ScFiltersTest::testContentXLS_XML() -// { -// ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_XLS_XML); -// CPPUNIT_ASSERT(xDocSh); -// -// ScDocument& rDoc = xDocSh->GetDocument(); -// testContentImpl(pDoc, FORMAT_XLS_XML); -// xDocSh->DoClose(); -// } +void ScFiltersTest::testContentXLS_XML() +{ + ScDocShellRef xDocSh = loadDoc("universal-content.", FORMAT_XLS_XML); + CPPUNIT_ASSERT(xDocSh.Is()); + + ScDocument& rDoc = xDocSh->GetDocument(); + testContentImpl(rDoc, FORMAT_XLS_XML); + xDocSh->DoClose(); +} void ScFiltersTest::testSharedFormulaXLS() { diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx index ac7a0e3..061b7b5 100644 --- a/sc/qa/unit/helper/qahelper.hxx +++ b/sc/qa/unit/helper/qahelper.hxx @@ -49,7 +49,7 @@ #define CSV_FORMAT_TYPE (SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::ALIEN ) #define HTML_FORMAT_TYPE (SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::ALIEN ) #define DIF_FORMAT_TYPE (SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::ALIEN ) -#define XLS_XML_FORMAT_TYPE (SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::ALIEN) +#define XLS_XML_FORMAT_TYPE (SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::ALIEN | SfxFilterFlags::STARONEFILTER) #define XLSB_XML_FORMAT_TYPE (SfxFilterFlags::IMPORT | SfxFilterFlags::ALIEN | SfxFilterFlags::STARONEFILTER | SfxFilterFlags::PREFERED) #define FODS_FORMAT_TYPE (SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::OWN | SfxFilterFlags::STARONEFILTER ) commit 4017f59303d2e99ac0c9a79b0a5b45091ffff2e6 Author: David Tardon <dtar...@redhat.com> Date: Wed Nov 9 15:46:57 2016 +0100 fix typo Change-Id: I2ad83dec1e409cd7b12009c31fbe4cc9d73223c1 diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 32f2375..3e1b4e5 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -543,7 +543,7 @@ ScDocShellRef ScBootstrapFixture::load( bool bReadWrite, std::shared_ptr<const SfxFilter> pFilter(new SfxFilter( rFilter, OUString(), nFilterFlags, nClipboardID, rTypeName, 0, OUString(), - rUserData, OUString("private:factory/scalc*"))); + rUserData, OUString("private:factory/scalc"))); const_cast<SfxFilter*>(pFilter.get())->SetVersion(nFilterVersion); ScDocShellRef xDocShRef = new ScDocShell; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits