[Libreoffice-commits] core.git: basic/inc basic/source compilerplugins/clang include/basic

Noel Grandin noel.grandin at collabora.co.uk
Thu Jul 20 10:01:48 UTC 2017


 basic/inc/sbstdobj.hxx                |    6 +++---
 basic/source/basmgr/basmgr.cxx        |    6 +++---
 basic/source/classes/image.cxx        |    4 ++--
 basic/source/classes/sb.cxx           |    4 ++--
 basic/source/classes/sbunoobj.cxx     |   14 +++++++-------
 basic/source/comp/codegen.cxx         |    4 ++--
 basic/source/inc/codegen.hxx          |    4 ++--
 basic/source/inc/image.hxx            |    2 +-
 basic/source/inc/runtime.hxx          |    8 ++++----
 basic/source/inc/sbunoobj.hxx         |   10 +++++-----
 basic/source/runtime/methods.cxx      |    2 +-
 basic/source/runtime/runtime.cxx      |   16 ++++++++--------
 basic/source/runtime/stdobj1.cxx      |    6 +++---
 basic/source/sbx/sbxarray.cxx         |    2 +-
 basic/source/sbx/sbxbase.cxx          |    2 +-
 basic/source/sbx/sbxdec.hxx           |    2 +-
 basic/source/sbx/sbxobj.cxx           |    2 +-
 basic/source/sbx/sbxvalue.cxx         |    2 +-
 compilerplugins/clang/constparams.cxx |    4 ++++
 include/basic/basmgr.hxx              |    2 +-
 include/basic/sbstar.hxx              |    2 +-
 include/basic/sbuno.hxx               |    2 +-
 include/basic/sbx.hxx                 |    2 +-
 include/basic/sbxcore.hxx             |    2 +-
 include/basic/sbxobj.hxx              |    2 +-
 include/basic/sbxvar.hxx              |    2 +-
 26 files changed, 59 insertions(+), 55 deletions(-)

New commits:
commit 6d829ae4f218b5d751cfc366f071fc6160c0787c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Jul 20 10:08:03 2017 +0200

    loplugin:constparams in basic
    
    Change-Id: Idf55f63f2d56be4997a8cdc6afc5690eacac9a60
    Reviewed-on: https://gerrit.libreoffice.org/40214
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basic/inc/sbstdobj.hxx b/basic/inc/sbstdobj.hxx
index 210d3f7a26c4..34a6e49e7450 100644
--- a/basic/inc/sbstdobj.hxx
+++ b/basic/inc/sbstdobj.hxx
@@ -101,12 +101,12 @@ protected:
     virtual ~SbStdClipboard() 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    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    MethSetText( SbxArray* pPar_, bool bWrite );
+    static void    MethSetText( SbxArray const * pPar_, bool bWrite );
 
 public:
 
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 464c10489b46..cc1e3d340503 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -131,7 +131,7 @@ public:
 
     static void insertLibraryImpl( const uno::Reference< script::XLibraryContainer >& xScriptCont, BasicManager* pMgr,
                                    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 );
 
 
@@ -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 )
 {
     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)
     {
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() )
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index 64791af66671..d16e9560e328 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -554,13 +554,13 @@ public:
 };
 
 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 );
 }
 
 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 );
 }
diff --git a/basic/source/inc/codegen.hxx b/basic/source/inc/codegen.hxx
index 70da5867274f..5a969d1f2cb7 100644
--- a/basic/source/inc/codegen.hxx
+++ b/basic/source/inc/codegen.hxx
@@ -53,8 +53,8 @@ public:
     void IncForLevel() { nForLevel++; }
     void DecForLevel() { nForLevel--; }
 
-    static sal_uInt32 calcNewOffSet( sal_uInt8* pCode, sal_uInt16 nOffset );
-    static sal_uInt16 calcLegacyOffSet( sal_uInt8* pCode, sal_uInt32 nOffset );
+    static sal_uInt32 calcNewOffSet( sal_uInt8 const * pCode, sal_uInt16 nOffset );
+    static sal_uInt16 calcLegacyOffSet( sal_uInt8 const * pCode, sal_uInt32 nOffset );
 
 };
 
diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx
index 5e46c8dace48..f15e8c700b4f 100644
--- a/basic/source/inc/image.hxx
+++ b/basic/source/inc/image.hxx
@@ -65,7 +65,7 @@ class SbiImage {
     void MakeStrings( short );      // establish StringPool
     void AddString( const OUString& );
     void AddCode( char*, sal_uInt32 );
-    void AddType(SbxObject *);
+    void AddType(SbxObject const *);
     void AddEnum(SbxObject *);
 
 public:
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx
index 6b390ff2f078..fd817d0ca935 100644
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@ -193,7 +193,7 @@ public:
     // offer NumberFormatter also static
     static SvNumberFormatter* PrepareNumberFormatter( sal_uInt32 &rnStdDateIdx,
         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.
@@ -287,7 +287,7 @@ class SbiRuntime
     // #56204 swap out DIM-functionality into help method (step0.cxx)
     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 );
 
@@ -363,7 +363,7 @@ public:
     SbMethod* GetCaller() { return pMeth;}
     SbxVariable* GetExternalCaller(){ return mpExtCaller; }
 
-    SbiForStack* FindForStackItemForCollection( class BasicCollection* pCollection );
+    SbiForStack* FindForStackItemForCollection( class BasicCollection const * pCollection );
 
     SbxBase* FindElementExtern( const OUString& rName );
     static bool isVBAEnabled();
@@ -376,7 +376,7 @@ inline void checkArithmeticOverflow( double d )
         StarBASIC::Error( ERRCODE_BASIC_MATH_OVERFLOW );
 }
 
-inline void checkArithmeticOverflow( SbxVariable* pVar )
+inline void checkArithmeticOverflow( SbxVariable const * pVar )
 {
     if( pVar->GetType() == SbxDOUBLE )
     {
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index bbb8f08f42cd..2fae21ecf514 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -117,7 +117,7 @@ class SbUnoObject: public SbxObject
     void implCreateAll();
 
 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_ );
     virtual ~SbUnoObject() override;
 
@@ -145,13 +145,13 @@ typedef tools::SvRef<SbUnoObject> SbUnoObjectRef;
 
 // #67781 delete return values of the uno-methods
 void clearUnoMethods();
-void clearUnoMethodsForBasic( StarBASIC* pBasic );
+void clearUnoMethodsForBasic( StarBASIC const * pBasic );
 
 class SbUnoMethod : public SbxMethod
 {
     friend class SbUnoObject;
     friend void clearUnoMethods();
-    friend void clearUnoMethodsForBasic( StarBASIC* pBasic );
+    friend void clearUnoMethodsForBasic( StarBASIC const * pBasic );
 
     css::uno::Reference< css::reflection::XIdlMethod > m_xUnoMethod;
     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_GetDefaultContext( SbxArray& rPar );
 
-void disposeComVariablesForBasic( StarBASIC* pBasic );
+void disposeComVariablesForBasic( StarBASIC const * pBasic );
 void clearNativeObjectWrapperVector();
 
 
@@ -353,7 +353,7 @@ class BasicCollection : public SbxObject
     void Initialize();
     virtual ~BasicCollection() 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 );
     void CollAdd( SbxArray* pPar_ );
     void CollItem( SbxArray* pPar_ );
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 92ae738a362b..f9f7d53597e3 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2622,7 +2622,7 @@ OUString implSetupWildcard( const OUString& rFileParam, SbiRTLData* pRTLData )
     return aPathStr;
 }
 
