diff options
Diffstat (limited to 'sw/source/core/access/accpara.cxx')
-rw-r--r-- | sw/source/core/access/accpara.cxx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 84d0cc67e7ab..ec8ab7a7c703 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -151,7 +151,7 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos() { // same node? Then check whether it's also within 'our' part // of the paragraph - USHORT nIndex = pPoint->nContent.GetIndex(); + sal_uInt16 nIndex = pPoint->nContent.GetIndex(); if( GetPortionData().IsValidCorePosition( nIndex ) ) { // Yes, it's us! @@ -195,7 +195,7 @@ sal_Bool SwAccessibleParagraph::GetSelection( { // get SwPosition for my node const SwTxtNode* pNode = GetTxtNode(); - ULONG nHere = pNode->GetIndex(); + sal_uLong nHere = pNode->GetIndex(); // iterate over ring SwPaM* pRingStart = pCrsr; @@ -206,9 +206,9 @@ sal_Bool SwAccessibleParagraph::GetSelection( { // check whether nHere is 'inside' pCrsr SwPosition* pStart = pCrsr->Start(); - ULONG nStartIndex = pStart->nNode.GetIndex(); + sal_uLong nStartIndex = pStart->nNode.GetIndex(); SwPosition* pEnd = pCrsr->End(); - ULONG nEndIndex = pEnd->nNode.GetIndex(); + sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && ( nHere <= nEndIndex ) ) { @@ -230,7 +230,7 @@ sal_Bool SwAccessibleParagraph::GetSelection( // selection starts in this node: // then check whether it's before or inside our part of // the paragraph, and if so, get the proper position - USHORT nCoreStart = pStart->nContent.GetIndex(); + sal_uInt16 nCoreStart = pStart->nContent.GetIndex(); if( nCoreStart < GetPortionData().GetFirstValidCorePosition() ) { @@ -266,7 +266,7 @@ sal_Bool SwAccessibleParagraph::GetSelection( // selection ends in this node: then select everything // before our part of the node - USHORT nCoreEnd = pEnd->nContent.GetIndex(); + sal_uInt16 nCoreEnd = pEnd->nContent.GetIndex(); if( nCoreEnd > GetPortionData().GetLastValidCorePosition() ) { @@ -329,7 +329,7 @@ SwPaM* SwAccessibleParagraph::GetCursor( const bool _bForSelection ) !(pFESh->IsFrmSelected() || pFESh->IsObjSelected() > 0) ) { // get the selection, and test whether it affects our text node - pCrsr = pCrsrShell->GetCrsr( FALSE /* ??? */ ); + pCrsr = pCrsrShell->GetCrsr( sal_False /* ??? */ ); } } @@ -563,7 +563,7 @@ void SwAccessibleParagraph::ClearPortionData() } -void SwAccessibleParagraph::ExecuteAtViewShell( UINT16 nSlot ) +void SwAccessibleParagraph::ExecuteAtViewShell( sal_uInt16 nSlot ) { DBG_ASSERT( GetMap() != NULL, "no map?" ); ViewShell* pViewShell = GetMap()->GetShell(); @@ -597,8 +597,8 @@ SwXTextPortion* SwAccessibleParagraph::CreateUnoPortion( IsValidRange(nStartIndex, nEndIndex, GetString().getLength()), "please check parameters before calling this method" ); - USHORT nStart = GetPortionData().GetModelPosition( nStartIndex ); - USHORT nEnd = (nEndIndex == -1) ? (nStart + 1) : + sal_uInt16 nStart = GetPortionData().GetModelPosition( nStartIndex ); + sal_uInt16 nEnd = (nEndIndex == -1) ? (nStart + 1) : GetPortionData().GetModelPosition( nEndIndex ); // create UNO cursor @@ -670,13 +670,13 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary( if( pBreakIt->GetBreakIter().is() ) { // get locale for this position - USHORT nModelPos = GetPortionData().GetModelPosition( nPos ); + sal_uInt16 nModelPos = GetPortionData().GetModelPosition( nPos ); lang::Locale aLocale = pBreakIt->GetLocale( GetTxtNode()->GetLang( nModelPos ) ); // which type of word are we interested in? // (DICTIONARY_WORD includes punctuation, ANY_WORD doesn't.) - const USHORT nWordType = i18n::WordType::ANY_WORD; + const sal_uInt16 nWordType = i18n::WordType::ANY_WORD; // get word boundary, as the Break-Iterator sees fit. rBound = pBreakIt->GetBreakIter()->getWordBoundary( @@ -750,12 +750,12 @@ sal_Bool SwAccessibleParagraph::GetGlyphBoundary( if( pBreakIt->GetBreakIter().is() ) { // get locale for this position - USHORT nModelPos = GetPortionData().GetModelPosition( nPos ); + sal_uInt16 nModelPos = GetPortionData().GetModelPosition( nPos ); lang::Locale aLocale = pBreakIt->GetLocale( GetTxtNode()->GetLang( nModelPos ) ); // get word boundary, as the Break-Iterator sees fit. - const USHORT nIterMode = i18n::CharacterIteratorMode::SKIPCELL; + const sal_uInt16 nIterMode = i18n::CharacterIteratorMode::SKIPCELL; sal_Int32 nDone = 0; rBound.endPos = pBreakIt->GetBreakIter()->nextCharacters( rText, nPos, aLocale, nIterMode, 1, nDone ); @@ -1532,9 +1532,9 @@ void SwAccessibleParagraph::_getRunAttributesImpl( { const SwTxtNode* pTxtNode( GetTxtNode() ); SwPosition* pStartPos = new SwPosition( *pTxtNode ); - pStartPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<USHORT>(nIndex) ); + pStartPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<sal_uInt16>(nIndex) ); SwPosition* pEndPos = new SwPosition( *pTxtNode ); - pEndPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<USHORT>(nIndex+1) ); + pEndPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<sal_uInt16>(nIndex+1) ); pPaM = new SwPaM( *pStartPos, *pEndPos ); @@ -1550,7 +1550,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( // From the perspective of the a11y API the character attributes, which // are set at the automatic paragraph style of the paragraph are treated // as run attributes. -// SwXTextCursor::GetCrsrAttr( *pPaM, aSet, TRUE, TRUE ); +// SwXTextCursor::GetCrsrAttr( *pPaM, aSet, sal_True, sal_True ); // get character attributes from automatic paragraph style and merge these into <aSet> { const SwTxtNode* pTxtNode( GetTxtNode() ); @@ -1559,7 +1559,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( SfxItemSet aAutomaticParaStyleCharAttrs( pPaM->GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END -1, 0 ); - aAutomaticParaStyleCharAttrs.Put( *(pTxtNode->GetpSwAttrSet()), FALSE ); + aAutomaticParaStyleCharAttrs.Put( *(pTxtNode->GetpSwAttrSet()), sal_False ); aSet.Put( aAutomaticParaStyleCharAttrs ); } } @@ -1568,7 +1568,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( SfxItemSet aCharAttrsAtPaM( pPaM->GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END -1, 0 ); - SwUnoCursorHelper::GetCrsrAttr(*pPaM, aCharAttrsAtPaM, TRUE, TRUE); + SwUnoCursorHelper::GetCrsrAttr(*pPaM, aCharAttrsAtPaM, sal_True, sal_True); aSet.Put( aCharAttrsAtPaM ); } // <-- @@ -1593,7 +1593,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( // --> OD 2007-11-12 #i82637# // Found character attributes, whose value equals the value of // the corresponding default character attributes, are excluded. - if ( aSet.GetItemState( aPropIt->nWID, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( aSet.GetItemState( aPropIt->nWID, sal_True, &pItem ) == SFX_ITEM_SET ) { uno::Any aVal; pItem->QueryValue( aVal, aPropIt->nMemberId ); @@ -1696,12 +1696,12 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds( // get model position & prepare GetCharRect() arguments SwCrsrMoveState aMoveState; - aMoveState.bRealHeight = TRUE; - aMoveState.bRealWidth = TRUE; + aMoveState.bRealHeight = sal_True; + aMoveState.bRealWidth = sal_True; SwSpecialPos aSpecialPos; SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() ); - USHORT nPos = 0; + sal_uInt16 nPos = 0; /* #i12332# FillSpecialPos does not accept nIndex == GetString().getLength(). In that case nPos is set to the @@ -1793,7 +1793,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) DBG_ASSERT( GetFrm()->IsTxtFrm(), "The text frame has mutated!" ); const SwTxtFrm* pFrm = static_cast<const SwTxtFrm*>( GetFrm() ); SwCrsrMoveState aMoveState; - aMoveState.bPosMatchesBounds = TRUE; + aMoveState.bPosMatchesBounds = sal_True; sal_Bool bSuccess = pFrm->GetCrsrOfst( &aPos, aCorePoint, &aMoveState ); SwIndex aCntntIdx = aPos.nContent; @@ -2126,7 +2126,7 @@ sal_Bool SwAccessibleParagraph::replaceText( SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() ); // translate positions - USHORT nStart, nEnd; + sal_uInt16 nStart, nEnd; sal_Bool bSuccess = GetPortionData().GetEditableRange( nStartIndex, nEndIndex, nStart, nEnd ); |