summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/ucalc_formula.cxx33
-rw-r--r--sc/source/core/tool/address.cxx2
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;