summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-02 14:56:27 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-08-04 05:46:22 +0000
commite5e7475febbca460c30eaf4959d3282688383ef2 (patch)
treea3c07eb67978c07ec1fc6acd6f8ca41adc043afb /basic
parent6d9cf658eda57c29c2848a7b6eaf5a8285e14972 (diff)
loplugin:countusersofdefaultparams in basctl..basic
Change-Id: I16fac3317ebf55581cb9aaef676a9759de51d695 Reviewed-on: https://gerrit.libreoffice.org/27793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sbunoobj.cxx8
-rw-r--r--basic/source/comp/dim.cxx4
-rw-r--r--basic/source/comp/parser.cxx2
-rw-r--r--basic/source/inc/parser.hxx2
-rw-r--r--basic/source/inc/runtime.hxx4
-rw-r--r--basic/source/inc/symtbl.hxx4
-rw-r--r--basic/source/runtime/runtime.cxx4
-rw-r--r--basic/source/sbx/sbxscan.cxx2
8 files changed, 15 insertions, 15 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 10e96e6de2e6..313756153e94 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -523,7 +523,7 @@ SbxDataType unoToSbxType( const Reference< XIdlClass >& xIdlClass )
return eRetType;
}
-static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int32 >& indices, Sequence< sal_Int32 >& sizes, const Any& aValue, sal_Int32& dimension, bool bIsZeroIndex, Type* pType = nullptr )
+static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int32 >& indices, Sequence< sal_Int32 >& sizes, const Any& aValue, sal_Int32& dimension, bool bIsZeroIndex, Type* pType )
{
const Type& aType = aValue.getValueType();
TypeClass eTypeClass = aType.getTypeClass();
@@ -651,7 +651,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
Sequence< sal_Int32 > indices;
Sequence< sal_Int32 > sizes;
sal_Int32 dimension = 0;
- implSequenceToMultiDimArray( pArray, indices, sizes, aWrap.Array, dimension, aWrap.IsZeroIndex );
+ implSequenceToMultiDimArray( pArray, indices, sizes, aWrap.Array, dimension, aWrap.IsZeroIndex, nullptr );
if ( pArray )
{
SbxDimArrayRef xArray = pArray;
@@ -1514,7 +1514,7 @@ enum INVOKETYPE
SetProp,
Func
};
-Any invokeAutomationMethod( const OUString& Name, Sequence< Any >& args, SbxArray* pParams, sal_uInt32 nParamCount, Reference< XInvocation >& rxInvocation, INVOKETYPE invokeType = Func )
+Any invokeAutomationMethod( const OUString& Name, Sequence< Any >& args, SbxArray* pParams, sal_uInt32 nParamCount, Reference< XInvocation >& rxInvocation, INVOKETYPE invokeType )
{
Sequence< sal_Int16 > OutParamIndex;
Sequence< Any > OutParam;
@@ -2274,7 +2274,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else if( bInvocation && mxInvocation.is() )
{
- Any aRetAny = invokeAutomationMethod( pMeth->GetName(), args, pParams, nParamCount, mxInvocation );
+ Any aRetAny = invokeAutomationMethod( pMeth->GetName(), args, pParams, nParamCount, mxInvocation, Func );
unoToSbxValue( pVar, aRetAny );
}
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index e6c6b9390dd0..2bdf696b703d 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -833,7 +833,7 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl )
pDef->SetType( eType );
if( Peek() == CDECL_ )
{
- Next(); pDef->SetCdecl();
+ Next(); pDef->SetCdecl(true);
}
if( Peek() == LIB )
{
@@ -939,7 +939,7 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl )
}
if( bByVal )
{
- pPar->SetByVal();
+ pPar->SetByVal(true);
}
if( bOptional )
{
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index e413c11bfd39..c2463610ae69 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -401,7 +401,7 @@ bool SbiParser::Parse()
Next();
Push( eCurTok );
aGen.Statement();
- Symbol();
+ Symbol(nullptr);
}
}
else
diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx
index b2a44dbb5912..2225cbcf4367 100644
--- a/basic/source/inc/parser.hxx
+++ b/basic/source/inc/parser.hxx
@@ -96,7 +96,7 @@ public:
bool TestComma();
void TestEoln();
- void Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo = nullptr ); // let or call
+ void Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo ); // let or call
void ErrorStmnt(); // ERROR n
void BadBlock(); // LOOP/WEND/NEXT
void NoIf(); // ELSE/ELSE IF without IF
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx
index d7ce4a310813..78b39a80bb01 100644
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@ -297,7 +297,7 @@ class SbiRuntime
static bool implIsClass( SbxObject* pObj, const OUString& aClass );
- void StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt = false );
+ void StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt );
// the following routines are called by the single
// stepper and implement the single opcodes
@@ -327,7 +327,7 @@ class SbiRuntime
void StepGOSUB( sal_uInt32 ), StepRETURN( sal_uInt32 );
void StepTESTFOR( sal_uInt32 ), StepCASETO( sal_uInt32 ), StepERRHDL( sal_uInt32 );
void StepRESUME( sal_uInt32 ), StepSETCLASS( sal_uInt32 ), StepVBASETCLASS( sal_uInt32 ), StepTESTCLASS( sal_uInt32 ), StepLIB( sal_uInt32 );
- bool checkClass_Impl( const SbxVariableRef& refVal, const OUString& aClass, bool bRaiseErrors, bool bDefault = true );
+ bool checkClass_Impl( const SbxVariableRef& refVal, const OUString& aClass, bool bRaiseErrors, bool bDefault );
void StepCLOSE( sal_uInt32 ), StepPRCHAR( sal_uInt32 ), StepARGTYP( sal_uInt32 );
// all opcodes with two operands
void StepRTL( sal_uInt32, sal_uInt32 ), StepPUBLIC( sal_uInt32, sal_uInt32 ), StepPUBLIC_P( sal_uInt32, sal_uInt32 );
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index cc30090bf60d..e51a846a2d02 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -132,7 +132,7 @@ public:
void SetParamArray() { bParamArray = true; }
void SetWithEvents() { bWithEvents = true; }
void SetWithBrackets(){ bWithBrackets = true; }
- void SetByVal( bool bByVal_ = true ) { bByVal = bByVal_; }
+ void SetByVal( bool bByVal_ ) { bByVal = bByVal_; }
void SetStatic( bool bAsStatic = true ) { bStatic = bAsStatic; }
void SetNew() { bNew = true; }
void SetDefinedAs() { bAs = true; }
@@ -183,7 +183,7 @@ public:
OUString& GetAlias() { return aAlias; }
void SetPublic( bool b ) { bPublic = b; }
bool IsPublic() const { return bPublic; }
- void SetCdecl( bool b = true) { bCdecl = b; }
+ void SetCdecl( bool b ) { bCdecl = b; }
bool IsCdecl() const { return bCdecl; }
bool IsUsedForProcDecl() const { return mbProcDecl; }
void SetLine1( sal_uInt16 n ) { nLine1 = n; }
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index c9559c5ecf5a..5978764ed89d 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -3254,7 +3254,7 @@ void SbiRuntime::StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt )
SbxVariableRef refVar = PopVar();
OUString aClass( pImg->GetString( static_cast<short>( nOp1 ) ) );
- bool bOk = checkClass_Impl( refVal, aClass, true );
+ bool bOk = checkClass_Impl( refVal, aClass, true, true );
if( bOk )
{
StepSET_Impl( refVal, refVar, bHandleDflt ); // don't do handle default prop for a "proper" set
@@ -3263,7 +3263,7 @@ void SbiRuntime::StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt )
void SbiRuntime::StepVBASETCLASS( sal_uInt32 nOp1 )
{
- StepSETCLASS_impl( nOp1 );
+ StepSETCLASS_impl( nOp1, false );
}
void SbiRuntime::StepSETCLASS( sal_uInt32 nOp1 )
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 05a4eaeba4da..cc864ec9f42f 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -316,7 +316,7 @@ static const double roundArray[] = {
***************************************************************************/
static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth,
- bool bPt, bool bFix, sal_Unicode cForceThousandSep = 0 )
+ bool bPt, bool bFix, sal_Unicode cForceThousandSep )
{
short nExp = 0;