diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:35:18 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:35:18 +0100 |
commit | 6a75a47be7b3aafbb655ffa70609fd2ed7ca4b3e (patch) | |
tree | d00d2024213e09b8eba4704b8b6660eb42c3921c /accessibility/source/standard | |
parent | Remove empty comment fields (diff) | |
parent | use boost::unordered_map instead of hash_map (diff) | |
download | core-6a75a47be7b3aafbb655ffa70609fd2ed7ca4b3e.tar.gz core-6a75a47be7b3aafbb655ffa70609fd2ed7ca4b3e.zip |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
automation/source/communi/communi.cxx
automation/source/server/recorder.cxx
automation/source/server/server.cxx
basctl/source/basicide/basobj2.cxx
Diffstat (limited to 'accessibility/source/standard')
12 files changed, 72 insertions, 73 deletions
diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx index ab02caaa322c..d416efeee799 100644 --- a/accessibility/source/standard/accessiblemenubasecomponent.cxx +++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx @@ -354,13 +354,13 @@ Reference< XAccessible > OAccessibleMenuBaseComponent::GetChild( sal_Int32 i ) // create a new child OAccessibleMenuBaseComponent* pChild; - if ( m_pMenu->GetItemType( (USHORT)i ) == MENUITEM_SEPARATOR ) + if ( m_pMenu->GetItemType( (sal_uInt16)i ) == MENUITEM_SEPARATOR ) { pChild = new VCLXAccessibleMenuSeparator( m_pMenu, (sal_uInt16)i ); } else { - PopupMenu* pPopupMenu = m_pMenu->GetPopupMenu( m_pMenu->GetItemId( (USHORT)i ) ); + PopupMenu* pPopupMenu = m_pMenu->GetPopupMenu( m_pMenu->GetItemId( (sal_uInt16)i ) ); if ( pPopupMenu ) { pChild = new VCLXAccessibleMenu( m_pMenu, (sal_uInt16)i, pPopupMenu ); @@ -525,7 +525,7 @@ void OAccessibleMenuBaseComponent::SelectChild( sal_Int32 i ) // highlight the child if ( m_pMenu ) - m_pMenu->HighlightItem( (USHORT)i ); + m_pMenu->HighlightItem( (sal_uInt16)i ); } // ----------------------------------------------------------------------------- @@ -542,7 +542,7 @@ sal_Bool OAccessibleMenuBaseComponent::IsChildSelected( sal_Int32 i ) { sal_Bool bSelected = sal_False; - if ( m_pMenu && m_pMenu->IsHighlighted( (USHORT)i ) ) + if ( m_pMenu && m_pMenu->IsHighlighted( (sal_uInt16)i ) ) bSelected = sal_True; return bSelected; diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx index 0b34e2efa800..2348198a7a1e 100644 --- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx +++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx @@ -158,7 +158,7 @@ void OAccessibleMenuItemComponent::Click() // that the popup menus are executed synchronously. AllSettings aSettings = pWindow->GetSettings(); MouseSettings aMouseSettings = aSettings.GetMouseSettings(); - ULONG nDelay = aMouseSettings.GetMenuDelay(); + sal_uLong nDelay = aMouseSettings.GetMenuDelay(); aMouseSettings.SetMenuDelay( 0 ); aSettings.SetMouseSettings( aMouseSettings ); pWindow->SetSettings( aSettings ); diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx index c8177943a3f2..8e7d349ef988 100644 --- a/accessibility/source/standard/vclxaccessiblebox.cxx +++ b/accessibility/source/standard/vclxaccessiblebox.cxx @@ -32,7 +32,6 @@ #include <accessibility/standard/vclxaccessibletextfield.hxx> #include <accessibility/standard/vclxaccessibleedit.hxx> #include <accessibility/standard/vclxaccessiblelist.hxx> -#include <accessibility/standard/vclxaccessiblelistboxlist.hxx> #include <accessibility/helper/listboxhelper.hxx> #include <unotools/accessiblestatesethelper.hxx> diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx index f30a690c89d9..11e7f5497da9 100644 --- a/accessibility/source/standard/vclxaccessiblebutton.cxx +++ b/accessibility/source/standard/vclxaccessiblebutton.cxx @@ -293,7 +293,7 @@ sal_Bool VCLXAccessibleButton::setCurrentValue( const Any& aNumber ) throw (Runt else if ( nValue > 1 ) nValue = 1; - pButton->SetPressed( (BOOL) nValue ); + pButton->SetPressed( (sal_Bool) nValue ); bReturn = sal_True; } diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx index b8f05dbc66c8..bbd329594f24 100644 --- a/accessibility/source/standard/vclxaccessibleedit.cxx +++ b/accessibility/source/standard/vclxaccessibleedit.cxx @@ -159,7 +159,7 @@ void VCLXAccessibleEdit::FillAccessibleStateSet( utl::AccessibleStateSetHelper& if ( !cEchoChar ) cEchoChar = '*'; XubString sTmp; - aText = sTmp.Fill( (USHORT)aText.getLength(), cEchoChar ); + aText = sTmp.Fill( (sal_uInt16)aText.getLength(), cEchoChar ); } } diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx index accce8440c7e..a411936fea4f 100644 --- a/accessibility/source/standard/vclxaccessiblelist.cxx +++ b/accessibility/source/standard/vclxaccessiblelist.cxx @@ -95,7 +95,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); } // ----------------------------------------------------------------------------- @@ -178,10 +178,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 ); } @@ -242,7 +242,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 ) @@ -272,7 +272,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; @@ -301,7 +301,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); @@ -330,15 +330,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 ) ); @@ -359,7 +359,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); @@ -416,7 +416,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 { @@ -488,8 +488,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 ) ) { @@ -532,7 +532,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; @@ -555,7 +555,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; @@ -572,10 +572,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); @@ -589,7 +589,7 @@ BOOL VCLXAccessibleList::checkEntrySelected(USHORT _nPos,Any& _rNewValue,Referen } // ----------------------------------------------------------------------------- -void VCLXAccessibleList::UpdateSelection_Impl(USHORT) +void VCLXAccessibleList::UpdateSelection_Impl(sal_uInt16) { uno::Any aOldValue, aNewValue; @@ -600,7 +600,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) { @@ -609,7 +609,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() ) { @@ -626,7 +626,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 ) @@ -665,7 +665,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(); @@ -688,7 +688,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; } @@ -722,9 +722,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(); @@ -756,7 +756,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; @@ -774,7 +774,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(); diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx index 31332bd14a21..121e781e8c30 100644 --- a/accessibility/source/standard/vclxaccessiblelistitem.cxx +++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx @@ -91,7 +91,7 @@ VCLXAccessibleListItem::VCLXAccessibleListItem( ::accessibility::IComboListBoxHe m_xParentContext = m_xParent->getAccessibleContext(); if ( m_pListBoxHelper ) - m_sEntryText = m_pListBoxHelper->GetEntry( (USHORT)_nIndexInParent ); + m_sEntryText = m_pListBoxHelper->GetEntry( (sal_uInt16)_nIndexInParent ); } // ----------------------------------------------------------------------------- VCLXAccessibleListItem::~VCLXAccessibleListItem() @@ -357,7 +357,7 @@ sal_Bool SAL_CALL VCLXAccessibleListItem::containsPoint( const awt::Point& _aPoi sal_Bool bInside = sal_False; if ( m_pListBoxHelper ) { - Rectangle aRect( m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ) ); + Rectangle aRect( m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ) ); aRect.Move(-aRect.TopLeft().X(),-aRect.TopLeft().Y()); bInside = aRect.IsInside( VCLPoint( _aPoint ) ); } @@ -376,7 +376,7 @@ awt::Rectangle SAL_CALL VCLXAccessibleListItem::getBounds( ) throw (RuntimeExce awt::Rectangle aRect; if ( m_pListBoxHelper ) - aRect = AWTRectangle( m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ) ); + aRect = AWTRectangle( m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ) ); return aRect; } @@ -389,7 +389,7 @@ awt::Point SAL_CALL VCLXAccessibleListItem::getLocation( ) throw (RuntimeExcept Point aPoint(0,0); if ( m_pListBoxHelper ) { - Rectangle aRect = m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ); + Rectangle aRect = m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); aPoint = aRect.TopLeft(); } return AWTPoint( aPoint ); @@ -403,7 +403,7 @@ awt::Point SAL_CALL VCLXAccessibleListItem::getLocationOnScreen( ) throw (Runti Point aPoint(0,0); if ( m_pListBoxHelper ) { - Rectangle aRect = m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ); + Rectangle aRect = m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); aPoint = aRect.TopLeft(); aPoint += m_pListBoxHelper->GetWindowExtentsRelative( NULL ).TopLeft(); } @@ -417,7 +417,7 @@ awt::Size SAL_CALL VCLXAccessibleListItem::getSize( ) throw (RuntimeException) Size aSize; if ( m_pListBoxHelper ) - aSize = m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ).GetSize(); + aSize = m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ).GetSize(); return AWTSize( aSize ); } @@ -478,7 +478,7 @@ awt::Rectangle SAL_CALL VCLXAccessibleListItem::getCharacterBounds( sal_Int32 nI if ( m_pListBoxHelper ) { Rectangle aCharRect = m_pListBoxHelper->GetEntryCharacterBounds( m_nIndexInParent, nIndex ); - Rectangle aItemRect = m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ); + Rectangle aItemRect = m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); aCharRect.Move( -aItemRect.Left(), -aItemRect.Top() ); aBounds = AWTRectangle( aCharRect ); } @@ -502,12 +502,12 @@ sal_Int32 SAL_CALL VCLXAccessibleListItem::getIndexAtPoint( const awt::Point& aP sal_Int32 nIndex = -1; if ( m_pListBoxHelper ) { - USHORT nPos = LISTBOX_ENTRY_NOTFOUND; - Rectangle aItemRect = m_pListBoxHelper->GetBoundingRectangle( (USHORT)m_nIndexInParent ); + sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND; + Rectangle aItemRect = m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); Point aPnt( VCLPoint( aPoint ) ); aPnt += aItemRect.TopLeft(); sal_Int32 nI = m_pListBoxHelper->GetIndexForPoint( aPnt, nPos ); - if ( nI != -1 && (USHORT)m_nIndexInParent == nPos ) + if ( nI != -1 && (sal_uInt16)m_nIndexInParent == nPos ) nIndex = nI; } return nIndex; diff --git a/accessibility/source/standard/vclxaccessiblemenubar.cxx b/accessibility/source/standard/vclxaccessiblemenubar.cxx index 557c7756b027..56cd4fcf44f2 100644 --- a/accessibility/source/standard/vclxaccessiblemenubar.cxx +++ b/accessibility/source/standard/vclxaccessiblemenubar.cxx @@ -173,7 +173,7 @@ sal_Int32 VCLXAccessibleMenuBar::getAccessibleIndexInParent( ) throw (RuntimeEx Window* pParent = pWindow->GetAccessibleParentWindow(); if ( pParent ) { - for ( USHORT n = pParent->GetAccessibleChildWindowCount(); n; ) + for ( sal_uInt16 n = pParent->GetAccessibleChildWindowCount(); n; ) { Window* pChild = pParent->GetAccessibleChildWindow( --n ); if ( pChild == pWindow ) diff --git a/accessibility/source/standard/vclxaccessiblestatusbar.cxx b/accessibility/source/standard/vclxaccessiblestatusbar.cxx index fd8be1a820b6..32e132802391 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx @@ -332,7 +332,7 @@ Reference< XAccessible > VCLXAccessibleStatusBar::getAccessibleChild( sal_Int32 { if ( m_pStatusBar ) { - sal_uInt16 nItemId = m_pStatusBar->GetItemId( (USHORT)i ); + sal_uInt16 nItemId = m_pStatusBar->GetItemId( (sal_uInt16)i ); xChild = new VCLXAccessibleStatusBarItem( m_pStatusBar, nItemId ); diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx index cb4339aab4f7..913871240191 100644 --- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx +++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx @@ -289,7 +289,7 @@ void VCLXAccessibleTabControl::ProcessWindowChildEvent( const VclWindowEvent& rV { for ( sal_Int32 i = 0, nCount = m_pTabControl->GetPageCount(); i < nCount; ++i ) { - sal_uInt16 nPageId = m_pTabControl->GetPageId( (USHORT)i ); + sal_uInt16 nPageId = m_pTabControl->GetPageId( (sal_uInt16)i ); TabPage* pTabPage = m_pTabControl->GetTabPage( nPageId ); if ( pTabPage == (TabPage*) pChild ) UpdateTabPage( i, rVclWindowEvent.GetId() == VCLEVENT_WINDOW_SHOW ); @@ -392,7 +392,7 @@ Reference< XAccessible > VCLXAccessibleTabControl::getAccessibleChild( sal_Int32 { if ( m_pTabControl ) { - sal_uInt16 nPageId = m_pTabControl->GetPageId( (USHORT)i ); + sal_uInt16 nPageId = m_pTabControl->GetPageId( (sal_uInt16)i ); xChild = new VCLXAccessibleTabPage( m_pTabControl, nPageId ); @@ -434,7 +434,7 @@ void VCLXAccessibleTabControl::selectAccessibleChild( sal_Int32 nChildIndex ) th throw IndexOutOfBoundsException(); if ( m_pTabControl ) - m_pTabControl->SelectTabPage( m_pTabControl->GetPageId( (USHORT)nChildIndex ) ); + m_pTabControl->SelectTabPage( m_pTabControl->GetPageId( (sal_uInt16)nChildIndex ) ); } // ----------------------------------------------------------------------------- @@ -447,7 +447,7 @@ sal_Bool VCLXAccessibleTabControl::isAccessibleChildSelected( sal_Int32 nChildIn throw IndexOutOfBoundsException(); sal_Bool bSelected = sal_False; - if ( m_pTabControl && m_pTabControl->GetCurPageId() == m_pTabControl->GetPageId( (USHORT)nChildIndex ) ) + if ( m_pTabControl && m_pTabControl->GetCurPageId() == m_pTabControl->GetPageId( (sal_uInt16)nChildIndex ) ) bSelected = sal_True; return bSelected; diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index 26e586260005..71ae99652215 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -227,26 +227,26 @@ void VCLXAccessibleToolBox::UpdateFocus_Impl() return; // submit events only if toolbox has the focus to avoid sending events due to mouse move - BOOL bHasFocus = FALSE; + sal_Bool bHasFocus = sal_False; if ( pToolBox->HasFocus() ) - bHasFocus = TRUE; + bHasFocus = sal_True; else { // check for subtoolbar, i.e. check if our parent is a toolbar ToolBox* pToolBoxParent = dynamic_cast< ToolBox* >( pToolBox->GetParent() ); // subtoolbars never get the focus as key input is just forwarded, so check if the parent toolbar has it if ( pToolBoxParent && pToolBoxParent->HasFocus() ) - bHasFocus = TRUE; + bHasFocus = sal_True; } if ( bHasFocus ) { - USHORT nHighlightItemId = pToolBox->GetHighlightItemId(); - USHORT nFocusCount = 0; + sal_uInt16 nHighlightItemId = pToolBox->GetHighlightItemId(); + sal_uInt16 nFocusCount = 0; for ( ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.begin(); aIter != m_aAccessibleChildren.end(); ++aIter ) { - USHORT nItemId = pToolBox->GetItemId( (USHORT)aIter->first ); + sal_uInt16 nItemId = pToolBox->GetItemId( (sal_uInt16)aIter->first ); if ( aIter->second.is() ) { @@ -296,7 +296,7 @@ void VCLXAccessibleToolBox::UpdateChecked_Impl( sal_Int32 ) for ( ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.begin(); aIter != m_aAccessibleChildren.end(); ++aIter ) { - USHORT nItemId = pToolBox->GetItemId( (USHORT)aIter->first ); + sal_uInt16 nItemId = pToolBox->GetItemId( (sal_uInt16)aIter->first ); VCLXAccessibleToolBoxItem* pItem = static_cast< VCLXAccessibleToolBoxItem* >( aIter->second.get() ); @@ -310,7 +310,7 @@ void VCLXAccessibleToolBox::UpdateIndeterminate_Impl( sal_Int32 _nPos ) ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() ); if ( pToolBox ) { - USHORT nItemId = pToolBox->GetItemId( (USHORT)_nPos ); + sal_uInt16 nItemId = pToolBox->GetItemId( (sal_uInt16)_nPos ); ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.find( _nPos ); if ( aIter != m_aAccessibleChildren.end() && aIter->second.is() ) @@ -432,7 +432,7 @@ void VCLXAccessibleToolBox::UpdateAllItems_Impl() m_aAccessibleChildren.clear(); // register the new items - USHORT i, nCount = pToolBox->GetItemCount(); + sal_uInt16 i, nCount = pToolBox->GetItemCount(); for ( i = 0; i < nCount; ++i ) { Any aNewValue; @@ -726,8 +726,8 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.find(i); if ( m_aAccessibleChildren.end() == aIter ) { - USHORT nItemId = pToolBox->GetItemId( (USHORT)i ); - USHORT nHighlightItemId = pToolBox->GetHighlightItemId(); + sal_uInt16 nItemId = pToolBox->GetItemId( (sal_uInt16)i ); + sal_uInt16 nHighlightItemId = pToolBox->GetHighlightItemId(); Window* pItemWindow = pToolBox->GetItemWindow( nItemId ); // not found -> create a new child VCLXAccessibleToolBoxItem* pChild = new VCLXAccessibleToolBoxItem( pToolBox, i ); @@ -766,7 +766,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleAtPoint( c ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() ); if ( pToolBox ) { - USHORT nItemPos = pToolBox->GetItemPos( VCLPoint( _rPoint ) ); + sal_uInt16 nItemPos = pToolBox->GetItemPos( VCLPoint( _rPoint ) ); if ( nItemPos != TOOLBOX_ITEM_NOTFOUND ) xAccessible = getAccessibleChild( nItemPos ); } @@ -781,10 +781,10 @@ Reference< XAccessible > VCLXAccessibleToolBox::GetItemWindowAccessible( const V ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() ); if ( pChildWindow && pToolBox ) { - USHORT nCount = pToolBox->GetItemCount(); - for (USHORT i = 0 ; i < nCount && !xReturn.is() ; ++i) + sal_uInt16 nCount = pToolBox->GetItemCount(); + for (sal_uInt16 i = 0 ; i < nCount && !xReturn.is() ; ++i) { - USHORT nItemId = pToolBox->GetItemId( i ); + sal_uInt16 nItemId = pToolBox->GetItemId( i ); Window* pItemWindow = pToolBox->GetItemWindow( nItemId ); if ( pItemWindow == pChildWindow ) xReturn = getAccessibleChild(i); @@ -810,7 +810,7 @@ void VCLXAccessibleToolBox::selectAccessibleChild( sal_Int32 nChildIndex ) throw if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() ) throw IndexOutOfBoundsException(); ToolBox * pToolBox = static_cast < ToolBox * > ( GetWindow() ); - USHORT nPos = static_cast < USHORT > (nChildIndex); + sal_uInt16 nPos = static_cast < sal_uInt16 > (nChildIndex); pToolBox->ChangeHighlight( nPos ); } // ----------------------------------------------------------------------------- @@ -820,7 +820,7 @@ sal_Bool VCLXAccessibleToolBox::isAccessibleChildSelected( sal_Int32 nChildIndex if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() ) throw IndexOutOfBoundsException(); ToolBox * pToolBox = static_cast < ToolBox * > ( GetWindow() ); - USHORT nPos = static_cast < USHORT > (nChildIndex); + sal_uInt16 nPos = static_cast < sal_uInt16 > (nChildIndex); if ( pToolBox != NULL && pToolBox->GetHighlightItemId() == pToolBox->GetItemId( nPos ) ) return sal_True; else diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index d1a61c726711..3c6a46c17242 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -87,11 +87,11 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock( ) ); DBG_ASSERT( m_pToolBox, "invalid toolbox" ); - m_nItemId = m_pToolBox->GetItemId( (USHORT)m_nIndexInParent ); + m_nItemId = m_pToolBox->GetItemId( (sal_uInt16)m_nIndexInParent ); m_sOldName = GetText( true ); m_bIsChecked = m_pToolBox->IsItemChecked( m_nItemId ); m_bIndeterminate = ( m_pToolBox->GetItemState( m_nItemId ) == STATE_DONTKNOW ); - ToolBoxItemType eType = m_pToolBox->GetItemType( (USHORT)m_nIndexInParent ); + ToolBoxItemType eType = m_pToolBox->GetItemType( (sal_uInt16)m_nIndexInParent ); switch ( eType ) { case TOOLBOXITEM_BUTTON : @@ -234,7 +234,7 @@ awt::Rectangle SAL_CALL VCLXAccessibleToolBoxItem::implGetBounds( ) throw (Runt { awt::Rectangle aRect; if ( m_pToolBox ) - aRect = AWTRectangle( m_pToolBox->GetItemPosRect( (USHORT)m_nIndexInParent ) ); + aRect = AWTRectangle( m_pToolBox->GetItemPosRect( (sal_uInt16)m_nIndexInParent ) ); return aRect; } @@ -686,7 +686,7 @@ sal_Bool VCLXAccessibleToolBoxItem::setCurrentValue( const Any& aNumber ) throw else if ( nValue > 1 ) nValue = 1; - m_pToolBox->CheckItem( m_nItemId, (BOOL) nValue ); + m_pToolBox->CheckItem( m_nItemId, (sal_Bool) nValue ); bReturn = sal_True; } |