diff options
author | Guillaume Poussel <gpoussel@gmail.com> | 2011-01-06 20:29:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-07 11:06:02 +0000 |
commit | 865bef974dbe82eda780bb28516d83982ae07ed8 (patch) | |
tree | 295b2ecd32008baab0b82760172a04449b76a505 /dbaccess/source | |
parent | 1fe3737d3d16f228a3668214d5b09ddc71c6e4a5 (diff) |
cppcheck cleanliness
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/core/api/CRowSetColumn.cxx | 1 | ||||
-rw-r--r-- | dbaccess/source/core/api/CRowSetDataColumn.cxx | 1 | ||||
-rw-r--r-- | dbaccess/source/core/api/OptimisticSet.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/core/api/definitioncolumn.cxx | 1 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/ModelImpl.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/app/subcomponentmanager.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/control/tabletree.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/RowSetDrop.cxx | 5 |
9 files changed, 7 insertions, 19 deletions
diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx index 883ec1b7b1b2..34ec5be0d3bd 100644 --- a/dbaccess/source/core/api/CRowSetColumn.cxx +++ b/dbaccess/source/core/api/CRowSetColumn.cxx @@ -57,7 +57,6 @@ ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaDa { const sal_Int32 nDerivedProperties = 21; Sequence< Property> aDerivedProperties( nDerivedProperties ); - Property* pDesc = aDerivedProperties.getArray(); sal_Int32 nPos = 0; DECL_PROP1( CATALOGNAME, ::rtl::OUString, READONLY ); diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index ee9b67c5d26b..c66b6c5940c5 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -79,7 +79,6 @@ ORowSetDataColumn::~ORowSetDataColumn() { const sal_Int32 nDerivedProperties = 21; Sequence< Property> aDerivedProperties( nDerivedProperties ); - Property* pDesc = aDerivedProperties.getArray(); sal_Int32 nPos = 0; DECL_PROP1( CATALOGNAME, ::rtl::OUString, READONLY ); diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 270e45d0960f..914539e138c6 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -1,3 +1,4 @@ + /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * @@ -256,10 +257,8 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow sSql.append(s_sSET); sSql.append(aSqlIter->second); ::rtl::OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first]; - bool bAddWhere = true; if ( rCondition.getLength() ) { - bAddWhere = false; sSql.appendAscii(" WHERE "); sSql.append( rCondition ); } diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx index 46d5de5615ef..56fce89f5647 100644 --- a/dbaccess/source/core/api/definitioncolumn.cxx +++ b/dbaccess/source/core/api/definitioncolumn.cxx @@ -471,7 +471,6 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa const sal_Int32 nPropertyCount( nHaveAlways + nHaveOptionally ); Sequence< Property > aTableDescProperties( nPropertyCount ); - Property* pDesc = aTableDescProperties.getArray(); sal_Int32 nPos = 0; DECL_PROP0_BOOL( ISAUTOINCREMENT ); diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx index d4899c247ab5..804e2f976acf 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.hxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx @@ -564,7 +564,7 @@ public: { return getMutex(); } - inline ::rtl::Reference< ODatabaseModelImpl > getImpl( GuardAccess ) + inline ::rtl::Reference< ODatabaseModelImpl > getImpl( GuardAccess ) const { return m_pImpl; } diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index 641051f20d49..f80cee309031 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -180,7 +180,7 @@ namespace dbaui //.............................................................................................................. struct SelectSubComponent : public ::std::unary_function< SubComponentDescriptor, Reference< XComponent > > { - Reference< XComponent > operator()( const SubComponentDescriptor _desc ) const + Reference< XComponent > operator()( const SubComponentDescriptor _desc & ) const { if ( _desc.xModel.is() ) return _desc.xModel.get(); diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index d1a38b9afcfd..d713059a3fcf 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1442,13 +1442,6 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for Reference< ::com::sun::star::container::XIndexAccess > xParameters = aEvent.Parameters; SolarMutexGuard aSolarGuard; - // this may be executed in a non-main thread and we want to use vcl ... - Window* pParent = Application::GetDefDialogParent(); - // don't use the content as parent if it isn't visible - // (and don't use NULL as parent : this may be displayed in the beamer and really shouldn't be task-local) - // 69297 - FS - 25.10.99 - if (getBrowserView() && getBrowserView()->IsVisible()) - pParent = getBrowserView(); // default handling: instantiate an interaction handler and let it handle the parameter request try diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 0e7d8d8aff66..9503c88d9746 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -282,8 +282,6 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn try { - // the root entry saying "all objects" - SvLBoxEntry* pAllObjects = NULL; if (haveVirtualRoot()) { String sRootEntryText; @@ -298,7 +296,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn sRootEntryText = String(ModuleRes(STR_ALL_VIEWS)); else sRootEntryText = String(ModuleRes(STR_ALL_TABLES_AND_VIEWS)); - pAllObjects = InsertEntry( sRootEntryText, NULL, FALSE, LIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) ); + InsertEntry( sRootEntryText, NULL, FALSE, LIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) ); } if ( _rTables.empty() ) diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx index cb22ad23c43a..70b127cc2ec6 100644 --- a/dbaccess/source/ui/misc/RowSetDrop.cxx +++ b/dbaccess/source/ui/misc/RowSetDrop.cxx @@ -1,3 +1,4 @@ + /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * @@ -119,8 +120,6 @@ BOOL ORowSetImportExport::Read() if(::std::find_if(m_aColumnMapping.begin(),m_aColumnMapping.end(), ::std::bind2nd(::std::greater<sal_Int32>(),0)) == m_aColumnMapping.end()) return FALSE; - sal_Int32 nCurrentRow = 0; - sal_Int32 nRowFilterIndex = 0; sal_Bool bContinue = sal_True; if(m_aSelection.getLength()) { @@ -138,6 +137,8 @@ BOOL ORowSetImportExport::Read() { Reference<XPropertySet> xProp(m_xResultSet,UNO_QUERY); sal_Int32 nRowCount = 0; + sal_Int32 nCurrentRow = 0; + sal_Int32 nRowFilterIndex = 0; if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_ISROWCOUNTFINAL) ) { sal_Bool bFinal = sal_False; |