Kaydet (Commit) 93124f77 authored tarafından Michael Weghorn's avatar Michael Weghorn Kaydeden (comit) Samuel Mehrbrodt

reduce scope of local variables

This eliminates some of the warnings from Cppcheck report of
2014-11-29.

Change-Id: Ic4bf3bd8f5982d2ea2f25a28c0dd61084c59af11
Reviewed-on: https://gerrit.libreoffice.org/13331Reviewed-by: 's avatarSamuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: 's avatarSamuel Mehrbrodt <s.mehrbrodt@gmail.com>
üst 29ef1b0a
......@@ -464,9 +464,9 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
uno::Reference< beans::XPropertySet > xDlgModPropSet( xDialogModel, uno::UNO_QUERY );
if( xDlgModPropSet.is() )
{
bool bDecoration = true;
try
{
bool bDecoration = true;
OUString aDecorationPropName("Decoration");
Any aDecorationAny = xDlgModPropSet->getPropertyValue( aDecorationPropName );
aDecorationAny >>= bDecoration;
......
......@@ -3630,7 +3630,6 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
// Parameter count -1 because of Param0 == this
sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0;
Sequence<Any> args;
bool bOutParams = false;
Reference< XServiceConstructorDescription > xCtor = pUnoCtor->getServiceCtorDesc();
Sequence< Reference< XParameter > > aParameterSeq = xCtor->getParameters();
......@@ -3689,6 +3688,7 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
if( !bParameterError )
{
bool bOutParams = false;
if( nAllocParamCount > 0 )
{
args.realloc( nAllocParamCount );
......
......@@ -440,7 +440,6 @@ bool SbiScanner::NextSym()
// Hex literals are signed Integers ( as defined by basic
// e.g. -2,147,483,648 through 2,147,483,647 (signed)
sal_uInt32 lu = 0;
int i;
bool bBufOverflow = false;
while(nCol < aLine.getLength() && theBasicCharClass::get().isAlphaNumeric(aLine[nCol] & 0xFF, bCompatible))
{
......@@ -461,7 +460,7 @@ bool SbiScanner::NextSym()
*p = 0;
for( p = buf; *p; ++p )
{
i = (*p & 0xFF) - '0';
int i = (*p & 0xFF) - '0';
if( i > 9 ) i -= 7;
lu = ( lu * base ) + i;
if( !ndig-- )
......
......@@ -140,10 +140,9 @@ SbError SbiDdeControl::Terminate( size_t nChannel )
SbError SbiDdeControl::TerminateAll()
{
DdeConnection *conv;
for (size_t nChannel = 0; nChannel < aConvList.size(); ++nChannel)
{
conv = aConvList[nChannel];
DdeConnection *conv = aConvList[nChannel];
if (conv != DDE_FREECHANNEL)
{
......
......@@ -1681,11 +1681,10 @@ bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
{
Reference< XParser > xParser = xml::sax::Parser::create(mxContext);
bool bLink = false;
bool bStorage = false;
if( pLib )
{
bLink = pLib->mbLink;
bool bLink = pLib->mbLink;
bStorage = xStorage.is() && !bLink;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment