diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-17 09:18:05 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-17 13:30:52 +0200 |
commit | 5d456dc5c6bf733228f0c342be25c8f68513c8cb (patch) | |
tree | 5b45cfcca12b26adec953bda766eff8535da50f5 /dbaccess | |
parent | 12bb4fdddd3c72a9fc9209288cc8e827bf353920 (diff) |
dbaccess: prefer passing OUString by reference
Change-Id: I7cec02a40db48ce3d3003b3808d06ff0455a6eb4
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/inc/SingleSelectQueryComposer.hxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ext/macromigration/macromigrationdialog.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/control/TableGrantCtrl.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbfindex.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbfindex.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/generalpage.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/generalpage.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TableGrantCtrl.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/dsmeta.cxx | 2 |
11 files changed, 19 insertions, 19 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 3b028ef0f256..65d862eb8fca 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -437,14 +437,14 @@ Sequence< Sequence< PropertyValue > > SAL_CALL OSingleSelectQueryComposer::getSt void SAL_CALL OSingleSelectQueryComposer::appendHavingClauseByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (SQLException, RuntimeException, std::exception) { SAL_INFO("dbaccess", "OSingleSelectQueryComposer::appendHavingClauseByColumn" ); - ::std::mem_fun1_t<bool,OSingleSelectQueryComposer,OUString> F_tmp(&OSingleSelectQueryComposer::implSetHavingClause); + ::std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString&> F_tmp(&OSingleSelectQueryComposer::implSetHavingClause); setConditionByColumn(column,andCriteria,F_tmp,filterOperator); } void SAL_CALL OSingleSelectQueryComposer::appendFilterByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw(SQLException, RuntimeException, std::exception) { SAL_INFO("dbaccess", "OSingleSelectQueryComposer::appendFilterByColumn" ); - ::std::mem_fun1_t<bool,OSingleSelectQueryComposer,OUString> F_tmp(&OSingleSelectQueryComposer::implSetFilter); + ::std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString&> F_tmp(&OSingleSelectQueryComposer::implSetFilter); setConditionByColumn(column,andCriteria,F_tmp,filterOperator); } @@ -643,8 +643,8 @@ void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const OUString& _r namespace { - OUString getComposedClause( const OUString _rElementaryClause, const OUString _rAdditionalClause, - TokenComposer& _rComposer, const OUString _rKeyword ) + OUString getComposedClause( const OUString& _rElementaryClause, const OUString& _rAdditionalClause, + TokenComposer& _rComposer, const OUString& _rKeyword ) { _rComposer.clear(); _rComposer.append( _rElementaryClause ); @@ -1548,7 +1548,7 @@ void SAL_CALL OSingleSelectQueryComposer::setStructuredHavingClause( const Seque setHavingClause(lcl_getCondition(filter,aPredicateInput,getColumns())); } -void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria ,::std::mem_fun1_t<bool,OSingleSelectQueryComposer,OUString>& _aSetFunctor,sal_Int32 filterOperator) +void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria ,::std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString& >& _aSetFunctor,sal_Int32 filterOperator) { SAL_INFO("dbaccess", "OSingleSelectQueryComposer::setConditionByColumn" ); ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed); diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 1008e3c754ac..2e676ab2f5ad 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -349,7 +349,7 @@ namespace } } - static Sequence< PropertyValue > lcl_appendFileNameToDescriptor( const ::comphelper::NamedValueCollection& _rDescriptor, const OUString _rURL ) + static Sequence< PropertyValue > lcl_appendFileNameToDescriptor( const ::comphelper::NamedValueCollection& _rDescriptor, const OUString& _rURL ) { ::comphelper::NamedValueCollection aMutableDescriptor( _rDescriptor ); if ( !_rURL.isEmpty() ) diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx index 3d67511b1bd5..3f43e350ac9a 100644 --- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx +++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx @@ -133,7 +133,7 @@ namespace dbaccess void setConditionByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column , sal_Bool andCriteria - ,::std::mem_fun1_t<bool,OSingleSelectQueryComposer,OUString>& _aSetFunctor + ,::std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString& >& _aSetFunctor ,sal_Int32 filterOperator); /** getStructuredCondition returns the structured condition for the where or having clause @@ -150,8 +150,8 @@ namespace dbaccess setCurrentColumns( EColumnType _eType, const ::rtl::Reference< ::connectivity::OSQLColumns >& _rCols ); //helper methods for mem_fun_t - inline bool implSetFilter(OUString _sFilter) { setFilter(_sFilter); return true;} - inline bool implSetHavingClause(OUString _sFilter) { setHavingClause(_sFilter); return true;} + inline bool implSetFilter(const OUString& _sFilter) { setFilter(_sFilter); return true;} + inline bool implSetHavingClause(const OUString& _sFilter) { setHavingClause(_sFilter); return true;} /** returns the part of the seelect statement @param _ePart diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx index cfe103dfa73b..3e0fc452beea 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx @@ -371,7 +371,7 @@ namespace dbmm { bool lcl_equalURLs_nothrow( const Reference< XComponentContext >& context, - const OUString& _lhs, const OUString _rhs ) + const OUString& _lhs, const OUString& _rhs ) { // the cheap situation: the URLs are equal if ( _lhs == _rhs ) diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx index 9570d8f99b8f..b15854de2281 100644 --- a/dbaccess/source/ui/control/TableGrantCtrl.cxx +++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx @@ -341,7 +341,7 @@ sal_Bool OTableGrantControl::isAllowed(sal_uInt16 _nColumnId,sal_Int32 _nPrivile return bAllowed; } -void OTableGrantControl::setUserName(const OUString _sUserName) +void OTableGrantControl::setUserName(const OUString& _sUserName) { m_sUserName = _sUserName; m_aPrivMap = TTablePrivilegeMap(); diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 5a05141c2849..ed4ad220fece 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -40,7 +40,7 @@ using namespace ::svt; const OString aGroupIdent("dBase III"); -ODbaseIndexDialog::ODbaseIndexDialog(Window * pParent, OUString aDataSrcName) +ODbaseIndexDialog::ODbaseIndexDialog(Window * pParent, const OUString& aDataSrcName) : ModalDialog(pParent, "DBaseIndexDialog", "dbaccess/ui/dbaseindexdialog.ui") , m_aDSN(aDataSrcName) , m_bCaseSensitiv(true) diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx index d3bb626d5a7a..adebe92af517 100644 --- a/dbaccess/source/ui/dlg/dbfindex.hxx +++ b/dbaccess/source/ui/dlg/dbfindex.hxx @@ -112,7 +112,7 @@ protected: void checkButtons(); public: - ODbaseIndexDialog( Window * pParent, OUString aDataSrcName ); + ODbaseIndexDialog( Window * pParent, const OUString& aDataSrcName ); }; } // namespace dbaui diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 590dbefffbdc..ff2b8395e09a 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -354,7 +354,7 @@ namespace dbaui return _inout_rDisplayName.getLength() > 0; } - void OGeneralPage::insertDatasourceTypeEntryData(const OUString& _sType, OUString sDisplayName) + void OGeneralPage::insertDatasourceTypeEntryData(const OUString& _sType, const OUString& sDisplayName) { // insert a (temporary) entry sal_uInt16 nPos = m_pDatasourceType->InsertEntry(sDisplayName); @@ -363,7 +363,7 @@ namespace dbaui m_aURLPrefixes[nPos] = _sType; } - void OGeneralPageWizard::insertEmbeddedDBTypeEntryData(const OUString& _sType, OUString sDisplayName) + void OGeneralPageWizard::insertEmbeddedDBTypeEntryData(const OUString& _sType, const OUString& sDisplayName) { // insert a (temporary) entry sal_uInt16 nPos = m_pEmbeddedDBType->InsertEntry(sDisplayName); diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index 5711261c4b92..aa4442751d25 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -54,7 +54,7 @@ namespace dbaui sal_Bool m_bDisplayingInvalid : 1; // the currently displayed data source is deleted bool m_bInitTypeList : 1; bool approveDatasourceType( const OUString& _sURLPrefix, OUString& _inout_rDisplayName ); - void insertDatasourceTypeEntryData( const OUString& _sType, OUString sDisplayName ); + void insertDatasourceTypeEntryData( const OUString& _sType, const OUString& sDisplayName ); protected: ListBox* m_pDatasourceType; @@ -159,7 +159,7 @@ namespace dbaui m_aControlDependencies; bool m_bInitEmbeddedDBList : 1; - void insertEmbeddedDBTypeEntryData( const OUString& _sType, OUString sDisplayName ); + void insertEmbeddedDBTypeEntryData( const OUString& _sType, const OUString& sDisplayName ); public: void SetCreationModeHandler( const Link& _rHandler ) { m_aCreationModeHandler = _rHandler; } diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx index 6e360cbf01df..63901b4cf167 100644 --- a/dbaccess/source/ui/inc/TableGrantCtrl.hxx +++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx @@ -62,7 +62,7 @@ public: OTableGrantControl( Window* pParent,const ResId& _RsId); virtual ~OTableGrantControl(); void UpdateTables(); - void setUserName(const OUString _sUserName); + void setUserName(const OUString& _sUserName); void setGrantUser(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XAuthorizable>& _xGrantUser); void setTablesSupplier(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier >& _xTablesSup); diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx index 97a5bd26b288..aaf3ab9ddd90 100644 --- a/dbaccess/source/ui/misc/dsmeta.cxx +++ b/dbaccess/source/ui/misc/dsmeta.cxx @@ -84,7 +84,7 @@ namespace dbaui return s_aMappings; } - static const FeatureSet& lcl_getFeatureSet( const OUString _rURL ) + static const FeatureSet& lcl_getFeatureSet( const OUString& _rURL ) { typedef ::std::map< OUString, FeatureSet > FeatureSets; static FeatureSets s_aFeatureSets; |