diff options
author | Noel Grandin <noel@peralex.com> | 2016-07-18 09:22:27 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-07-27 06:48:25 +0000 |
commit | 508c95f1b655d9cfa6be37a5a9de9aff6fd383bf (patch) | |
tree | d1c8626818cbf26a699875ae2d82f751a1657e92 /dbaccess | |
parent | 9f4af777a832d8a0b9a21d793d421fa6228131e0 (diff) |
improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSetCacheIterator.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/core/api/RowSetCacheIterator.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/connection.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/connection.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlExport.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlExport.hxx | 6 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlfilter.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlfilter.hxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/control/ColumnControlWindow.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/ColumnControlWindow.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/WCopyTable.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WCopyTable.cxx | 2 |
17 files changed, 30 insertions, 29 deletions
diff --git a/dbaccess/source/core/api/RowSetCacheIterator.cxx b/dbaccess/source/core/api/RowSetCacheIterator.cxx index bc1c9155eb52..9fbbc3209f41 100644 --- a/dbaccess/source/core/api/RowSetCacheIterator.cxx +++ b/dbaccess/source/core/api/RowSetCacheIterator.cxx @@ -22,6 +22,7 @@ #include "RowSetBase.hxx" using namespace dbaccess; + ORowSetCacheIterator::ORowSetCacheIterator(const ORowSetCacheIterator& _rRH) : m_aIter(_rRH.m_aIter) , m_pCache(_rRH.m_pCache) @@ -29,7 +30,7 @@ ORowSetCacheIterator::ORowSetCacheIterator(const ORowSetCacheIterator& _rRH) { } -ORowSetCacheIterator::operator ORowSetMatrix::iterator() +ORowSetCacheIterator::operator ORowSetMatrix::iterator const &() { return m_aIter->second.aIterator; } diff --git a/dbaccess/source/core/api/RowSetCacheIterator.hxx b/dbaccess/source/core/api/RowSetCacheIterator.hxx index 4b4c97e35a39..6c4a63367961 100644 --- a/dbaccess/source/core/api/RowSetCacheIterator.hxx +++ b/dbaccess/source/core/api/RowSetCacheIterator.hxx @@ -58,7 +58,7 @@ namespace dbaccess bool isNull() const; ORowSetCacheIterator& operator =(const ORowSetMatrix::iterator&); - operator ORowSetMatrix::iterator(); + operator ORowSetMatrix::iterator const &(); ORowSetRow& operator *(); diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index 9b170bdf0627..10c63345db44 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -669,7 +669,7 @@ Sequence< OUString > SAL_CALL OConnection::getAvailableServiceNames( ) throw (R return aRet; } -Reference< XTablesSupplier > OConnection::getMasterTables() +Reference< XTablesSupplier > const & OConnection::getMasterTables() { // check if out "master connection" can supply tables if(!m_xMasterTables.is()) diff --git a/dbaccess/source/core/dataaccess/connection.hxx b/dbaccess/source/core/dataaccess/connection.hxx index e06186cd91e5..eef6cfc2aa75 100644 --- a/dbaccess/source/core/dataaccess/connection.hxx +++ b/dbaccess/source/core/dataaccess/connection.hxx @@ -203,7 +203,7 @@ protected: throw css::lang::DisposedException(); } - css::uno::Reference< css::sdbcx::XTablesSupplier > getMasterTables(); + css::uno::Reference< css::sdbcx::XTablesSupplier > const & getMasterTables(); private: /** checks whether or not there are naming conflicts between tables and queries diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 9e0ee5eceb92..4d28b3756ea7 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -1729,7 +1729,7 @@ Reference< XUIConfigurationManager > SAL_CALL ODatabaseDocument::getUIConfigurat return Reference< XUIConfigurationManager >( getUIConfigurationManager2(), UNO_QUERY_THROW ); } -Reference< XUIConfigurationManager2 > ODatabaseDocument::getUIConfigurationManager2( ) throw (RuntimeException) +Reference< XUIConfigurationManager2 > const & ODatabaseDocument::getUIConfigurationManager2( ) throw (RuntimeException) { DocumentGuard aGuard(*this, DocumentGuard::DefaultMethod); @@ -2090,7 +2090,7 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons return xController; } -Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw() +Reference< XTitle > const & ODatabaseDocument::impl_getTitleHelper_throw() { if ( ! m_xTitleHelper.is ()) { diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx index 0b91ad84119b..dbee460941aa 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.hxx +++ b/dbaccess/source/core/dataaccess/databasedocument.hxx @@ -267,7 +267,7 @@ class ODatabaseDocument :public ModelDependentComponent // ModelDepe // ModelDependentComponent overridables virtual css::uno::Reference< css::uno::XInterface > getThis() const override; - css::uno::Reference< css::frame::XTitle > impl_getTitleHelper_throw(); + css::uno::Reference< css::frame::XTitle > const & impl_getTitleHelper_throw(); css::uno::Reference< css::frame::XUntitledNumbers > impl_getUntitledHelper_throw( const css::uno::Reference< css::uno::XInterface >& _xComponent = css::uno::Reference< css::uno::XInterface >()); @@ -466,7 +466,7 @@ public: } private: - css::uno::Reference< css::ui::XUIConfigurationManager2 > getUIConfigurationManager2() throw (css::uno::RuntimeException); + css::uno::Reference< css::ui::XUIConfigurationManager2 > const & getUIConfigurationManager2() throw (css::uno::RuntimeException); /** returns whether the model is currently being initialized */ diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index a17220c2f55a..735586ad6f94 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -1360,7 +1360,7 @@ OUString ODBExport::implConvertAny(const Any& _rValue) return aBuffer.makeStringAndClear(); } -rtl::Reference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > const & ODBExport::GetTableStylesPropertySetMapper() const { if ( !m_xTableStylesPropertySetMapper.is() ) { @@ -1369,7 +1369,7 @@ rtl::Reference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapp return m_xTableStylesPropertySetMapper; } -rtl::Reference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > const & ODBExport::GetCellStylesPropertySetMapper() const { if ( !m_xCellStylesPropertySetMapper.is() ) { @@ -1378,7 +1378,7 @@ rtl::Reference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMappe return m_xCellStylesPropertySetMapper; } -rtl::Reference < XMLPropertySetMapper > ODBExport::GetColumnStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > const & ODBExport::GetColumnStylesPropertySetMapper() const { if ( !m_xColumnStylesPropertySetMapper.is() ) { diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx index 4a25fcf2da67..3a335e2b4817 100644 --- a/dbaccess/source/filter/xml/xmlExport.hxx +++ b/dbaccess/source/filter/xml/xmlExport.hxx @@ -154,7 +154,7 @@ class ODBExport : public SvXMLExport static OUString implConvertAny(const Any& _rValue); - rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > const & GetTableStylesPropertySetMapper() const; ODBExport() = delete; protected: @@ -183,8 +183,8 @@ public: static css::uno::Reference<css::uno::XInterface> SAL_CALL Create( css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxORB); - rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const; - rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > const & GetColumnStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > const & GetCellStylesPropertySetMapper() const; // XExporter virtual void SAL_CALL setSourceDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) throw(css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index dcc8f767116a..6608e91f3d83 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -734,7 +734,7 @@ SvXMLImportContext* ODBFilter::CreateScriptContext( const OUString& _rLocalName } -rtl::Reference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > const & ODBFilter::GetTableStylesPropertySetMapper() const { if ( !m_xTableStylesPropertySetMapper.is() ) { @@ -744,7 +744,7 @@ rtl::Reference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapp } -rtl::Reference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > const & ODBFilter::GetColumnStylesPropertySetMapper() const { if ( !m_xColumnStylesPropertySetMapper.is() ) { @@ -754,7 +754,7 @@ rtl::Reference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMap } -rtl::Reference < XMLPropertySetMapper > ODBFilter::GetCellStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > const & ODBFilter::GetCellStylesPropertySetMapper() const { if ( !m_xCellStylesPropertySetMapper.is() ) { diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx index 5db692434af9..7e47f458cdd6 100644 --- a/dbaccess/source/filter/xml/xmlfilter.hxx +++ b/dbaccess/source/filter/xml/xmlfilter.hxx @@ -139,9 +139,9 @@ public: const SvXMLTokenMap& GetQueryElemTokenMap() const; const SvXMLTokenMap& GetColumnElemTokenMap() const; - rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const; - rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const; - rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > const & GetTableStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > const & GetColumnStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > const & GetCellStylesPropertySetMapper() const; /** add a Info to the sequence which will be appended to the data source @param _rInfo The property to append. diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx index 122cec748dcf..c3a1bb3af524 100644 --- a/dbaccess/source/ui/control/ColumnControlWindow.cxx +++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx @@ -152,7 +152,7 @@ OUString OColumnControlWindow::getAutoIncrementValue() const return m_sAutoIncrementValue; } -TOTypeInfoSP OColumnControlWindow::getDefaultTyp() const +TOTypeInfoSP const & OColumnControlWindow::getDefaultTyp() const { if ( !m_pTypeInfo.get() ) { diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 6c80b1cccbe6..2490f0eaf31c 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -411,7 +411,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const OUString return xDriver; } -Reference< XPropertySet > ODbDataSourceAdministrationHelper::getCurrentDataSource() +Reference< XPropertySet > const & ODbDataSourceAdministrationHelper::getCurrentDataSource() { if ( !m_xDatasource.is() ) { diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.hxx b/dbaccess/source/ui/dlg/DbAdminImpl.hxx index 64efba450f4e..7d6e90882e73 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.hxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.hxx @@ -103,7 +103,7 @@ namespace dbaui /** returns the data source the dialog is currently working with */ - css::uno::Reference< css::beans::XPropertySet > getCurrentDataSource(); + css::uno::Reference< css::beans::XPropertySet > const & getCurrentDataSource(); // returns the Url of a database document static OUString getDocumentUrl(SfxItemSet& _rDest); diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 4de77cc3e180..2df16e90ea24 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -68,7 +68,7 @@ namespace { } - Image getImage() const + Image const & getImage() const { if ( !m_defaultImage ) m_defaultImage = Image( ModuleRes( m_defaultImageID ) ); @@ -107,7 +107,7 @@ namespace { } - std::shared_ptr< ImageProvider > getImageProvider( SQLExceptionInfo::TYPE _eType ) const + std::shared_ptr< ImageProvider > const & getImageProvider( SQLExceptionInfo::TYPE _eType ) const { std::shared_ptr< ImageProvider >* ppProvider( &m_pErrorImage ); sal_uInt16 nNormalImageID( BMP_EXCEPTION_ERROR ); @@ -133,7 +133,7 @@ namespace return *ppProvider; } - std::shared_ptr< LabelProvider > getLabelProvider( SQLExceptionInfo::TYPE _eType, bool _bSubLabel ) const + std::shared_ptr< LabelProvider > const & getLabelProvider( SQLExceptionInfo::TYPE _eType, bool _bSubLabel ) const { std::shared_ptr< LabelProvider >* ppProvider( &m_pErrorLabel ); sal_uInt16 nLabelID( STR_EXCEPTION_ERROR ); diff --git a/dbaccess/source/ui/inc/ColumnControlWindow.hxx b/dbaccess/source/ui/inc/ColumnControlWindow.hxx index 7a1cf40b5f5e..7c7f63a12e4e 100644 --- a/dbaccess/source/ui/inc/ColumnControlWindow.hxx +++ b/dbaccess/source/ui/inc/ColumnControlWindow.hxx @@ -61,7 +61,7 @@ namespace dbaui virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() override; virtual css::uno::Reference< css::sdbc::XConnection> getConnection() override; virtual const OTypeInfoMap* getTypeInfo() const override; - TOTypeInfoSP getDefaultTyp() const; + TOTypeInfoSP const & getDefaultTyp() const; }; } // namespace dbaui #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_COLUMNCONTROLWINDOW_HXX diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx index 212d03445ffc..dd8c38c5ae9c 100644 --- a/dbaccess/source/ui/inc/WCopyTable.hxx +++ b/dbaccess/source/ui/inc/WCopyTable.hxx @@ -208,7 +208,7 @@ namespace dbaui private: void impl_ensureColumnInfo_throw(); - ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement > + ::utl::SharedUNOComponent< css::sdbc::XPreparedStatement > const & impl_ensureStatement_throw(); }; diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 73281f417597..56142ceee651 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -330,7 +330,7 @@ void NamedTableCopySource::impl_ensureColumnInfo_throw() } } -::utl::SharedUNOComponent< XPreparedStatement > NamedTableCopySource::impl_ensureStatement_throw() +::utl::SharedUNOComponent< XPreparedStatement > const & NamedTableCopySource::impl_ensureStatement_throw() { if ( !m_xStatement.is() ) m_xStatement.set( m_xConnection->prepareStatement( getSelectStatement() ), UNO_SET_THROW ); |