summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorBenjamin Ni <benjaminniri@hotmail.com>2015-09-25 11:41:53 +0100
committerMichael Stahl <mstahl@redhat.com>2015-11-02 23:40:57 +0100
commitbe729e772196f33543e21cb9bac21add87726b20 (patch)
treef2150f458e2b07f8924b4702d37c09c8dd52215a /basic
parent6ccf68622e51c1b727dd042c1c1a71b5d1fd6a12 (diff)
tdf#94269: Replace "n" prefix for bool variables with "b"
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797 Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/cppunit/basic_coverage.cxx6
-rw-r--r--basic/source/classes/sbunoobj.cxx16
-rw-r--r--basic/source/comp/exprnode.cxx20
-rw-r--r--basic/source/runtime/methods1.cxx6
-rw-r--r--basic/source/runtime/runtime.cxx6
5 files changed, 27 insertions, 27 deletions
diff --git a/basic/qa/cppunit/basic_coverage.cxx b/basic/qa/cppunit/basic_coverage.cxx
index 1c4cb3a8ef52..8e321c747f3a 100644
--- a/basic/qa/cppunit/basic_coverage.cxx
+++ b/basic/qa/cppunit/basic_coverage.cxx
@@ -73,7 +73,7 @@ void Coverage::test_success()
void Coverage::run_test(const OUString& sFileURL)
{
m_sCurrentTest = sFileURL;
- bool result = false;
+ bool bResult = false;
MacroSnippet testMacro;
testMacro.LoadSourceFromFile( sFileURL );
testMacro.Compile();
@@ -82,10 +82,10 @@ void Coverage::run_test(const OUString& sFileURL)
SbxVariableRef pResult = testMacro.Run();
if( pResult && pResult->GetInteger() == 1 )
{
- result = true;
+ bResult = true;
}
}
- if(result)
+ if(bResult)
{
test_success();
}
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index a522472d6089..3f645660f667 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -119,15 +119,15 @@ static char const defaultNameSpace[] = "ooo.vba";
bool SbUnoObject::getDefaultPropName( SbUnoObject* pUnoObj, OUString& sDfltProp )
{
- bool result = false;
+ bool bResult = false;
Reference< XDefaultProperty> xDefaultProp( pUnoObj->maTmpUnoObj, UNO_QUERY );
if ( xDefaultProp.is() )
{
sDfltProp = xDefaultProp->getDefaultPropertyName();
if ( !sDfltProp.isEmpty() )
- result = true;
+ bResult = true;
}
- return result;
+ return bResult;
}
SbxVariable* getDefaultProp( SbxVariable* pRef )
@@ -1674,7 +1674,7 @@ bool checkUnoObjectType(SbUnoObject& rUnoObj, const OUString& rClass)
{
return true;
}
- bool result = false;
+ bool bResult = false;
Reference< XTypeProvider > xTypeProvider( x, UNO_QUERY );
if( xTypeProvider.is() )
{
@@ -1730,11 +1730,11 @@ bool checkUnoObjectType(SbUnoObject& rUnoObj, const OUString& rClass)
if ( sTypeName.isEmpty() || sTypeName == "IDispatch" )
{
// can't check type, leave it pass
- result = true;
+ bResult = true;
}
else
{
- result = sTypeName.equals( rClass );
+ bResult = sTypeName.equals( rClass );
}
}
break; // finished checking automation object
@@ -1745,12 +1745,12 @@ bool checkUnoObjectType(SbUnoObject& rUnoObj, const OUString& rClass)
if ( (aClassName.getLength() <= aInterfaceName.getLength()) &&
aInterfaceName.endsWithIgnoreAsciiCase( aClassName ) )
{
- result = true;
+ bResult = true;
break;
}
}
}
- return result;
+ return bResult;
}
// Debugging help method to readout the imlemented interfaces of an object
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index 2b65fd1c6fd0..1fecc7f17cc1 100644
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -304,15 +304,15 @@ void SbiExprNode::FoldConstants(SbiParser* pParser)
|| eTok == IDIV || eTok == MOD )
{
// Integer operations
- bool err = false;
- if( nl > SbxMAXLNG ) err = true, nl = SbxMAXLNG;
- else if( nl < SbxMINLNG ) err = true, nl = SbxMINLNG;
- if( nr > SbxMAXLNG ) err = true, nr = SbxMAXLNG;
- else if( nr < SbxMINLNG ) err = true, nr = SbxMINLNG;
+ bool bErr = false;
+ if( nl > SbxMAXLNG ) bErr = true, nl = SbxMAXLNG;
+ else if( nl < SbxMINLNG ) bErr = true, nl = SbxMINLNG;
+ if( nr > SbxMAXLNG ) bErr = true, nr = SbxMAXLNG;
+ else if( nr < SbxMINLNG ) bErr = true, nr = SbxMINLNG;
ll = static_cast<long>(nl); lr = static_cast<long>(nr);
llMod = static_cast<long>(nl);
lrMod = static_cast<long>(nr);
- if( err )
+ if( bErr )
{
pParser->Error( ERRCODE_BASIC_MATH_OVERFLOW );
bError = true;
@@ -419,10 +419,10 @@ void SbiExprNode::FoldConstants(SbiParser* pParser)
nVal = -nVal; break;
case NOT: {
// Integer operation!
- bool err = false;
- if( nVal > SbxMAXLNG ) err = true, nVal = SbxMAXLNG;
- else if( nVal < SbxMINLNG ) err = true, nVal = SbxMINLNG;
- if( err )
+ bool bErr = false;
+ if( nVal > SbxMAXLNG ) bErr = true, nVal = SbxMAXLNG;
+ else if( nVal < SbxMINLNG ) bErr = true, nVal = SbxMINLNG;
+ if( bErr )
{
pParser->Error( ERRCODE_BASIC_MATH_OVERFLOW );
bError = true;
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index c9367a939661..8f5dedd4f81a 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -788,16 +788,16 @@ RTLFUNC(FreeLibrary)
}
bool IsBaseIndexOne()
{
- bool result = false;
+ bool bResult = false;
if ( GetSbData()->pInst && GetSbData()->pInst->pRun )
{
sal_uInt16 res = GetSbData()->pInst->pRun->GetBase();
if ( res )
{
- result = true;
+ bResult = true;
}
}
- return result;
+ return bResult;
}
RTLFUNC(Array)
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index b0aaa1597905..99031a118c81 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -84,11 +84,11 @@ static void lcl_eraseImpl( SbxVariableRef& refVar, bool bVBAEnabled );
bool SbiRuntime::isVBAEnabled()
{
- bool result = false;
+ bool bResult = false;
SbiInstance* pInst = GetSbData()->pInst;
if ( pInst && GetSbData()->pInst->pRun )
- result = pInst->pRun->bVBAEnabled;
- return result;
+ bResult = pInst->pRun->bVBAEnabled;
+ return bResult;
}
void StarBASIC::SetVBAEnabled( bool bEnabled )