diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-19 15:27:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-19 20:28:35 +0100 |
commit | f0e90c712b701b2d3b4f4725dfbed8c5ea924b0f (patch) | |
tree | f6de2296f69e8ea7ef9f2d51b79bd254b8dc042a /framework | |
parent | b27417623835b1c82475783979a1fb9656b5155e (diff) |
for testing allow disabling configmgr for time critical paths
Change-Id: I83396e7c90d3b182f353a77c9bdf06fd17af92a1
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/services/desktop.hxx | 2 | ||||
-rw-r--r-- | framework/source/services/desktop.cxx | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/framework/inc/services/desktop.hxx b/framework/inc/services/desktop.hxx index dc3d4d70053b..1d475225c97e 100644 --- a/framework/inc/services/desktop.hxx +++ b/framework/inc/services/desktop.hxx @@ -409,7 +409,7 @@ class Desktop : private cppu::BaseMutex, css::uno::Reference< css::frame::XFrame > m_xLastFrame; /// last target of "loadComponentFromURL()"! css::uno::Any m_aInteractionRequest; bool m_bSuspendQuickstartVeto; /// don't ask quickstart for a veto - SvtCommandOptions m_aCommandOptions; /// ref counted class to support disabling commands defined by configuration file + std::unique_ptr<SvtCommandOptions> m_xCommandOptions; /// ref counted class to support disabling commands defined by configuration file OUString m_sName; OUString m_sTitle; css::uno::Reference< css::frame::XDispatchRecorderSupplier > m_xDispatchRecorderSupplier; diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 32add3feb417..9c2eb1c02e79 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -63,6 +63,7 @@ #include <vcl/svapp.hxx> #include <tools/errinf.hxx> +#include <unotools/configmgr.hxx> #include <comphelper/extract.hxx> namespace framework{ @@ -162,7 +163,6 @@ Desktop::Desktop( const css::uno::Reference< css::uno::XComponentContext >& xCon , m_xLastFrame ( ) , m_aInteractionRequest ( ) , m_bSuspendQuickstartVeto( false ) - , m_aCommandOptions ( ) , m_sName ( ) , m_sTitle ( ) , m_xDispatchRecorderSupplier( ) @@ -646,8 +646,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::IsAvoidConfig()) + m_xCommandOptions.reset(new SvtCommandOptions); + // Make std::unordered_map lookup if the current URL is in the disabled list - if ( m_aCommandOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, aCommand ) ) + if (m_xCommandOptions && m_xCommandOptions->Lookup(SvtCommandOptions::CMDOPTION_DISABLED, aCommand)) return css::uno::Reference< css::frame::XDispatch >(); else { |