Kaydet (Commit) 4944bd81 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Revert "do not parse range fragments as valid ranges"

This reverts commit ed6209f5, plus follow-up
18a2a642 "unit test that parsing range fragments
should fail."

Breaks CppunitTest_sc_subsequent_filters_test

Change-Id: Ic4663d79bf4bc017094bc37779f74f30630d79bd
üst 361090c4
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment