summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-05-19 05:27:18 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-05-19 05:33:48 +0200
commit912189fdd6543028ccd81ca01df576de2ab9b106 (patch)
tree62cf07216932d4f8ace6630a4b2289e85e314fa1 /sc
parent02b6abe87c4a9d3c11f795d36078fcabbbda498b (diff)
add test for OOXML ref string conversion
Change-Id: Icef24eb47b34f1609026a4ead01329846034405a
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/xlsx/ref_string.xlsxbin0 -> 8026 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/xlsx/ref_string.xlsx b/sc/qa/unit/data/xlsx/ref_string.xlsx
new file mode 100644
index 000000000000..08076cb40575
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/ref_string.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 1c6f94a134ab..9f2f3819b7cb 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -199,6 +199,7 @@ public:
void testVBAUserFunctionXLSM();
void testEmbeddedImageXLS();
void testEditEngStrikeThroughXLSX();
+ void testRefStringXLSX();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testBooleanFormatXLSX);
@@ -291,6 +292,7 @@ public:
CPPUNIT_TEST(testEmbeddedImageXLS);
CPPUNIT_TEST(testErrorOnExternalReferences);
CPPUNIT_TEST(testEditEngStrikeThroughXLSX);
+ CPPUNIT_TEST(testRefStringXLSX);
CPPUNIT_TEST_SUITE_END();
private:
@@ -3045,6 +3047,22 @@ void ScFiltersTest::testEditEngStrikeThroughXLSX()
}
}
+void ScFiltersTest::testRefStringXLSX()
+{
+ ScDocShellRef xDocSh = loadDoc("ref_string.", XLSX);
+ CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.Is());
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ double nVal = rDoc.GetValue(2, 2, 0);
+ ASSERT_DOUBLES_EQUAL(3.0, nVal);
+
+ const ScCalcConfig& rCalcConfig = rDoc.GetCalcConfig();
+ CPPUNIT_ASSERT_EQUAL(formula::FormulaGrammar::CONV_XL_A1, rCalcConfig.meStringRefAddressSyntax);
+
+ xDocSh->DoClose();
+}
+
ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "/sc/qa/unit/data" )
{