summaryrefslogtreecommitdiff
path: root/sc/qa/unit
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-11-09 16:26:56 +0100
committerDavid Tardon <dtardon@redhat.com>2016-11-09 17:46:27 +0100
commit1115281560a7e204386c21fe78b8c84ce42b2017 (patch)
tree3f652262ee38732e42f2f13dea38866feda61d7e /sc/qa/unit
parent4017f59303d2e99ac0c9a79b0a5b45091ffff2e6 (diff)
make MS Excel 2003 XML filter tests great again!
Change-Id: Ica8a5a2f6046eabf4fa8081db0aa50ade23b5b3a
Diffstat (limited to 'sc/qa/unit')
-rw-r--r--sc/qa/unit/bugfix-test.cxx6
-rw-r--r--sc/qa/unit/filters-test.cxx24
-rw-r--r--sc/qa/unit/helper/qahelper.hxx2
3 files changed, 15 insertions, 17 deletions
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index aedcea60ce64..692e2a8132a1 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 f383c681e6b3..ff0b8f44c6a2 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 ac7a0e3dec5f..061b7b5a6c80 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 )