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>
This commit is contained in:
@@ -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<m_aTable.GetRowCount(); i++)
|
||||
selectedRows[i]=i;
|
||||
selectedRowsRange[i]=i;
|
||||
}
|
||||
sal_Int32 SAL_CALL AccessibleGridControlTable::getSelectedAccessibleChildCount()
|
||||
{
|
||||
|
@@ -203,8 +203,9 @@ void AccessibleGridControlTableBase::implGetSelectedRows( Sequence< sal_Int32 >&
|
||||
{
|
||||
sal_Int32 const selectionCount( m_aTable.GetSelectedRowCount() );
|
||||
rSeq.realloc( selectionCount );
|
||||
auto pSeq = rSeq.getArray();
|
||||
for ( sal_Int32 i=0; i<selectionCount; ++i )
|
||||
rSeq[i] = m_aTable.GetSelectedRowIndex(i);
|
||||
pSeq[i] = m_aTable.GetSelectedRowIndex(i);
|
||||
}
|
||||
|
||||
void AccessibleGridControlTableBase::ensureIsValidRow( sal_Int32 nRow )
|
||||
|
@@ -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.GetModifier() != 0)
|
||||
{
|
||||
auto pSeq3 = aSeq3.getArray();
|
||||
if ( aAccelKeyCode.IsShift() )
|
||||
aSeq3[0].Modifiers |= awt::KeyModifier::SHIFT;
|
||||
pSeq3[0].Modifiers |= awt::KeyModifier::SHIFT;
|
||||
if ( aAccelKeyCode.IsMod1() )
|
||||
aSeq3[0].Modifiers |= awt::KeyModifier::MOD1;
|
||||
pSeq3[0].Modifiers |= awt::KeyModifier::MOD1;
|
||||
if ( aAccelKeyCode.IsMod2() )
|
||||
aSeq3[0].Modifiers |= awt::KeyModifier::MOD2;
|
||||
pSeq3[0].Modifiers |= awt::KeyModifier::MOD2;
|
||||
if ( aAccelKeyCode.IsMod3() )
|
||||
aSeq3[0].Modifiers |= awt::KeyModifier::MOD3;
|
||||
pSeq3[0].Modifiers |= awt::KeyModifier::MOD3;
|
||||
}
|
||||
pKeyBindingHelper->AddKeyBinding( aSeq3 );
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user