diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-12 09:22:15 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-13 11:26:26 +0100 |
commit | 9a4056c18f09160264af7a5533852c9deae4b27c (patch) | |
tree | a24b6f58309a919cb922265130b94dae62aa20c0 /framework/source/accelerators | |
parent | dae2b047f9fd84032cb282af3c57ee3d92f9256a (diff) |
Do not use pattern::configuration::ConfigurationHelper.
Change-Id: I9cf913f085a2c6862e44803485ab63e2b4572eab
Diffstat (limited to 'framework/source/accelerators')
-rw-r--r-- | framework/source/accelerators/acceleratorconfiguration.cxx | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index d76fea6ae5f0..bbccd5578b55 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -19,7 +19,6 @@ #include <accelerators/acceleratorconfiguration.hxx> -#include <pattern/configuration.hxx> #include <accelerators/presethandler.hxx> #include <xml/saxnamespacefilter.hxx> @@ -47,24 +46,16 @@ #include <com/sun/star/awt/KeyEvent.hpp> #include <com/sun/star/awt/KeyModifier.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> -#include <com/sun/star/util/XChangesNotifier.hpp> #include <comphelper/configurationhelper.hxx> +#include <officecfg/Setup.hxx> #include <unotools/configpaths.hxx> #include <svtools/acceleratorexecute.hxx> -#include <stdio.h> - namespace framework { const char CFG_ENTRY_SECONDARY[] = "SecondaryKeys"; const char CFG_PROP_COMMAND[] = "Command"; -#ifdef fpc - #error "Who exports this define? I use it as namespace alias ..." -#else - namespace fpc = ::framework::pattern::configuration; -#endif - OUString lcl_getKeyString(salhelper::SingletonRef<framework::KeyMapping>& _rKeyMapping, const css::awt::KeyEvent& aKeyEvent) { const sal_Int32 nBeginIndex = 4; // "KEY_" is the prefix of a identifier... @@ -588,17 +579,7 @@ AcceleratorCache& XMLBasedAcceleratorConfiguration::impl_getCFG(sal_Bool bWriteA //----------------------------------------------- OUString XMLBasedAcceleratorConfiguration::impl_ts_getLocale() const { - // SAFE -> ---------------------------------- - ReadGuard aReadLock(m_aLock); - css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext; - aReadLock.unlock(); - // <- SAFE ---------------------------------- - - css::uno::Reference< css::uno::XInterface > xCFG = fpc::ConfigurationHelper::openConfig( xContext, - "/org.openoffice.Setup", "L10N", fpc::ConfigurationHelper::E_READONLY); - css::uno::Reference< css::beans::XPropertySet > xProp (xCFG, css::uno::UNO_QUERY_THROW); - OUString sISOLocale; - xProp->getPropertyValue("ooLocale") >>= sISOLocale; + OUString sISOLocale = officecfg::Setup::L10N::ooLocale::get(); if (sISOLocale.isEmpty()) return OUString("en-US"); @@ -1626,17 +1607,7 @@ AcceleratorCache& XCUBasedAcceleratorConfiguration::impl_getCFG(sal_Bool bPrefer //----------------------------------------------- OUString XCUBasedAcceleratorConfiguration::impl_ts_getLocale() const { - // SAFE -> ---------------------------------- - ReadGuard aReadLock(m_aLock); - css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext; - aReadLock.unlock(); - // <- SAFE ---------------------------------- - - css::uno::Reference< css::uno::XInterface > xCFG = fpc::ConfigurationHelper::openConfig( xContext, - "/org.openoffice.Setup", "L10N", fpc::ConfigurationHelper::E_READONLY); - css::uno::Reference< css::beans::XPropertySet > xProp (xCFG, css::uno::UNO_QUERY_THROW); - OUString sISOLocale; - xProp->getPropertyValue("ooLocale") >>= sISOLocale; + OUString sISOLocale = officecfg::Setup::L10N::ooLocale::get(); if (sISOLocale.isEmpty()) return OUString("en-US"); |