summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-04-14 16:41:14 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-04-14 17:00:40 -0400
commit2da75ceaca3907694b4021d3d63a63375ce37ac6 (patch)
tree354695f485bb4a35cb5fbac92d287a8324725d61
parent981590d1cf89bb07864ec62bfebdc03c61bd475b (diff)
fdo#76294: Write import test for this.
Change-Id: I4d2f98117b783e801916f99fd99e69d43e161e2d
-rw-r--r--sc/qa/unit/data/xls/shared-string/literal-in-formula.xlsbin0 -> 13824 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx16
2 files changed, 16 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/shared-string/literal-in-formula.xls b/sc/qa/unit/data/xls/shared-string/literal-in-formula.xls
new file mode 100644
index 000000000000..75e48f0d03bf
--- /dev/null
+++ b/sc/qa/unit/data/xls/shared-string/literal-in-formula.xls
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 4411d329d930..2ad313d7c075 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -124,6 +124,8 @@ public:
void testNewCondFormatODS();
void testNewCondFormatXLSX();
+ void testLiteralInFormulaXLS();
+
//change this test file only in excel and not in calc
void testCellValueXLSX();
@@ -211,6 +213,7 @@ public:
CPPUNIT_TEST(testColorScaleXLSX);
CPPUNIT_TEST(testNewCondFormatODS);
CPPUNIT_TEST(testNewCondFormatXLSX);
+ CPPUNIT_TEST(testLiteralInFormulaXLS);
CPPUNIT_TEST(testNumberFormatHTML);
CPPUNIT_TEST(testNumberFormatCSV);
@@ -2347,6 +2350,19 @@ void ScFiltersTest::testNewCondFormatXLSX()
xDocSh->DoClose();
}
+void ScFiltersTest::testLiteralInFormulaXLS()
+{
+ ScDocShellRef xDocSh = loadDoc("shared-string/literal-in-formula.", XLS);
+ CPPUNIT_ASSERT(xDocSh.Is());
+
+ ScDocument* pDoc = xDocSh->GetDocument();
+ pDoc->CalcAll();
+
+ CPPUNIT_ASSERT_EQUAL(2.0, pDoc->GetValue(ScAddress(0,0,0)));
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest::testFormulaDependency()
{
ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc( "dependencyTree.", ODS );