diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index ffb8108d0f24..8938ba83a122 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -238,8 +238,9 @@ void SAL_CALL AccessibleGridControlTable::selectAllAccessibleChildren() ensureIsAlive(); Sequence< sal_Int32 > selectedRows = getSelectedAccessibleRows(); + auto selectedRowsRange = asNonConstRange(selectedRows); for(tools::Long i=0; i& { sal_Int32 const selectionCount( m_aTable.GetSelectedRowCount() ); rSeq.realloc( selectionCount ); + auto pSeq = rSeq.getArray(); for ( sal_Int32 i=0; i 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 ); } }