diff options
-rw-r--r-- | basic/source/runtime/methods.cxx | 3 | ||||
-rw-r--r-- | chart2/source/view/axes/VCartesianAxis.cxx | 6 | ||||
-rw-r--r-- | rsc/source/parser/rscibas.cxx | 6 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvread.cxx | 3 |
4 files changed, 5 insertions, 13 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 5a86549402a8..6ecdf30e1361 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -3560,10 +3560,9 @@ RTLFUNC(Randomize) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); } - int nSeed; if( rPar.Count() == 2 ) { - nSeed = (int)rPar.Get(1)->GetInteger(); + int nSeed = (int)rPar.Get(1)->GetInteger(); theRandomNumberGenerator::get().global_rng.seed(nSeed); } // without parameter, no need to do anything - RNG is seeded at first use diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index c8ae9e095be7..90f5880165cd 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -713,13 +713,12 @@ bool VCartesianAxis::createTextShapes( const TickInfo* pPreviousVisibleTickInfo = NULL; const TickInfo* pPREPreviousVisibleTickInfo = NULL; - const TickInfo* pLastVisibleNeighbourTickInfo = NULL; sal_Int32 nTick = 0; for( TickInfo* pTickInfo = rTickIter.firstInfo() ; pTickInfo ; pTickInfo = rTickIter.nextInfo(), nTick++ ) { - pLastVisibleNeighbourTickInfo = bIsStaggered ? + const TickInfo* pLastVisibleNeighbourTickInfo = bIsStaggered ? pPREPreviousVisibleTickInfo : pPreviousVisibleTickInfo; //don't create labels which does not fit into the rhythm @@ -909,13 +908,12 @@ bool VCartesianAxis::createTextShapesSimple( uno::Any* pLimitedSpaceAny = PropertyMapper::getValuePointerForLimitedSpace(aPropValues,aPropNames,bLimitedHeight); const TickInfo* pPreviousVisibleTickInfo = NULL; - const TickInfo* pLastVisibleNeighbourTickInfo = NULL; sal_Int32 nTick = 0; for( TickInfo* pTickInfo = rTickIter.firstInfo() ; pTickInfo ; pTickInfo = rTickIter.nextInfo(), nTick++ ) { - pLastVisibleNeighbourTickInfo = pPreviousVisibleTickInfo; + const TickInfo* pLastVisibleNeighbourTickInfo = pPreviousVisibleTickInfo; //don't create labels which does not fit into the rhythm if( nTick%rAxisLabelProperties.nRhythm != 0 ) diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx index 3836b4748d3e..395ba1f032a3 100644 --- a/rsc/source/parser/rscibas.cxx +++ b/rsc/source/parser/rscibas.cxx @@ -150,22 +150,18 @@ void RscLangEnum::Init( RscNameTable& rNames ) Atom RscLangEnum::AddLanguage( const char* pLang, RscNameTable& rNames ) { Atom nResult = 0; - bool bAdd = false; KEY_STRUCT aStruct; if( ! rNames.Get( nResult = pHS->getID( pLang ), &aStruct ) ) { SetConstant( nResult = rNames.Put( pLang, CONSTNAME, mnLangId ), mnLangId ); // insert new lang to ULong_Iso_map OString aLang( pLang ); - bAdd = (GetLangId( aLang ) == 0); + bool bAdd = (GetLangId( aLang ) == 0); if ( bAdd ) ULong_Iso_map[ aLang ] = mnLangId; // increase id counter mnLangId++; } -#if OSL_DEBUG_LEVEL > 2 - fprintf( stderr, "AddLanguage( '%s' ) = %d (%s)\n", pLang, nResult, (bAdd ? "added" : "exists") ); -#endif return nResult; } diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index 1954335ec783..a13067b012b1 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -707,7 +707,6 @@ ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext ) osl_FileStatus_Mask_FileName | osl_FileStatus_Mask_FileURL ); if( osl::Directory::E_None == aDirectory.open() ) { - int idx_ = 0; OUString aFileUrl, aFileName; while( aDirectory.getNextItem( aDirItem ) == osl::FileBase::E_None && aDirItem.getFileStatus( aFileStatus ) == osl::FileBase::E_None && @@ -716,7 +715,7 @@ ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext ) { aFileUrl = aFileStatus.getFileURL(); aFileName = aFileStatus.getFileName(); - idx_ = aFileName.lastIndexOf( '.' ); + int idx_ = aFileName.lastIndexOf( '.' ); if( idx_ == -1 ) continue; |