loplugin:constparams in basic

Change-Id: Idf55f63f2d56be4997a8cdc6afc5690eacac9a60
Reviewed-on: https://gerrit.libreoffice.org/40214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2017-07-20 10:08:03 +02:00
parent f148100707
commit 6d829ae4f2
26 changed files with 59 additions and 55 deletions

View File

@ -101,12 +101,12 @@ protected:
virtual ~SbStdClipboard() override; virtual ~SbStdClipboard() override;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
static void MethClear( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); static void MethClear( SbxVariable* pVar, SbxArray const * pPar_, bool bWrite );
static void MethGetData( SbxArray* pPar_, bool bWrite ); static void MethGetData( SbxArray* pPar_, bool bWrite );
static void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); static void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, bool bWrite );
static void MethGetText( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); static void MethGetText( SbxVariable* pVar, SbxArray const * pPar_, bool bWrite );
static void MethSetData( SbxArray* pPar_, bool bWrite ); static void MethSetData( SbxArray* pPar_, bool bWrite );
static void MethSetText( SbxArray* pPar_, bool bWrite ); static void MethSetText( SbxArray const * pPar_, bool bWrite );
public: public:

View File

@ -131,7 +131,7 @@ public:
static void insertLibraryImpl( const uno::Reference< script::XLibraryContainer >& xScriptCont, BasicManager* pMgr, static void insertLibraryImpl( const uno::Reference< script::XLibraryContainer >& xScriptCont, BasicManager* pMgr,
const uno::Any& aLibAny, const OUString& aLibName ); const uno::Any& aLibAny, const OUString& aLibName );
static void addLibraryModulesImpl( BasicManager* pMgr, const uno::Reference< container::XNameAccess >& xLibNameAccess, static void addLibraryModulesImpl( BasicManager const * pMgr, const uno::Reference< container::XNameAccess >& xLibNameAccess,
const OUString& aLibName ); const OUString& aLibName );
@ -177,7 +177,7 @@ void BasMgrContainerListenerImpl::insertLibraryImpl( const uno::Reference< scrip
} }
void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr, void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager const * pMgr,
const uno::Reference< container::XNameAccess >& xLibNameAccess, const OUString& aLibName ) const uno::Reference< container::XNameAccess >& xLibNameAccess, const OUString& aLibName )
{ {
uno::Sequence< OUString > aModuleNames = xLibNameAccess->getElementNames(); uno::Sequence< OUString > aModuleNames = xLibNameAccess->getElementNames();
@ -1367,7 +1367,7 @@ StarBASIC* BasicManager::CreateLibForLibContainer( const OUString& rLibName,
} }
BasicLibInfo* BasicManager::FindLibInfo( StarBASIC* pBasic ) BasicLibInfo* BasicManager::FindLibInfo( StarBASIC const * pBasic )
{ {
for (auto const& rpLib : mpImpl->aLibs) for (auto const& rpLib : mpImpl->aLibs)
{ {

View File

@ -77,7 +77,7 @@ void SbiImage::Clear()
* *
**************************************************************************/ **************************************************************************/
bool SbiGood( SvStream& r ) bool SbiGood( SvStream const & r )
{ {
return !r.IsEof() && r.GetError() == ERRCODE_NONE; return !r.IsEof() && r.GetError() == ERRCODE_NONE;
} }
@ -618,7 +618,7 @@ void SbiImage::AddCode( char* p, sal_uInt32 s )
} }
// Add user type // Add user type
void SbiImage::AddType(SbxObject* pObject) void SbiImage::AddType(SbxObject const * pObject)
{ {
if( !rTypes.is() ) if( !rTypes.is() )
{ {

View File

@ -1190,7 +1190,7 @@ void SbModule::implProcessModuleRunInit( ModuleInitDependencyMap& rMap, ClassMod
} }
// Run Init-Code of all modules (including inserted libraries) // Run Init-Code of all modules (including inserted libraries)
void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit ) void StarBASIC::InitAllModules( StarBASIC const * pBasicNotToInit )
{ {
SolarMutexGuard guard; SolarMutexGuard guard;
@ -2083,7 +2083,7 @@ void BasicCollection::Notify( SfxBroadcaster& rCst, const SfxHint& rHint )
SbxObject::Notify( rCst, rHint ); SbxObject::Notify( rCst, rHint );
} }
sal_Int32 BasicCollection::implGetIndex( SbxVariable* pIndexVar ) sal_Int32 BasicCollection::implGetIndex( SbxVariable const * pIndexVar )
{ {
sal_Int32 nIndex = -1; sal_Int32 nIndex = -1;
if( pIndexVar->GetType() == SbxSTRING ) if( pIndexVar->GetType() == SbxSTRING )

View File

@ -111,7 +111,7 @@ static char const aSeqLevelStr[] = "[]";
// redirection built in. The property name specifies the name // redirection built in. The property name specifies the name
// of the default property. // of the default property.
bool SbUnoObject::getDefaultPropName( SbUnoObject* pUnoObj, OUString& sDfltProp ) bool SbUnoObject::getDefaultPropName( SbUnoObject const * pUnoObj, OUString& sDfltProp )
{ {
bool bResult = false; bool bResult = false;
Reference< XDefaultProperty> xDefaultProp( pUnoObj->maTmpUnoObj, UNO_QUERY ); Reference< XDefaultProperty> xDefaultProp( pUnoObj->maTmpUnoObj, UNO_QUERY );
@ -521,7 +521,7 @@ SbxDataType unoToSbxType( const Reference< XIdlClass >& xIdlClass )
return eRetType; 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(); const Type& aType = aValue.getValueType();
TypeClass eTypeClass = aType.getTypeClass(); 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 // 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; Any aRetVal;
@ -1502,7 +1502,7 @@ enum class INVOKETYPE
GetProp = 0, GetProp = 0,
Func 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< sal_Int16 > OutParamIndex;
Sequence< Any > OutParam; Sequence< Any > OutParam;
@ -2423,7 +2423,7 @@ void SbUnoObject::doIntrospection()
// Start of a list of all SbUnoMethod-Instances // Start of a list of all SbUnoMethod-Instances
static SbUnoMethod* pFirst = nullptr; static SbUnoMethod* pFirst = nullptr;
void clearUnoMethodsForBasic( StarBASIC* pBasic ) void clearUnoMethodsForBasic( StarBASIC const * pBasic )
{ {
SbUnoMethod* pMeth = pFirst; SbUnoMethod* pMeth = pFirst;
while( pMeth ) while( pMeth )
@ -4424,7 +4424,7 @@ typedef std::vector< StarBasicDisposeItem* > DisposeItemVector;
static DisposeItemVector GaDisposeItemVector; static DisposeItemVector GaDisposeItemVector;
static DisposeItemVector::iterator lcl_findItemForBasic( StarBASIC* pBasic ) static DisposeItemVector::iterator lcl_findItemForBasic( StarBASIC const * pBasic )
{ {
DisposeItemVector::iterator it; DisposeItemVector::iterator it;
for( it = GaDisposeItemVector.begin() ; it != GaDisposeItemVector.end() ; ++it ) for( it = GaDisposeItemVector.begin() ; it != GaDisposeItemVector.end() ; ++it )
@ -4462,7 +4462,7 @@ void registerComListenerVariableForBasic( SbxVariable* pVar, StarBASIC* pBasic )
pArray->Put( pVar, pArray->Count() ); pArray->Put( pVar, pArray->Count() );
} }
void disposeComVariablesForBasic( StarBASIC* pBasic ) void disposeComVariablesForBasic( StarBASIC const * pBasic )
{ {
DisposeItemVector::iterator it = lcl_findItemForBasic( pBasic ); DisposeItemVector::iterator it = lcl_findItemForBasic( pBasic );
if( it != GaDisposeItemVector.end() ) if( it != GaDisposeItemVector.end() )

View File

@ -554,13 +554,13 @@ public:
}; };
sal_uInt32 sal_uInt32
SbiCodeGen::calcNewOffSet( sal_uInt8* pCode, sal_uInt16 nOffset ) SbiCodeGen::calcNewOffSet( sal_uInt8 const * pCode, sal_uInt16 nOffset )
{ {
return BufferTransformer< sal_uInt16, sal_uInt32 >::convertBufferOffSet( pCode, nOffset ); return BufferTransformer< sal_uInt16, sal_uInt32 >::convertBufferOffSet( pCode, nOffset );
} }
sal_uInt16 sal_uInt16
SbiCodeGen::calcLegacyOffSet( sal_uInt8* pCode, sal_uInt32 nOffset ) SbiCodeGen::calcLegacyOffSet( sal_uInt8 const * pCode, sal_uInt32 nOffset )
{ {
return BufferTransformer< sal_uInt32, sal_uInt16 >::convertBufferOffSet( pCode, nOffset ); return BufferTransformer< sal_uInt32, sal_uInt16 >::convertBufferOffSet( pCode, nOffset );
} }

View File

@ -53,8 +53,8 @@ public:
void IncForLevel() { nForLevel++; } void IncForLevel() { nForLevel++; }
void DecForLevel() { nForLevel--; } void DecForLevel() { nForLevel--; }
static sal_uInt32 calcNewOffSet( sal_uInt8* pCode, sal_uInt16 nOffset ); static sal_uInt32 calcNewOffSet( sal_uInt8 const * pCode, sal_uInt16 nOffset );
static sal_uInt16 calcLegacyOffSet( sal_uInt8* pCode, sal_uInt32 nOffset ); static sal_uInt16 calcLegacyOffSet( sal_uInt8 const * pCode, sal_uInt32 nOffset );
}; };

View File

@ -65,7 +65,7 @@ class SbiImage {
void MakeStrings( short ); // establish StringPool void MakeStrings( short ); // establish StringPool
void AddString( const OUString& ); void AddString( const OUString& );
void AddCode( char*, sal_uInt32 ); void AddCode( char*, sal_uInt32 );
void AddType(SbxObject *); void AddType(SbxObject const *);
void AddEnum(SbxObject *); void AddEnum(SbxObject *);
public: public:

View File

@ -193,7 +193,7 @@ public:
// offer NumberFormatter also static // offer NumberFormatter also static
static SvNumberFormatter* PrepareNumberFormatter( sal_uInt32 &rnStdDateIdx, static SvNumberFormatter* PrepareNumberFormatter( sal_uInt32 &rnStdDateIdx,
sal_uInt32 &rnStdTimeIdx, sal_uInt32 &rnStdDateTimeIdx, sal_uInt32 &rnStdTimeIdx, sal_uInt32 &rnStdDateTimeIdx,
LanguageType* peFormatterLangType=nullptr, DateOrder* peFormatterDateOrder=nullptr ); LanguageType const * peFormatterLangType=nullptr, DateOrder* peFormatterDateOrder=nullptr );
}; };
// There's one instance of this class for every executed sub-program. // There's one instance of this class for every executed sub-program.
@ -287,7 +287,7 @@ class SbiRuntime
// #56204 swap out DIM-functionality into help method (step0.cxx) // #56204 swap out DIM-functionality into help method (step0.cxx)
void DimImpl( SbxVariableRef refVar ); void DimImpl( SbxVariableRef refVar );
static bool implIsClass( SbxObject* pObj, const OUString& aClass ); static bool implIsClass( SbxObject const * pObj, const OUString& aClass );
void StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt ); void StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt );
@ -363,7 +363,7 @@ public:
SbMethod* GetCaller() { return pMeth;} SbMethod* GetCaller() { return pMeth;}
SbxVariable* GetExternalCaller(){ return mpExtCaller; } SbxVariable* GetExternalCaller(){ return mpExtCaller; }
SbiForStack* FindForStackItemForCollection( class BasicCollection* pCollection ); SbiForStack* FindForStackItemForCollection( class BasicCollection const * pCollection );
SbxBase* FindElementExtern( const OUString& rName ); SbxBase* FindElementExtern( const OUString& rName );
static bool isVBAEnabled(); static bool isVBAEnabled();
@ -376,7 +376,7 @@ inline void checkArithmeticOverflow( double d )
StarBASIC::Error( ERRCODE_BASIC_MATH_OVERFLOW ); StarBASIC::Error( ERRCODE_BASIC_MATH_OVERFLOW );
} }
inline void checkArithmeticOverflow( SbxVariable* pVar ) inline void checkArithmeticOverflow( SbxVariable const * pVar )
{ {
if( pVar->GetType() == SbxDOUBLE ) if( pVar->GetType() == SbxDOUBLE )
{ {

View File

@ -117,7 +117,7 @@ class SbUnoObject: public SbxObject
void implCreateAll(); void implCreateAll();
public: public:
static bool getDefaultPropName( SbUnoObject* pUnoObj, OUString& sDfltProp ); static bool getDefaultPropName( SbUnoObject const * pUnoObj, OUString& sDfltProp );
SbUnoObject( const OUString& aName_, const css::uno::Any& aUnoObj_ ); SbUnoObject( const OUString& aName_, const css::uno::Any& aUnoObj_ );
virtual ~SbUnoObject() override; virtual ~SbUnoObject() override;
@ -145,13 +145,13 @@ typedef tools::SvRef<SbUnoObject> SbUnoObjectRef;
// #67781 delete return values of the uno-methods // #67781 delete return values of the uno-methods
void clearUnoMethods(); void clearUnoMethods();
void clearUnoMethodsForBasic( StarBASIC* pBasic ); void clearUnoMethodsForBasic( StarBASIC const * pBasic );
class SbUnoMethod : public SbxMethod class SbUnoMethod : public SbxMethod
{ {
friend class SbUnoObject; friend class SbUnoObject;
friend void clearUnoMethods(); friend void clearUnoMethods();
friend void clearUnoMethodsForBasic( StarBASIC* pBasic ); friend void clearUnoMethodsForBasic( StarBASIC const * pBasic );
css::uno::Reference< css::reflection::XIdlMethod > m_xUnoMethod; css::uno::Reference< css::reflection::XIdlMethod > m_xUnoMethod;
css::uno::Sequence< css::reflection::ParamInfo >* pParamInfoSeq; css::uno::Sequence< css::reflection::ParamInfo >* pParamInfoSeq;
@ -337,7 +337,7 @@ void RTL_Impl_IsUnoStruct( SbxArray& rPar );
void RTL_Impl_EqualUnoObjects( SbxArray& rPar ); void RTL_Impl_EqualUnoObjects( SbxArray& rPar );
void RTL_Impl_GetDefaultContext( SbxArray& rPar ); void RTL_Impl_GetDefaultContext( SbxArray& rPar );
void disposeComVariablesForBasic( StarBASIC* pBasic ); void disposeComVariablesForBasic( StarBASIC const * pBasic );
void clearNativeObjectWrapperVector(); void clearNativeObjectWrapperVector();
@ -353,7 +353,7 @@ class BasicCollection : public SbxObject
void Initialize(); void Initialize();
virtual ~BasicCollection() override; virtual ~BasicCollection() override;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
sal_Int32 implGetIndex( SbxVariable* pIndexVar ); sal_Int32 implGetIndex( SbxVariable const * pIndexVar );
sal_Int32 implGetIndexForName( const OUString& rName ); sal_Int32 implGetIndexForName( const OUString& rName );
void CollAdd( SbxArray* pPar_ ); void CollAdd( SbxArray* pPar_ );
void CollItem( SbxArray* pPar_ ); void CollItem( SbxArray* pPar_ );

View File

@ -2622,7 +2622,7 @@ OUString implSetupWildcard( const OUString& rFileParam, SbiRTLData* pRTLData )
return aPathStr; return aPathStr;
} }
inline bool implCheckWildcard( const OUString& rName, SbiRTLData* pRTLData ) inline bool implCheckWildcard( const OUString& rName, SbiRTLData const * pRTLData )
{ {
bool bMatch = true; bool bMatch = true;

View File

@ -80,8 +80,8 @@ using namespace com::sun::star::script;
using namespace ::com::sun::star; using namespace ::com::sun::star;
static void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType ); static void lcl_clearImpl( SbxVariableRef const & refVar, SbxDataType const & eType );
static void lcl_eraseImpl( SbxVariableRef& refVar, bool bVBAEnabled ); static void lcl_eraseImpl( SbxVariableRef const & refVar, bool bVBAEnabled );
bool SbiRuntime::isVBAEnabled() bool SbiRuntime::isVBAEnabled()
{ {
@ -385,7 +385,7 @@ SvNumberFormatter* SbiInstance::GetNumberFormatter()
// #39629 offer NumberFormatter static too // #39629 offer NumberFormatter static too
SvNumberFormatter* SbiInstance::PrepareNumberFormatter( sal_uInt32 &rnStdDateIdx, SvNumberFormatter* SbiInstance::PrepareNumberFormatter( sal_uInt32 &rnStdDateIdx,
sal_uInt32 &rnStdTimeIdx, sal_uInt32 &rnStdDateTimeIdx, sal_uInt32 &rnStdTimeIdx, sal_uInt32 &rnStdDateTimeIdx,
LanguageType* peFormatterLangType, DateOrder* peFormatterDateOrder ) LanguageType const * peFormatterLangType, DateOrder* peFormatterDateOrder )
{ {
SvNumberFormatter* pNumberFormater = nullptr; SvNumberFormatter* pNumberFormater = nullptr;
LanguageType eLangType; LanguageType eLangType;
@ -1209,7 +1209,7 @@ void SbiRuntime::ClearForStack()
} }
} }
SbiForStack* SbiRuntime::FindForStackItemForCollection( class BasicCollection* pCollection ) SbiForStack* SbiRuntime::FindForStackItemForCollection( class BasicCollection const * pCollection )
{ {
for (SbiForStack *p = pForStk; p; p = p->pNext) for (SbiForStack *p = pForStk; p; p = p->pNext)
{ {
@ -1561,7 +1561,7 @@ void SbiRuntime::StepGET()
} }
// #67607 copy Uno-Structs // #67607 copy Uno-Structs
inline bool checkUnoStructCopy( bool bVBA, SbxVariableRef& refVal, SbxVariableRef& refVar ) inline bool checkUnoStructCopy( bool bVBA, SbxVariableRef const & refVal, SbxVariableRef const & refVar )
{ {
SbxDataType eVarType = refVar->GetType(); SbxDataType eVarType = refVar->GetType();
SbxDataType eValType = refVal->GetType(); SbxDataType eValType = refVal->GetType();
@ -2258,7 +2258,7 @@ void SbiRuntime::StepREDIMP_ERASE()
} }
} }
static void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType ) static void lcl_clearImpl( SbxVariableRef const & refVar, SbxDataType const & eType )
{ {
SbxFlagBits nSavFlags = refVar->GetFlags(); SbxFlagBits nSavFlags = refVar->GetFlags();
refVar->ResetFlag( SbxFlagBits::Fixed ); refVar->ResetFlag( SbxFlagBits::Fixed );
@ -2267,7 +2267,7 @@ static void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType )
refVar->Clear(); refVar->Clear();
} }
static void lcl_eraseImpl( SbxVariableRef& refVar, bool bVBAEnabled ) static void lcl_eraseImpl( SbxVariableRef const & refVar, bool bVBAEnabled )
{ {
SbxDataType eType = refVar->GetType(); SbxDataType eType = refVar->GetType();
if( eType & SbxARRAY ) if( eType & SbxARRAY )
@ -3137,7 +3137,7 @@ void SbiRuntime::StepPRCHAR( sal_uInt32 nOp1 )
// check whether TOS is a certain object class (+StringID) // check whether TOS is a certain object class (+StringID)
bool SbiRuntime::implIsClass( SbxObject* pObj, const OUString& aClass ) bool SbiRuntime::implIsClass( SbxObject const * pObj, const OUString& aClass )
{ {
bool bRet = true; bool bRet = true;

View File

@ -277,7 +277,7 @@ void SbStdFont::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
} }
void SbStdClipboard::MethClear( SbxVariable*, SbxArray* pPar_, bool ) void SbStdClipboard::MethClear( SbxVariable*, SbxArray const * pPar_, bool )
{ {
if( pPar_ && (pPar_->Count() > 1) ) if( pPar_ && (pPar_->Count() > 1) )
{ {
@ -322,7 +322,7 @@ void SbStdClipboard::MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, bool )
pVar->PutBool( false ); pVar->PutBool( false );
} }
void SbStdClipboard::MethGetText( SbxVariable* pVar, SbxArray* pPar_, bool ) void SbStdClipboard::MethGetText( SbxVariable* pVar, SbxArray const * pPar_, bool )
{ {
if( pPar_ && (pPar_->Count() > 1) ) if( pPar_ && (pPar_->Count() > 1) )
{ {
@ -350,7 +350,7 @@ void SbStdClipboard::MethSetData( SbxArray* pPar_, bool )
} }
void SbStdClipboard::MethSetText( SbxArray* pPar_, bool ) void SbStdClipboard::MethSetText( SbxArray const * pPar_, bool )
{ {
if( !pPar_ || (pPar_->Count() != 2) ) if( !pPar_ || (pPar_->Count() != 2) )
{ {

View File

@ -287,7 +287,7 @@ void SbxArray::Remove( sal_uInt32 nIdx )
} }
} }
void SbxArray::Remove( SbxVariable* pVar ) void SbxArray::Remove( SbxVariable const * pVar )
{ {
if( pVar ) if( pVar )
{ {

View File

@ -123,7 +123,7 @@ void SbxBase::AddFactory( SbxFactory* pFac )
r.m_Factories.insert(r.m_Factories.begin(), std::unique_ptr<SbxFactory>(pFac)); r.m_Factories.insert(r.m_Factories.begin(), std::unique_ptr<SbxFactory>(pFac));
} }
void SbxBase::RemoveFactory( SbxFactory* pFac ) void SbxBase::RemoveFactory( SbxFactory const * pFac )
{ {
SbxAppData& r = GetSbxData_Impl(); SbxAppData& r = GetSbxData_Impl();
for (auto it = r.m_Factories.begin(); it != r.m_Factories.end(); ++it) for (auto it = r.m_Factories.begin(); it != r.m_Factories.end(); ++it)

View File

@ -68,7 +68,7 @@ public:
void setInt( int val ); void setInt( int val );
void setUInt( unsigned int val ); void setUInt( unsigned int val );
bool setString( OUString* pOUString ); bool setString( OUString* pOUString );
void setDecimal( SbxDecimal* pDecimal ) void setDecimal( SbxDecimal const * pDecimal )
{ {
#ifdef _WIN32 #ifdef _WIN32
if( pDecimal ) if( pDecimal )

View File

@ -329,7 +329,7 @@ void SbxObject::SetDfltProperty( const OUString& rName )
// the index will be set, otherwise the Count of the Array will be returned. // the index will be set, otherwise the Count of the Array will be returned.
// In any case the correct Array will be returned. // In any case the correct Array will be returned.
SbxArray* SbxObject::FindVar( SbxVariable* pVar, sal_uInt16& nArrayIdx ) SbxArray* SbxObject::FindVar( SbxVariable const * pVar, sal_uInt16& nArrayIdx )
{ {
SbxArray* pArray = nullptr; SbxArray* pArray = nullptr;
if( pVar ) if( pVar )

View File

@ -606,7 +606,7 @@ void SbxValue::PutNull()
// Special decimal methods // Special decimal methods
void SbxValue::PutDecimal( css::bridge::oleautomation::Decimal& rAutomationDec ) void SbxValue::PutDecimal( css::bridge::oleautomation::Decimal const & rAutomationDec )
{ {
SbxValue::Clear(); SbxValue::Clear();
aData.pDecimal = new SbxDecimal( rAutomationDec ); aData.pDecimal = new SbxDecimal( rAutomationDec );

View File

@ -107,6 +107,7 @@ bool ConstParams::VisitFunctionDecl(FunctionDecl * functionDecl)
|| name == "memory_write" || name == "memory_write"
|| name == "file_write" || name == "file_write"
|| name == "SalMainPipeExchangeSignal_impl" || name == "SalMainPipeExchangeSignal_impl"
|| name.startswith("SbRtl_")
// UNO component entry points // UNO component entry points
|| name.endswith("component_getFactory") || name.endswith("component_getFactory")
// in Scheduler::, wants to loop until a reference to a bool becomes true // in Scheduler::, wants to loop until a reference to a bool becomes true
@ -197,6 +198,9 @@ bool ConstParams::VisitDeclRefExpr( const DeclRefExpr* declRefExpr )
if (interestingSet.find(parmVarDecl) == interestingSet.end()) { if (interestingSet.find(parmVarDecl) == interestingSet.end()) {
return true; return true;
} }
// no need to check again if we have already eliminated this one
if (cannotBeConstSet.find(parmVarDecl) != cannotBeConstSet.end())
return true;
if (!checkIfCanBeConst(declRefExpr, parmVarDecl)) if (!checkIfCanBeConst(declRefExpr, parmVarDecl))
cannotBeConstSet.insert(parmVarDecl); cannotBeConstSet.insert(parmVarDecl);

View File

@ -128,7 +128,7 @@ protected:
void LoadOldBasicManager( SotStorage& rStorage ); void LoadOldBasicManager( SotStorage& rStorage );
bool ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const; bool ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const;
static bool ImplEncryptStream( SvStream& rStream ); static bool ImplEncryptStream( SvStream& rStream );
BasicLibInfo* FindLibInfo( StarBASIC* pBasic ); BasicLibInfo* FindLibInfo( StarBASIC const * pBasic );
static void CheckModules( StarBASIC* pBasic, bool bReference ); static void CheckModules( StarBASIC* pBasic, bool bReference );
virtual ~BasicManager() override; virtual ~BasicManager() override;

View File

@ -116,7 +116,7 @@ public:
SbxObject* GetRtl() { return pRtl.get(); } SbxObject* GetRtl() { return pRtl.get(); }
SbModule* FindModule( const OUString& ); SbModule* FindModule( const OUString& );
// Run init code of all modules (including the inserted Doc-Basics) // Run init code of all modules (including the inserted Doc-Basics)
void InitAllModules( StarBASIC* pBasicNotToInit = nullptr ); void InitAllModules( StarBASIC const * pBasicNotToInit = nullptr );
void DeInitAllModules(); void DeInitAllModules();
void ClearAllModuleVars(); void ClearAllModuleVars();

View File

@ -37,7 +37,7 @@ BASIC_DLLPUBLIC void createAllObjectProperties( SbxObject* pObj );
BASIC_DLLPUBLIC void SetSbUnoObjectDfltPropName( SbxObject* pObj ); BASIC_DLLPUBLIC void SetSbUnoObjectDfltPropName( SbxObject* pObj );
BASIC_DLLPUBLIC css::uno::Any sbxToUnoValue( const SbxValue* pVar ); BASIC_DLLPUBLIC css::uno::Any sbxToUnoValue( const SbxValue* pVar );
BASIC_DLLPUBLIC css::uno::Any sbxToUnoValue( const SbxValue* pVar, const css::uno::Type& rType, css::beans::Property* pUnoProperty = nullptr ); BASIC_DLLPUBLIC css::uno::Any sbxToUnoValue( const SbxValue* pVar, const css::uno::Type& rType, css::beans::Property const * pUnoProperty = nullptr );
BASIC_DLLPUBLIC void unoToSbxValue( SbxVariable* pVar, const css::uno::Any& aValue ); BASIC_DLLPUBLIC void unoToSbxValue( SbxVariable* pVar, const css::uno::Any& aValue );

View File

@ -144,7 +144,7 @@ public:
SbxVariable* Get( sal_uInt16 ); SbxVariable* Get( sal_uInt16 );
void Put( SbxVariable*, sal_uInt16 ); void Put( SbxVariable*, sal_uInt16 );
void Insert( SbxVariable*, sal_uInt16 ); void Insert( SbxVariable*, sal_uInt16 );
void Remove( SbxVariable* ); void Remove( SbxVariable const * );
void Merge( SbxArray* ); void Merge( SbxArray* );
OUString GetAlias( sal_uInt16 ); OUString GetAlias( sal_uInt16 );
void PutAlias( const OUString&, sal_uInt16 ); void PutAlias( const OUString&, sal_uInt16 );

View File

@ -87,7 +87,7 @@ public:
// Set the factory for Load/Store/Create // Set the factory for Load/Store/Create
static void AddFactory( SbxFactory* ); static void AddFactory( SbxFactory* );
static void RemoveFactory( SbxFactory* ); static void RemoveFactory( SbxFactory const * );
static SbxBase* Create( sal_uInt16, sal_uInt32 ); static SbxBase* Create( sal_uInt16, sal_uInt32 );
static SbxObject* CreateObject( const OUString& ); static SbxObject* CreateObject( const OUString& );

View File

@ -29,7 +29,7 @@ class SbxProperty;
class BASIC_DLLPUBLIC SbxObject : public SbxVariable, public SfxListener class BASIC_DLLPUBLIC SbxObject : public SbxVariable, public SfxListener
{ {
BASIC_DLLPRIVATE SbxArray* FindVar( SbxVariable*, sal_uInt16& ); BASIC_DLLPRIVATE SbxArray* FindVar( SbxVariable const *, sal_uInt16& );
protected: protected:
SbxArrayRef pMethods; // Methods SbxArrayRef pMethods; // Methods
SbxArrayRef pProps; // Properties SbxArrayRef pProps; // Properties

View File

@ -161,7 +161,7 @@ public:
void PutNull(); void PutNull();
// Special methods // Special methods
void PutDecimal( css::bridge::oleautomation::Decimal& rAutomationDec ); void PutDecimal( css::bridge::oleautomation::Decimal const & rAutomationDec );
bool PutDecimal( SbxDecimal* pDecimal ); // This function is needed for Windows build, don't remove bool PutDecimal( SbxDecimal* pDecimal ); // This function is needed for Windows build, don't remove
void fillAutomationDecimal( css::bridge::oleautomation::Decimal& rAutomationDec ) const; void fillAutomationDecimal( css::bridge::oleautomation::Decimal& rAutomationDec ) const;
bool PutCurrency( sal_Int64 ); bool PutCurrency( sal_Int64 );