diff options
author | Ćukasz Hryniuk <lukasz.hryniuk@wp.pl> | 2015-01-04 22:50:05 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-01-07 06:47:04 +0000 |
commit | 9fd89a5952a48b473cee03a2681eb5d4cd6d1742 (patch) | |
tree | 1fbf98ba46e86989826adf5d559f51c82d59a5e5 /dbaccess | |
parent | a527ad98e58a7fc9af482f9088687d82e5c52cca (diff) |
fdo#39440 reduce scope of local variables
Beside scope changes, it fixes lack of initialization in a few places.
Change-Id: Ia09fdb9845d8ac17256330a5ec5168401c84f0f2
Reviewed-on: https://gerrit.libreoffice.org/13755
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/filter/xml/xmlfilter.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/control/FieldDescControl.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/copytablewizard.cxx | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index 76f8e843aea3..a47b6c8fef5d 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -306,10 +306,10 @@ sal_Int32 ReadThroughComponent( if ( xStorage.is() ) { uno::Reference< io::XStream > xDocStream; - bool bEncrypted = false; try { + bool bEncrypted = false; // open stream (and set parser input) OUString sStreamName = OUString::createFromAscii(pStreamName); if ( !xStorage->hasByName( sStreamName ) || !xStorage->isStreamElement( sStreamName ) ) diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index ab59911c4038..52217346b0a3 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1669,12 +1669,11 @@ OUString OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldD if ( bCheck ) { sal_uInt32 nFormatKey; - bool bTextFormat = false; try { double nValue = 0.0; - bTextFormat = isTextFormat(_pFieldDescr,nFormatKey); + bool bTextFormat = isTextFormat(_pFieldDescr,nFormatKey); if ( _pFieldDescr->GetControlDefault() >>= sDefault ) { if ( !bTextFormat ) diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index 6d8f85558468..f11a7b8e155d 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -85,9 +85,9 @@ SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const OUString& rEntryTe OJoinDesignView* pView = m_pTabWin->getDesignView(); OJoinController& rController = pView->getController(); - bool bCase = false; try { + bool bCase = false; Reference<XConnection> xConnection = rController.getConnection(); if(xConnection.is()) { diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index 70e5a6e615ce..e7ad4f93f21f 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -1167,13 +1167,13 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou } ++nRowCount; - bool bInsertAutoIncrement = true; ODatabaseExport::TPositions::const_iterator aPosIter = aColumnMapping.begin(); ODatabaseExport::TPositions::const_iterator aPosEnd = aColumnMapping.end(); aCopyEvent.Error.clear(); try { + bool bInsertAutoIncrement = true; // notify listeners m_aCopyTableListeners.notifyEach( &XCopyTableListener::copyingRow, aCopyEvent ); |