summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/rangenam.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index cc438f626471..830980c9ca66 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -463,7 +463,8 @@ void ScRangeData::MakeValidName( OUString& rName )
ScAddress::Details details( static_cast<FormulaGrammar::AddressConvention>( nConv ) );
// Don't check Parse on VALID, any partial only VALID may result in
// #REF! during compile later!
- while ( (bool)aRange.Parse( rName, nullptr, details) || (bool)aAddr.Parse( rName, nullptr, details ) )
+ while (aRange.Parse(rName, nullptr, details) != ScRefFlags::ZERO ||
+ aAddr.Parse(rName, nullptr, details) != ScRefFlags::ZERO)
{
// Range Parse is partially valid also with invalid sheet name,
// Address Parse dito, during compile name would generate a #REF!
@@ -498,8 +499,11 @@ bool ScRangeData::IsNameValid( const OUString& rName, ScDocument* pDoc )
ScAddress::Details details( static_cast<FormulaGrammar::AddressConvention>( nConv ) );
// Don't check Parse on VALID, any partial only VALID may result in
// #REF! during compile later!
- if ( (bool)aRange.Parse( rName, pDoc, details) || (bool)aAddr.Parse( rName, pDoc, details) )
+ if (aRange.Parse(rName, pDoc, details) != ScRefFlags::ZERO ||
+ aAddr.Parse(rName, pDoc, details) != ScRefFlags::ZERO )
+ {
return false;
+ }
}
return true;
}