summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorGuillaume Poussel <gpoussel@gmail.com>2011-01-06 20:29:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-01-07 11:06:02 +0000
commit47e68d01327a85c0fa58f02958a2076770ac647b (patch)
tree9756e0473696006252ae07d1714f0be8cfd7e7aa /dbaccess
parentfcca556b758d21319a8fb8ce1949f0fe8b74a22f (diff)
cppcheck cleanliness
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/CRowSetColumn.cxx1
-rw-r--r--dbaccess/source/core/api/CRowSetDataColumn.cxx1
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx3
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx1
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.hxx2
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.cxx2
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx7
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx4
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx5
9 files changed, 7 insertions, 19 deletions
diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx
index 41a5cd81c..bbda9df2e 100644
--- a/dbaccess/source/core/api/CRowSetColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetColumn.cxx
@@ -57,7 +57,6 @@ ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaData
{
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 8d7c8723c..6942dd9eb 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 7e604f4d2..be2a0ddf5 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 c38443c0a..044039a14 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 fe4cf4fb0..78247ea9c 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 7193d7098..695d6420f 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 e952cba97..1be4f4d46 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 60214114b..cd0a0b6ef 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 787aa5f7f..f1d72889e 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;