| commit | 936f2e6924e405433770b98f32a615508fd0670d | [log] |
|---|---|---|
| author | Caolán McNamara <caolanm@redhat.com> | Wed Mar 22 16:59:23 2023 +0000 |
| committer | Caolán McNamara <caolanm@redhat.com> | Wed Mar 22 19:36:13 2023 +0000 |
| tree | 661339706ac03e1c03ca31738b9a3447cd73ac02 | |
| parent | 2252313a90b6561f2746e05dae99551701550201 [diff] |
fix crash seen when experimenting with tdf#129547 Change-Id: I0b26a7f683f91d3307856f86c5a437fde1155451 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149331 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 48e0d36..e07c826 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -64,7 +64,10 @@ namespace framework static OUString lcl_getKeyString(const css::awt::KeyEvent& aKeyEvent) { const sal_Int32 nBeginIndex = 4; // "KEY_" is the prefix of an identifier... OUStringBuffer sKeyBuffer((KeyMapping::get().mapCodeToIdentifier(aKeyEvent.KeyCode)).subView(nBeginIndex)); OUString sKey(KeyMapping::get().mapCodeToIdentifier(aKeyEvent.KeyCode)); if (sKey.getLength() < nBeginIndex) // dead key return OUString(); OUStringBuffer sKeyBuffer(sKey.subView(nBeginIndex)); if ( (aKeyEvent.Modifiers & css::awt::KeyModifier::SHIFT) == css::awt::KeyModifier::SHIFT ) sKeyBuffer.append("_SHIFT");