summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--include/connectivity/FValue.hxx2
-rw-r--r--include/connectivity/ParameterCont.hxx2
-rw-r--r--include/connectivity/dbcharset.hxx2
-rw-r--r--include/connectivity/sqliterator.hxx8
-rw-r--r--include/connectivity/sqlscan.hxx2
22 files changed, 33 insertions, 33 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;
}
diff --git a/include/connectivity/FValue.hxx b/include/connectivity/FValue.hxx
index d15abd69f24d..c78f3c76b8c5 100644
--- a/include/connectivity/FValue.hxx
+++ b/include/connectivity/FValue.hxx
@@ -410,7 +410,7 @@ namespace connectivity
css::util::DateTime getDateTime() const;
css::uno::Sequence<sal_Int8> getSequence() const;
// only use for anys
- css::uno::Any getAny() const { return *static_cast<css::uno::Any*>(m_aValue.m_pValue); }
+ const css::uno::Any& getAny() const { return *static_cast<css::uno::Any*>(m_aValue.m_pValue); }
css::uno::Any makeAny() const;
/**
diff --git a/include/connectivity/ParameterCont.hxx b/include/connectivity/ParameterCont.hxx
index f1997b755b26..ff6686f5d7db 100644
--- a/include/connectivity/ParameterCont.hxx
+++ b/include/connectivity/ParameterCont.hxx
@@ -35,7 +35,7 @@ namespace dbtools
public:
OParameterContinuation() { }
- css::uno::Sequence< css::beans::PropertyValue > getValues() const { return m_aValues; }
+ const css::uno::Sequence< css::beans::PropertyValue >& getValues() const { return m_aValues; }
// XInteractionSupplyParameters
virtual void SAL_CALL setParameters( const css::uno::Sequence< css::beans::PropertyValue >& _rValues ) throw(css::uno::RuntimeException, std::exception) override;
diff --git a/include/connectivity/dbcharset.hxx b/include/connectivity/dbcharset.hxx
index 01ce6fa05f96..8c7e9def1ce1 100644
--- a/include/connectivity/dbcharset.hxx
+++ b/include/connectivity/dbcharset.hxx
@@ -105,7 +105,7 @@ namespace dbtools
CharsetIteratorDerefHelper(const CharsetIteratorDerefHelper& _rSource);
rtl_TextEncoding getEncoding() const { return m_eEncoding; }
- OUString getIanaName() const { return m_aIanaName; }
+ const OUString& getIanaName() const { return m_aIanaName; }
protected:
CharsetIteratorDerefHelper( const rtl_TextEncoding _eEncoding, const OUString& _rIanaName );
diff --git a/include/connectivity/sqliterator.hxx b/include/connectivity/sqliterator.hxx
index 6afd1c4f4d66..7d69003bc162 100644
--- a/include/connectivity/sqliterator.hxx
+++ b/include/connectivity/sqliterator.hxx
@@ -220,10 +220,10 @@ namespace connectivity
// The TableRangeMap contains all tables associated with the range name found first.
const OSQLTables& getTables() const;
- ::rtl::Reference<OSQLColumns> getSelectColumns() const { return m_aSelectColumns;}
- ::rtl::Reference<OSQLColumns> getGroupColumns() const { return m_aGroupColumns;}
- ::rtl::Reference<OSQLColumns> getOrderColumns() const { return m_aOrderColumns;}
- ::rtl::Reference<OSQLColumns> getParameters() const { return m_aParameters; }
+ const ::rtl::Reference<OSQLColumns>& getSelectColumns() const { return m_aSelectColumns;}
+ const ::rtl::Reference<OSQLColumns>& getGroupColumns() const { return m_aGroupColumns;}
+ const ::rtl::Reference<OSQLColumns>& getOrderColumns() const { return m_aOrderColumns;}
+ const ::rtl::Reference<OSQLColumns>& getParameters() const { return m_aParameters; }
/** return the columname and the table range
@param _pColumnRef
diff --git a/include/connectivity/sqlscan.hxx b/include/connectivity/sqlscan.hxx
index ad17f7d28e0d..570a17ea7289 100644
--- a/include/connectivity/sqlscan.hxx
+++ b/include/connectivity/sqlscan.hxx
@@ -60,7 +60,7 @@ namespace connectivity
// setting the new information before scanning
void prepareScan(const OUString & rNewStatement, const IParseContext* pContext, bool bInternational);
const OUString& getErrorMessage() const {return m_sErrorMessage;}
- OString getStatement() const { return m_sStatement; }
+ const OString& getStatement() const { return m_sStatement; }
static sal_Int32 SQLlex();
// set this as scanner for flex