diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-26 18:07:10 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-26 18:14:25 +0200 |
commit | 4944bd81ed056b5002ea36718ab4e953ba77c171 (patch) | |
tree | ce5b5c1b8429ced51283bd1f0d071c5d368c7547 /sc | |
parent | 361090c4cc60b8a0c4c553542b8ab9f10fff833f (diff) |
Revert "do not parse range fragments as valid ranges"
This reverts commit ed6209f572bad38bdb066be668163fe8acf52056, plus follow-up
18a2a642c4a8848e2a2cb0df29c6463db8428ef9 "unit test that parsing range fragments
should fail."
Breaks CppunitTest_sc_subsequent_filters_test
Change-Id: Ic4663d79bf4bc017094bc37779f74f30630d79bd
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 33 | ||||
-rw-r--r-- | sc/source/core/tool/address.cxx | 2 |
2 files changed, 1 insertions, 34 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 0e379f125edc..8a5d76622c79 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -321,39 +321,6 @@ void Test::testFormulaParseReference() CPPUNIT_ASSERT_MESSAGE("This is not an external address.", !aExtInfo.mbExternal); ScRange aRange; - - aRange.aStart.SetTab(0); - nRes = aRange.Parse(":B", m_pDoc, formula::FormulaGrammar::CONV_OOO); - CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", (nRes & SCA_VALID) == 0); - - aRange.aStart.SetTab(0); - nRes = aRange.Parse("B:", m_pDoc, formula::FormulaGrammar::CONV_OOO); - CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", (nRes & SCA_VALID) == 0); - - aRange.aStart.SetTab(0); - nRes = aRange.Parse(":B2", m_pDoc, formula::FormulaGrammar::CONV_OOO); - CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", (nRes & SCA_VALID) == 0); - - aRange.aStart.SetTab(0); - nRes = aRange.Parse("B2:", m_pDoc, formula::FormulaGrammar::CONV_OOO); - CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", (nRes & SCA_VALID) == 0); - - aRange.aStart.SetTab(0); - nRes = aRange.Parse(":2", m_pDoc, formula::FormulaGrammar::CONV_OOO); - CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", (nRes & SCA_VALID) == 0); - - aRange.aStart.SetTab(0); - nRes = aRange.Parse("2:", m_pDoc, formula::FormulaGrammar::CONV_OOO); - CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", (nRes & SCA_VALID) == 0); - - aRange.aStart.SetTab(0); - nRes = aRange.Parse(":2B", m_pDoc, formula::FormulaGrammar::CONV_OOO); - CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", (nRes & SCA_VALID) == 0); - - aRange.aStart.SetTab(0); - nRes = aRange.Parse("2B:", m_pDoc, formula::FormulaGrammar::CONV_OOO); - CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", (nRes & SCA_VALID) == 0); - aRange.aStart.SetTab(0); nRes = aRange.Parse("B:B", m_pDoc, formula::FormulaGrammar::CONV_OOO); CPPUNIT_ASSERT_MESSAGE("Failed to parse.", (nRes & SCA_VALID) != 0); diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index da7a195d4917..81e4047ff0d3 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -1505,7 +1505,7 @@ static sal_uInt16 lcl_ScRange_Parse_OOo( ScRange& rRange, nRes2 |= SCA_COL_ABSOLUTE; } } - if ((nRes1 & SCA_VALID) && (nRes2 & SCA_VALID)) + if (nRes1 && nRes2) { // PutInOrder / Justify sal_uInt16 nMask, nBits1, nBits2; |