diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-28 16:01:34 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-28 20:09:41 +0200 |
commit | ada320547db4c7ddbb05d10df4140ea988f29973 (patch) | |
tree | 551cde16a671bc6e17ccb427a81aa6954ae2520a /accessibility/source/standard/vclxaccessiblemenuitem.cxx | |
parent | dd97bfce9900e6bae40eece36124f8b22e70ff47 (diff) |
Prepare for removal of non-const operator[] from Sequence in accessibility
Change-Id: I9454befb46767255451c490eab17e331eb8bb9dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124334
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'accessibility/source/standard/vclxaccessiblemenuitem.cxx')
-rw-r--r-- | accessibility/source/standard/vclxaccessiblemenuitem.cxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx index 8ad81ee06ed9..96e31c0074b1 100644 --- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx +++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx @@ -454,7 +454,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleMenuItem::getAccessibleActionKe { Reference< XAccessibleContext > xParentContext( xParent->getAccessibleContext() ); if ( xParentContext.is() && xParentContext->getAccessibleRole() == AccessibleRole::MENU_BAR ) - aSeq1[0].Modifiers |= awt::KeyModifier::MOD2; + aSeq1.getArray()[0].Modifiers |= awt::KeyModifier::MOD2; } pKeyBindingHelper->AddKeyBinding( aSeq1 ); @@ -490,14 +490,18 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleMenuItem::getAccessibleActionKe static_cast< sal_Int16 >(aAccelKeyCode.GetFunction()) } }; - if ( aAccelKeyCode.IsShift() ) - aSeq3[0].Modifiers |= awt::KeyModifier::SHIFT; - if ( aAccelKeyCode.IsMod1() ) - aSeq3[0].Modifiers |= awt::KeyModifier::MOD1; - if ( aAccelKeyCode.IsMod2() ) - aSeq3[0].Modifiers |= awt::KeyModifier::MOD2; - if ( aAccelKeyCode.IsMod3() ) - aSeq3[0].Modifiers |= awt::KeyModifier::MOD3; + if (aAccelKeyCode.GetModifier() != 0) + { + auto pSeq3 = aSeq3.getArray(); + if ( aAccelKeyCode.IsShift() ) + pSeq3[0].Modifiers |= awt::KeyModifier::SHIFT; + if ( aAccelKeyCode.IsMod1() ) + pSeq3[0].Modifiers |= awt::KeyModifier::MOD1; + if ( aAccelKeyCode.IsMod2() ) + pSeq3[0].Modifiers |= awt::KeyModifier::MOD2; + if ( aAccelKeyCode.IsMod3() ) + pSeq3[0].Modifiers |= awt::KeyModifier::MOD3; + } pKeyBindingHelper->AddKeyBinding( aSeq3 ); } } |