diff options
Diffstat (limited to 'sw/source/uibase/dbui/dbmgr.cxx')
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index a651b20b8520..79193c08eff5 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -139,7 +139,7 @@ void lcl_emitEvent(SfxEventHintId nEventId, sal_Int32 nStrId, SfxObjectShell* pD // Construct vnd.sun.star.pkg:// URL OUString ConstructVndSunStarPkgUrl(const OUString& rMainURL, std::u16string_view rStreamRelPath) { - auto xContext(comphelper::getProcessComponentContext()); + const auto& xContext(comphelper::getProcessComponentContext()); auto xUri = css::uri::UriReferenceFactory::create(xContext)->parse(rMainURL); assert(xUri.is()); xUri = css::uri::VndSunStarPkgUrlReferenceFactory::create(xContext) @@ -243,7 +243,7 @@ public: SwDataSourceRemovedListener::SwDataSourceRemovedListener(SwDBManager& rDBManager) : m_pDBManager(&rDBManager) { - uno::Reference<uno::XComponentContext> xComponentContext(comphelper::getProcessComponentContext()); + const uno::Reference<uno::XComponentContext>& xComponentContext(comphelper::getProcessComponentContext()); m_xDatabaseContext = sdb::DatabaseContext::create(xComponentContext); m_xDatabaseContext->addDatabaseRegistrationsListener(this); } @@ -324,7 +324,7 @@ struct SwDBManager::SwDBManager_Impl static void lcl_InitNumberFormatter(SwDSParam& rParam, uno::Reference<sdbc::XDataSource> const & xSource) { - uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); + const uno::Reference<uno::XComponentContext>& xContext = ::comphelper::getProcessComponentContext(); rParam.xFormatter = util::NumberFormatter::create(xContext); uno::Reference<beans::XPropertySet> xSourceProps( (xSource.is() @@ -1883,7 +1883,7 @@ uno::Reference< sdbc::XConnection> SwDBManager::GetConnection(const OUString& rD uno::Reference<sdbc::XDataSource>& rxSource, const SwView *pView) { uno::Reference< sdbc::XConnection> xConnection; - uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const uno::Reference< uno::XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); try { uno::Reference<sdb::XCompletedConnection> xComplConnection(dbtools::getDataSource(rDataSource, xContext), uno::UNO_QUERY); @@ -2537,7 +2537,7 @@ const SwDBData& SwDBManager::GetAddressDBName() uno::Sequence<OUString> SwDBManager::GetExistingDatabaseNames() { - uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); + const uno::Reference<uno::XComponentContext>& xContext( ::comphelper::getProcessComponentContext() ); uno::Reference<sdb::XDatabaseContext> xDBContext = sdb::DatabaseContext::create(xContext); return xDBContext->getElementNames(); } @@ -2696,7 +2696,7 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference try { - uno::Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext()); + const uno::Reference<uno::XComponentContext>& xContext(::comphelper::getProcessComponentContext()); uno::Reference<sdb::XDatabaseContext> xDBContext = sdb::DatabaseContext::create(xContext); OUString sNewName = rURL.getName( @@ -2825,7 +2825,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(weld::Window* pParent, SwDocShel if( DBConnURIType::FLAT == type ) { - uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); + const uno::Reference<uno::XComponentContext>& xContext( ::comphelper::getProcessComponentContext() ); uno::Reference < sdb::XTextConnectionSettings > xSettingsDlg = sdb::TextConnectionSettings::create(xContext); if( xSettingsDlg->execute() ) aSettings.set( uno::Reference < beans::XPropertySet >( xSettingsDlg, uno::UNO_QUERY_THROW ) ); @@ -3045,7 +3045,7 @@ void SwDBManager::InsertText(SwWrtShell& rSh, OSL_FAIL("PropertyValues missing or unset"); return; } - uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const uno::Reference< uno::XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); uno::Reference<sdbc::XDataSource> xSource; uno::Reference<container::XChild> xChild(xConnection, uno::UNO_QUERY); if(xChild.is()) |