summaryrefslogtreecommitdiff
path: root/basic/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-11 08:39:01 +0200
committerNoel Grandin <noel@peralex.com>2016-01-11 10:49:24 +0200
commitbc80f951c14208eae6060fe2e6a941f9dd2d619c (patch)
treefb6e3f0523c0c562951ea5fa7b6f654726d1b443 /basic/source
parent1b26a4eb4ba99cb4a47da83c4e6419f2065f9d17 (diff)
loplugin:unusedmethods unused return value in basic
Change-Id: I0ccbf994d2c9be35f43fc3c62e60da90634bacdf
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/classes/sbunoobj.cxx4
-rw-r--r--basic/source/comp/buffer.cxx25
-rw-r--r--basic/source/inc/buffer.hxx8
-rw-r--r--basic/source/inc/sbunoobj.hxx2
-rw-r--r--basic/source/sbx/sbxdec.cxx3
-rw-r--r--basic/source/sbx/sbxdec.hxx2
6 files changed, 14 insertions, 30 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 5bea51795de9..0038dbc696c1 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -4754,9 +4754,9 @@ Any StructRefInfo::getValue()
return aRet;
}
-bool StructRefInfo::setValue( const Any& rValue )
+void StructRefInfo::setValue( const Any& rValue )
{
- return uno_type_assignData( getInst(),
+ uno_type_assignData( getInst(),
maType.getTypeLibType(),
const_cast<void*>(rValue.getValue()),
rValue.getValueTypeRef(),
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index 1a4405caa379..bb1be6e142b1 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -151,17 +151,12 @@ void SbiBuffer::Chain( sal_uInt32 off )
}
}
-bool SbiBuffer::operator +=( sal_Int8 n )
+void SbiBuffer::operator +=( sal_Int8 n )
{
if( Check( 1 ) )
{
*pCur++ = (char) n;
nOff += 1;
- return true;
- }
- else
- {
- return false;
}
}
@@ -179,18 +174,13 @@ bool SbiBuffer::operator +=( sal_uInt8 n )
}
}
-bool SbiBuffer::operator +=( sal_Int16 n )
+void SbiBuffer::operator +=( sal_Int16 n )
{
if( Check( 2 ) )
{
*pCur++ = (char) ( n & 0xFF );
*pCur++ = (char) ( n >> 8 );
nOff += 2;
- return true;
- }
- else
- {
- return false;
}
}
@@ -224,13 +214,13 @@ bool SbiBuffer::operator +=( sal_uInt32 n )
}
}
-bool SbiBuffer::operator +=( sal_Int32 n )
+void SbiBuffer::operator +=( sal_Int32 n )
{
- return operator +=( (sal_uInt32) n );
+ operator +=( (sal_uInt32) n );
}
-bool SbiBuffer::operator +=( const OUString& n )
+void SbiBuffer::operator +=( const OUString& n )
{
sal_uInt32 len = n.getLength() + 1;
if( Check( len ) )
@@ -239,11 +229,6 @@ bool SbiBuffer::operator +=( const OUString& n )
memcpy( pCur, aByteStr.getStr(), len );
pCur += len;
nOff += len;
- return true;
- }
- else
- {
- return false;
}
}
diff --git a/basic/source/inc/buffer.hxx b/basic/source/inc/buffer.hxx
index e94ba15c9ad4..2faeb2b8a0ea 100644
--- a/basic/source/inc/buffer.hxx
+++ b/basic/source/inc/buffer.hxx
@@ -37,13 +37,13 @@ public:
~SbiBuffer();
void Patch( sal_uInt32, sal_uInt32 );
void Chain( sal_uInt32 );
- bool operator += (const OUString&); // save basic-string
- bool operator += (sal_Int8); // save character
- bool operator += (sal_Int16); // save integer
+ void operator += (const OUString&); // save basic-string
+ void operator += (sal_Int8); // save character
+ void operator += (sal_Int16); // save integer
bool operator += (sal_uInt8); // save character
bool operator += (sal_uInt16); // save integer
bool operator += (sal_uInt32); // save integer
- bool operator += (sal_Int32); // save integer
+ void operator += (sal_Int32); // save integer
char* GetBuffer(); // give out buffer (delete yourself!)
sal_uInt32 GetSize() { return nOff; }
};
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 3cec557758dc..f2bd5d5b4ff4 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -59,7 +59,7 @@ public:
bool isEmpty() { return (mnPos == -1); }
css::uno::Any getValue();
- bool setValue( const css::uno::Any& );
+ void setValue( const css::uno::Any& );
};
class SbUnoStructRefObject: public SbxObject
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index e0e4afa32d58..8938e2f6e68c 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -349,7 +349,7 @@ bool SbxDecimal::getDouble( double& rVal ) { (void)rVal; return false; }
#endif
-bool SbxDecimal::getString( OUString& rString )
+void SbxDecimal::getString( OUString& rString )
{
#ifdef WIN32
static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US );
@@ -390,7 +390,6 @@ bool SbxDecimal::getString( OUString& rString )
return bRet;
#else
(void)rString;
- return false;
#endif
}
diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx
index 3014071dca09..957ffd03c0d5 100644
--- a/basic/source/sbx/sbxdec.hxx
+++ b/basic/source/sbx/sbxdec.hxx
@@ -90,7 +90,7 @@ public:
bool getULong( sal_uInt32& rVal );
bool getSingle( float& rVal );
bool getDouble( double& rVal );
- bool getString( OUString& rString );
+ void getString( OUString& rString );
bool operator -= ( const SbxDecimal &r );
bool operator += ( const SbxDecimal &r );