diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-03 11:47:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-03 15:14:00 +0200 |
commit | f1ec3c675f1fcb04de564861c24f26b2bac4244c (patch) | |
tree | d324611d26b069d29cb5ca9308a997d6b0f853fa /basic/source | |
parent | 6c8128532e5631702ed426ed664807d6e760e195 (diff) |
loplugin:constmethod in basic
Change-Id: Ib2056ab8437e163c7ae42e3ab7a4a3f8b6cb80a2
Reviewed-on: https://gerrit.libreoffice.org/78547
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 2 | ||||
-rw-r--r-- | basic/source/comp/codegen.cxx | 2 | ||||
-rw-r--r-- | basic/source/comp/exprnode.cxx | 6 | ||||
-rw-r--r-- | basic/source/comp/exprtree.cxx | 2 | ||||
-rw-r--r-- | basic/source/inc/buffer.hxx | 2 | ||||
-rw-r--r-- | basic/source/inc/codegen.hxx | 4 | ||||
-rw-r--r-- | basic/source/inc/dlgcont.hxx | 4 | ||||
-rw-r--r-- | basic/source/inc/expr.hxx | 48 | ||||
-rw-r--r-- | basic/source/inc/image.hxx | 4 | ||||
-rw-r--r-- | basic/source/inc/runtime.hxx | 14 | ||||
-rw-r--r-- | basic/source/inc/sbunoobj.hxx | 26 | ||||
-rw-r--r-- | basic/source/inc/scanner.hxx | 18 | ||||
-rw-r--r-- | basic/source/inc/symtbl.hxx | 10 | ||||
-rw-r--r-- | basic/source/inc/token.hxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/ddectrl.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/ddectrl.hxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/iosys.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/runtime.cxx | 4 | ||||
-rw-r--r-- | basic/source/sbx/sbxdec.cxx | 4 | ||||
-rw-r--r-- | basic/source/sbx/sbxdec.hxx | 2 |
22 files changed, 83 insertions, 83 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index a8707a825d0f..d5fc199e792e 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -377,7 +377,7 @@ public: static BasicLibInfo* Create( SotStorageStream& rSStream ); - const uno::Reference< script::XLibraryContainer >& GetLibraryContainer() + const uno::Reference< script::XLibraryContainer >& GetLibraryContainer() const { return mxScriptCont; } void SetLibraryContainer( const uno::Reference< script::XLibraryContainer >& xScriptCont ) { mxScriptCont = xScriptCont; } diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 6e04394d5d99..3b698965abd0 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4881,7 +4881,7 @@ StructRefInfo SbUnoStructRefObject::getStructMember( const OUString& rMemberName return aRet; } -OUString SbUnoStructRefObject::getDbgObjectName() +OUString SbUnoStructRefObject::getDbgObjectName() const { OUString aName = GetClassName(); if( aName.isEmpty() ) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 74f96ac2740c..35fdb4bd0937 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1658,7 +1658,7 @@ public: StarBASIC::SetGlobalErrorHdl(mErrHandler); } DECL_LINK( BasicErrorHdl, StarBASIC *, bool ); - bool HasError() { return mbError; } + bool HasError() const { return mbError; } }; IMPL_LINK( ErrorHdlResetter, BasicErrorHdl, StarBASIC *, /*pBasic*/, bool) diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index dbed7a50ac0b..f22f98135277 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -42,7 +42,7 @@ SbiCodeGen::SbiCodeGen( SbModule& r, SbiParser* p, short nInc ) nForLevel = 0; } -sal_uInt32 SbiCodeGen::GetPC() +sal_uInt32 SbiCodeGen::GetPC() const { return aCode.GetSize(); } diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx index ca341228d113..6b712a639046 100644 --- a/basic/source/comp/exprnode.cxx +++ b/basic/source/comp/exprnode.cxx @@ -161,17 +161,17 @@ void SbiExprNode::ConvertToIntConstIfPossible() } } -bool SbiExprNode::IsNumber() +bool SbiExprNode::IsNumber() const { return eNodeType == SbxNUMVAL; } -bool SbiExprNode::IsVariable() +bool SbiExprNode::IsVariable() const { return eNodeType == SbxVARVAL; } -bool SbiExprNode::IsLvalue() +bool SbiExprNode::IsLvalue() const { return IsVariable(); } diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index 24b004f424ef..a7f5188aa075 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -110,7 +110,7 @@ static bool DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTo // definition of a new symbol static SbiSymDef* AddSym ( SbiToken eTok, SbiSymPool& rPool, SbiExprType eCurExpr, - const OUString& rName, SbxDataType eType, SbiExprList* pPar ) + const OUString& rName, SbxDataType eType, const SbiExprList* pPar ) { SbiSymDef* pDef; // A= is not a procedure diff --git a/basic/source/inc/buffer.hxx b/basic/source/inc/buffer.hxx index 525a193566c6..2291e8d0bea8 100644 --- a/basic/source/inc/buffer.hxx +++ b/basic/source/inc/buffer.hxx @@ -45,7 +45,7 @@ public: bool operator += (sal_uInt32); // save integer void operator += (sal_Int32); // save integer char* GetBuffer(); // give out buffer (delete yourself!) - sal_uInt32 GetSize() { return nOff; } + sal_uInt32 GetSize() const { return nOff; } }; #endif diff --git a/basic/source/inc/codegen.hxx b/basic/source/inc/codegen.hxx index 5a969d1f2cb7..4abf53504295 100644 --- a/basic/source/inc/codegen.hxx +++ b/basic/source/inc/codegen.hxx @@ -45,8 +45,8 @@ public: void BackChain( sal_uInt32 off ) { aCode.Chain( off ); } void Statement(); void GenStmnt(); // create statement-opcode maybe - sal_uInt32 GetPC(); - sal_uInt32 GetOffset() { return GetPC() + 1; } + sal_uInt32 GetPC() const; + sal_uInt32 GetOffset() const { return GetPC() + 1; } void Save(); // #29955 service for-loop-level diff --git a/basic/source/inc/dlgcont.hxx b/basic/source/inc/dlgcont.hxx index 93e917dd1cd2..d138b77ce5e6 100644 --- a/basic/source/inc/dlgcont.hxx +++ b/basic/source/inc/dlgcont.hxx @@ -130,11 +130,11 @@ public: virtual css::uno::Reference< css::resource::XStringResourceResolver > SAL_CALL getStringResource( ) override; - const OUString& getName() + const OUString& getName() const { return m_aName; } const css::uno::Reference< css::resource::XStringResourcePersistence >& - getStringResourcePersistence() + getStringResourcePersistence() const { return m_xStringResourcePersistence; } diff --git a/basic/source/inc/expr.hxx b/basic/source/inc/expr.hxx index e0b088ef15d8..d83594c4951f 100644 --- a/basic/source/inc/expr.hxx +++ b/basic/source/inc/expr.hxx @@ -106,10 +106,10 @@ class SbiExprNode final { // operators (and operands) void FoldConstantsBinaryNode(SbiParser*); void FoldConstantsUnaryNode(SbiParser*); void CollectBits(); // converting numbers to strings - bool IsOperand() + bool IsOperand() const { return eNodeType != SbxNODE && eNodeType != SbxTYPEOF && eNodeType != SbxNEW; } - bool IsNumber(); - bool IsLvalue(); // true, if usable as Lvalue + bool IsNumber() const; + bool IsLvalue() const; // true, if usable as Lvalue void GenElement( SbiCodeGen&, SbiOpcode ); public: @@ -122,22 +122,22 @@ public: SbiExprNode( sal_uInt16 ); // new <type> ~SbiExprNode(); - bool IsValid() { return !bError; } - bool IsConstant() // true: constant operand + bool IsValid() const { return !bError; } + bool IsConstant() const // true: constant operand { return eNodeType == SbxSTRVAL || eNodeType == SbxNUMVAL; } void ConvertToIntConstIfPossible(); - bool IsVariable(); + bool IsVariable() const; void SetWithParent( SbiExprNode* p ) { pWithParent = p; } - SbxDataType GetType() { return eType; } + SbxDataType GetType() const { return eType; } void SetType( SbxDataType eTp ) { eType = eTp; } - SbiNodeType GetNodeType() { return eNodeType; } + SbiNodeType GetNodeType() const { return eNodeType; } SbiSymDef* GetVar(); SbiSymDef* GetRealVar(); // last variable in x.y.z SbiExprNode* GetRealNode(); // last node in x.y.z - const OUString& GetString() { return aStrVal; } - short GetNumber() { return static_cast<short>(nVal); } + const OUString& GetString() const { return aStrVal; } + short GetNumber() const { return static_cast<short>(nVal); } SbiExprList* GetParameters() { return aVar.pPar; } void Optimize(SbiParser*); // tree matching @@ -180,17 +180,17 @@ public: ~SbiExpression(); OUString& GetName() { return aArgName; } void SetBased() { bBased = true; } - bool IsBased() { return bBased; } + bool IsBased() const { return bBased; } void SetByVal() { bByVal = true; } - bool IsBracket() { return bBracket; } - bool IsValid() { return pExpr->IsValid(); } - bool IsVariable() { return pExpr->IsVariable(); } - bool IsLvalue() { return pExpr->IsLvalue(); } + bool IsBracket() const { return bBracket; } + bool IsValid() const { return pExpr->IsValid(); } + bool IsVariable() const { return pExpr->IsVariable(); } + bool IsLvalue() const { return pExpr->IsLvalue(); } void ConvertToIntConstIfPossible() { pExpr->ConvertToIntConstIfPossible(); } - const OUString& GetString() { return pExpr->GetString(); } + const OUString& GetString() const { return pExpr->GetString(); } SbiSymDef* GetRealVar() { return pExpr->GetRealVar(); } SbiExprNode* GetExprNode() { return pExpr.get(); } - SbxDataType GetType() { return pExpr->GetType(); } + SbxDataType GetType() const { return pExpr->GetType(); } void Gen( RecursiveMode eRecMode = UNDEFINED ); }; @@ -200,9 +200,9 @@ class SbiConstExpression : public SbiExpression { SbxDataType eType; public: // numeric constant SbiConstExpression( SbiParser* ); - SbxDataType GetType() { return eType; } - const OUString& GetString() { return aVal; } - double GetValue() { return nVal; } + SbxDataType GetType() const { return eType; } + const OUString& GetString() const { return aVal; } + double GetValue() const { return nVal; } short GetShortValue(); }; @@ -216,10 +216,10 @@ public: ~SbiExprList(); static SbiExprListPtr ParseParameters(SbiParser*, bool bStandaloneExpression = false, bool bPar = true); static SbiExprListPtr ParseDimList( SbiParser* ); - bool IsBracket() { return bBracket; } - bool IsValid() { return !bError; } - short GetSize() { return aData.size(); } - short GetDims() { return nDim; } + bool IsBracket() const { return bBracket; } + bool IsValid() const { return !bError; } + short GetSize() const { return aData.size(); } + short GetDims() const { return nDim; } SbiExpression* Get( size_t ); void Gen( SbiCodeGen& rGen); // code generation void addExpression( std::unique_ptr<SbiExpression>&& pExpr ); diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx index f286e3e286fb..bc64dc6730d6 100644 --- a/basic/source/inc/image.hxx +++ b/basic/source/inc/image.hxx @@ -81,7 +81,7 @@ public: // nVer is set to version // of image bool Save( SvStream&, sal_uInt32 = B_CURVERSION ); - bool IsError() { return bError; } + bool IsError() const { return bError; } const char* GetCode() const { return pCode.get(); } sal_uInt32 GetCodeSize() const { return nCodeSize; } @@ -89,7 +89,7 @@ public: OUString GetString( short nId ) const; const SbxObject* FindType (const OUString& aTypeName) const; - const SbxArrayRef& GetEnums() { return rEnums; } + const SbxArrayRef& GetEnums() const { return rEnums; } void SetFlag( SbiImageFlags n ) { nFlags |= n; } bool IsFlag( SbiImageFlags n ) const { return bool(nFlags & n); } diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 754336ea089e..11da4275c77b 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -167,13 +167,13 @@ public: void Abort(); // with current error code void Stop(); - ErrCode const & GetErr() { return nErr; } - const OUString& GetErrorMsg() { return aErrorMsg; } - sal_Int32 GetErl() { return nErl; } + ErrCode const & GetErr() const { return nErr; } + const OUString& GetErrorMsg() const { return aErrorMsg; } + sal_Int32 GetErl() const { return nErl; } void EnableReschedule( bool bEnable ) { bReschedule = bEnable; } - bool IsReschedule() { return bReschedule; } + bool IsReschedule() const { return bReschedule; } void EnableCompatibility( bool bEnable ) { bCompatibility = bEnable; } - bool IsCompatibility() { return bCompatibility; } + bool IsCompatibility() const { return bCompatibility; } ComponentVector_t& getComponentVector() { return ComponentVector; } @@ -343,7 +343,7 @@ class SbiRuntime public: void SetVBAEnabled( bool bEnabled ); bool IsImageFlag( SbiImageFlags n ) const; - sal_uInt16 GetBase(); + sal_uInt16 GetBase() const; sal_Int32 nLine,nCol1,nCol2; SbiRuntime* pNext; // Stack-Chain @@ -359,7 +359,7 @@ public: void block() { bBlocked = true; } void unblock() { bBlocked = false; } SbModule* GetModule() { return pMod; } - BasicDebugFlags GetDebugFlags() { return nFlags; } + BasicDebugFlags GetDebugFlags() const { return nFlags; } void SetDebugFlags( BasicDebugFlags nFl ) { nFlags = nFl; } SbMethod* GetCaller() { return pMeth;} SbxVariable* GetExternalCaller(){ return mpExtCaller; } diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index 1116767e34ca..2c38ed5542f4 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -56,7 +56,7 @@ public: css::uno::TypeClass getTypeClass() const; void* getInst(); - bool isEmpty() { return (mnPos == -1); } + bool isEmpty() const { return (mnPos == -1); } css::uno::Any getValue(); void setValue( const css::uno::Any& ); @@ -79,10 +79,10 @@ class SbUnoStructRefObject: public SbxObject void implCreateDbgProperties(); void initMemberCache(); OUString Impl_DumpProperties(); - OUString getDbgObjectName(); + OUString getDbgObjectName() const; public: StructRefInfo getStructMember( const OUString& rMember ); - const StructRefInfo& getStructInfo() { return maMemberInfo; } + const StructRefInfo& getStructInfo() const { return maMemberInfo; } SbUnoStructRefObject( const OUString& aName_, const StructRefInfo& rMemberInfo ); virtual ~SbUnoStructRefObject() override; @@ -133,12 +133,12 @@ public: // give out value css::uno::Any getUnoAny(); - const css::uno::Reference< css::beans::XIntrospectionAccess >& getIntrospectionAccess() { return mxUnoAccess; } - const css::uno::Reference< css::script::XInvocation >& getInvocation() { return mxInvocation; } + const css::uno::Reference< css::beans::XIntrospectionAccess >& getIntrospectionAccess() const { return mxUnoAccess; } + const css::uno::Reference< css::script::XInvocation >& getInvocation() const { return mxInvocation; } void Notify( SfxBroadcaster&, const SfxHint& rHint ) override; - bool isNativeCOMObject() + bool isNativeCOMObject() const { return bNativeCOMObject; } }; typedef tools::SvRef<SbUnoObject> SbUnoObjectRef; @@ -171,7 +171,7 @@ public: const css::uno::Sequence< css::reflection::ParamInfo >& getParamInfos(); - bool isInvocationBased() + bool isInvocationBased() const { return mbInvocation; } }; @@ -195,10 +195,10 @@ public: SbUnoProperty( const OUString& aName_, SbxDataType eSbxType, SbxDataType eRealSbxType, const css::beans::Property& aUnoProp_, sal_Int32 nId_, bool bInvocation, bool bUnoStruct ); - bool isUnoStruct() { return mbUnoStruct; } - bool isInvocationBased() + bool isUnoStruct() const { return mbUnoStruct; } + bool isInvocationBased() const { return mbInvocation; } - SbxDataType getRealType() { return mRealType; } + SbxDataType getRealType() const { return mRealType; } }; // factory class to create uno-structs per DIM AS NEW @@ -227,7 +227,7 @@ public: virtual SbxVariable* Find( const OUString&, SbxClassType ) override; - const css::uno::Reference< css::reflection::XIdlClass >& getUnoClass() { return m_xClass; } + const css::uno::Reference< css::reflection::XIdlClass >& getUnoClass() const { return m_xClass; } }; @@ -271,7 +271,7 @@ public: virtual ~SbUnoServiceCtor() override; virtual SbxInfo* GetInfo() override; - const css::uno::Reference< css::reflection::XServiceConstructorDescription >& getServiceCtorDesc() + const css::uno::Reference< css::reflection::XServiceConstructorDescription >& getServiceCtorDesc() const { return m_xServiceCtorDesc; } }; @@ -299,7 +299,7 @@ public: , mVal( rVal ) {} - const css::uno::Any& getValue() + const css::uno::Any& getValue() const { return mVal; } }; diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx index 5b5b03653b3b..9b03b0adc568 100644 --- a/basic/source/inc/scanner.hxx +++ b/basic/source/inc/scanner.hxx @@ -69,14 +69,14 @@ public: SbiScanner( const OUString&, StarBASIC* = nullptr ); void EnableErrors() { bError = false; } - bool IsHash() { return bHash; } - bool IsCompatible() { return bCompatible; } + bool IsHash() const { return bHash; } + bool IsCompatible() const { return bCompatible; } void SetCompatible( bool b ) { bCompatible = b; } // #118206 - bool IsVBASupportOn() { return bVBASupportOn; } + bool IsVBASupportOn() const { return bVBASupportOn; } bool WhiteSpace() { return bSpaces; } - sal_Int32 GetErrors() { return nErrors; } - sal_Int32 GetLine() { return nLine; } - sal_Int32 GetCol1() { return nCol1; } + sal_Int32 GetErrors() const { return nErrors; } + sal_Int32 GetLine() const { return nLine; } + sal_Int32 GetCol1() const { return nCol1; } void SetCol1( sal_Int32 n ) { nCol1 = n; } StarBASIC* GetBasic() { return pBasic; } void SaveLine() { nSaveLineIdx = nLineIdx; } @@ -86,9 +86,9 @@ public: bool DoesColonFollow(); bool NextSym(); - const OUString& GetSym() { return aSym; } - SbxDataType GetType() { return eScanType; } - double GetDbl() { return nVal; } + const OUString& GetSym() const { return aSym; } + SbxDataType GetType() const { return eScanType; } + double GetDbl() const { return nVal; } }; #endif diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx index 64a11ea814f3..cecfb797da22 100644 --- a/basic/source/inc/symtbl.hxx +++ b/basic/source/inc/symtbl.hxx @@ -136,7 +136,7 @@ public: void SetDefinedAs() { bAs = true; } void SetGlobal(bool b){ bGlobal = b; } void SetDefaultId( sal_uInt16 n ) { nDefaultId = n; } - sal_uInt16 GetDefaultId() { return nDefaultId; } + sal_uInt16 GetDefaultId() const { return nDefaultId; } bool IsOptional() const{ return bOpt; } bool IsParamArray() const{ return bParamArray; } bool IsWithEvents() const{ return bWithEvents; } @@ -188,9 +188,9 @@ public: sal_uInt16 GetLine1() const { return nLine1; } void SetLine2( sal_uInt16 n ) { nLine2 = n; } sal_uInt16 GetLine2() const { return nLine2; } - PropertyMode getPropertyMode() { return mePropMode; } + PropertyMode getPropertyMode() const { return mePropMode; } void setPropertyMode( PropertyMode ePropMode ); - const OUString& GetPropName() { return maPropName; } + const OUString& GetPropName() const { return maPropName; } // Match with a forward-declaration. The parameter names are // compared and the forward declaration is replaced by this @@ -211,8 +211,8 @@ public: virtual SbiConstDef* GetConstDef() override; void Set( double, SbxDataType ); void Set( const OUString& ); - double GetValue() { return nVal; } - const OUString& GetString() { return aVal; } + double GetValue() const { return nVal; } + const OUString& GetString() const { return aVal; } }; diff --git a/basic/source/inc/token.hxx b/basic/source/inc/token.hxx index fd991ba1bb6e..5178013172b3 100644 --- a/basic/source/inc/token.hxx +++ b/basic/source/inc/token.hxx @@ -112,8 +112,8 @@ protected: public: SbiTokenizer( const OUString&, StarBASIC* = nullptr ); - bool IsEof() { return bEof; } - bool IsEos() { return bEos; } + bool IsEof() const { return bEof; } + bool IsEos() const { return bEos; } void Push( SbiToken ); const OUString& Symbol( SbiToken ); // reconversion diff --git a/basic/source/runtime/ddectrl.cxx b/basic/source/runtime/ddectrl.cxx index 47858f2b97ff..37d3c7d0c44d 100644 --- a/basic/source/runtime/ddectrl.cxx +++ b/basic/source/runtime/ddectrl.cxx @@ -47,7 +47,7 @@ static const ErrCode nDdeErrMap[] = /* DMLERR_UNFOUND_QUEUE_ID */ ErrCode(0x4011), ERRCODE_BASIC_DDE_NO_CHANNEL }; -ErrCode SbiDdeControl::GetLastErr( DdeConnection* pConv ) +ErrCode SbiDdeControl::GetLastErr( const DdeConnection* pConv ) { if( !pConv ) { diff --git a/basic/source/runtime/ddectrl.hxx b/basic/source/runtime/ddectrl.hxx index dd12241a31b5..ea4557d4d02e 100644 --- a/basic/source/runtime/ddectrl.hxx +++ b/basic/source/runtime/ddectrl.hxx @@ -30,7 +30,7 @@ class SbiDdeControl { private: DECL_LINK( Data, const DdeData*, void ); - static ErrCode GetLastErr( DdeConnection* ); + static ErrCode GetLastErr( const DdeConnection* ); size_t GetFreeChannel(); std::vector<std::unique_ptr<DdeConnection>> aConvList; OUString aData; diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index d73a177ac223..cf433052014c 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -69,7 +69,7 @@ class SbiInputDialog : public weld::GenericDialogController DECL_LINK(Cancel, weld::Button&, void); public: SbiInputDialog(weld::Window*, const OUString&); - const OUString& GetInput() { return m_aText; } + const OUString& GetInput() const { return m_aText; } }; SbiInputDialog::SbiInputDialog(weld::Window* pParent, const OUString& rPrompt) diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 70300cc6542e..74fe533bd4a5 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -99,7 +99,7 @@ void StarBASIC::SetVBAEnabled( bool bEnabled ) } } -bool StarBASIC::isVBAEnabled() +bool StarBASIC::isVBAEnabled() const { if ( bDocBasic ) { @@ -1261,7 +1261,7 @@ bool SbiRuntime::IsImageFlag( SbiImageFlags n ) const return pImg->IsFlag( n ); } -sal_uInt16 SbiRuntime::GetBase() +sal_uInt16 SbiRuntime::GetBase() const { return pImg->GetBase(); } diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx index 8ae493031c0c..cd4566b105b7 100644 --- a/basic/source/sbx/sbxdec.cxx +++ b/basic/source/sbx/sbxdec.cxx @@ -127,7 +127,7 @@ bool SbxDecimal::neg() return bRet; } -bool SbxDecimal::isZero() +bool SbxDecimal::isZero() const { SbxDecimal aZeroDec; aZeroDec.setLong( 0 ); @@ -310,7 +310,7 @@ bool SbxDecimal::neg() return false; } -bool SbxDecimal::isZero() +bool SbxDecimal::isZero() const { return false; } diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx index ed054642ded9..cfd2290aa517 100644 --- a/basic/source/sbx/sbxdec.hxx +++ b/basic/source/sbx/sbxdec.hxx @@ -93,7 +93,7 @@ public: bool operator *= ( const SbxDecimal &r ); bool neg(); - bool isZero(); + bool isZero() const; // must match the return values of the Microsoft VarDecCmp Automation function enum class CmpResult { LT, EQ, GT }; |