summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-13 10:42:52 +0200
committerNoel Grandin <noel@peralex.com>2016-04-13 13:27:51 +0200
commitef268562602a4bef0e128f95beaef9732ac00c7d (patch)
treeb36a4a773a86c84833a48f7eeec50dc3e76b0729 /connectivity/source
parent216ffb038f4a2f43286d96b83a64346a2351c8c1 (diff)
loplugin:passstuffbyref in connectivity
Change-Id: I751977ecc1b532f72dd5673767471cb0a2cdbd06
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/firebird/Connection.hxx2
-rw-r--r--connectivity/source/drivers/mork/MDriver.hxx4
-rw-r--r--connectivity/source/drivers/mork/MTable.hxx4
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx4
-rw-r--r--connectivity/source/inc/TConnection.hxx2
-rw-r--r--connectivity/source/inc/calc/CConnection.hxx2
-rw-r--r--connectivity/source/inc/dbase/dindexnode.hxx4
-rw-r--r--connectivity/source/inc/file/FConnection.hxx2
-rw-r--r--connectivity/source/inc/file/FDriver.hxx2
-rw-r--r--connectivity/source/inc/file/FTable.hxx4
-rw-r--r--connectivity/source/inc/file/fcomp.hxx2
-rw-r--r--connectivity/source/inc/hsqldb/HCatalog.hxx2
-rw-r--r--connectivity/source/inc/mysql/YCatalog.hxx2
-rw-r--r--connectivity/source/inc/odbc/OBoundParam.hxx2
-rw-r--r--connectivity/source/inc/odbc/ODriver.hxx2
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx8
17 files changed, 25 insertions, 25 deletions
diff --git a/connectivity/source/drivers/firebird/Connection.hxx b/connectivity/source/drivers/firebird/Connection.hxx
index 29784ddc55be..37c5b83bc3f8 100644
--- a/connectivity/source/drivers/firebird/Connection.hxx
+++ b/connectivity/source/drivers/firebird/Connection.hxx
@@ -177,7 +177,7 @@ namespace connectivity
css::uno::RuntimeException,
std::exception);
- ::rtl::OUString getConnectionURL() const {return m_sConnectionURL;}
+ const OUString& getConnectionURL() const {return m_sConnectionURL;}
bool isEmbedded() const {return m_bIsEmbedded;}
isc_db_handle& getDBHandle() {return m_aDBHandle;}
isc_tr_handle& getTransaction()
diff --git a/connectivity/source/drivers/mork/MDriver.hxx b/connectivity/source/drivers/mork/MDriver.hxx
index 198909194ec9..d9265799b5e9 100644
--- a/connectivity/source/drivers/mork/MDriver.hxx
+++ b/connectivity/source/drivers/mork/MDriver.hxx
@@ -39,8 +39,8 @@ public:
static css::uno::Sequence< OUString > getSupportedServiceNames_Static()
throw (css::uno::RuntimeException);
- css::uno::Reference< com::sun::star::lang::XMultiServiceFactory > getFactory(){return m_xFactory;}
- OUString getProfilePath() {return m_sProfilePath;}
+ const css::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& getFactory(){return m_xFactory;}
+ const OUString& getProfilePath() {return m_sProfilePath;}
private:
MorkDriver(const MorkDriver&) = delete;
diff --git a/connectivity/source/drivers/mork/MTable.hxx b/connectivity/source/drivers/mork/MTable.hxx
index 7e50743192be..1008eb62f3f8 100644
--- a/connectivity/source/drivers/mork/MTable.hxx
+++ b/connectivity/source/drivers/mork/MTable.hxx
@@ -44,8 +44,8 @@ namespace connectivity
static bool isReadOnly() { return false; }
- OUString getTableName() const { return m_Name; }
- OUString getSchema() const { return m_SchemaName; }
+ const OUString& getTableName() const { return m_Name; }
+ const OUString& getSchema() const { return m_SchemaName; }
// OTableHelper overridables
virtual sdbcx::OCollection* createColumns( const TStringVector& _rNames ) override;
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
index 92f45cb2237c..0655e528bd4d 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -34,7 +34,7 @@ namespace connectivity
profileName = aProfileName;
profilePath = aProfilePath;
}
- OUString ProfileStruct::getProfilePath()
+ const OUString& ProfileStruct::getProfilePath()
{
return profilePath;
}
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
index 3f9ad6980268..585cf24eb881 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
@@ -49,8 +49,8 @@ namespace connectivity
public:
ProfileStruct(MozillaProductType aProduct, const OUString& aProfileName,
const OUString &aProfilePath);
- OUString getProfileName(){ return profileName;}
- OUString getProfilePath() ;
+ const OUString& getProfileName(){ return profileName;}
+ const OUString& getProfilePath();
protected:
MozillaProductType product;
OUString profileName;
diff --git a/connectivity/source/inc/TConnection.hxx b/connectivity/source/inc/TConnection.hxx
index 4dbf6a3091c3..9c82f1c66ce5 100644
--- a/connectivity/source/inc/TConnection.hxx
+++ b/connectivity/source/inc/TConnection.hxx
@@ -60,7 +60,7 @@ namespace connectivity
OMetaConnection();
inline rtl_TextEncoding getTextEncoding() const { return m_nTextEncoding; }
- inline OUString getURL() const { return m_sURL; }
+ const OUString& getURL() const { return m_sURL; }
inline void setURL(const OUString& _rsUrl) { m_sURL = _rsUrl; }
void throwGenericSQLException( sal_uInt16 _nErrorResourceId,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xContext );
const SharedResources& getResources() const { return m_aResources;}
diff --git a/connectivity/source/inc/calc/CConnection.hxx b/connectivity/source/inc/calc/CConnection.hxx
index 854a9f74481c..a0c99139e51a 100644
--- a/connectivity/source/inc/calc/CConnection.hxx
+++ b/connectivity/source/inc/calc/CConnection.hxx
@@ -87,7 +87,7 @@ namespace connectivity
m_xDoc.clear();
m_pConnection->releaseDoc();
}
- ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheetDocument> getDoc() const { return m_xDoc; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheetDocument>& getDoc() const { return m_xDoc; }
};
};
}
diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx
index cc24a7c8c38b..9d5977e3a384 100644
--- a/connectivity/source/inc/dbase/dindexnode.hxx
+++ b/connectivity/source/inc/dbase/dindexnode.hxx
@@ -158,7 +158,7 @@ namespace connectivity
ONDXPagePtr& GetChild(ODbaseIndex* pIndex = nullptr);
// Parent does not need to be reloaded
- ONDXPagePtr GetParent();
+ const ONDXPagePtr& GetParent();
ODbaseIndex& GetIndex() {return rIndex;}
const ODbaseIndex& GetIndex() const {return rIndex;}
@@ -217,7 +217,7 @@ namespace connectivity
inline bool ONDXPage::IsLeaf() const {return !aChild.HasPage();}
inline bool ONDXPage::IsModified() const {return bModified;}
inline bool ONDXPage::HasParent() {return aParent.Is();}
- inline ONDXPagePtr ONDXPage::GetParent() {return aParent;}
+ inline const ONDXPagePtr& ONDXPage::GetParent() {return aParent;}
inline void ONDXPage::SetParent(ONDXPagePtr aPa = ONDXPagePtr())
{
diff --git a/connectivity/source/inc/file/FConnection.hxx b/connectivity/source/inc/file/FConnection.hxx
index 58a57fce4201..ae5ddfdb7f00 100644
--- a/connectivity/source/inc/file/FConnection.hxx
+++ b/connectivity/source/inc/file/FConnection.hxx
@@ -120,7 +120,7 @@ namespace connectivity
// no interface methods
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XDynamicResultSet > getDir() const;
- ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent> getContent() const { return m_xContent; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& getContent() const { return m_xContent; }
// create a catalog or return the catalog already created
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > createCatalog();
diff --git a/connectivity/source/inc/file/FDriver.hxx b/connectivity/source/inc/file/FDriver.hxx
index f96e953e810c..c6c1be63d3e4 100644
--- a/connectivity/source/inc/file/FDriver.hxx
+++ b/connectivity/source/inc/file/FDriver.hxx
@@ -69,7 +69,7 @@ namespace connectivity
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& connection ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByURL( const OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getComponentContext() const { return m_xContext; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& getComponentContext() const { return m_xContext; }
};
}
diff --git a/connectivity/source/inc/file/FTable.hxx b/connectivity/source/inc/file/FTable.hxx
index 6f8b2ae29130..05635b9b529c 100644
--- a/connectivity/source/inc/file/FTable.hxx
+++ b/connectivity/source/inc/file/FTable.hxx
@@ -76,7 +76,7 @@ namespace connectivity
virtual bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) = 0;
virtual bool fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, bool bRetrieveData) = 0;
- ::rtl::Reference<OSQLColumns> getTableColumns() const {return m_aColumns;}
+ const ::rtl::Reference<OSQLColumns>& getTableColumns() const {return m_aColumns;}
virtual bool InsertRow(OValueRefVector& rRow, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
virtual bool DeleteRow(const OSQLColumns& _rCols);
virtual bool UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols);
@@ -87,7 +87,7 @@ namespace connectivity
OUString SAL_CALL getName() throw(std::exception) override { return m_Name; }
- OUString getSchema() { return m_SchemaName; }
+ const OUString& getSchema() { return m_SchemaName; }
bool isReadOnly() const { return !m_bWriteable; }
// m_pFileStream && !m_pFileStream->IsWritable(); }
// com::sun::star::lang::XUnoTunnel
diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx
index 68ab356ccdd7..04acb53ec844 100644
--- a/connectivity/source/inc/file/fcomp.hxx
+++ b/connectivity/source/inc/file/fcomp.hxx
@@ -66,7 +66,7 @@ namespace connectivity
bool isClean() const {return m_aCodeList.empty();}
bool hasCode() const {return !isClean();}
void setOrigColumns(const css::uno::Reference< css::container::XNameAccess>& rCols) { m_orgColumns = rCols; }
- const css::uno::Reference< css::container::XNameAccess> getOrigColumns() const { return m_orgColumns; }
+ const css::uno::Reference< css::container::XNameAccess>& getOrigColumns() const { return m_orgColumns; }
protected:
OOperand* execute_COMPARE(connectivity::OSQLParseNode* pPredicateNode) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
OOperand* execute_LIKE(connectivity::OSQLParseNode* pPredicateNode) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
diff --git a/connectivity/source/inc/hsqldb/HCatalog.hxx b/connectivity/source/inc/hsqldb/HCatalog.hxx
index 336c0e3b0369..d22e065ecfe8 100644
--- a/connectivity/source/inc/hsqldb/HCatalog.hxx
+++ b/connectivity/source/inc/hsqldb/HCatalog.hxx
@@ -52,7 +52,7 @@ namespace connectivity
inline sdbcx::OCollection* getPrivateTables() const { return m_pTables;}
inline sdbcx::OCollection* getPrivateViews() const { return m_pViews; }
- inline ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() const { return m_xConnection; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& getConnection() const { return m_xConnection; }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) override;
// ::cppu::OComponentHelper
diff --git a/connectivity/source/inc/mysql/YCatalog.hxx b/connectivity/source/inc/mysql/YCatalog.hxx
index 8427026ccf6e..e90928500604 100644
--- a/connectivity/source/inc/mysql/YCatalog.hxx
+++ b/connectivity/source/inc/mysql/YCatalog.hxx
@@ -52,7 +52,7 @@ namespace connectivity
inline sdbcx::OCollection* getPrivateTables() const { return m_pTables;}
inline sdbcx::OCollection* getPrivateViews() const { return m_pViews; }
- inline ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() const { return m_xConnection; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& getConnection() const { return m_xConnection; }
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) override;
// ::cppu::OComponentHelper
diff --git a/connectivity/source/inc/odbc/OBoundParam.hxx b/connectivity/source/inc/odbc/OBoundParam.hxx
index 73b90f0b70a2..d4daa79cd46a 100644
--- a/connectivity/source/inc/odbc/OBoundParam.hxx
+++ b/connectivity/source/inc/odbc/OBoundParam.hxx
@@ -87,7 +87,7 @@ namespace connectivity
// getInputStream
// Gets the input stream for the bound parameter
- ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream> getInputStream ()
+ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>& getInputStream ()
{
return paramInputStream;
}
diff --git a/connectivity/source/inc/odbc/ODriver.hxx b/connectivity/source/inc/odbc/ODriver.hxx
index 96a5773d3390..c3e2354fa04c 100644
--- a/connectivity/source/inc/odbc/ODriver.hxx
+++ b/connectivity/source/inc/odbc/ODriver.hxx
@@ -74,7 +74,7 @@ namespace connectivity
virtual sal_Int32 SAL_CALL getMajorVersion( ) throw(::com::sun::star::uno::RuntimeException, std::exception) override;
virtual sal_Int32 SAL_CALL getMinorVersion( ) throw(::com::sun::star::uno::RuntimeException, std::exception) override;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const { return m_xORB; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& getORB() const { return m_xORB; }
};
}
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index d6a5102a429f..8d1e24bff9e3 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -137,17 +137,17 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W
};
/// an STL functor which extracts a SdbcDriver from a DriverAccess
- struct ExtractDriverFromAccess : public ::std::unary_function< DriverAccess, Reference<XDriver> >
+ struct ExtractDriverFromAccess : public ::std::unary_function< DriverAccess, const Reference<XDriver>& >
{
- Reference<XDriver> operator()( const DriverAccess& _rAccess ) const
+ const Reference<XDriver>& operator()( const DriverAccess& _rAccess ) const
{
return _rAccess.xDriver;
}
};
- struct ExtractDriverFromCollectionElement : public ::std::unary_function< DriverCollection::value_type, Reference<XDriver> >
+ struct ExtractDriverFromCollectionElement : public ::std::unary_function< DriverCollection::value_type, const Reference<XDriver>& >
{
- Reference<XDriver> operator()( const DriverCollection::value_type& _rElement ) const
+ const Reference<XDriver>& operator()( const DriverCollection::value_type& _rElement ) const
{
return _rElement.second;
}