diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-01-06 18:35:37 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-01-07 21:04:32 +0100 |
commit | c1dafdf6c645b0199a988ed467189e2b18794ce0 (patch) | |
tree | 48620d1d09d51d069e5f249b8fada9e792b773e0 /sw/source/core | |
parent | 7b765053e3b3476de7017359c2e10bcd87c000b0 (diff) |
sal_uInt16 to size_t
Change-Id: Iaf133b811f4182d9cf73cc68c6d01afb1acf2a75
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/access/accmap.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/access/accselectionhelper.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 10 |
3 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 2d3cf8337cfd..58e48d0a167c 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -282,7 +282,7 @@ SwAccessibleObjShape_Impl SwAccessibleObjShape_Impl *pShapes = 0; SwAccessibleObjShape_Impl *pSelShape = 0; - sal_uInt16 nSelShapes = pFESh ? pFESh->IsObjSelected() : 0; + size_t nSelShapes = pFESh ? pFESh->IsObjSelected() : 0; rSize = maMap.size(); if( rSize > 0 ) @@ -299,7 +299,7 @@ SwAccessibleObjShape_Impl { const SdrObject *pObj = (*aIter).first; uno::Reference < XAccessible > xAcc( (*aIter).second ); - if( nSelShapes && pFESh &&pFESh->IsObjSelected( *pObj ) ) + if( nSelShapes && pFESh && pFESh->IsObjSelected( *pObj ) ) { // selected objects are inserted from the back --pSelShape; @@ -1132,7 +1132,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() static_cast< const SwFEShell * >( pVSh ) : 0; SwPaM* pCrsr = pFESh ? pFESh->GetCrsr( false /* ??? */ ) : NULL; - //sal_uInt16 nSelShapes = pFESh ? pFESh->IsObjSelected() : 0; + //const size_t nSelShapes = pFESh ? pFESh->IsObjSelected() : 0; { osl::MutexGuard aGuard( maMutex ); @@ -1441,7 +1441,7 @@ void SwAccessibleMap::DoInvalidateShapeSelection(bool bInvalidateFocusMode /*=fa const SwViewShell *pVSh = GetShell(); const SwFEShell *pFESh = pVSh->ISA( SwFEShell ) ? static_cast< const SwFEShell * >( pVSh ) : 0; - sal_uInt16 nSelShapes = pFESh ? pFESh->IsObjSelected() : 0; + const size_t nSelShapes = pFESh ? pFESh->IsObjSelected() : 0; //when InvalidateFocus Call this function ,and the current selected shape count is not 1 , //return @@ -1609,7 +1609,7 @@ void SwAccessibleMap::DoInvalidateShapeFocus() const SwViewShell *pVSh = GetShell(); const SwFEShell *pFESh = pVSh->ISA( SwFEShell ) ? static_cast< const SwFEShell * >( pVSh ) : 0; - sal_uInt16 nSelShapes = pFESh ? pFESh->IsObjSelected() : 0; + const size_t nSelShapes = pFESh ? pFESh->IsObjSelected() : 0; if( nSelShapes != 1 ) return; diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx index a2a8bd39a6bd..af7553a0675a 100644 --- a/sw/source/core/access/accselectionhelper.cxx +++ b/sw/source/core/access/accselectionhelper.cxx @@ -233,7 +233,7 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) } else { - sal_uInt16 nSelObjs = pFEShell->IsObjSelected(); + const size_t nSelObjs = pFEShell->IsObjSelected(); if( nSelObjs > 0 ) { ::std::list< SwAccessibleChild > aChildren; @@ -243,7 +243,7 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( ) aChildren.begin(); ::std::list< SwAccessibleChild >::const_iterator aEndIter = aChildren.end(); - while( aIter != aEndIter && nCount < nSelObjs ) + while( aIter != aEndIter && static_cast<size_t>(nCount) < nSelObjs ) { const SwAccessibleChild& rChild = *aIter; if( rChild.GetDrawObject() && !rChild.GetSwFrm() && @@ -321,8 +321,8 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild( } else { - sal_uInt16 nSelObjs = pFEShell->IsObjSelected(); - if( 0 == nSelObjs || nSelectedChildIndex >= nSelObjs ) + const size_t nSelObjs = pFEShell->IsObjSelected(); + if( 0 == nSelObjs || static_cast<size_t>(nSelectedChildIndex) >= nSelObjs ) throwIndexOutOfBoundsException(); ::std::list< SwAccessibleChild > aChildren; diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index b1be489e2913..9fc4cdcc9dae 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -911,12 +911,12 @@ void SwFEShell::SelectionToHell() ChangeOpaque( getIDocumentDrawModelAccess()->GetHellId() ); } -sal_uInt16 SwFEShell::IsObjSelected() const +size_t SwFEShell::IsObjSelected() const { if ( IsFrmSelected() || !Imp()->HasDrawView() ) return 0; - else - return sal_uInt16( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ); + + return Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount(); } bool SwFEShell::IsFrmSelected() const @@ -2372,8 +2372,8 @@ bool SwFEShell::SetObjAttr( const SfxItemSet& rSet ) bool SwFEShell::IsAlignPossible() const { - sal_uInt16 nCnt; - if ( 0 < (nCnt = IsObjSelected()) ) + const size_t nCnt = IsObjSelected(); + if ( 0 < nCnt ) { bool bRet = true; if ( nCnt == 1 ) |