summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-14 14:50:07 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-07-15 09:07:05 +0000
commit22b094f5d8e1e82375b135abd3a6f99a9a555244 (patch)
tree8f678aa9d5db3400fb8aba0ade1f1cbda23696f1 /basic
parentba562acdf293e0e0ec4f747716e7fb0db848f1cb (diff)
loplugin:unusedmethods basic
Change-Id: Iddfbde451088750f8c74f3ac72c35b5ccfbe0ab1 Reviewed-on: https://gerrit.libreoffice.org/17044 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/cppunit/basictest.hxx5
-rw-r--r--basic/source/classes/sbunoobj.cxx6
-rw-r--r--basic/source/inc/buffer.hxx1
-rw-r--r--basic/source/inc/errobject.hxx3
-rw-r--r--basic/source/inc/expr.hxx6
-rw-r--r--basic/source/inc/image.hxx1
-rw-r--r--basic/source/inc/parser.hxx2
-rw-r--r--basic/source/inc/runtime.hxx4
-rw-r--r--basic/source/inc/sbunoobj.hxx6
-rw-r--r--basic/source/inc/scanner.hxx1
-rw-r--r--basic/source/inc/scriptcont.hxx3
-rw-r--r--basic/source/inc/symtbl.hxx1
-rw-r--r--basic/source/runtime/dllmgr-x86.cxx2
-rw-r--r--basic/source/sbx/sbxdec.hxx2
-rw-r--r--basic/source/uno/scriptcont.cxx29
15 files changed, 5 insertions, 67 deletions
diff --git a/basic/qa/cppunit/basictest.hxx b/basic/qa/cppunit/basictest.hxx
index c3d16cf8ae89..1b9c6341cd7f 100644
--- a/basic/qa/cppunit/basictest.hxx
+++ b/basic/qa/cppunit/basictest.hxx
@@ -138,11 +138,6 @@ class MacroSnippet
bool HasError() { return mbError; }
- void ResetError()
- {
- StarBASIC::SetGlobalErrorHdl( Link<StarBASIC*,bool>() );
- mbError = false;
- }
};
IMPL_LINK_TYPED( MacroSnippet, BasicErrorHdl, StarBASIC *, /*pBasic*/, bool)
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 3d3dfbee6c9c..00f30ec124b1 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -2537,12 +2537,10 @@ SbUnoMethod::SbUnoMethod
const OUString& aName_,
SbxDataType eSbxType,
Reference< XIdlMethod > xUnoMethod_,
- bool bInvocation,
- bool bDirect
+ bool bInvocation
)
: SbxMethod( aName_, eSbxType )
, mbInvocation( bInvocation )
- , mbDirectInvocation( bDirect )
{
m_xUnoMethod = xUnoMethod_;
pParamInfoSeq = NULL;
@@ -2760,7 +2758,7 @@ SbxVariable* SbUnoObject::Find( const OUString& rName, SbxClassType t )
Reference< XDirectInvocation > xDirectInvoke( mxInvocation, UNO_QUERY );
if ( xDirectInvoke.is() && xDirectInvoke->hasMember( aUName ) )
{
- SbxVariableRef xMethRef = new SbUnoMethod( aUName, SbxVARIANT, xDummyMethod, true, true );
+ SbxVariableRef xMethRef = new SbUnoMethod( aUName, SbxVARIANT, xDummyMethod, true );
QuickInsert( static_cast<SbxVariable*>(xMethRef) );
pRes = xMethRef;
}
diff --git a/basic/source/inc/buffer.hxx b/basic/source/inc/buffer.hxx
index 839af8543821..e94ba15c9ad4 100644
--- a/basic/source/inc/buffer.hxx
+++ b/basic/source/inc/buffer.hxx
@@ -45,7 +45,6 @@ public:
bool operator += (sal_uInt32); // save integer
bool operator += (sal_Int32); // save integer
char* GetBuffer(); // give out buffer (delete yourself!)
- char* GetBufferPtr(){ return pBuf; }
sal_uInt32 GetSize() { return nOff; }
};
diff --git a/basic/source/inc/errobject.hxx b/basic/source/inc/errobject.hxx
index 588a69ef3de8..e2c354e78e0a 100644
--- a/basic/source/inc/errobject.hxx
+++ b/basic/source/inc/errobject.hxx
@@ -31,9 +31,6 @@ class SbxErrObject : public SbUnoObject
SbxErrObject( const OUString& aName_, const com::sun::star::uno::Any& aUnoObj_ );
virtual ~SbxErrObject();
- class ErrObject* getImplErrObject()
- { return m_pErrObject; }
-
public:
static SbxVariableRef getErrObject();
static com::sun::star::uno::Reference< ooo::vba::XErrObject > getUnoErrObject();
diff --git a/basic/source/inc/expr.hxx b/basic/source/inc/expr.hxx
index d5fdfd5b99ca..0df028181a3d 100644
--- a/basic/source/inc/expr.hxx
+++ b/basic/source/inc/expr.hxx
@@ -145,7 +145,6 @@ public:
const OUString& GetString() { return aStrVal; }
short GetNumber() { return (short)nVal; }
SbiExprList* GetParameters() { return aVar.pPar; }
- SbiExprListVector* GetMoreParameters() { return aVar.pvMorePar; }
void Optimize(SbiParser*); // tree matching
@@ -192,19 +191,15 @@ public:
void SetBased() { bBased = true; }
bool IsBased() { return bBased; }
void SetByVal() { bByVal = true; }
- bool IsByVal() { return bByVal; }
bool IsBracket() { return bBracket; }
bool IsValid() { return pExpr->IsValid(); }
- bool IsConstant() { return pExpr->IsConstant(); }
bool IsVariable() { return pExpr->IsVariable(); }
bool IsLvalue() { return pExpr->IsLvalue(); }
bool IsIntConstant() { return pExpr->IsIntConst(); }
const OUString& GetString() { return pExpr->GetString(); }
- SbiSymDef* GetVar() { return pExpr->GetVar(); }
SbiSymDef* GetRealVar() { return pExpr->GetRealVar(); }
SbiExprNode* GetExprNode() { return pExpr; }
SbxDataType GetType() { return pExpr->GetType(); }
- void SetType( SbxDataType eType){ pExpr->eType = eType; }
void Gen( RecursiveMode eRecMode = UNDEFINED );
};
@@ -249,7 +244,6 @@ class SbiDimList : public SbiExprList {
bool bConst; // true: everything integer constants
public:
SbiDimList( SbiParser* ); // parsing Ctor
- bool IsConstant() { return bConst; }
};
#endif
diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx
index 0061a072531a..cc4b7de10c9e 100644
--- a/basic/source/inc/image.hxx
+++ b/basic/source/inc/image.hxx
@@ -86,7 +86,6 @@ public:
const char* GetCode() const { return pCode; }
sal_uInt32 GetCodeSize() const { return nCodeSize; }
- OUString& GetSource32() { return aOUSource; }
sal_uInt16 GetBase() const { return nDimBase; }
OUString GetString( short nId ) const;
const SbxObject* FindType (const OUString& aTypeName) const;
diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx
index 1d277b4b22fd..2245651894df 100644
--- a/basic/source/inc/parser.hxx
+++ b/basic/source/inc/parser.hxx
@@ -99,9 +99,7 @@ public:
void Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo = NULL ); // let or call
void ErrorStmnt(); // ERROR n
- void NotImp(); // not implemented
void BadBlock(); // LOOP/WEND/NEXT
- void BadSyntax(); // wrong SbiToken
void NoIf(); // ELSE/ELSE IF without IF
void Assign(); // LET
void Attribute();
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx
index 0ab61835276f..8e7e8844daa7 100644
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@ -346,7 +346,7 @@ class SbiRuntime
void StepLE(), StepGE(), StepIDIV(), StepAND();
void StepOR(), StepXOR(), StepEQV(), StepIMP();
void StepNOT(), StepCAT(), StepLIKE(), StepIS();
- void StepCLONE(), StepOLDBASED(), StepARGC();
+ void StepARGC();
void StepARGV(), StepINPUT(), StepLINPUT(), StepSTOP();
void StepGET(), StepSET(), StepVBASET(), StepPUT(), StepPUTC();
void StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, bool bDefaultHandling = false );
@@ -399,12 +399,10 @@ public:
void FatalError( SbError ); // error handling = standard, set error
void FatalError( SbError, const OUString& ); // error handling = standard, set error
static sal_Int32 translateErrorToVba( SbError nError, OUString& rMsg );
- void DumpPCode();
bool Step(); // single step (one opcode)
void Stop() { bRun = false; }
void block() { bBlocked = true; }
void unblock() { bBlocked = false; }
- SbMethod* GetMethod() { return pMeth; }
SbModule* GetModule() { return pMod; }
sal_uInt16 GetDebugFlags() { return nFlags; }
void SetDebugFlags( sal_uInt16 nFl ) { nFlags = nFl; }
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 879e0c08d00f..21754c65116e 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -164,14 +164,12 @@ class SbUnoMethod : public SbxMethod
SbUnoMethod* pNext;
bool mbInvocation; // Method is based on invocation
- bool mbDirectInvocation; // Method should be used with XDirectInvocation interface
public:
TYPEINFO_OVERRIDE();
SbUnoMethod( const OUString& aName_, SbxDataType eSbxType, ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlMethod > xUnoMethod_,
- bool bInvocation,
- bool bDirect = false );
+ bool bInvocation );
virtual ~SbUnoMethod();
virtual SbxInfo* GetInfo() SAL_OVERRIDE;
@@ -179,8 +177,6 @@ public:
bool isInvocationBased()
{ return mbInvocation; }
- bool needsDirectInvocation()
- { return mbDirectInvocation; }
};
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index 43bab7bcbbbc..e499c25c7070 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -74,7 +74,6 @@ public:
bool IsCompatible() { return bCompatible; }
void SetCompatible( bool b ) { bCompatible = b; } // #118206
bool IsVBASupportOn() { return bVBASupportOn; }
- void SetVBASupportOn( bool b ) { bVBASupportOn = b; }
bool WhiteSpace() { return bSpaces; }
sal_Int32 GetErrors() { return nErrors; }
sal_Int32 GetLine() { return nLine; }
diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx
index 17f9c32274f9..dd33cd09611a 100644
--- a/basic/source/inc/scriptcont.hxx
+++ b/basic/source/inc/scriptcont.hxx
@@ -82,9 +82,6 @@ class SfxScriptLibraryContainer : public SfxLibraryContainer, public OldBasicPas
// OldBasicPassword interface
virtual void setLibraryPassword( const OUString& rLibraryName, const OUString& rPassword ) SAL_OVERRIDE;
- virtual OUString getLibraryPassword( const OUString& rLibraryName ) SAL_OVERRIDE;
- virtual void clearLibraryPassword( const OUString& rLibraryName ) SAL_OVERRIDE;
- virtual bool hasLibraryPassword( const OUString& rLibraryName ) SAL_OVERRIDE;
virtual const sal_Char* SAL_CALL getInfoFileName() const SAL_OVERRIDE;
virtual const sal_Char* SAL_CALL getOldInfoFileName() const SAL_OVERRIDE;
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index cc4fac562188..bb8d1b7a8a91 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -122,7 +122,6 @@ public:
virtual void SetType( SbxDataType );
const OUString& GetName();
SbiSymScope GetScope() const;
- sal_uInt16 GetProcId() const{ return nProcId; }
sal_uInt32 GetAddr() const { return nChain; }
sal_uInt16 GetId() const { return nId; }
sal_uInt16 GetTypeId() const{ return nTypeId; }
diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx
index acc9cb5685e9..02730189a261 100644
--- a/basic/source/runtime/dllmgr-x86.cxx
+++ b/basic/source/runtime/dllmgr-x86.cxx
@@ -326,7 +326,7 @@ SbError marshal(
case SbxDOUBLE:
case SbxBOOL:
case SbxBYTE:
- add(blob, variable->data(), 4, offset);
+ add(blob, variable->GetValues_Impl(), 4, offset);
break;
case SbxSTRING:
{
diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx
index 1bed80e87f6b..28d392e4637a 100644
--- a/basic/source/sbx/sbxdec.hxx
+++ b/basic/source/sbx/sbxdec.hxx
@@ -90,8 +90,6 @@ public:
bool getULong( sal_uInt32& rVal );
bool getSingle( float& rVal );
bool getDouble( double& rVal );
- bool getInt( int& rVal );
- bool getUInt( unsigned int& rVal );
bool getString( OUString& rString );
bool operator -= ( const SbxDecimal &r );
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 46620df77a3d..2142b03e76c5 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -98,35 +98,6 @@ void SfxScriptLibraryContainer::setLibraryPassword( const OUString& rLibraryName
catch(const NoSuchElementException& ) {}
}
-OUString SfxScriptLibraryContainer::getLibraryPassword( const OUString& rLibraryName )
-{
- SfxLibrary* pImplLib = getImplLib( rLibraryName );
- OUString aPassword;
- if( pImplLib->mbPasswordVerified )
- {
- aPassword = pImplLib->maPassword;
- }
- return aPassword;
-}
-
-void SfxScriptLibraryContainer::clearLibraryPassword( const OUString& rLibraryName )
-{
- try
- {
- SfxLibrary* pImplLib = getImplLib( rLibraryName );
- pImplLib->mbDoc50Password = false;
- pImplLib->mbPasswordProtected = false;
- pImplLib->maPassword.clear();
- }
- catch(const NoSuchElementException& ) {}
-}
-
-bool SfxScriptLibraryContainer::hasLibraryPassword( const OUString& rLibraryName )
-{
- SfxLibrary* pImplLib = getImplLib( rLibraryName );
- return pImplLib->mbPasswordProtected;
-}
-
// Ctor for service
SfxScriptLibraryContainer::SfxScriptLibraryContainer()
:maScriptLanguage( "StarBasic" )