diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-05 22:30:24 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-16 21:52:28 +0200 |
commit | 384cb5ff7b9227002206422d0bf4e75795d5f5cc (patch) | |
tree | 21a15556a592c9bc42893c69d98d23b64c1a9464 /sw | |
parent | 7e605f124f78a7f8b97385fcb8b91dce2ec735d8 (diff) |
Consistently use size_t and SAL_MAX_SIZE
Instead of a mix of sal_uIntPtr, sal_uLong, int, and so on.
Also change CONTAINER_ENTRY_NOTFOUND=ULONG_MAX to SAL_MAX_SIZE as
return value in case of failure and in the related tests.
Change-Id: Ie778a849253b4be84fbcdab9557b7c4240233927
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/access/accdoc.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/docdraw.cxx | 13 | ||||
-rw-r--r-- | sw/source/core/doc/docfly.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/draw/dview.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/edit/edundo.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/frmedt/fecopy.cxx | 17 | ||||
-rw-r--r-- | sw/source/core/frmedt/fefly1.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 28 | ||||
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/undo/undraw.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwbassh.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewdraw.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxvw.cxx | 2 |
14 files changed, 46 insertions, 50 deletions
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 7c089b26958a..07e1c8fd6fb2 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -668,7 +668,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() if(pCrsrShell->Imp()->GetDrawView()) { const SdrMarkList &rMrkList = pCrsrShell->Imp()->GetDrawView()->GetMarkedObjectList(); - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark(i)->GetMarkedSdrObj(); SwFrmFmt* pFmt = ((SwDrawContact*)pObj->GetUserCall())->GetFmt(); diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 25bcb900adc6..767fec89f256 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -221,7 +221,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView ) bGroupMembersNotPositioned = pAnchoredDrawObj->NotYetPositioned(); } // Destroy ContactObjects and formats. - for( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj); @@ -309,7 +309,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView ) const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList(); std::vector< std::pair< SwDrawFrmFmt*, SdrObject* > >* pFmtsAndObjs( 0L ); - const sal_uInt32 nMarkCount( rMrkList.GetMarkCount() ); + const size_t nMarkCount( rMrkList.GetMarkCount() ); if ( nMarkCount ) { pFmtsAndObjs = new std::vector< std::pair< SwDrawFrmFmt*, SdrObject* > >[nMarkCount]; @@ -317,7 +317,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView ) if( !pMyObj->GetUpGroup() ) { OUString sDrwFmtNm("DrawObject"); - for ( sal_uInt16 i = 0; i < nMarkCount; ++i ) + for ( size_t i = 0; i < nMarkCount; ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if ( pObj->IsA( TYPE(SdrObjGroup) ) ) @@ -354,7 +354,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView ) rDrawView.UnGroupMarked(); // creation of <SwDrawContact> instances for the former group members and // its connection to the Writer layout. - for ( sal_uInt32 i = 0; i < nMarkCount; ++i ) + for ( size_t i = 0; i < nMarkCount; ++i ) { SwUndoDrawUnGroupConnectToLayout* pUndo = 0; if( bUndo ) @@ -390,7 +390,6 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView ) if( rMrkList.GetMarkCount() ) { GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL); - sal_uInt16 i; bool bDelMarked = true; if( 1 == rMrkList.GetMarkCount() ) @@ -408,7 +407,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView ) } } - for( i = 0; i < rMrkList.GetMarkCount(); ++i ) + for( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if( !pObj->ISA(SwVirtFlyDrawObj) ) @@ -436,7 +435,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView ) : new SwUndoDrawDelete( (sal_uInt16)rMrkList.GetMarkCount() ); // Destroy ContactObjects, save formats. - for( i = 0; i < rMrkList.GetMarkCount(); ++i ) + for( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { const SdrMark& rMark = *rMrkList.GetMark( i ); pObj = rMark.GetMarkedSdrObj(); diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index ff8e0ffe4955..2283ac43d837 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -695,7 +695,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, GetIDocumentUndoRedo().StartUndo( UNDO_INSATTR, NULL ); bool bUnmark = false; - for ( sal_uInt16 i = 0; i < _rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < _rMrkList.GetMarkCount(); ++i ) { SdrObject* pObj = _rMrkList.GetMark( i )->GetMarkedSdrObj(); if ( !pObj->ISA(SwVirtFlyDrawObj) ) diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 19609f6543d1..b8f834b89f7d 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -153,10 +153,10 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt else { // check if the object is selected in this view - const sal_uInt32 nMarkCount(rMrkList.GetMarkCount()); + const size_t nMarkCount(rMrkList.GetMarkCount()); bool bSelected(false); - for(sal_uInt32 a(0); !bSelected && a < nMarkCount; a++) + for(size_t a = 0; !bSelected && a < nMarkCount; ++a) { if(pSwVirtFlyDrawObj == rMrkList.GetMark(a)->GetMarkedSdrObj()) { @@ -818,7 +818,7 @@ void SwDrawView::CheckPossibilities() const SdrMarkList &rMrkList = GetMarkedObjectList(); bool bProtect = false; bool bSzProtect = false; - for ( sal_uInt16 i = 0; !bProtect && i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; !bProtect && i < rMrkList.GetMarkCount(); ++i ) { const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); const SwFrm *pFrm = NULL; @@ -890,7 +890,7 @@ void SwDrawView::ReplaceMarkedDrawVirtObjs( SdrMarkView& _rMarkView ) { // collect marked objects in a local data structure std::vector<SdrObject*> aMarkedObjs; - for( sal_uInt32 i = 0; i < rMarkList.GetMarkCount(); ++i ) + for( size_t i = 0; i < rMarkList.GetMarkCount(); ++i ) { SdrObject* pMarkedObj = rMarkList.GetMark( i )->GetMarkedSdrObj(); aMarkedObjs.push_back( pMarkedObj ); @@ -945,7 +945,7 @@ void SwDrawView::DeleteMarked() // Check what textboxes have to be deleted afterwards. const SdrMarkList& rMarkList = GetMarkedObjectList(); std::vector<SwFrmFmt*> aTextBoxesToDelete; - for (sal_uInt16 i = 0; i < rMarkList.GetMarkCount(); ++i) + for (size_t i = 0; i < rMarkList.GetMarkCount(); ++i) { SdrObject *pObject = rMarkList.GetMark(i)->GetMarkedSdrObj(); SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(GetUserCall(pObject)); diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx index 73c98c53482f..e3a928d4c66f 100644 --- a/sw/source/core/edit/edundo.cxx +++ b/sw/source/core/edit/edundo.cxx @@ -239,7 +239,7 @@ static void lcl_SelectSdrMarkList( SwEditShell* pShell, { SwFEShell* pFEShell = static_cast<SwFEShell*>( pShell ); bool bFirst = true; - for( sal_uInt16 i = 0; i < pSdrMarkList->GetMarkCount(); ++i ) + for( size_t i = 0; i < pSdrMarkList->GetMarkCount(); ++i ) { SdrObject *pObj = pSdrMarkList->GetMark( i )->GetMarkedSdrObj(); if( pObj ) diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 6bdf41fc9f6e..f4fcbb6044f8 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -178,7 +178,7 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpTxt ) { SwPosition aPos( aSttIdx, SwIndex( pTxtNd, 0 )); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); @@ -283,7 +283,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, // The list should be copied, because below new objects will be selected const SdrMarkList aMrkList( Imp()->GetDrawView()->GetMarkedObjectList() ); - sal_uLong nMarkCount = aMrkList.GetMarkCount(); + const size_t nMarkCount = aMrkList.GetMarkCount(); if( !pDestShell->Imp()->GetDrawView() ) // should create it now pDestShell->MakeDrawView(); @@ -297,7 +297,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, SwDoc* pDestDoc = pDestShell->GetDoc(); Size aSiz( rInsPt.X() - rSttPt.X(), rInsPt.Y() - rSttPt.Y() ); - for( sal_uInt16 i = 0; i < nMarkCount; ++i ) + for( size_t i = 0; i < nMarkCount; ++i ) { SdrObject *pObj = aMrkList.GetMark( i )->GetMarkedSdrObj(); @@ -418,16 +418,13 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, const SdrMarkList aList( pSrcDrwView->GetMarkedObjectList() ); pSrcDrwView->UnmarkAll(); - sal_uLong nMrkCnt = aMrkList.GetMarkCount(); - sal_uInt16 i; - for ( i = 0; i < nMrkCnt; ++i ) + for ( size_t i = 0, nMrkCnt = aMrkList.GetMarkCount(); i < nMrkCnt; ++i ) { SdrObject *pObj = aMrkList.GetMark( i )->GetMarkedSdrObj(); pSrcDrwView->MarkObj( pObj, pSrcPgView ); } DelSelectedObj(); - nMrkCnt = aList.GetMarkCount(); - for ( i = 0; i < nMrkCnt; ++i ) + for ( size_t i = 0, nMrkCnt = aList.GetMarkCount(); i < nMrkCnt; ++i ) { SdrObject *pObj = aList.GetMark( i )->GetMarkedSdrObj(); pSrcDrwView->MarkObj( pObj, pSrcPgView ); @@ -1518,11 +1515,11 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt ) lcl_ConvertSdrOle2ObjsToSdrGrafObjs( pModel ); pView->Paste(*pModel, aPos, NULL, 0, OUString(), OUString()); - sal_uLong nCnt = pView->GetMarkedObjectList().GetMarkCount(); + const size_t nCnt = pView->GetMarkedObjectList().GetMarkCount(); if( nCnt ) { const Point aNull( 0, 0 ); - for( sal_uLong i=0; i < nCnt; ++i ) + for( size_t i=0; i < nCnt; ++i ) { SdrObject *pObj = pView->GetMarkedObjectList().GetMark(i)->GetMarkedSdrObj(); pObj->ImpSetAnchorPos( aNull ); diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index ce7b32d42581..a542f43f9d67 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1719,7 +1719,7 @@ ObjCntType SwFEShell::GetObjCntTypeOfSelection( SdrObject** ppObj ) const if( Imp()->HasDrawView() ) { const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for( sal_uInt32 i = 0, nE = rMrkList.GetMarkCount(); i < nE; ++i ) + for( size_t i = 0, nE = rMrkList.GetMarkCount(); i < nE; ++i ) { SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if( !pObj ) diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 6bbb858baa75..402a0e8ce3e0 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -212,7 +212,7 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) { // It sucks if Drawing objects were selected and now // additionally a fly is selected. - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pTmpObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); bool bForget = pTmpObj->ISA(SwVirtFlyDrawObj); @@ -227,7 +227,7 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) // If the fly frame is a textbox of a shape, then select the shape instead. std::map<SwFrmFmt*, SwFrmFmt*> aTextBoxShapes = SwTextBoxHelper::findShapes(mpDoc); - for (sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i) + for (size_t i = 0; i < rMrkList.GetMarkCount(); ++i) { SdrObject* pObject = rMrkList.GetMark(i)->GetMarkedSdrObj(); SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(GetUserCall(pObject)); @@ -725,7 +725,7 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst ) // 2. The content of the frame itself has to be notified // 3. Frames displaced by the frame have to be notified // 4. Also Drawing objects can displace frames - for( sal_uInt16 j = 0; j < pLst->GetMarkCount(); ++j ) + for( size_t j = 0; j < pLst->GetMarkCount(); ++j ) { SwPageFrm *pPage; bool bCheckNeighbours = false; @@ -844,7 +844,7 @@ short SwFEShell::GetLayerId() const if ( Imp()->HasDrawView() ) { const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if( !pObj ) @@ -874,7 +874,7 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId ) const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); const IDocumentDrawModelAccess* pIDDMA = getIDocumentDrawModelAccess(); // correct type of <nControls> - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if( !pObj ) @@ -997,7 +997,7 @@ void SwFEShell::EndTextEdit() DelSelectedObj(); if ( aSave.GetMarkCount() ) { - for ( sal_uInt16 i = 0; i < aSave.GetMarkCount(); ++i ) + for ( size_t i = 0; i < aSave.GetMarkCount(); ++i ) pView->MarkObj( aSave.GetMark( i )->GetMarkedSdrObj(), Imp()->GetPageView() ); } @@ -1898,7 +1898,7 @@ bool SwFEShell::EndMark() SwFlyFrm* pOldSelFly = ::GetFlyFromMarked( &rMrkList, this ); if ( rMrkList.GetMarkCount() > 1 ) - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if( pObj->ISA(SwVirtFlyDrawObj) ) @@ -1948,7 +1948,7 @@ short SwFEShell::GetAnchorId() const if ( Imp()->HasDrawView() ) { const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if ( pObj->ISA(SwVirtFlyDrawObj) ) @@ -2056,7 +2056,7 @@ bool SwFEShell::IsGroupSelected() if ( IsObjSelected() ) { const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); // consider 'virtual' drawing objects. @@ -2087,7 +2087,7 @@ bool SwFEShell::IsGroupAllowed() const const SdrObject* pUpGroup = 0L; const SwFrm* pHeaderFooterFrm = 0L; const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( sal_uInt16 i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i ) { const SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if ( i ) @@ -2274,7 +2274,7 @@ sal_uInt8 SwFEShell::IsSelObjProtected( sal_uInt16 eType ) const if( Imp()->HasDrawView() ) { const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for( sal_uLong i = rMrkList.GetMarkCount(); i; ) + for( size_t i = rMrkList.GetMarkCount(); i; ) { SdrObject *pObj = rMrkList.GetMark( --i )->GetMarkedSdrObj(); if( !bParent ) @@ -2336,7 +2336,7 @@ bool SwFEShell::GetObjAttr( SfxItemSet &rSet ) const return false; const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj); @@ -2366,7 +2366,7 @@ bool SwFEShell::SetObjAttr( const SfxItemSet& rSet ) StartUndo( UNDO_INSATTR ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj); @@ -2405,7 +2405,7 @@ void SwFEShell::CheckUnboundObjects() SET_CURR_SHELL( this ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if ( !GetUserCall(pObj) ) diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 4bc36f4ea934..45547311a881 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -429,7 +429,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rTxt, cons // local list to perform the corresponding action for each object std::vector<SdrObject*> aDrawObjs; { - for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject* pDrawObj = rMrkList.GetMark(i)->GetMarkedSdrObj(); if( pDrawObj ) diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx index ede0e46043f6..570c4606a860 100644 --- a/sw/source/core/undo/undraw.cxx +++ b/sw/source/core/undo/undraw.cxx @@ -506,7 +506,7 @@ SwUndoDrawDelete::~SwUndoDrawDelete() if( bDelFmt ) { SwUndoGroupObjImpl* pTmp = pObjArr; - for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n, ++pTmp ) + for( size_t n = 0; n < pMarkLst->GetMarkCount(); ++n, ++pTmp ) delete pTmp->pFmt; } delete [] pObjArr; @@ -517,7 +517,7 @@ void SwUndoDrawDelete::UndoImpl(::sw::UndoRedoContext & rContext) { bDelFmt = false; SwFrmFmts & rFlyFmts = *rContext.GetDoc().GetSpzFrmFmts(); - for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n ) + for( size_t n = 0; n < pMarkLst->GetMarkCount(); ++n ) { SwUndoGroupObjImpl& rSave = *( pObjArr + n ); ::lcl_RestoreAnchor( rSave.pFmt, rSave.nNodeIdx ); @@ -542,7 +542,7 @@ void SwUndoDrawDelete::RedoImpl(::sw::UndoRedoContext & rContext) { bDelFmt = true; SwFrmFmts & rFlyFmts = *rContext.GetDoc().GetSpzFrmFmts(); - for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n ) + for( size_t n = 0; n < pMarkLst->GetMarkCount(); ++n ) { SwUndoGroupObjImpl& rSave = *( pObjArr + n ); SdrObject *pObj = rSave.pObj; diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index df20923ea4ad..d05805814c51 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -763,7 +763,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference< if ( rMarkList.GetMarkCount() > 1 ) { bool bFlyInCnt = false; - for ( sal_uLong i = 0; !bFlyInCnt && i < rMarkList.GetMarkCount(); ++i ) + for ( size_t i = 0; !bFlyInCnt && i < rMarkList.GetMarkCount(); ++i ) { const SdrObject *pObj = rMarkList.GetMark( i )->GetMarkedSdrObj(); if (FLY_AS_CHAR == ::FindFrmFmt(const_cast<SdrObject*>( diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 2aefdedb63c6..8fdac9743acb 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -520,7 +520,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) if(1L == pSdrView->GetMarkedObjectCount()) { // #i68101# - SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0L); + SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0); OSL_ENSURE(pSelected, "DrawViewShell::FuTemp03: nMarkCount, but no object (!)"); OUString aName(pSelected->GetName()); @@ -549,7 +549,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) if(1L == pSdrView->GetMarkedObjectCount()) { - SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0L); + SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0); OSL_ENSURE(pSelected, "DrawViewShell::FuTemp03: nMarkCount, but no object (!)"); OUString aTitle(pSelected->GetTitle()); OUString aDescription(pSelected->GetDescription()); diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index 5c895ae64028..f5eb9aa1895d 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -659,11 +659,11 @@ bool SwView::AreOnlyFormsSelected() const SdrView* pSdrView = GetWrtShell().GetDrawView(); const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); - sal_uInt32 nCount = rMarkList.GetMarkCount(); + const size_t nCount = rMarkList.GetMarkCount(); if (nCount) { - for (sal_uInt32 i = 0; i < nCount; i++) + for (size_t i = 0; i < nCount; ++i) { // Except controls, are still normal draw objects selected? SdrObject *pSdrObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 05fd21692b3d..1f15014dfc9b 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -407,7 +407,7 @@ uno::Any SwXTextView::getSelection() comphelper::getProcessComponentContext()); const SdrMarkList& rMarkList = rSh.GetDrawView()->GetMarkedObjectList(); - for(sal_uLong i = 0; i < rMarkList.GetMarkCount(); ++i) + for(size_t i = 0; i < rMarkList.GetMarkCount(); ++i) { SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); uno::Reference< uno::XInterface > xInt = pSvxDrawPage->GetInterface( pObj ); |