diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-03-25 10:37:37 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-03-25 10:37:37 +0000 |
commit | 4ff72fcbcf95f46272b981cb784ec11e4a520476 (patch) | |
tree | 91a496ab9aa2796199f4724366d3228e648150f7 | |
parent | db99d452d2af7054f7dcb6f8488832262c9a6a22 (diff) |
CWS-TOOLING: integrate CWS fwk106
2009-03-16 14:18:23 +0100 cd r269538 : #i100172#,#i100177# Move sDefaultLocale out of loop. Make variables const.
2009-03-16 13:37:17 +0100 cd r269531 : #i100172#,#i100177# Move complex objects outside the loop to fix performance problems
-rw-r--r-- | framework/source/accelerators/acceleratorconfiguration.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index a2c52e9c83..ea2b1208c0 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -1205,8 +1205,8 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util: { ::rtl::OUString sModule; sKey = ::utl::extractFirstFromConfigurationPath(sPath); - if ( sKey.getLength() )
- reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
+ if ( sKey.getLength() ) + reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); } else if ( sGlobalModules.equals(CFG_ENTRY_MODULES) ) { @@ -1214,7 +1214,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util: ::rtl::OUString sDropModule = ::rtl::OUString::createFromAscii("Module['") + sModule + ::rtl::OUString::createFromAscii("']"); sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sDropModule); sKey = ::utl::extractFirstFromConfigurationPath(sPath); - if ( sKey.getLength() )
+ if ( sKey.getLength() ) reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); } } @@ -1242,6 +1242,10 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const xModules->getByName(m_sModuleCFG) >>= xAccess; } + static KeyMapping aKeyMapping; + const ::rtl::OUString sIsoLang = impl_ts_getLocale().toISO(); + const ::rtl::OUString sDefaultLocale = ::rtl::OUString::createFromAscii("en-US"); + css::uno::Reference< css::container::XNameAccess > xKey; css::uno::Reference< css::container::XNameAccess > xCommand; if (xAccess.is()) @@ -1263,13 +1267,12 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const ::std::vector< ::rtl::OUString >::const_iterator pFound; for ( pFound = aLocales.begin(); pFound != aLocales.end(); ++pFound ) { - if ( *pFound == impl_ts_getLocale().toISO() ) + if ( *pFound == sIsoLang ) break; } if ( pFound == aLocales.end() ) { - ::rtl::OUString sDefaultLocale = ::rtl::OUString::createFromAscii("en-US"); for ( pFound = aLocales.begin(); pFound != aLocales.end(); ++pFound ) { if ( *pFound == sDefaultLocale ) @@ -1286,7 +1289,6 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const if (sCommand.getLength()<1) continue; - KeyMapping aKeyMapping; css::awt::KeyEvent aKeyEvent; sal_Int32 nIndex = 0; |