diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-18 15:26:05 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-18 17:25:41 -0500 |
commit | eeb91d8f57424c3e2c3d2ea371dd8d00af287953 (patch) | |
tree | 7d7b87b9fd525dab9ebcf0bb045bff855d939699 /sc/qa/unit | |
parent | 6adf0ba4c8815c95b9bdbf274c0e2f774aed9a9f (diff) |
Handle external reference bits too. This is the last missing piece.
Change-Id: Ib1dd18bb5a8d70c53722ac91e2340d05bbc7798a
Diffstat (limited to 'sc/qa/unit')
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 7ae255472d4f..6db441caf4d5 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -115,11 +115,21 @@ void Test::testFormulaCreateStringFromTokens() "SUM(sheetx;x;y;z)", // sheet local and global named ranges mixed "MAX(Table1)+MIN(Table2)*SUM(Table3)", // database ranges "{1;TRUE;3|FALSE;5;\"Text\"|;;}", // inline matrix + "SUM('file:///path/to/fake.file'#$Sheet.A1:B10)", }; boost::scoped_ptr<ScTokenArray> pArray; sc::TokenStringContext aCxt(m_pDoc, formula::FormulaGrammar::GRAM_ENGLISH); + + // Artificially add external refererence data after the context object is + // initialized. + aCxt.maExternalFileNames.push_back("file:///path/to/fake.file"); + std::vector<OUString> aExtTabNames; + aExtTabNames.push_back("Sheet"); + aCxt.maExternalCachedTabNames.insert( + sc::TokenStringContext::IndexNamesMapType::value_type(0, aExtTabNames)); + ScAddress aPos(0,0,0); for (size_t i = 0, n = SAL_N_ELEMENTS(aTests); i < n; ++i) |