summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-11-24 23:17:13 -0500
committerKohei Yoshida <kyoshida@novell.com>2010-11-24 23:17:13 -0500
commit714a8596cfc320c89601db9078a41d157dce1ff2 (patch)
tree97b71e2c63322df937d781cec28f362f5f37e2aa
parent788a418aaa494b03975f7738225aaf306b11ce37 (diff)
cppcheck: reduce the scopes of local variables.
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index e9bd5a888..48222c4d9 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -219,14 +219,6 @@ void ScDbNameDlg::Init()
aBtnMore.AddWindow( &aFTSource );
aBtnMore.AddWindow( &aFTOperations );
- String theAreaStr;
- SCCOL nStartCol = 0;
- SCROW nStartRow = 0;
- SCTAB nStartTab = 0;
- SCCOL nEndCol = 0;
- SCROW nEndRow = 0;
- SCTAB nEndTab = 0;
-
aBtnOk.SetClickHdl ( LINK( this, ScDbNameDlg, OkBtnHdl ) );
aBtnCancel.SetClickHdl ( LINK( this, ScDbNameDlg, CancelBtnHdl ) );
aBtnAdd.SetClickHdl ( LINK( this, ScDbNameDlg, AddBtnHdl ) );
@@ -235,8 +227,17 @@ void ScDbNameDlg::Init()
aEdAssign.SetModifyHdl ( LINK( this, ScDbNameDlg, AssModifyHdl ) );
UpdateNames();
+ String theAreaStr;
+
if ( pViewData && pDoc )
{
+ SCCOL nStartCol = 0;
+ SCROW nStartRow = 0;
+ SCTAB nStartTab = 0;
+ SCCOL nEndCol = 0;
+ SCROW nEndRow = 0;
+ SCTAB nEndTab = 0;
+
ScDBCollection* pDBColl = pDoc->GetDBCollection();
ScDBData* pDBData = NULL;