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 /svx/source/engine3d | |
parent | df159d3cd0bce255e14839a81d921e73771ca886 (diff) |
Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
Diffstat (limited to 'svx/source/engine3d')
-rw-r--r-- | svx/source/engine3d/obj3d.cxx | 24 | ||||
-rw-r--r-- | svx/source/engine3d/scene3d.cxx | 12 | ||||
-rw-r--r-- | svx/source/engine3d/view3d.cxx | 10 | ||||
-rw-r--r-- | svx/source/engine3d/view3d1.cxx | 2 |
4 files changed, 24 insertions, 24 deletions
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 973d307b2aed..ff32a413f550 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -99,7 +99,7 @@ E3dObjList::~E3dObjList() { } -void E3dObjList::NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrInsertReason* pReason) +void E3dObjList::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason) { // Get owner DBG_ASSERT(GetOwnerObj()->ISA(E3dObject), "Insert 3D object in parent != 3DObject"); @@ -118,7 +118,7 @@ void E3dObjList::NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrIns } } -void E3dObjList::InsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrInsertReason* pReason) +void E3dObjList::InsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason) { OSL_ENSURE(GetOwnerObj()->ISA(E3dObject), "Insert 3D object in non-3D Parent"); @@ -132,7 +132,7 @@ void E3dObjList::InsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrInsert } } -SdrObject* E3dObjList::NbcRemoveObject(sal_uIntPtr nObjNum) +SdrObject* E3dObjList::NbcRemoveObject(size_t nObjNum) { DBG_ASSERT(GetOwnerObj()->ISA(E3dObject), "Remove 3D object from Parent != 3DObject"); @@ -148,7 +148,7 @@ SdrObject* E3dObjList::NbcRemoveObject(sal_uIntPtr nObjNum) return pRetval; } -SdrObject* E3dObjList::RemoveObject(sal_uIntPtr nObjNum) +SdrObject* E3dObjList::RemoveObject(size_t nObjNum) { OSL_ENSURE(GetOwnerObj()->ISA(E3dObject), "3D object is removed from non-3D Parent"); @@ -200,7 +200,7 @@ void E3dObject::SetSelected(bool bNew) mbIsSelected = bNew; } - for(sal_uInt32 a(0); a < maSubList.GetObjCount(); a++) + for(size_t a = 0; a < maSubList.GetObjCount(); ++a) { E3dObject* pCandidate = dynamic_cast< E3dObject* >(maSubList.GetObj(a)); @@ -230,7 +230,7 @@ void E3dObject::SetRectsDirty(bool bNotMyself) // call parent SdrAttrObj::SetRectsDirty(bNotMyself); - for(sal_uInt32 a(0); a < maSubList.GetObjCount(); a++) + for(size_t a = 0; a < maSubList.GetObjCount(); ++a) { E3dObject* pCandidate = dynamic_cast< E3dObject* >(maSubList.GetObj(a)); @@ -289,7 +289,7 @@ void E3dObject::NbcSetLayer(SdrLayerID nLayer) { SdrAttrObj::NbcSetLayer(nLayer); - for(sal_uInt32 a(0); a < maSubList.GetObjCount(); a++) + for(size_t a = 0; a < maSubList.GetObjCount(); ++a) { E3dObject* pCandidate = dynamic_cast< E3dObject* >(maSubList.GetObj(a)); @@ -432,7 +432,7 @@ void E3dObject::RecalcSnapRect() { maSnapRect = Rectangle(); - for(sal_uInt32 a(0); a < maSubList.GetObjCount(); a++) + for(size_t a = 0; a < maSubList.GetObjCount(); ++a) { E3dObject* pCandidate = dynamic_cast< E3dObject* >(maSubList.GetObj(a)); @@ -515,11 +515,11 @@ E3dScene* E3dObject::GetScene() const basegfx::B3DRange E3dObject::RecalcBoundVolume() const { basegfx::B3DRange aRetval; - const sal_uInt32 nObjCnt(maSubList.GetObjCount()); + const size_t nObjCnt(maSubList.GetObjCount()); if(nObjCnt) { - for(sal_uInt32 a(0); a < nObjCnt; a++) + for(size_t a = 0; a < nObjCnt; ++a) { const E3dObject* p3DObject = dynamic_cast< const E3dObject* >(maSubList.GetObj(a)); @@ -578,7 +578,7 @@ void E3dObject::SetBoundVolInvalid() { InvalidateBoundVolume(); - for(sal_uInt32 a(0); a < maSubList.GetObjCount(); a++) + for(size_t a = 0; a < maSubList.GetObjCount(); ++a) { E3dObject* pCandidate = dynamic_cast< E3dObject* >(maSubList.GetObj(a)); @@ -596,7 +596,7 @@ void E3dObject::SetTransformChanged() InvalidateBoundVolume(); mbTfHasChanged = true; - for(sal_uInt32 a(0); a < maSubList.GetObjCount(); a++) + for(size_t a = 0; a < maSubList.GetObjCount(); ++a) { E3dObject* pCandidate = dynamic_cast< E3dObject* >(maSubList.GetObj(a)); diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 40e606a2738c..3978fadaacc9 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -126,9 +126,9 @@ Imp3DDepthRemapper::Imp3DDepthRemapper(E3dScene& rScene) { // only called when rScene.GetSubList() and nObjCount > 1L SdrObjList* pList = rScene.GetSubList(); - const sal_uInt32 nObjCount(pList->GetObjCount()); + const size_t nObjCount(pList->GetObjCount()); - for(sal_uInt32 a(0L); a < nObjCount; a++) + for(size_t a = 0; a < nObjCount; ++a) { SdrObject* pCandidate = pList->GetObj(a); @@ -269,9 +269,9 @@ sal_uInt32 E3dScene::RemapOrdNum(sal_uInt32 nNewOrdNum) const { if(!mp3DDepthRemapper) { - const sal_uInt32 nObjCount(GetSubList() ? GetSubList()->GetObjCount() : 0L); + const size_t nObjCount(GetSubList() ? GetSubList()->GetObjCount() : 0); - if(nObjCount > 1L) + if(nObjCount > 1) { ((E3dScene*)this)->mp3DDepthRemapper = new Imp3DDepthRemapper((E3dScene&)(*this)); } @@ -406,7 +406,7 @@ void E3dScene::removeAllNonSelectedObjects() { E3DModifySceneSnapRectUpdater aUpdater(this); - for(sal_uInt32 a(0); a < maSubList.GetObjCount(); a++) + for(size_t a = 0; a < maSubList.GetObjCount(); ++a) { SdrObject* pObj = maSubList.GetObj(a); @@ -422,7 +422,7 @@ void E3dScene::removeAllNonSelectedObjects() pScene->removeAllNonSelectedObjects(); // check object count. Empty scenes can be deleted - const sal_uInt32 nObjCount(pScene->GetSubList() ? pScene->GetSubList()->GetObjCount() : 0); + const size_t nObjCount(pScene->GetSubList() ? pScene->GetSubList()->GetObjCount() : 0); if(!nObjCount) { diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 9702cacfdd9c..960fac5c4716 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -411,9 +411,9 @@ SdrModel* E3dView::GetMarkedObjModel() const for(sal_uInt16 nPg(0); nPg < pNewModel->GetPageCount(); nPg++) { const SdrPage* pSrcPg=pNewModel->GetPage(nPg); - const sal_uInt32 nObAnz(pSrcPg->GetObjCount()); + const size_t nObAnz(pSrcPg->GetObjCount()); - for(sal_uInt32 nOb(0); nOb < nObAnz; nOb++) + for(size_t nOb = 0; nOb < nObAnz; ++nOb) { const SdrObject* pSrcOb=pSrcPg->GetObj(nOb); @@ -466,14 +466,14 @@ bool E3dView::Paste( for(sal_uInt16 nPg(0); nPg < rMod.GetPageCount(); nPg++) { const SdrPage* pSrcPg=rMod.GetPage(nPg); - sal_uInt32 nObAnz(pSrcPg->GetObjCount()); + const size_t nObAnz(pSrcPg->GetObjCount()); // calculate offset for paste Rectangle aR = pSrcPg->GetAllObjBoundRect(); Point aDist(aPos - aR.Center()); // Insert sub-objects for scenes - for(sal_uInt32 nOb(0); nOb < nObAnz; nOb++) + for(size_t nOb = 0; nOb < nObAnz; ++nOb) { const SdrObject* pSrcOb = pSrcPg->GetObj(nOb); if(pSrcOb->ISA(E3dScene)) @@ -506,7 +506,7 @@ bool E3dView::ImpCloneAll3DObjectsToDestScene(E3dScene* pSrcScene, E3dScene* pDs const sdr::contact::ViewContactOfE3dScene& rVCSceneSrc = static_cast< sdr::contact::ViewContactOfE3dScene& >(pSrcScene->GetViewContact()); const drawinglayer::geometry::ViewInformation3D aViewInfo3DSrc(rVCSceneSrc.getViewInformation3D()); - for(sal_uInt32 i(0); i < pSrcScene->GetSubList()->GetObjCount(); i++) + for(size_t i = 0; i < pSrcScene->GetSubList()->GetObjCount(); ++i) { E3dCompoundObject* pCompoundObj = dynamic_cast< E3dCompoundObject* >(pSrcScene->GetSubList()->GetObj(i)); diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx index 8f194a49d56e..9de4503887b9 100644 --- a/svx/source/engine3d/view3d1.cxx +++ b/svx/source/engine3d/view3d1.cxx @@ -91,7 +91,7 @@ void Imp_E3dView_InorderRun3DObjects(const SdrObject* pObj, sal_uInt32& rMask) else if(pObj->IsGroupObject()) { SdrObjList* pList = pObj->GetSubList(); - for(sal_uInt32 a(0); a < pList->GetObjCount(); a++) + for(size_t a = 0; a < pList->GetObjCount(); ++a) Imp_E3dView_InorderRun3DObjects(pList->GetObj(a), rMask); } } |