diff options
Diffstat (limited to 'framework/source/services/desktop.cxx')
-rw-r--r-- | framework/source/services/desktop.cxx | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index c3d2c79ecdbe..6560af7f1eb3 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -51,13 +51,14 @@ #include <comphelper/sequence.hxx> #include <comphelper/lok.hxx> #include <cppuhelper/supportsservice.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <desktop/crashreport.hxx> #include <vcl/scheduler.hxx> #include <sal/log.hxx> -#include <vcl/errcode.hxx> +#include <comphelper/errcode.hxx> #include <vcl/threadex.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> namespace framework{ @@ -139,14 +140,14 @@ void Desktop::constructorInit() The value must be different from NULL! @onerror We throw an ASSERT in debug version or do nothing in release version. *//*-*************************************************************************************************************/ -Desktop::Desktop( const css::uno::Reference< css::uno::XComponentContext >& xContext ) +Desktop::Desktop( css::uno::Reference< css::uno::XComponentContext > xContext ) : Desktop_BASE ( m_aMutex ) , cppu::OPropertySetHelper( cppu::WeakComponentImplHelperBase::rBHelper ) // Init member , m_bIsTerminated(false) , m_bIsShutdown(false) // see dispose() for further information! , m_bSession ( false ) - , m_xContext ( xContext ) + , m_xContext (std::move( xContext )) , m_aListenerContainer ( m_aMutex ) , m_eLoadState ( E_NOTSET ) , m_bSuspendQuickstartVeto( false ) @@ -196,8 +197,7 @@ sal_Bool SAL_CALL Desktop::terminate() css::lang::EventObject aEvent ( static_cast< ::cppu::OWeakObject* >(this) ); bool bAskQuickStart = !m_bSuspendQuickstartVeto; - const bool bRestartableMainLoop = Application::IsEventTestingModeEnabled() || - comphelper::LibreOfficeKit::isActive(); + const bool bRestartableMainLoop = comphelper::LibreOfficeKit::isActive(); aGuard.clear(); // Allow using of any UI ... because Desktop.terminate() was designed as UI functionality in the past. @@ -341,9 +341,9 @@ namespace Desktop* const m_pDesktop; css::uno::Reference< css::frame::XTerminateListener > m_xQuickLauncher; public: - QuickstartSuppressor(Desktop* const pDesktop, css::uno::Reference< css::frame::XTerminateListener > const & xQuickLauncher) + QuickstartSuppressor(Desktop* const pDesktop, css::uno::Reference< css::frame::XTerminateListener > xQuickLauncher) : m_pDesktop(pDesktop) - , m_xQuickLauncher(xQuickLauncher) + , m_xQuickLauncher(std::move(xQuickLauncher)) { SAL_INFO("fwk.desktop", "temporary removing Quickstarter"); if(m_xQuickLauncher.is()) @@ -443,9 +443,7 @@ void SAL_CALL Desktop::removeTerminateListener( const css::uno::Reference< css:: } else if (sImplementationName == "com.sun.star.comp.ComponentDLLListener") { - m_xComponentDllListeners.erase( - std::remove(m_xComponentDllListeners.begin(), m_xComponentDllListeners.end(), xListener), - m_xComponentDllListeners.end()); + std::erase(m_xComponentDllListeners, xListener); return; } } @@ -675,11 +673,11 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL Desktop::queryDispatch( co if ( aURL.Protocol.equalsIgnoreAsciiCase(".uno:") ) aCommand = aURL.Path; - if (!m_xCommandOptions && !utl::ConfigManager::IsFuzzing()) + if (!m_xCommandOptions && !comphelper::IsFuzzing()) m_xCommandOptions.reset(new SvtCommandOptions); // Make std::unordered_map lookup if the current URL is in the disabled list - if (m_xCommandOptions && m_xCommandOptions->Lookup(SvtCommandOptions::CMDOPTION_DISABLED, aCommand)) + if (m_xCommandOptions && m_xCommandOptions->LookupDisabled(aCommand)) return css::uno::Reference< css::frame::XDispatch >(); else { @@ -1040,8 +1038,6 @@ void SAL_CALL Desktop::disposing() // Safe impossible cases // It's a programming error if dispose is called before terminate! - // But if you just ignore the assertion (which happens in unit - // tests for instance in sc/qa/unit) nothing bad happens. assert(m_bIsShutdown && "Desktop disposed before terminating it"); { @@ -1335,21 +1331,21 @@ sal_Bool SAL_CALL Desktop::convertFastPropertyValue( css::uno::Any& aCon { case PropHandle::SuspendQuickstartVeto: bReturn = PropHelper::willPropertyBeChanged( - css::uno::makeAny(m_bSuspendQuickstartVeto), + css::uno::Any(m_bSuspendQuickstartVeto), aValue, aOldValue, aConvertedValue); break; case PropHandle::DispatchRecorderSupplier : bReturn = PropHelper::willPropertyBeChanged( - css::uno::makeAny(m_xDispatchRecorderSupplier), + css::uno::Any(m_xDispatchRecorderSupplier), aValue, aOldValue, aConvertedValue); break; case PropHandle::Title : bReturn = PropHelper::willPropertyBeChanged( - css::uno::makeAny(m_sTitle), + css::uno::Any(m_sTitle), aValue, aOldValue, aConvertedValue); |