[Libreoffice-commits] core.git: sc/source
Caolán McNamara
caolanm at redhat.com
Sun Mar 13 20:31:26 UTC 2016
sc/source/core/tool/rangenam.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit e1c9efceaef0f706889aa987def592d7ae62285a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Mar 13 20:25:02 2016 +0000
loplugin:cstylecast
Change-Id: I2d03c5054ef1b863052b221c0740ed3bb993600e
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index cc438f6..830980c 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;
}
More information about the Libreoffice-commits
mailing list