diff options
Diffstat (limited to 'cui')
25 files changed, 45 insertions, 43 deletions
diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx b/cui/source/customize/CustomNotebookbarGenerator.cxx index e1851a72506a..7b26d36a68b8 100644 --- a/cui/source/customize/CustomNotebookbarGenerator.cxx +++ b/cui/source/customize/CustomNotebookbarGenerator.cxx @@ -216,7 +216,7 @@ void CustomNotebookbarGenerator::getFileNameAndAppName(OUString& sAppName, if (!pFrame) return; - const auto xContext = comphelper::getProcessComponentContext(); + const auto& xContext = comphelper::getProcessComponentContext(); utl::OConfigurationTreeRoot aRoot(xContext, u"org.openoffice.Office.UI.ToolbarMode/"_ustr, false); const Reference<frame::XFrame>& xFrame = pFrame->GetFrame().GetFrameInterface(); diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index 68d53b680a41..f04815570cf2 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -196,7 +196,8 @@ void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId const weld::TreeIter& rIter) { css::uno::Reference<css::container::XNameAccess> m_xCommandToLabelMap; - uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); + const uno::Reference<uno::XComponentContext>& xContext + = ::comphelper::getProcessComponentContext(); uno::Reference<container::XNameAccess> xNameAccess( css::frame::theUICommandDescription::get(xContext)); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 04db1bf78dca..feae0442ef90 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -302,7 +302,7 @@ SaveInData::SaveInData( bReadOnly = xDocPersistence->isReadOnly(); } - uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); + const uno::Reference<uno::XComponentContext>& xContext = ::comphelper::getProcessComponentContext(); uno::Reference< container::XNameAccess > xNameAccess( css::frame::theUICommandDescription::get(xContext) ); @@ -603,7 +603,7 @@ void MenuSaveInData::Apply( uno::Reference< container::XIndexContainer > const & rMenuBar, uno::Reference< lang::XSingleComponentFactory >& rFactory ) { - uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); + const uno::Reference<uno::XComponentContext>& xContext = ::comphelper::getProcessComponentContext(); for (auto const& entryData : *GetEntries()) { @@ -630,7 +630,7 @@ void SaveInData::ApplyMenu( uno::Reference< lang::XSingleComponentFactory >& rFactory, SvxConfigEntry* pMenuData ) { - uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); + const uno::Reference<uno::XComponentContext>& xContext = ::comphelper::getProcessComponentContext(); for (auto const& entry : *pMenuData->GetEntries()) { @@ -702,7 +702,7 @@ ContextMenuSaveInData::ContextMenuSaveInData( const OUString& aModuleId, bool bIsDocConfig ) : SaveInData( xCfgMgr, xParentCfgMgr, aModuleId, bIsDocConfig ) { - css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::getProcessComponentContext() ); + const css::uno::Reference< css::uno::XComponentContext >& xContext( comphelper::getProcessComponentContext() ); css::uno::Reference< css::container::XNameAccess > xConfig( css::ui::theWindowStateConfiguration::get( xContext ) ); xConfig->getByName( aModuleId ) >>= m_xPersistentWindowState; } @@ -1279,7 +1279,7 @@ OUString SvxConfigPage::GetFrameWithDefaultAndIdentify( uno::Reference< frame::X OUString sModuleID; try { - uno::Reference< uno::XComponentContext > xContext( + const uno::Reference< uno::XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create( @@ -1974,7 +1974,7 @@ ToolbarSaveInData::ToolbarSaveInData( m_aDescriptorContainer ( ITEM_DESCRIPTOR_CONTAINER ) { - uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); + const uno::Reference<uno::XComponentContext>& xContext = ::comphelper::getProcessComponentContext(); // Initialize the m_xPersistentWindowState variable which is used // to get the default properties of system toolbars such as name uno::Reference< container::XNameAccess > xPWSS = css::ui::theWindowStateConfiguration::get( xContext ); @@ -2413,7 +2413,7 @@ void ToolbarSaveInData::ApplyToolbar( uno::Reference< lang::XSingleComponentFactory >& rFactory, SvxConfigEntry const * pToolbarData ) { - uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); + const uno::Reference<uno::XComponentContext>& xContext = ::comphelper::getProcessComponentContext(); for (auto const& entry : *pToolbarData->GetEntries()) { @@ -2742,7 +2742,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog(weld::Window *pWindow, Size aSize(m_xTbSymbol->CalcWindowSizePixel(Size(m_nExpectedSize, m_nExpectedSize), 11, 5)); m_xTbSymbol->set_size_request(aSize.Width(), aSize.Height()); - uno::Reference< uno::XComponentContext > xComponentContext = + const uno::Reference< uno::XComponentContext >& xComponentContext = ::comphelper::getProcessComponentContext(); m_xGraphProvider.set( graphic::GraphicProvider::create( xComponentContext ) ); diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index 6fdf6c130319..12d1e4847397 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -317,7 +317,7 @@ void QrCodeGenDialog::Apply() SvMemoryStream aSvgStream(4096, 4096); aSvgStream.WriteOString(aSvgImage); Reference<XInputStream> xInputStream(new utl::OSeekableInputStreamWrapper(aSvgStream)); - Reference<XComponentContext> xContext(comphelper::getProcessComponentContext()); + const Reference<XComponentContext>& xContext(comphelper::getProcessComponentContext()); Reference<XGraphicProvider> xProvider = css::graphic::GraphicProvider::create(xContext); Sequence<PropertyValue> aMediaProperties{ comphelper::makePropertyValue(u"InputStream"_ustr, diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx b/cui/source/dialogs/SignSignatureLineDialog.cxx index 183fb04c82fb..a58e9298054d 100644 --- a/cui/source/dialogs/SignSignatureLineDialog.cxx +++ b/cui/source/dialogs/SignSignatureLineDialog.cxx @@ -119,7 +119,7 @@ SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Referenc IMPL_LINK_NOARG(SignSignatureLineDialog, loadImage, weld::Button&, void) { - Reference<XComponentContext> xContext = comphelper::getProcessComponentContext(); + const Reference<XComponentContext>& xContext = comphelper::getProcessComponentContext(); sfx2::FileDialogHelper aHelper(TemplateDescription::FILEOPEN_PREVIEW, FileDialogFlags::NONE, m_xDialog.get()); aHelper.SetContext(sfx2::FileDialogHelper::SignatureLine); diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 15f4e08ba2d3..1bf026e7d865 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -801,7 +801,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickSearchHdl, weld::Button&, void) try { // setup folder picker - css::uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const css::uno::Reference< XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); xFolderPicker = sfx2::createFolderPicker(xContext, GetFrameWeld()); OUString aDlgPathName( SvtPathOptions().GetGraphicPath() ); diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index bf10d1df85b1..6fcc0ac9d7c6 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -383,7 +383,7 @@ void SvxHyperlinkNewDocTp::DoApply() IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl, weld::Button&, void) { DisableClose( true ); - uno::Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const uno::Reference < XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); uno::Reference < XFolderPicker2 > xFolderPicker = sfx2::createFolderPicker(xContext, mpDialog->getDialog()); OUString aStrURL; diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 814732173598..41d50c17b336 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -287,7 +287,7 @@ short SvInsertOleDlg::run() if ( !aFileName.isEmpty() ) { - uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); + const uno::Reference< uno::XComponentContext >& xContext = ::comphelper::getProcessComponentContext(); uno::Reference< task::XInteractionHandler2 > xInteraction( task::InteractionHandler::createWithParent(xContext, nullptr) ); diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 383c2ee1ab0b..abd8d56411fb 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -87,7 +87,7 @@ void SvxMultiPathDialog::AppendEntry(const OUString& rText, const OUString& rId) IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl, weld::Button&, void) { - Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const Reference < XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); Reference < XFolderPicker2 > xFolderPicker = sfx2::createFolderPicker(xContext, m_xDialog.get()); if ( xFolderPicker->execute() != ExecutableDialogResults::OK ) @@ -117,7 +117,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl, weld::Button&, void) IMPL_LINK_NOARG(SvxPathSelectDialog, AddHdl_Impl, weld::Button&, void) { - Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const Reference < XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); Reference < XFolderPicker2 > xFolderPicker = sfx2::createFolderPicker(xContext, m_xDialog.get()); if ( xFolderPicker->execute() != ExecutableDialogResults::OK ) diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 017f1178be8b..bdde6fbeaef1 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -123,7 +123,7 @@ void SvxScriptOrgDialog::Init( std::u16string_view language ) deleteAllTree(); Reference< browse::XBrowseNode > rootNode; - Reference< XComponentContext > xCtx( + const Reference< XComponentContext >& xCtx( comphelper::getProcessComponentContext() ); Sequence< Reference< browse::XBrowseNode > > children; diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index 22b669ccae75..86b84c688e8b 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -174,7 +174,7 @@ void TipOfTheDayDialog::UpdateTip() { css::util::URL aCommandURL; aCommandURL.Complete = sLink; - const css::uno::Reference<css::uno::XComponentContext> xContext + const css::uno::Reference<css::uno::XComponentContext>& xContext = comphelper::getProcessComponentContext(); const css::uno::Reference<css::util::XURLTransformer> xParser = css::util::URLTransformer::create(xContext); diff --git a/cui/source/dialogs/toolbarmodedlg.cxx b/cui/source/dialogs/toolbarmodedlg.cxx index 25cd4a7b9ac0..1d91a8b6f5cc 100644 --- a/cui/source/dialogs/toolbarmodedlg.cxx +++ b/cui/source/dialogs/toolbarmodedlg.cxx @@ -35,7 +35,7 @@ static OUString GetCurrentApp() if (SfxViewFrame* pViewFrame = SfxViewFrame::Current()) { const auto xCurrentFrame = pViewFrame->GetFrame().GetFrameInterface(); - const auto xContext = comphelper::getProcessComponentContext(); + const auto& xContext = comphelper::getProcessComponentContext(); const auto xModuleManager = css::frame::ModuleManager::create(xContext); switch (vcl::EnumContext::GetApplicationEnum(xModuleManager->identify(xCurrentFrame))) { @@ -69,7 +69,7 @@ static OUString GetCurrentMode() OUString sResult; if (SfxViewFrame::Current()) { - const auto xContext = comphelper::getProcessComponentContext(); + const auto& xContext = comphelper::getProcessComponentContext(); const utl::OConfigurationTreeRoot aAppNode( xContext, "org.openoffice.Office.UI.ToolbarMode/Applications/" + GetCurrentApp(), true); if (aAppNode.isValid()) @@ -190,7 +190,7 @@ IMPL_LINK(ToolbarmodeDialog, OnApplyClick, weld::Button&, rButton, void) OUString sCurrentApp = GetCurrentApp(); if (SfxViewFrame::Current()) { - const auto xContext = comphelper::getProcessComponentContext(); + const auto& xContext = comphelper::getProcessComponentContext(); const utl::OConfigurationTreeRoot aAppNode( xContext, u"org.openoffice.Office.UI.ToolbarMode/Applications/"_ustr, true); if (sCurrentApp != "Writer") diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx index ed24e4904af2..0a0a10e0ea6f 100644 --- a/cui/source/options/certpath.cxx +++ b/cui/source/options/certpath.cxx @@ -50,7 +50,7 @@ void CertPathDialog::Init() try { - uno::Reference<uno::XComponentContext> xContext = comphelper::getProcessComponentContext(); + const uno::Reference<uno::XComponentContext>& xContext = comphelper::getProcessComponentContext(); uno::Reference<xml::crypto::XNSSInitializer> xCipherContextSupplier = xml::crypto::NSSInitializer::create(xContext); OUString sActivePath = xCipherContextSupplier->getNSSPath(); @@ -138,7 +138,7 @@ bool CertPathDialog::isActiveServicePath() const try { - uno::Reference<uno::XComponentContext> xContext = comphelper::getProcessComponentContext(); + const uno::Reference<uno::XComponentContext>& xContext = comphelper::getProcessComponentContext(); uno::Reference<xml::crypto::XNSSInitializer> xCipherContextSupplier = xml::crypto::NSSInitializer::create(xContext); if (!xCipherContextSupplier->getIsNSSinitialized()) diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index 32c5cd7033e0..779adb27218f 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -73,7 +73,7 @@ namespace offapp }; m_xDriverList->set_column_fixed_widths(aWidths); - css::uno::Reference < css::uno::XComponentContext > xContext(::comphelper::getProcessComponentContext()); + const css::uno::Reference < css::uno::XComponentContext >& xContext(::comphelper::getProcessComponentContext()); m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, u"*"_ustr); m_xEnablePooling->connect_toggled( LINK(this, ConnectionPoolOptionsPage, OnEnabledDisabled) ); diff --git a/cui/source/options/dbregisterednamesconfig.cxx b/cui/source/options/dbregisterednamesconfig.cxx index 9c087d2823d0..737170a17f8a 100644 --- a/cui/source/options/dbregisterednamesconfig.cxx +++ b/cui/source/options/dbregisterednamesconfig.cxx @@ -39,7 +39,7 @@ namespace svx try { - Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); + const Reference<XComponentContext>& xContext( ::comphelper::getProcessComponentContext() ); Reference< XDatabaseContext > xRegistrations( DatabaseContext::create(xContext) ); diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index 4d4c17c2a409..76d8126a9b50 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -57,7 +57,7 @@ namespace svx m_xURL->DisableHistory(); m_xURL->SetFilter(u"*.odb"); - css::uno::Reference < css::uno::XComponentContext > xContext(::comphelper::getProcessComponentContext()); + const css::uno::Reference < css::uno::XComponentContext >& xContext(::comphelper::getProcessComponentContext()); m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, u"*"_ustr); m_xName->connect_changed( LINK(this, ODocumentLinkDialog, OnEntryModified) ); diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 1dd1874c820e..9480b2de5e8f 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -703,7 +703,8 @@ void CuiAboutConfigTabPage::FillItems(const Reference<XNameAccess>& xNameAccess, Reference<XNameAccess> CuiAboutConfigTabPage::getConfigAccess(const OUString& sNodePath, bool bUpdate) { - uno::Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext()); + const uno::Reference<uno::XComponentContext>& xContext( + ::comphelper::getProcessComponentContext()); uno::Reference<lang::XMultiServiceFactory> xConfigProvider( css::configuration::theDefaultProvider::get(xContext)); diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index b2c6b5a1e49b..9f5397411286 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -464,7 +464,7 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(weld::Window* pTopLevel, weld::Co , m_xWidget1(m_xBuilder->weld_widget(u"docboundaries"_ustr)) , m_xWidget2(m_xBuilder->weld_widget(u"docboundaries_lb"_ustr)) { - css::uno::Reference < css::uno::XComponentContext > xContext(::comphelper::getProcessComponentContext()); + const css::uno::Reference < css::uno::XComponentContext >& xContext(::comphelper::getProcessComponentContext()); m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, u"*"_ustr); CreateEntries(); diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 6b84062337a4..6550b52fef66 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1451,7 +1451,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) // tell quickstarter to stop being a veto listener - Reference< XComponentContext > xContext( + const Reference< XComponentContext >& xContext( comphelper::getProcessComponentContext()); css::office::Quickstart::createAndSetVeto(xContext, false, false, false/*DisableVeto*/); } diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 323fb34d3b6b..f8cb0657d393 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -160,7 +160,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, AddHdl_Impl, weld::Button&, void) { try { - Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const Reference < XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); xFolderPicker = sfx2::createFolderPicker(xContext, GetFrameWeld()); OUString sWorkFolder = SvtPathOptions().GetWorkPath(); @@ -873,7 +873,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl, weld::Button&, void) IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl, weld::Button&, void) { - Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const Reference < XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); Reference < XFolderPicker2 > xFolderPicker = sfx2::createFolderPicker(xContext, m_xDialog.get()); OUString sOldFolder; diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 7381c4d190e3..15a0842e386a 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -524,7 +524,7 @@ static void lcl_MergeDisplayArray( SvxLinguData_Impl::SvxLinguData_Impl() : nDisplayServices (0) { - uno::Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); + const uno::Reference< XComponentContext >& xContext = ::comphelper::getProcessComponentContext(); xLinguSrvcMgr = LinguServiceManager::create(xContext); const Locale& rCurrentLocale = Application::GetSettings().GetUILanguageTag().getLocale(); @@ -1609,7 +1609,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(weld::Window* pParent, SvxLinguData_Impl& r if (m_xLanguageLB->get_active_id() != eSysLang) m_xLanguageLB->set_active(0); - css::uno::Reference < css::uno::XComponentContext > xContext(::comphelper::getProcessComponentContext()); + const css::uno::Reference < css::uno::XComponentContext >& xContext(::comphelper::getProcessComponentContext()); m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, u"*"_ustr); m_xLanguageLB->connect_changed( LINK( this, SvxEditModulesDlg, LangSelectListBoxHdl_Impl )); diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 6357989e5fb9..949627151b8e 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -543,7 +543,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, weld::Button&, void) { try { - Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const Reference < XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); xFolderPicker = sfx2::createFolderPicker(xContext, GetFrameWeld()); INetURLObject aURL( sWritable, INetProtocol::File ); @@ -608,7 +608,7 @@ void SvxPathTabPage::GetPathList( // load PathSettings service if necessary if ( !pImpl->m_xPathSettings.is() ) { - Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); + const Reference< XComponentContext >& xContext = comphelper::getProcessComponentContext(); pImpl->m_xPathSettings = css::util::thePathSettings::get( xContext ); } @@ -666,7 +666,7 @@ void SvxPathTabPage::SetPathList( // load PathSettings service if necessary if ( !pImpl->m_xPathSettings.is() ) { - Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); + const Reference< XComponentContext >& xContext = comphelper::getProcessComponentContext(); pImpl->m_xPathSettings = css::util::thePathSettings::get( xContext ); } diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index 9b8a416dead3..2db1bcb52aaa 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -91,7 +91,7 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(weld::Container* pPage, weld::Dia + "&LOlocale=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47()); - uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const uno::Reference < uno::XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); m_xUpdateAccess = setup::UpdateCheckConfig::create( xContext ); m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, u"*"_ustr); @@ -444,7 +444,7 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, ExtrasCheckHdl_Impl, weld::Toggleable&, IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, FileDialogHdl_Impl, weld::Button&, void) { - uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const uno::Reference < uno::XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); uno::Reference < ui::dialogs::XFolderPicker2 > xFolderPicker = sfx2::createFolderPicker(xContext, GetFrameWeld()); OUString aURL; @@ -464,7 +464,7 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, FileDialogHdl_Impl, weld::Button&, void) IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, CheckNowHdl_Impl, weld::Button&, void) { - uno::Reference < uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); + const uno::Reference < uno::XComponentContext>& xContext( ::comphelper::getProcessComponentContext() ); try { diff --git a/cui/source/options/sdbcdriverenum.cxx b/cui/source/options/sdbcdriverenum.cxx index 0ddd7f8f9f08..0efb1a353504 100644 --- a/cui/source/options/sdbcdriverenum.cxx +++ b/cui/source/options/sdbcdriverenum.cxx @@ -50,7 +50,7 @@ namespace offapp { try { - Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); + const Reference< XComponentContext >& xContext = ::comphelper::getProcessComponentContext(); Reference< XDriverManager2 > xEnumAccess = DriverManager::create( xContext ); Reference< XEnumeration > xEnumDrivers = xEnumAccess->createEnumeration(); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index d531e0a59d68..15a6b2803021 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1621,7 +1621,7 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) bool bSaveSpellCheck = false; const SfxPoolItem* pItem = nullptr; - Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + const Reference< XComponentContext >& xContext( ::comphelper::getProcessComponentContext() ); Reference< XLinguProperties > xProp = LinguProperties::create( xContext ); if ( const SfxHyphenRegionItem* pHyphenItem = rSet.GetItemIfSet(SID_ATTR_HYPHENREGION, false ) ) { @@ -2271,7 +2271,7 @@ OUString OfaTreeOptionsDialog::GetModuleIdentifier( const Reference< XFrame >& r { OUString sModule; Reference < XFrame > xCurrentFrame( rFrame ); - Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); + const Reference< XComponentContext >& xContext = comphelper::getProcessComponentContext(); Reference < XModuleManager2 > xModuleManager = ModuleManager::create(xContext); if ( !xCurrentFrame.is() ) |