From 6d829ae4f218b5d751cfc366f071fc6160c0787c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 20 Jul 2017 10:08:03 +0200 Subject: loplugin:constparams in basic Change-Id: Idf55f63f2d56be4997a8cdc6afc5690eacac9a60 Reviewed-on: https://gerrit.libreoffice.org/40214 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/classes/image.cxx | 4 ++-- basic/source/classes/sb.cxx | 4 ++-- basic/source/classes/sbunoobj.cxx | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'basic/source/classes') diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index db06dc9b5d2b..7363fd5ad24f 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -77,7 +77,7 @@ void SbiImage::Clear() * **************************************************************************/ -bool SbiGood( SvStream& r ) +bool SbiGood( SvStream const & r ) { return !r.IsEof() && r.GetError() == ERRCODE_NONE; } @@ -618,7 +618,7 @@ void SbiImage::AddCode( char* p, sal_uInt32 s ) } // Add user type -void SbiImage::AddType(SbxObject* pObject) +void SbiImage::AddType(SbxObject const * pObject) { if( !rTypes.is() ) { diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 7367bba69051..d04e6c3f0b73 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1190,7 +1190,7 @@ void SbModule::implProcessModuleRunInit( ModuleInitDependencyMap& rMap, ClassMod } // Run Init-Code of all modules (including inserted libraries) -void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit ) +void StarBASIC::InitAllModules( StarBASIC const * pBasicNotToInit ) { SolarMutexGuard guard; @@ -2083,7 +2083,7 @@ void BasicCollection::Notify( SfxBroadcaster& rCst, const SfxHint& rHint ) SbxObject::Notify( rCst, rHint ); } -sal_Int32 BasicCollection::implGetIndex( SbxVariable* pIndexVar ) +sal_Int32 BasicCollection::implGetIndex( SbxVariable const * pIndexVar ) { sal_Int32 nIndex = -1; if( pIndexVar->GetType() == SbxSTRING ) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index a5274f662c50..771a6cd3da33 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -111,7 +111,7 @@ static char const aSeqLevelStr[] = "[]"; // redirection built in. The property name specifies the name // of the default property. -bool SbUnoObject::getDefaultPropName( SbUnoObject* pUnoObj, OUString& sDfltProp ) +bool SbUnoObject::getDefaultPropName( SbUnoObject const * pUnoObj, OUString& sDfltProp ) { bool bResult = false; Reference< XDefaultProperty> xDefaultProp( pUnoObj->maTmpUnoObj, UNO_QUERY ); @@ -521,7 +521,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 ) +static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int32 >& indices, Sequence< sal_Int32 >& sizes, const Any& aValue, sal_Int32& dimension, bool bIsZeroIndex, Type const * pType ) { const Type& aType = aValue.getValueType(); TypeClass eTypeClass = aType.getTypeClass(); @@ -1166,7 +1166,7 @@ static bool implGetTypeByName( const OUString& rName, Type& rRetType ) // converting of Sbx to Uno with known target class -Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProperty ) +Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property const * pUnoProperty ) { Any aRetVal; @@ -1502,7 +1502,7 @@ enum class INVOKETYPE GetProp = 0, Func }; -Any invokeAutomationMethod( const OUString& Name, Sequence< Any >& args, SbxArray* pParams, sal_uInt32 nParamCount, Reference< XInvocation >& rxInvocation, INVOKETYPE invokeType ) +Any invokeAutomationMethod( const OUString& Name, Sequence< Any > const & args, SbxArray* pParams, sal_uInt32 nParamCount, Reference< XInvocation > const & rxInvocation, INVOKETYPE invokeType ) { Sequence< sal_Int16 > OutParamIndex; Sequence< Any > OutParam; @@ -2423,7 +2423,7 @@ void SbUnoObject::doIntrospection() // Start of a list of all SbUnoMethod-Instances static SbUnoMethod* pFirst = nullptr; -void clearUnoMethodsForBasic( StarBASIC* pBasic ) +void clearUnoMethodsForBasic( StarBASIC const * pBasic ) { SbUnoMethod* pMeth = pFirst; while( pMeth ) @@ -4424,7 +4424,7 @@ typedef std::vector< StarBasicDisposeItem* > DisposeItemVector; static DisposeItemVector GaDisposeItemVector; -static DisposeItemVector::iterator lcl_findItemForBasic( StarBASIC* pBasic ) +static DisposeItemVector::iterator lcl_findItemForBasic( StarBASIC const * pBasic ) { DisposeItemVector::iterator it; for( it = GaDisposeItemVector.begin() ; it != GaDisposeItemVector.end() ; ++it ) @@ -4462,7 +4462,7 @@ void registerComListenerVariableForBasic( SbxVariable* pVar, StarBASIC* pBasic ) pArray->Put( pVar, pArray->Count() ); } -void disposeComVariablesForBasic( StarBASIC* pBasic ) +void disposeComVariablesForBasic( StarBASIC const * pBasic ) { DisposeItemVector::iterator it = lcl_findItemForBasic( pBasic ); if( it != GaDisposeItemVector.end() ) -- cgit