From 3338f479182a5face7f143bdc4b9ea9067028887 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Sat, 6 Dec 2014 01:07:11 +0100 Subject: reduce scope of local variables This eliminates some of the warnings from Cppcheck report of 2014-11-29. Change-Id: Id5bf885de12a6de262d2cca9fa71627ac67f50d9 Reviewed-on: https://gerrit.libreoffice.org/13330 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- basctl/source/basicide/basobj2.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'basctl/source/basicide/basobj2.cxx') diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 28a781c5a622..98348758e73a 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -240,7 +240,6 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, GetExtraData()->ChoosingMacro() = true; OUString aScriptURL; - bool bError = false; SbMethod* pMethod = NULL; boost::scoped_ptr< MacroChooser > pChooser( new MacroChooser( NULL, true ) ); @@ -259,6 +258,8 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, { case Macro_OkRun: { + bool bError = false; + pMethod = pChooser->GetMacro(); if ( !pMethod && pChooser->GetMode() == MacroChooser::Recording ) pMethod = pChooser->CreateMacro(); -- cgit