[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Nov 24 20:17:37 PST 2010


 sc/source/ui/dbgui/dbnamdlg.cxx |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 714a8596cfc320c89601db9078a41d157dce1ff2
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Nov 24 23:17:13 2010 -0500

    cppcheck: reduce the scopes of local variables.

diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index e9bd5a8..48222c4 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;
 


More information about the Libreoffice-commits mailing list