diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-16 12:59:11 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-16 21:52:32 +0200 |
commit | 47e2fd0dc8d88af120508e463decf5b15563a629 (patch) | |
tree | 55ca49e099c6401643772db012fae6e3ec15c501 /sd/source/ui | |
parent | df159d3cd0bce255e14839a81d921e73771ca886 (diff) |
Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/app/sdxfer.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/animobjs.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgassim.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/masterlayoutdlg.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel3.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuconarc.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuconbez.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fumorph.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/outlview.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/sdview2.cxx | 5 |
12 files changed, 27 insertions, 30 deletions
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 1e5c8872b76c..a3fe2f13de47 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -325,7 +325,7 @@ void SdTransferable::CreateData() Point aOrigin( ( maVisArea = mpSdViewIntern->GetAllMarkedBoundRect() ).TopLeft() ); Size aVector( -aOrigin.X(), -aOrigin.Y() ); - for( sal_uLong nObj = 0, nObjCount = pPage->GetObjCount(); nObj < nObjCount; nObj++ ) + for( size_t nObj = 0, nObjCount = pPage->GetObjCount(); nObj < nObjCount; ++nObj ) { SdrObject* pObj = pPage->GetObj( nObj ); pObj->NbcMove( aVector ); diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index a1049582d5f1..0fa83e45f29c 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -799,7 +799,7 @@ void AnimationWindow::AddObj (::sd::View& rView ) const SdrMarkList& rMarkList = rView.GetMarkedObjectList(); const size_t nMarkCount = rMarkList.GetMarkCount(); SdPage* pPage = pMyDoc->GetSdPage(0, PK_STANDARD); - sal_uLong nCloneCount = pPage->GetObjCount(); + const size_t nCloneCount = pPage->GetObjCount(); if (nMarkCount > 0) { @@ -866,7 +866,7 @@ void AnimationWindow::AddObj (::sd::View& rView ) // several objects SdrObjList* pObjList = ((SdrObjGroup*)pObject)->GetSubList(); - for( sal_uLong nObject = 0; nObject < pObjList->GetObjCount(); nObject++ ) + for( size_t nObject = 0; nObject < pObjList->GetObjCount(); ++nObject ) { SdrObject* pSnapShot = (SdrObject*) pObjList->GetObj( nObject ); @@ -944,7 +944,7 @@ void AnimationWindow::AddObj (::sd::View& rView ) SdrObjList* pObjList = pCloneGroup->GetSubList(); for (size_t nObject= 0; nObject < nMarkCount; ++nObject) - pObjList->InsertObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj()->Clone(), CONTAINER_APPEND); + pObjList->InsertObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj()->Clone()); pPage->InsertObject(pCloneGroup, m_nCurrentFrame + 1); } @@ -1163,14 +1163,14 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView ) SdrObjGroup* pGroup = new SdrObjGroup; SdrObjList* pObjList = pGroup->GetSubList(); - for (size_t i = 0; i < nCount; i++) + for (size_t i = 0; i < nCount; ++i) { // the clone remains in the animatior; we insert a clone of the // clone into the group pClone = pPage->GetObj(i); SdrObject* pCloneOfClone = pClone->Clone(); //SdrObject* pCloneOfClone = pPage->GetObj(i)->Clone(); - pObjList->InsertObject(pCloneOfClone, CONTAINER_APPEND); + pObjList->InsertObject(pCloneOfClone); } // until now the top left corner of the group is in the window center; diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx index 9ffff9b0d929..1c11c3d3f23c 100644 --- a/sd/source/ui/dlg/dlgassim.cxx +++ b/sd/source/ui/dlg/dlgassim.cxx @@ -127,8 +127,8 @@ void SdPageListControl::Fill( SdDrawDocument* pDoc ) if(!pTO) { // determines the SdrTextObject with the layout text of this page - const sal_uLong nObjectCount = pPage->GetObjCount(); - for (sal_uLong nObject = 0; nObject < nObjectCount; nObject++) + const size_t nObjectCount = pPage->GetObjCount(); + for (size_t nObject = 0; nObject < nObjectCount; ++nObject) { SdrObject* pObject = pPage->GetObj(nObject); if (pObject->GetObjInventor() == SdrInventor && pObject->GetObjIdentifier() == OBJ_OUTLINETEXT) diff --git a/sd/source/ui/dlg/masterlayoutdlg.cxx b/sd/source/ui/dlg/masterlayoutdlg.cxx index 21aa64b9894f..eb4e4fddef5a 100644 --- a/sd/source/ui/dlg/masterlayoutdlg.cxx +++ b/sd/source/ui/dlg/masterlayoutdlg.cxx @@ -136,8 +136,7 @@ void MasterLayoutDialog::remove( PresObjKind eKind ) if( bUndo ) mpDoc->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoDeleteObject(*pObject)); SdrObjList* pOL =pObject->GetObjList(); - sal_uInt32 nOrdNum=pObject->GetOrdNumDirect(); - pOL->RemoveObject(nOrdNum); + pOL->RemoveObject(pObject->GetOrdNumDirect()); if( !bUndo ) SdrObject::Free(pObject); diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index a80746e17cf0..07f91ef4ad8b 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -116,8 +116,8 @@ static void lcl_setLanguage( const SdDrawDocument *pDoc, const OUString &rLangua for( sal_uInt16 nPage = 0; nPage < nPageCount; nPage++ ) { const SdrPage *pPage = pDoc->GetPage( nPage ); - sal_uIntPtr nObjCount = pPage->GetObjCount(); - for( sal_uInt16 nObj = 0; nObj < nObjCount; nObj++ ) + const size_t nObjCount = pPage->GetObjCount(); + for( size_t nObj = 0; nObj < nObjCount; ++nObj ) { SdrObject *pObj = pPage->GetObj( nObj ); lcl_setLanguageForObj( pObj, nLang, bLanguageNone ); diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx index 461eee36dec9..7f57ddf53224 100644 --- a/sd/source/ui/func/fuconarc.cxx +++ b/sd/source/ui/func/fuconarc.cxx @@ -140,7 +140,7 @@ bool FuConstructArc::MouseButtonUp( const MouseEvent& rMEvt ) if ( mpView->IsCreateObj() && rMEvt.IsLeft() ) { - sal_uLong nCount = mpView->GetSdrPageView()->GetObjList()->GetObjCount(); + const size_t nCount = mpView->GetSdrPageView()->GetObjList()->GetObjCount(); if (mpView->EndCreateObj(SDRCREATE_NEXTPOINT) ) { diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index 541b38ad5a9a..ad605555c805 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -146,7 +146,7 @@ bool FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt ) SdrViewEvent aVEvt; mpView->PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt); - sal_uLong nCount = mpView->GetSdrPageView()->GetObjList()->GetObjCount(); + const size_t nCount = mpView->GetSdrPageView()->GetObjList()->GetObjCount(); if (mpView->IsInsObjPoint()) { @@ -161,7 +161,7 @@ bool FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt ) { bReturn = true; - if (nCount == (mpView->GetSdrPageView()->GetObjList()->GetObjCount() - 1)) + if (nCount+1 == mpView->GetSdrPageView()->GetObjList()->GetObjCount()) { bCreated = true; } diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index 272a95d8b1da..c113f38bb7ed 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -430,13 +430,13 @@ void FuMorph::ImpInsertPolygons( pNewObj->SetMergedItemSetAndBroadcast(aSet); - pObjList->InsertObject( pNewObj, CONTAINER_APPEND ); + pObjList->InsertObject( pNewObj ); } if ( nCount ) { pObjList->InsertObject( pObj1->Clone(), 0 ); - pObjList->InsertObject( pObj2->Clone(), CONTAINER_APPEND ); + pObjList->InsertObject( pObj2->Clone() ); mpView->DeleteMarked(); mpView->InsertObjectAtView( pObjGroup, *pPageView, SDRINSERT_SETDEFLAYER ); } diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 821d0497a6b8..3c99d4d29979 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -2580,7 +2580,7 @@ void SdGenericDrawPage::setNavigationOrder( const Any& rValue ) return; } - else if( xIA->getCount() == static_cast< sal_Int32 >( GetPage()->GetObjCount() ) ) + else if( static_cast<size_t>(xIA->getCount()) == GetPage()->GetObjCount() ) { GetPage()->SetNavigationOrder(xIA); return; @@ -2607,13 +2607,12 @@ private: }; SdNavigationOrderAccess::SdNavigationOrderAccess( SdrPage* pPage ) -: maShapes( static_cast< sal_uInt32 >( pPage ? pPage->GetObjCount() : 0 ) ) +: maShapes( pPage ? pPage->GetObjCount() : 0 ) { if( pPage ) { - sal_uInt32 nIndex; - const sal_uInt32 nCount = static_cast< sal_uInt32 >( pPage->GetObjCount() ); - for( nIndex = 0; nIndex < nCount; ++nIndex ) + const size_t nCount = pPage->GetObjCount(); + for( size_t nIndex = 0; nIndex < nCount; ++nIndex ) { SdrObject* pObj = pPage->GetObj( nIndex ); sal_uInt32 nNavPos = pObj->GetNavigationPosition(); diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index def627d9988f..ba5445d600eb 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1628,7 +1628,7 @@ private: continue; SdrTextObj* pTextObj = NULL; - sal_uInt32 nObj (0); + size_t nObj (0); while (pTextObj==NULL && nObj < pPage->GetObjCount()) { diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index a76bb0b57a03..f873ad4e5a8b 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -945,11 +945,11 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner ) */ SdrTextObj* OutlineView::GetTitleTextObject(SdrPage* pPage) { - sal_uLong nObjectCount = pPage->GetObjCount(); + const size_t nObjectCount = pPage->GetObjCount(); SdrObject* pObject = NULL; SdrTextObj* pResult = NULL; - for (sal_uLong nObject = 0; nObject < nObjectCount; nObject++) + for (size_t nObject = 0; nObject < nObjectCount; ++nObject) { pObject = pPage->GetObj(nObject); if (pObject->GetObjInventor() == SdrInventor && @@ -967,11 +967,11 @@ SdrTextObj* OutlineView::GetTitleTextObject(SdrPage* pPage) */ SdrTextObj* OutlineView::GetOutlineTextObject(SdrPage* pPage) { - sal_uLong nObjectCount = pPage->GetObjCount(); + const size_t nObjectCount = pPage->GetObjCount(); SdrObject* pObject = NULL; SdrTextObj* pResult = NULL; - for (sal_uLong nObject = 0; nObject < nObjectCount; nObject++) + for (size_t nObject = 0; nObject < nObjectCount; ++nObject) { pObject = pPage->GetObj(nObject); if (pObject->GetObjInventor() == SdrInventor && diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index c60f9e728599..9d754052d58a 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -424,7 +424,7 @@ void View::DragFinished( sal_Int8 nDropAction ) if( pObj && pObj->GetPage() ) { - sal_uInt32 nOrdNum=pObj->GetOrdNumDirect(); + const size_t nOrdNum = pObj->GetOrdNumDirect(); #ifdef DBG_UTIL SdrObject* pChkObj = #endif @@ -939,8 +939,7 @@ void ImplProcessObjectList(SdrObject* pObj, SdrObjectVector& rVector ) if(bIsGroup) { SdrObjList* pObjList = pObj->GetSubList(); - sal_uInt32 a; - for( a = 0; a < pObjList->GetObjCount(); a++) + for( size_t a = 0; a < pObjList->GetObjCount(); ++a) ImplProcessObjectList(pObjList->GetObj(a), rVector); } } |