summaryrefslogtreecommitdiff
path: root/accessibility/source/standard/vclxaccessiblelist.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/source/standard/vclxaccessiblelist.cxx')
-rw-r--r--accessibility/source/standard/vclxaccessiblelist.cxx56
1 files changed, 28 insertions, 28 deletions
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index 6d287a02f0e9..03fde2b0dc28 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -94,7 +94,7 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType
}
UpdateVisibleLineCount();
- USHORT nCount = static_cast<USHORT>(getAccessibleChildCount());
+ sal_uInt16 nCount = static_cast<sal_uInt16>(getAccessibleChildCount());
m_aAccessibleChildren.reserve(nCount);
}
// -----------------------------------------------------------------------------
@@ -181,10 +181,10 @@ void VCLXAccessibleList::notifyVisibleStates(sal_Bool _bSetNew )
VCLXAccessibleListItem* pItem = static_cast<VCLXAccessibleListItem*>(xHold.get());
if ( pItem )
{
- USHORT nTopEntry = 0;
+ sal_uInt16 nTopEntry = 0;
if ( m_pListBoxHelper )
nTopEntry = m_pListBoxHelper->GetTopEntry();
- USHORT nPos = (USHORT)(aIter - m_aAccessibleChildren.begin());
+ sal_uInt16 nPos = (sal_uInt16)(aIter - m_aAccessibleChildren.begin());
sal_Bool bVisible = ( nPos>=nTopEntry && nPos<( nTopEntry + m_nVisibleLineCount ) );
pItem->SetVisible( m_bVisible && bVisible );
}
@@ -245,7 +245,7 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve
{
uno::Any aOldValue,
aNewValue;
- USHORT nPos = m_pListBoxHelper->GetSelectEntryPos();
+ sal_uInt16 nPos = m_pListBoxHelper->GetSelectEntryPos();
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos = m_pListBoxHelper->GetTopEntry();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
@@ -275,7 +275,7 @@ void VCLXAccessibleList::UpdateSelection (::rtl::OUString sTextOfSelectedItem)
if ( pBox != NULL )
{
// Find the index of the selected item inside the VCL control...
- USHORT nIndex = pBox->GetEntryPos (XubString(sTextOfSelectedItem));
+ sal_uInt16 nIndex = pBox->GetEntryPos (XubString(sTextOfSelectedItem));
// ...and then find the associated accessibility object.
if ( nIndex == LISTBOX_ENTRY_NOTFOUND )
nIndex = 0;
@@ -304,7 +304,7 @@ Reference<XAccessible> VCLXAccessibleList::CreateChild (sal_Int32 i)
{
Reference<XAccessible> xChild;
- USHORT nPos = static_cast<USHORT>(i);
+ sal_uInt16 nPos = static_cast<sal_uInt16>(i);
if ( nPos >= m_aAccessibleChildren.size() )
{
m_aAccessibleChildren.resize(nPos + 1);
@@ -333,15 +333,15 @@ Reference<XAccessible> VCLXAccessibleList::CreateChild (sal_Int32 i)
if ( xChild.is() )
{
// Just add the SELECTED state.
- BOOL bNowSelected = FALSE;
+ sal_Bool bNowSelected = sal_False;
if ( m_pListBoxHelper )
- bNowSelected = m_pListBoxHelper->IsEntryPosSelected ((USHORT)i);
+ bNowSelected = m_pListBoxHelper->IsEntryPosSelected ((sal_uInt16)i);
VCLXAccessibleListItem* pItem = static_cast< VCLXAccessibleListItem* >(xChild.get());
pItem->SetSelected( bNowSelected );
// Set the child's VISIBLE state.
UpdateVisibleLineCount();
- USHORT nTopEntry = 0;
+ sal_uInt16 nTopEntry = 0;
if ( m_pListBoxHelper )
nTopEntry = m_pListBoxHelper->GetTopEntry();
sal_Bool bVisible = ( nPos>=nTopEntry && nPos<( nTopEntry + m_nVisibleLineCount ) );
@@ -362,7 +362,7 @@ void VCLXAccessibleList::HandleChangedItemList (bool bItemInserted, sal_Int32 nI
}
else
{
- if ( nIndex >= 0 && static_cast<USHORT>(nIndex) < m_aAccessibleChildren.size() )
+ if ( nIndex >= 0 && static_cast<sal_uInt16>(nIndex) < m_aAccessibleChildren.size() )
{
ListItems::iterator aIter = m_aAccessibleChildren.erase(m_aAccessibleChildren.begin()+nIndex);
::std::mem_fun_t<bool, VCLXAccessibleListItem> aTemp(&VCLXAccessibleListItem::DecrementIndexInParent);
@@ -419,7 +419,7 @@ Reference<XAccessible> SAL_CALL VCLXAccessibleList::getAccessibleChild (sal_Int3
Reference< XAccessible > xChild;
// search for the child
- if ( static_cast<USHORT>(i) >= m_aAccessibleChildren.size() )
+ if ( static_cast<sal_uInt16>(i) >= m_aAccessibleChildren.size() )
xChild = CreateChild (i);
else
{
@@ -491,8 +491,8 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleList::getAccessibleAt( const awt
if ( contains( rPoint ) && m_nVisibleLineCount > 0 )
{
Point aPos = VCLPoint( rPoint );
- USHORT nEndPos = m_pListBoxHelper->GetTopEntry() + (USHORT)m_nVisibleLineCount;
- for ( USHORT i = m_pListBoxHelper->GetTopEntry(); i < nEndPos; ++i )
+ sal_uInt16 nEndPos = m_pListBoxHelper->GetTopEntry() + (sal_uInt16)m_nVisibleLineCount;
+ for ( sal_uInt16 i = m_pListBoxHelper->GetTopEntry(); i < nEndPos; ++i )
{
if ( m_pListBoxHelper->GetBoundingRectangle(i).IsInside( aPos ) )
{
@@ -535,7 +535,7 @@ void VCLXAccessibleList::UpdateVisibleLineCount()
m_nVisibleLineCount = m_pListBoxHelper->GetDisplayLineCount();
else
{
- USHORT nCols = 0,
+ sal_uInt16 nCols = 0,
nLines = 0;
m_pListBoxHelper->GetMaxVisColumnsAndLines (nCols, nLines);
m_nVisibleLineCount = nLines;
@@ -558,7 +558,7 @@ void VCLXAccessibleList::UpdateEntryRange_Impl()
UpdateVisibleLineCount();
sal_Int32 nBegin = Min( m_nLastTopEntry, nTop );
sal_Int32 nEnd = Max( m_nLastTopEntry + m_nVisibleLineCount, nTop + m_nVisibleLineCount );
- for (USHORT i = static_cast<USHORT>(nBegin); (i <= static_cast<USHORT>(nEnd)); ++i)
+ for (sal_uInt16 i = static_cast<sal_uInt16>(nBegin); (i <= static_cast<sal_uInt16>(nEnd)); ++i)
{
sal_Bool bVisible = ( i >= nTop && i < ( nTop + m_nVisibleLineCount ) );
Reference< XAccessible > xHold;
@@ -575,10 +575,10 @@ void VCLXAccessibleList::UpdateEntryRange_Impl()
m_nLastTopEntry = nTop;
}
// -----------------------------------------------------------------------------
-BOOL VCLXAccessibleList::checkEntrySelected(USHORT _nPos,Any& _rNewValue,Reference< XAccessible >& _rxNewAcc)
+sal_Bool VCLXAccessibleList::checkEntrySelected(sal_uInt16 _nPos,Any& _rNewValue,Reference< XAccessible >& _rxNewAcc)
{
OSL_ENSURE(m_pListBoxHelper,"Helper is not valid!");
- BOOL bNowSelected = FALSE;
+ sal_Bool bNowSelected = sal_False;
if ( m_pListBoxHelper )
{
bNowSelected = m_pListBoxHelper->IsEntryPosSelected (_nPos);
@@ -592,7 +592,7 @@ BOOL VCLXAccessibleList::checkEntrySelected(USHORT _nPos,Any& _rNewValue,Referen
}
// -----------------------------------------------------------------------------
-void VCLXAccessibleList::UpdateSelection_Impl(USHORT)
+void VCLXAccessibleList::UpdateSelection_Impl(sal_uInt16)
{
uno::Any aOldValue, aNewValue;
@@ -603,7 +603,7 @@ void VCLXAccessibleList::UpdateSelection_Impl(USHORT)
if ( m_pListBoxHelper )
{
- USHORT i=0;
+ sal_uInt16 i=0;
for ( ListItems::iterator aIter = m_aAccessibleChildren.begin();
aIter != m_aAccessibleChildren.end(); ++aIter,++i)
{
@@ -612,7 +612,7 @@ void VCLXAccessibleList::UpdateSelection_Impl(USHORT)
{
VCLXAccessibleListItem* pItem = static_cast< VCLXAccessibleListItem* >( xHold.get() );
// Retrieve the item's index from the list entry.
- BOOL bNowSelected = m_pListBoxHelper->IsEntryPosSelected (i);
+ sal_Bool bNowSelected = m_pListBoxHelper->IsEntryPosSelected (i);
if ( bNowSelected && !pItem->IsSelected() )
{
@@ -629,7 +629,7 @@ void VCLXAccessibleList::UpdateSelection_Impl(USHORT)
checkEntrySelected(i,aNewValue,xNewAcc);
}
}
- USHORT nCount = m_pListBoxHelper->GetEntryCount();
+ sal_uInt16 nCount = m_pListBoxHelper->GetEntryCount();
if ( i < nCount ) // here we have to check the if any other listbox entry is selected
{
for (; i < nCount && !checkEntrySelected(i,aNewValue,xNewAcc) ;++i )
@@ -668,7 +668,7 @@ void SAL_CALL VCLXAccessibleList::selectAccessibleChild( sal_Int32 nChildIndex )
{
checkSelection_Impl(nChildIndex,*m_pListBoxHelper,sal_False);
- m_pListBoxHelper->SelectEntryPos( (USHORT)nChildIndex, TRUE );
+ m_pListBoxHelper->SelectEntryPos( (sal_uInt16)nChildIndex, sal_True );
// call the select handler, don't handle events in this time
m_bDisableProcessEvent = true;
m_pListBoxHelper->Select();
@@ -691,7 +691,7 @@ sal_Bool SAL_CALL VCLXAccessibleList::isAccessibleChildSelected( sal_Int32 nChil
{
checkSelection_Impl(nChildIndex,*m_pListBoxHelper,sal_False);
- bRet = m_pListBoxHelper->IsEntryPosSelected( (USHORT)nChildIndex );
+ bRet = m_pListBoxHelper->IsEntryPosSelected( (sal_uInt16)nChildIndex );
}
return bRet;
}
@@ -725,9 +725,9 @@ void SAL_CALL VCLXAccessibleList::selectAllAccessibleChildren( ) throw (Runtime
if ( m_pListBoxHelper )
{
- USHORT nCount = m_pListBoxHelper->GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
- m_pListBoxHelper->SelectEntryPos( i, TRUE );
+ sal_uInt16 nCount = m_pListBoxHelper->GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ m_pListBoxHelper->SelectEntryPos( i, sal_True );
// call the select handler, don't handle events in this time
m_bDisableProcessEvent = true;
m_pListBoxHelper->Select();
@@ -759,7 +759,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleList::getSelectedAccessibleChild
if ( m_pListBoxHelper )
{
checkSelection_Impl(nSelectedChildIndex,*m_pListBoxHelper,sal_True);
- return getAccessibleChild( (sal_Int32)m_pListBoxHelper->GetSelectEntryPos( (USHORT)nSelectedChildIndex ) );
+ return getAccessibleChild( (sal_Int32)m_pListBoxHelper->GetSelectEntryPos( (sal_uInt16)nSelectedChildIndex ) );
}
return NULL;
@@ -777,7 +777,7 @@ void SAL_CALL VCLXAccessibleList::deselectAccessibleChild( sal_Int32 nSelectedCh
{
checkSelection_Impl(nSelectedChildIndex,*m_pListBoxHelper,sal_False);
- m_pListBoxHelper->SelectEntryPos( (USHORT)nSelectedChildIndex, FALSE );
+ m_pListBoxHelper->SelectEntryPos( (sal_uInt16)nSelectedChildIndex, sal_False );
// call the select handler, don't handle events in this time
m_bDisableProcessEvent = true;
m_pListBoxHelper->Select();