summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/app/msgedit.cxx3
-rw-r--r--basic/source/classes/image.cxx2
-rw-r--r--basic/source/classes/sb.cxx4
-rw-r--r--basic/source/sbx/sbxscan.cxx7
-rw-r--r--basic/source/sbx/sbxvalue.cxx2
-rw-r--r--connectivity/source/commontools/DateConversion.cxx3
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx2
-rw-r--r--connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx8
-rw-r--r--connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx2
-rw-r--r--connectivity/source/parse/sqliterator.cxx3
11 files changed, 18 insertions, 20 deletions
diff --git a/basic/source/app/msgedit.cxx b/basic/source/app/msgedit.cxx
index 16e8639c7430..c6d7b0b8d062 100644
--- a/basic/source/app/msgedit.cxx
+++ b/basic/source/app/msgedit.cxx
@@ -543,10 +543,9 @@ String MsgEdit::GetSelected()
TextSelection MsgEdit::GetSelection() const
{
- ULONG nStart=0,nEnd=0;
-
if ( aEditTree.FirstSelected() )
{
+ ULONG nStart=0,nEnd=0;
nStart = aEditTree.GetModel()->GetAbsPos(aEditTree.FirstSelected() );
if ( aEditTree.LastSelected() )
nEnd = aEditTree.GetModel()->GetAbsPos(aEditTree.LastSelected() );
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 654ad79df750..716cbe0497d7 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -149,7 +149,6 @@ BOOL SbiImage::Load( SvStream& r, UINT32& nVersion )
ULONG nNext;
while( ( nNext = r.Tell() ) < nLast )
{
- short i;
r >> nSign >> nLen >> nCount;
nNext += nLen + 8;
@@ -217,6 +216,7 @@ BOOL SbiImage::Load( SvStream& r, UINT32& nVersion )
case B_STRINGPOOL:
if( bBadVer ) break;
MakeStrings( nCount );
+ short i;
for( i = 0; i < nStrings && SbiGood( r ); i++ )
{
r >> nOff;
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index ed2de2533c6f..e53570035efb 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -375,12 +375,12 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj )
SbxBase* pParObj = pVar->GetObject();
SbxDimArray* pSource = PTR_CAST(SbxDimArray,pParObj);
SbxDimArray* pDest = new SbxDimArray( pVar->GetType() );
- INT32 lb = 0;
- INT32 ub = 0;
pDest->setHasFixedSize( pSource->hasFixedSize() );
if ( pSource->GetDims() && pSource->hasFixedSize() )
{
+ INT32 lb = 0;
+ INT32 ub = 0;
for ( INT32 j = 1 ; j <= pSource->GetDims(); ++j )
{
pSource->GetDim32( (INT32)j, lb, ub );
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 5fe1704bcc38..c7cfe6e6850e 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -289,7 +289,7 @@ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth,
short nExp = 0; // Exponent
short nDig = nPrec + 1; // Anzahl Digits in Zahl
short nDec; // Anzahl Vorkommastellen
- register int i, digit;
+ register int i;
// Komma besorgen
sal_Unicode cDecimalSep, cThousandSep;
@@ -339,6 +339,7 @@ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth,
// Zahl ausgeben:
if( nDig > 0 )
{
+ register int digit;
for( i = 0 ; ; ++i )
{
if( i < 16 )
@@ -747,8 +748,6 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const
SvNumberFormatter aFormatter( xFactory, eLangType );
sal_uInt32 nIndex;
- xub_StrLen nCheckPos = 0;
- short nType;
double nNumber;
Color* pCol;
@@ -757,6 +756,8 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const
// number format, use SvNumberFormatter to handle it.
if( bSuccess )
{
+ xub_StrLen nCheckPos = 0;
+ short nType;
String aFmtStr = *pFmt;
VbaFormatInfo* pInfo = getFormatInfo( aFmtStr );
if( pInfo && pInfo->meType != VBA_FORMAT_TYPE_NULL )
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index df4fe7b4a753..15b98a2f1256 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1199,7 +1199,6 @@ BOOL SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
}
else if( GetType() == SbxCURRENCY || rOp.GetType() == SbxCURRENCY )
{
- double dTest;
aL.eType = SbxCURRENCY;
aR.eType = SbxCURRENCY;
@@ -1210,6 +1209,7 @@ BOOL SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
if( Get( aL ) ) switch( eOp )
{
+ double dTest;
case SbxMUL:
// first overflow check: see if product will fit - test real value of product (hence 2 curr factors)
dTest = (double)aL.nInt64 * (double)aR.nInt64 / (double)CURRENCY_FACTOR_SQUARE;
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index 56ed6748368d..a26a296081c7 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -252,7 +252,6 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant,
sal_Int16 nFieldType,
sal_Int16 nKeyType) throw(::com::sun::star::lang::IllegalArgumentException)
{
- double fValue = 0;
if (rString.getLength())
{
// Muss der String formatiert werden?
@@ -264,7 +263,7 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant,
// wirft convertStringToNumber eine NotNumericException
try
{
- fValue = xFormatter->convertStringToNumber(nKeyToUse, rString);
+ double fValue = xFormatter->convertStringToNumber(nKeyToUse, rString);
sal_Int32 nRealUsedKey = xFormatter->detectNumberFormat(0, rString);
if (nRealUsedKey != nKeyToUse)
nRealUsedTypeClass = getNumberFormatType(xFormatter, nRealUsedKey) & ~NumberFormat::DEFINED;
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index 058ad8094703..37fb4f981240 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -161,7 +161,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
::dbtools::throwFunctionSequenceException(*this);
}
- catch(const Exception )
+ catch(const Exception& )
{
osl_decrementInterlockedCount( &m_refCount );
throw;
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
index 4ded64d6b6c5..f56df914a411 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
@@ -48,7 +48,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce
if (iniUrl.getLength())
fileError = osl_openFile(iniUrl.pData, &handle, osl_File_OpenFlag_Read);
}
- catch(::com::sun::star::io::IOException e)
+ catch(::com::sun::star::io::IOException&)
{
#if OSL_DEBUG_LEVEL > 0
OString file_tmp = OUStringToOString(iniUrl, RTL_TEXTENCODING_ASCII_US);
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx
index d068fc0315ba..2c17529ed48d 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx
@@ -75,9 +75,9 @@ namespace connectivity
MQueryExpressionBase( node_type _eNodeType ) : m_eNodeType( _eNodeType ) {}
public:
- sal_Bool isUnknown( ) { return m_eNodeType == Unknown; }
- sal_Bool isStringExpr( ) { return m_eNodeType == StringExpr; }
- sal_Bool isExpr( ) { return m_eNodeType == Expr; }
+ sal_Bool isUnknown( ) const { return m_eNodeType == Unknown; }
+ sal_Bool isStringExpr( ) const { return m_eNodeType == StringExpr; }
+ sal_Bool isExpr( ) const { return m_eNodeType == Expr; }
};
class MQueryExpressionString : public MQueryExpressionBase {
@@ -137,7 +137,7 @@ namespace connectivity
{ return m_aExprVector; }
// All expressions on a peer level use same condition operator
- bool_cond getExpressionCondition( )
+ bool_cond getExpressionCondition( ) const
{ return m_aExprCondType; }
MQueryExpression() : MQueryExpressionBase( MQueryExpressionBase::Expr ),
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx
index daeed173ea20..6884ddd2c8b3 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx
@@ -65,7 +65,7 @@ namespace connectivity
void setCard(nsIAbCard *card);
nsIAbCard *getCard();
sal_Bool setRowStates(sal_Int32 state){m_RowStates = state; return sal_True;};
- sal_Int32 getRowStates() { return m_RowStates;};
+ sal_Int32 getRowStates() const { return m_RowStates;};
};
class MQueryHelper : public nsIAbDirectoryQueryResultListener
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 8c935fb75943..4bcffb677486 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -885,7 +885,6 @@ void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNo
::rtl::OUString aTypeName;
::rtl::OUString aTableRange;
sal_Int32 nType = DataType::VARCHAR;
- sal_Int32 nLen = 0;
aColumnName = pColumnRef->getChild(0)->getTokenValue();
OSQLParseNode *pDatatype = pColumnRef->getChild(1);
@@ -899,7 +898,7 @@ void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNo
const OSQLParseNode *pParams = pDatatype->getChild(pDatatype->count()-1);
if ( pParams->count() )
{
- nLen = pParams->getChild(1)->getTokenValue().toInt32();
+ sal_Int32 nLen = pParams->getChild(1)->getTokenValue().toInt32();
(void)nLen;
}
}