-inline bool implCheckWildcard( const OUString& rName, SbiRTLData* pRTLData )
+inline bool implCheckWildcard( const OUString& rName, SbiRTLData const * pRTLData )
 {
     bool bMatch = true;
 
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index ce1e17f74872..8f7342b84aee 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -80,8 +80,8 @@ using namespace com::sun::star::script;
 
 using namespace ::com::sun::star;
 
-static void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType );
-static void lcl_eraseImpl( SbxVariableRef& refVar, bool bVBAEnabled );
+static void lcl_clearImpl( SbxVariableRef const & refVar, SbxDataType const & eType );
+static void lcl_eraseImpl( SbxVariableRef const & refVar, bool bVBAEnabled );
 
 bool SbiRuntime::isVBAEnabled()
 {
@@ -385,7 +385,7 @@ SvNumberFormatter* SbiInstance::GetNumberFormatter()
 // #39629 offer NumberFormatter static too
 SvNumberFormatter* SbiInstance::PrepareNumberFormatter( sal_uInt32 &rnStdDateIdx,
     sal_uInt32 &rnStdTimeIdx, sal_uInt32 &rnStdDateTimeIdx,
-    LanguageType* peFormatterLangType, DateOrder* peFormatterDateOrder )
+    LanguageType const * peFormatterLangType, DateOrder* peFormatterDateOrder )
 {
     SvNumberFormatter* pNumberFormater = nullptr;
     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)
     {
@@ -1561,7 +1561,7 @@ void SbiRuntime::StepGET()
 }
 
 // #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 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();
     refVar->ResetFlag( SbxFlagBits::Fixed );
@@ -2267,7 +2267,7 @@ static void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType )
     refVar->Clear();
 }
 
-static void lcl_eraseImpl( SbxVariableRef& refVar, bool bVBAEnabled )
+static void lcl_eraseImpl( SbxVariableRef const & refVar, bool bVBAEnabled )
 {
     SbxDataType eType = refVar->GetType();
     if( eType & SbxARRAY )
@@ -3137,7 +3137,7 @@ void SbiRuntime::StepPRCHAR( sal_uInt32 nOp1 )
 
 // 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;
 
diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx
index d0dedad8961f..07342d1bb1ee 100644
--- a/basic/source/runtime/stdobj1.cxx
+++ b/basic/source/runtime/stdobj1.cxx
@@ -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) )
     {
@@ -322,7 +322,7 @@ void SbStdClipboard::MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, bool )
     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) )
     {
@@ -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) )
     {
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index ae20542c798d..d09d3cf56eae 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -287,7 +287,7 @@ void SbxArray::Remove( sal_uInt32 nIdx )
     }
 }
 
