summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-12 11:16:51 +0200
committerNoel Grandin <noel@peralex.com>2016-04-12 11:25:18 +0200
commitdbd1f4b75a22150af80a6fbd8de1a38d5dc4b4c3 (patch)
tree4e52a2f864b9dcc58278670a8041b235faa20018 /dbaccess
parentf520af173500bc2a0c35e20e96353a5e2305bb63 (diff)
clang-tidy performance-unnecessary-value-param in dbaccess
Change-Id: I9cec61867b4e6e8abde7749047974c6de87b9669
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/BookmarkSet.cxx2
-rw-r--r--dbaccess/source/core/api/BookmarkSet.hxx2
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx2
-rw-r--r--dbaccess/source/core/api/WrappedResultSet.cxx2
-rw-r--r--dbaccess/source/core/api/WrappedResultSet.hxx2
-rw-r--r--dbaccess/source/core/dataaccess/definitioncontainer.cxx6
-rw-r--r--dbaccess/source/core/inc/definitioncontainer.hxx6
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx2
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx2
-rw-r--r--dbaccess/source/ui/inc/FieldDescriptions.hxx2
-rw-r--r--dbaccess/source/ui/inc/QueryDesignView.hxx2
-rw-r--r--dbaccess/source/ui/inc/UITools.hxx2
-rw-r--r--dbaccess/source/ui/inc/indexcollection.hxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--dbaccess/source/ui/misc/indexcollection.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx2
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescriptions.cxx2
19 files changed, 24 insertions, 24 deletions
diff --git a/dbaccess/source/core/api/BookmarkSet.cxx b/dbaccess/source/core/api/BookmarkSet.cxx
index faca63120942..d3869e0111ed 100644
--- a/dbaccess/source/core/api/BookmarkSet.cxx
+++ b/dbaccess/source/core/api/BookmarkSet.cxx
@@ -131,7 +131,7 @@ void OBookmarkSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
OCacheSet::fillValueRow(_rRow,_nPosition);
}
-void OBookmarkSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParameter,const ORowSetValue& _rValue)
+void OBookmarkSet::updateColumn(sal_Int32 nPos, const Reference< XRowUpdate >& _xParameter, const ORowSetValue& _rValue)
{
if(_rValue.isBound() && _rValue.isModified())
{
diff --git a/dbaccess/source/core/api/BookmarkSet.hxx b/dbaccess/source/core/api/BookmarkSet.hxx
index a4b11c253a4a..6a1c00735d25 100644
--- a/dbaccess/source/core/api/BookmarkSet.hxx
+++ b/dbaccess/source/core/api/BookmarkSet.hxx
@@ -30,7 +30,7 @@ namespace dbaccess
{
css::uno::Reference< css::sdbcx::XRowLocate> m_xRowLocate;
- void updateColumn(sal_Int32 nPos,css::uno::Reference< css::sdbc::XRowUpdate > _xParameter,const connectivity::ORowSetValue& _rValue);
+ void updateColumn(sal_Int32 nPos, const css::uno::Reference< css::sdbc::XRowUpdate >& _xParameter, const connectivity::ORowSetValue& _rValue);
public:
explicit OBookmarkSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows)
{}
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 622d86b90018..3f80fc896c56 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -154,7 +154,7 @@ namespace
/** transforms a parse node describing a complete statement into a pure select
statement, without any filter/order/groupby/having clauses
*/
- OUString getPureSelectStatement( const OSQLParseNode* _pRootNode, Reference< XConnection > _rxConnection )
+ OUString getPureSelectStatement( const OSQLParseNode* _pRootNode, const Reference< XConnection >& _rxConnection )
{
OUString sSQL = STR_SELECT;
_pRootNode->getChild(1)->parseNodeToStr( sSQL, _rxConnection );
diff --git a/dbaccess/source/core/api/WrappedResultSet.cxx b/dbaccess/source/core/api/WrappedResultSet.cxx
index d9659a1777cd..86c0d4f87138 100644
--- a/dbaccess/source/core/api/WrappedResultSet.cxx
+++ b/dbaccess/source/core/api/WrappedResultSet.cxx
@@ -115,7 +115,7 @@ void WrappedResultSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
OCacheSet::fillValueRow(_rRow,_nPosition);
}
-void WrappedResultSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParameter,const ORowSetValue& _rValue)
+void WrappedResultSet::updateColumn(sal_Int32 nPos, const Reference< XRowUpdate >& _xParameter, const ORowSetValue& _rValue)
{
if(_rValue.isBound() && _rValue.isModified())
{
diff --git a/dbaccess/source/core/api/WrappedResultSet.hxx b/dbaccess/source/core/api/WrappedResultSet.hxx
index 8e458e40cd9e..db769259abaf 100644
--- a/dbaccess/source/core/api/WrappedResultSet.hxx
+++ b/dbaccess/source/core/api/WrappedResultSet.hxx
@@ -33,7 +33,7 @@ namespace dbaccess
css::uno::Reference< css::sdbc::XResultSetUpdate> m_xUpd;
css::uno::Reference< css::sdbc::XRowUpdate> m_xUpdRow;
- void updateColumn(sal_Int32 nPos, css::uno::Reference< css::sdbc::XRowUpdate > _xParameter,const connectivity::ORowSetValue& _rValue);
+ void updateColumn(sal_Int32 nPos, const css::uno::Reference< css::sdbc::XRowUpdate >& _xParameter, const connectivity::ORowSetValue& _rValue);
public:
explicit WrappedResultSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows)
{}
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 16cedbbb8934..a8b2d4fe265e 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -53,14 +53,14 @@ namespace dbaccess
{
// ODefinitionContainer_Impl
-void ODefinitionContainer_Impl::erase( TContentPtr _pDefinition )
+void ODefinitionContainer_Impl::erase( const TContentPtr& _pDefinition )
{
NamedDefinitions::const_iterator aPos = find( _pDefinition );
if ( aPos != end() )
m_aDefinitions.erase( aPos );
}
-ODefinitionContainer_Impl::const_iterator ODefinitionContainer_Impl::find( TContentPtr _pDefinition ) const
+ODefinitionContainer_Impl::const_iterator ODefinitionContainer_Impl::find( const TContentPtr& _pDefinition ) const
{
return ::std::find_if(
m_aDefinitions.begin(),
@@ -70,7 +70,7 @@ ODefinitionContainer_Impl::const_iterator ODefinitionContainer_Impl::find( TCont
});
}
-ODefinitionContainer_Impl::iterator ODefinitionContainer_Impl::find( TContentPtr _pDefinition )
+ODefinitionContainer_Impl::iterator ODefinitionContainer_Impl::find( const TContentPtr& _pDefinition )
{
return ::std::find_if(
m_aDefinitions.begin(),
diff --git a/dbaccess/source/core/inc/definitioncontainer.hxx b/dbaccess/source/core/inc/definitioncontainer.hxx
index bdefec380f7b..eaa1b0d1b1c8 100644
--- a/dbaccess/source/core/inc/definitioncontainer.hxx
+++ b/dbaccess/source/core/inc/definitioncontainer.hxx
@@ -64,10 +64,10 @@ public:
inline const_iterator end() const { return m_aDefinitions.end(); }
inline const_iterator find( const OUString& _rName ) const { return m_aDefinitions.find( _rName ); }
- const_iterator find( TContentPtr _pDefinition ) const;
+ const_iterator find( const TContentPtr& _pDefinition ) const;
inline void erase( const OUString& _rName ) { m_aDefinitions.erase( _rName ); }
- void erase( TContentPtr _pDefinition );
+ void erase( const TContentPtr& _pDefinition );
inline void insert( const OUString& _rName, TContentPtr _pDefinition )
{
@@ -75,7 +75,7 @@ public:
}
private:
- iterator find( TContentPtr _pDefinition );
+ iterator find( const TContentPtr& _pDefinition );
// (for the moment, this is private. Make it public if needed. If really needed.)
};
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index a9ebf6c5b2c8..1c12a464debe 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -140,7 +140,7 @@ sal_Int32 ReadThroughComponent(
/// read a component (storage version)
sal_Int32 ReadThroughComponent(
- uno::Reference< embed::XStorage > xStorage,
+ const uno::Reference< embed::XStorage >& xStorage,
const uno::Reference<XComponent>& xModelComponent,
const sal_Char* pStreamName,
const sal_Char* pCompatibilityStreamName,
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 22ca33fe3038..fe14de024b91 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -90,7 +90,7 @@ using namespace com::sun::star::frame;
namespace
{
- bool implCheckItemType( SfxItemSet& _rSet, const sal_uInt16 _nId, std::function<bool ( const SfxPoolItem* )> isItemType )
+ bool implCheckItemType( SfxItemSet& _rSet, const sal_uInt16 _nId, const std::function<bool ( const SfxPoolItem* )>& isItemType )
{
bool bCorrectType = false;
diff --git a/dbaccess/source/ui/inc/FieldDescriptions.hxx b/dbaccess/source/ui/inc/FieldDescriptions.hxx
index 8144a44c45ab..e6128c11f9c2 100644
--- a/dbaccess/source/ui/inc/FieldDescriptions.hxx
+++ b/dbaccess/source/ui/inc/FieldDescriptions.hxx
@@ -71,7 +71,7 @@ namespace dbaui
void SetDefaultValue(const css::uno::Any& _rDefaultValue);
void SetControlDefault(const css::uno::Any& _rControlDefault);
void SetAutoIncrementValue(const OUString& _sAutoIncValue);
- void SetType(TOTypeInfoSP _pType);
+ void SetType(const TOTypeInfoSP& _pType);
void SetTypeValue(sal_Int32 _nType);
void SetTypeName(const OUString& _sTypeName);
void SetPrecision(const sal_Int32& _rPrecision);
diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx
index 743b33d9abeb..67f8f8e5d962 100644
--- a/dbaccess/source/ui/inc/QueryDesignView.hxx
+++ b/dbaccess/source/ui/inc/QueryDesignView.hxx
@@ -140,7 +140,7 @@ namespace dbaui
const css::uno::Sequence< css::beans::PropertyValue >& i_rFieldDescriptions
);
- ::connectivity::OSQLParseNode* getPredicateTreeFromEntry( OTableFieldDescRef pEntry,
+ ::connectivity::OSQLParseNode* getPredicateTreeFromEntry( const OTableFieldDescRef& pEntry,
const OUString& _sCriteria,
OUString& _rsErrorMessage,
css::uno::Reference< css::beans::XPropertySet>& _rxColumn) const;
diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx
index 7964c794ac93..0340ca2e2e3c 100644
--- a/dbaccess/source/ui/inc/UITools.hxx
+++ b/dbaccess/source/ui/inc/UITools.hxx
@@ -166,7 +166,7 @@ namespace dbaui
getDataSourceByName(
const OUString& _rDataSourceName,
vcl::Window* _pErrorMessageParent,
- css::uno::Reference< css::uno::XComponentContext > _rxContext,
+ const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
::dbtools::SQLExceptionInfo* _pErrorInfo
);
diff --git a/dbaccess/source/ui/inc/indexcollection.hxx b/dbaccess/source/ui/inc/indexcollection.hxx
index baa39afd3e4e..7dbbae44ee5c 100644
--- a/dbaccess/source/ui/inc/indexcollection.hxx
+++ b/dbaccess/source/ui/inc/indexcollection.hxx
@@ -87,7 +87,7 @@ namespace dbaui
protected:
void implConstructFrom(const css::uno::Reference< css::container::XNameAccess >& _rxIndexes);
- static void implFillIndexInfo(OIndex& _rIndex, css::uno::Reference< css::beans::XPropertySet > _rxDescriptor);
+ static void implFillIndexInfo(OIndex& _rIndex, const css::uno::Reference< css::beans::XPropertySet >& _rxDescriptor);
void implFillIndexInfo(OIndex& _rIndex);
};
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 22c2abf54b1a..0079841a5540 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -209,7 +209,7 @@ SQLExceptionInfo createConnection( const Reference< css::beans::XPropertySet>&
}
Reference< XDataSource > getDataSourceByName( const OUString& _rDataSourceName,
- vcl::Window* _pErrorMessageParent, Reference< XComponentContext > _rxContext, ::dbtools::SQLExceptionInfo* _pErrorInfo )
+ vcl::Window* _pErrorMessageParent, const Reference< XComponentContext >& _rxContext, ::dbtools::SQLExceptionInfo* _pErrorInfo )
{
Reference< XDatabaseContext > xDatabaseContext = DatabaseContext::create(_rxContext);
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index c7a07ac5952e..94790d3a7efe 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -250,7 +250,7 @@ namespace dbaui
implFillIndexInfo(_rIndex, xIndex);
}
- void OIndexCollection::implFillIndexInfo(OIndex& _rIndex, Reference< XPropertySet > _rxDescriptor)
+ void OIndexCollection::implFillIndexInfo(OIndex& _rIndex, const Reference< XPropertySet >& _rxDescriptor)
{
static const char s_sPrimaryIndexPropertyName[] = "IsPrimaryKeyIndex";
static const char s_sUniquePropertyName[] = "IsUnique";
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 0e7271f7e26e..8d88ec3408f7 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -124,7 +124,7 @@ namespace
}
return sTableRange;
}
- void insertConnection(const OQueryDesignView* _pView,const EJoinType& _eJoinType,OTableFieldDescRef _aDragLeft,OTableFieldDescRef _aDragRight,bool _bNatural = false)
+ void insertConnection(const OQueryDesignView* _pView,const EJoinType& _eJoinType, const OTableFieldDescRef& _aDragLeft, const OTableFieldDescRef& _aDragRight, bool _bNatural = false)
{
OQueryTableView* pTableView = static_cast<OQueryTableView*>(_pView->getTableView());
OQueryTableConnection* pConn = static_cast<OQueryTableConnection*>( pTableView->GetTabConn(static_cast<OTableWindow*>(_aDragLeft->GetTabWindow()),static_cast<OTableWindow*>(_aDragRight->GetTabWindow()),true));
@@ -2998,7 +2998,7 @@ void OQueryDesignView::SaveUIConfig()
rCtrl.setSplitPos( m_aSplitter->GetSplitPosPixel() );
}
-OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pEntry,
+OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(const OTableFieldDescRef& pEntry,
const OUString& _sCriteria,
OUString& _rsErrorMessage,
Reference<XPropertySet>& _rxColumn) const
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 234838971c0a..a35cdc43727f 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1473,7 +1473,7 @@ Rectangle OSelectionBrowseBox::GetInvalidRect( sal_uInt16 nColId )
return aInvalidRect;
}
-void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _nColumnPosition)
+void OSelectionBrowseBox::InsertColumn(const OTableFieldDescRef& pEntry, sal_uInt16& _nColumnPosition)
{
// the control should have exactly one more column: the HandleColumn
OSL_ENSURE(_nColumnPosition == BROWSER_INVALIDID || (_nColumnPosition <= (long)getFields().size()), "OSelectionBrowseBox::InsertColumn : invalid parameter nColId.");
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index c482bc4240c9..ea2e827cdd2b 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -84,7 +84,7 @@ namespace dbaui
void initialize();
OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource );
OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true, bool bActivate=true );
- void InsertColumn( OTableFieldDescRef pEntry, sal_uInt16& _nColumnPosition );
+ void InsertColumn( const OTableFieldDescRef& pEntry, sal_uInt16& _nColumnPosition );
void RemoveColumn( sal_uInt16 _nColumnId );
void DeleteFields( const OUString& rAliasName );
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
index 9763f639f2b3..7b9231817485 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -326,7 +326,7 @@ void OFieldDescription::SetAutoIncrementValue(const OUString& _sAutoIncValue)
}
}
-void OFieldDescription::SetType(TOTypeInfoSP _pType)
+void OFieldDescription::SetType(const TOTypeInfoSP& _pType)
{
m_pType = _pType;
if ( m_pType.get() )