summaryrefslogtreecommitdiff
path: root/sc/qa/unit
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-09-18 18:38:23 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-09-18 18:55:02 +0200
commit73bda3572bea446736662bca1ffd654f0d84a3ae (patch)
treeb2c43afd3eed5c312daf32920968169eabfa5af2 /sc/qa/unit
parentd0014dae70cf3be897e5cb910b298b54b7f4e941 (diff)
add lotus .123 import test
Change-Id: Iadf71abb02f6178fbe64db6ad9377b131e00fae8
Diffstat (limited to 'sc/qa/unit')
-rw-r--r--sc/qa/unit/data/123/universal-content.123bin0 -> 3860 bytes
-rw-r--r--sc/qa/unit/filters-test.cxx21
2 files changed, 19 insertions, 2 deletions
diff --git a/sc/qa/unit/data/123/universal-content.123 b/sc/qa/unit/data/123/universal-content.123
new file mode 100644
index 000000000000..ef74617e895b
--- /dev/null
+++ b/sc/qa/unit/data/123/universal-content.123
Binary files differ
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 68c03172478c..15d5f7b7c88c 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -55,10 +55,12 @@
#define ODS_FORMAT_TYPE 50331943
#define XLS_FORMAT_TYPE 318767171
#define XLSX_FORMAT_TYPE 268959811
+#define LOTUS123_FORMAT_TYPE 268435649
#define ODS 0
#define XLS 1
#define XLSX 2
+#define LOTUS123 3
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -72,7 +74,8 @@ struct FileFormat {
FileFormat aFileFormats[] = {
{ "ods" , "calc8", "", ODS_FORMAT_TYPE },
{ "xls" , "MS Excel 97", "calc_MS_EXCEL_97", XLS_FORMAT_TYPE },
- { "xlsx", "Calc MS Excel 2007 XML" , "MS Excel 2007 XML", XLSX_FORMAT_TYPE }
+ { "xlsx", "Calc MS Excel 2007 XML" , "MS Excel 2007 XML", XLSX_FORMAT_TYPE },
+ { "123" , "Lotus", "calc_Lotus", LOTUS123_FORMAT_TYPE }
};
}
@@ -106,6 +109,7 @@ public:
void testContentODS();
void testContentXLS();
void testContentXLSX();
+ void testContentLotus123();
#if TEST_BUG_FILES
//goes recursively through all files in this dir and tries to open them
@@ -122,6 +126,7 @@ public:
CPPUNIT_TEST(testContentODS);
CPPUNIT_TEST(testContentXLS);
CPPUNIT_TEST(testContentXLSX);
+ CPPUNIT_TEST(testContentLotus123);
#if TEST_BUG_FILES
CPPUNIT_TEST(testBugFiles);
@@ -319,7 +324,7 @@ void ScFiltersTest::testRangeNameODS()
namespace {
-void testContentImpl(ScDocument* pDoc) //same code for ods, xls, xlsx
+void testContentImpl(ScDocument* pDoc ) //same code for ods, xls, xlsx
{
double fValue;
//check value import
@@ -390,6 +395,18 @@ void ScFiltersTest::testContentXLSX()
xDocSh->DoClose();
}
+void ScFiltersTest::testContentLotus123()
+{
+ const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("universal-content."));
+ ScDocShellRef xDocSh = loadDoc(aFileNameBase, 3);
+ xDocSh->DoHardRecalc(true);
+
+ ScDocument* pDoc = xDocSh->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+ //testContentImpl(pDoc);
+ xDocSh->DoClose();
+}
+
ScFiltersTest::ScFiltersTest()
: m_aBaseString(RTL_CONSTASCII_USTRINGPARAM("/sc/qa/unit/data"))
{