-void SbxArray::Remove( SbxVariable* pVar )
+void SbxArray::Remove( SbxVariable const * pVar )
 {
     if( pVar )
     {
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index a17d2c336016..379ecdd41e10 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -123,7 +123,7 @@ void SbxBase::AddFactory( 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();
     for (auto it = r.m_Factories.begin(); it != r.m_Factories.end(); ++it)
diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx
index 4d80b253f0ed..ed054642ded9 100644
--- a/basic/source/sbx/sbxdec.hxx
+++ b/basic/source/sbx/sbxdec.hxx
@@ -68,7 +68,7 @@ public:
     void setInt( int val );
     void setUInt( unsigned int val );
     bool setString( OUString* pOUString );
-    void setDecimal( SbxDecimal* pDecimal )
+    void setDecimal( SbxDecimal const * pDecimal )
     {
 #ifdef _WIN32
         if( pDecimal )
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index ece89f5862be..0a17ccdb3319 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -329,7 +329,7 @@ void SbxObject::SetDfltProperty( const OUString& rName )
 // the index will be set, otherwise the Count of the 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;
     if( pVar )
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 1f79b69230ad..687f7293517c 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -606,7 +606,7 @@ void SbxValue::PutNull()
 
 
 // Special decimal methods
-void SbxValue::PutDecimal( css::bridge::oleautomation::Decimal& rAutomationDec )
+void SbxValue::PutDecimal( css::bridge::oleautomation::Decimal const & rAutomationDec )
 {
     SbxValue::Clear();
     aData.pDecimal = new SbxDecimal( rAutomationDec );
diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx
index 0bee8fbc134c..d2d779c4d1c4 100644
--- a/compilerplugins/clang/constparams.cxx
+++ b/compilerplugins/clang/constparams.cxx
@@ -107,6 +107,7 @@ bool ConstParams::VisitFunctionDecl(FunctionDecl * functionDecl)
             || name == "memory_write"
             || name == "file_write"
             || name == "SalMainPipeExchangeSignal_impl"
+            || name.startswith("SbRtl_")
                 // UNO component entry points
             || name.endswith("component_getFactory")
                 // 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()) {
         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))
         cannotBeConstSet.insert(parmVarDecl);
 
diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx
index 4dfc8833669b..9cd3a502facb 100644
--- a/include/basic/basmgr.hxx
+++ b/include/basic/basmgr.hxx
@@ -128,7 +128,7 @@ protected:
     void            LoadOldBasicManager( SotStorage& rStorage );
     bool            ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const;
     static bool     ImplEncryptStream( SvStream& rStream );
-    BasicLibInfo*   FindLibInfo( StarBASIC* pBasic );
+    BasicLibInfo*   FindLibInfo( StarBASIC const * pBasic );
     static void     CheckModules( StarBASIC* pBasic, bool bReference );
     virtual ~BasicManager() override;
 
diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx
index 35a51e17a5c9..071025d52fa3 100644
--- a/include/basic/sbstar.hxx
+++ b/include/basic/sbstar.hxx
@@ -116,7 +116,7 @@ public:
     SbxObject*      GetRtl()     { return pRtl.get();     }
     SbModule*       FindModule( const OUString& );
     // 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            ClearAllModuleVars();
 
diff --git a/include/basic/sbuno.hxx b/include/basic/sbuno.hxx
index 895ecf59dba2..2fd809304671 100644
--- a/include/basic/sbuno.hxx
+++ b/include/basic/sbuno.hxx
@@ -37,7 +37,7 @@ BASIC_DLLPUBLIC void createAllObjectProperties( 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, 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 );
 
diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx
index 485a2e89994b..0e905fd333b1 100644
--- a/include/basic/sbx.hxx
+++ b/include/basic/sbx.hxx
@@ -144,7 +144,7 @@ public:
     SbxVariable*         Get( sal_uInt16 );
     void                 Put( SbxVariable*, sal_uInt16 );
     void                 Insert( SbxVariable*, sal_uInt16 );
-    void                 Remove( SbxVariable* );
+    void                 Remove( SbxVariable const * );
     void                 Merge( SbxArray* );
     OUString             GetAlias( sal_uInt16 );
     void                 PutAlias( const OUString&, sal_uInt16 );
diff --git a/include/basic/sbxcore.hxx b/include/basic/sbxcore.hxx
index 3c1c48fdd9c5..ed6a3944c2a2 100644
--- a/include/basic/sbxcore.hxx
+++ b/include/basic/sbxcore.hxx
@@ -87,7 +87,7 @@ public:
 
     // Set the factory for Load/Store/Create
     static void AddFactory( SbxFactory* );
-    static void RemoveFactory( SbxFactory* );
+    static void RemoveFactory( SbxFactory const * );
 
     static SbxBase* Create( sal_uInt16, sal_uInt32 );
     static SbxObject* CreateObject( const OUString& );
diff --git a/include/basic/sbxobj.hxx b/include/basic/sbxobj.hxx
index 65176320dd57..86aacecff5c9 100644
--- a/include/basic/sbxobj.hxx
+++ b/include/basic/sbxobj.hxx
@@ -29,7 +29,7 @@ class SbxProperty;
 
 class BASIC_DLLPUBLIC SbxObject : public SbxVariable, public SfxListener
 {
-    BASIC_DLLPRIVATE SbxArray* FindVar( SbxVariable*, sal_uInt16& );
+    BASIC_DLLPRIVATE SbxArray* FindVar( SbxVariable const *, sal_uInt16& );
 protected:
     SbxArrayRef  pMethods;                  // Methods
     SbxArrayRef  pProps;                    // Properties
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx
index 516d0d936516..f90dc939b768 100644
--- a/include/basic/sbxvar.hxx
+++ b/include/basic/sbxvar.hxx
@@ -161,7 +161,7 @@ public:
     void PutNull();
 
             // 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
     void fillAutomationDecimal( css::bridge::oleautomation::Decimal& rAutomationDec ) const;
     bool PutCurrency( sal_Int64 );


More information about the Libreoffice-commits mailing list