summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-10-19 08:51:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-10-19 11:40:04 +0200
commit414016a0d390701d6e3e0b81febaf06a1b724bca (patch)
tree609c87675f89b117e8cbfcf6dc76b5ac21b6ca3b /framework
parentf5dbf927bf44c9a1ac80eae6f72887a4f3543201 (diff)
can reduce scope a little
Change-Id: I19f5422ad7c72b5fcd11b507e7a2e22e34dde4c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123797 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index 2f1d6000fd28..54b4f5a8f827 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -1012,13 +1012,13 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( bool bPreferred, const css:
const sal_Int32 nToken = 4;
bool bValid = true;
- sal_Int32 k=0;
- for (OUString sToken; k<nToken; ++k)
+ sal_Int32 k;
+ for (k = 0; k < nToken; ++k)
{
if (nIndex < 0)
break;
- sToken = sKey.getToken(0, '_', nIndex);
+ OUString sToken = sKey.getToken(0, '_', nIndex);
if (sToken.isEmpty())
{
bValid = false;
@@ -1224,13 +1224,12 @@ void XCUBasedAcceleratorConfiguration::reloadChanged( const OUString& sPrimarySe
aKeyEvent.KeyCode = KeyMapping::get().mapIdentifierToCode("KEY_"+sKeyIdentifier);
const int nToken = 4;
- sal_Int32 i = 0;
- for (OUString sToken; i<nToken; ++i)
+ for (sal_Int32 i = 0; i < nToken; ++i)
{
if ( nIndex < 0 )
break;
- sToken = sKey.getToken(0, '_', nIndex);
+ OUString sToken = sKey.getToken(0, '_', nIndex);
if ( sToken == "SHIFT" )
aKeyEvent.Modifiers |= css::awt::KeyModifier::SHIFT;
else if ( sToken == "MOD1" )