summaryrefslogtreecommitdiff
path: root/sc/qa/unit
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/unit')
-rw-r--r--sc/qa/unit/data/ods/basic-cell-content.odsbin0 -> 10041 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx18
2 files changed, 18 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/basic-cell-content.ods b/sc/qa/unit/data/ods/basic-cell-content.ods
new file mode 100644
index 000000000000..70f6b6e82746
--- /dev/null
+++ b/sc/qa/unit/data/ods/basic-cell-content.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 16db9547eb10..748922f6940c 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -95,6 +95,7 @@ public:
virtual void tearDown();
//ods, xls, xlsx filter tests
+ void testBasicCellContentODS();
void testRangeNameXLS();
void testRangeNameXLSX();
void testHardRecalcODS();
@@ -151,6 +152,7 @@ public:
void testOptimalHeightReset();
CPPUNIT_TEST_SUITE(ScFiltersTest);
+ CPPUNIT_TEST(testBasicCellContentODS);
CPPUNIT_TEST(testRangeNameXLS);
CPPUNIT_TEST(testRangeNameXLSX);
CPPUNIT_TEST(testHardRecalcODS);
@@ -266,6 +268,22 @@ void testRangeNameImpl(ScDocument* pDoc)
}
+void ScFiltersTest::testBasicCellContentODS()
+{
+ ScDocShellRef xDocSh = loadDoc("basic-cell-content.", ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to load basic-cell-content.ods", xDocSh.Is());
+
+ ScDocument* pDoc = xDocSh->GetDocument();
+ OUString aStr = pDoc->GetString(1, 1, 0); // B2
+ CPPUNIT_ASSERT_EQUAL(OUString("LibreOffice Calc"), aStr);
+ double fVal = pDoc->GetValue(1, 2, 0); // B3
+ CPPUNIT_ASSERT_EQUAL(12345.0, fVal);
+ aStr = pDoc->GetString(1, 3, 0); // B4
+ CPPUNIT_ASSERT_EQUAL(OUString("A < B"), aStr);
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest::testRangeNameXLS()
{
ScDocShellRef xDocSh = loadDoc("named-ranges-global.", XLS);