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 | |
parent | df159d3cd0bce255e14839a81d921e73771ca886 (diff) |
Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/sdpage.hxx | 10 | ||||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 4 | ||||
-rw-r--r-- | sd/source/core/drawdoc2.cxx | 4 | ||||
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 8 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 4 | ||||
-rw-r--r-- | sd/source/core/sdpage.cxx | 21 | ||||
-rw-r--r-- | sd/source/core/sdpage2.cxx | 8 | ||||
-rw-r--r-- | sd/source/filter/html/htmlex.cxx | 6 | ||||
-rw-r--r-- | sd/source/filter/xml/sdtransform.cxx | 4 | ||||
-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 |
21 files changed, 61 insertions, 65 deletions
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index c3f1a38a12e2..391b0ef800d5 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -197,15 +197,15 @@ public: void CreateTitleAndLayout(bool bInit=false, bool bCreate=false); SdrObject* InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, Rectangle aRect, bool bInit ); - virtual void NbcInsertObject(SdrObject* pObj, sal_uLong nPos=CONTAINER_APPEND, + virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE, const SdrInsertReason* pReason=NULL) SAL_OVERRIDE; - virtual SdrObject* NbcRemoveObject(sal_uLong nObjNum) SAL_OVERRIDE; - virtual SdrObject* RemoveObject(sal_uLong nObjNum) SAL_OVERRIDE; + virtual SdrObject* NbcRemoveObject(size_t nObjNum) SAL_OVERRIDE; + virtual SdrObject* RemoveObject(size_t nObjNum) SAL_OVERRIDE; /** Also overload ReplaceObject methods to realize when objects are removed with this mechanism instead of RemoveObject*/ - virtual SdrObject* NbcReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum) SAL_OVERRIDE; - virtual SdrObject* ReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum) SAL_OVERRIDE; + virtual SdrObject* NbcReplaceObject(SdrObject* pNewObj, size_t nObjNum) SAL_OVERRIDE; + virtual SdrObject* ReplaceObject(SdrObject* pNewObj, size_t nObjNum) SAL_OVERRIDE; void SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eObjKind, const OUString& rStr ); diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 20c770edec8d..288ac794c87d 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -167,8 +167,8 @@ void SdFiltersTest::testSmoketest() const SdrPage *pPage = pDoc->GetPage (1); CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL ); - sal_uIntPtr nObjs = pPage->GetObjCount(); - for (sal_uIntPtr i = 0; i < nObjs; i++) + const size_t nObjs = pPage->GetObjCount(); + for (size_t i = 0; i < nObjs; i++) { SdrObject *pObj = pPage->GetObj(i); SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier(); diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 7190291f9713..3bff50df9716 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -223,9 +223,9 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos) // number if (pPage && pPage->GetPageKind() == PK_NOTES) { - sal_uLong nObjCount = pPage->GetObjCount(); + const size_t nObjCount = pPage->GetObjCount(); SdrObject* pObj = NULL; - for (sal_uLong nObj = 0; nObj < nObjCount; nObj++) + for (size_t nObj = 0; nObj < nObjCount; ++nObj) { pObj = pPage->GetObj(nObj); if (pObj->GetObjIdentifier() == OBJ_PAGE && diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 72fab2ccb2e9..e5533b874c80 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -926,7 +926,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( for(sal_uInt32 p = nInsertPos; p < (nInsertPos + nBMSdPageCount); p++) { SdPage *pPg = (SdPage *) GetPage(p); - for(sal_uIntPtr i = 0; i < pPg->GetObjCount(); i++) + for(size_t i = 0; i < pPg->GetObjCount(); ++i) { if(pPg->GetObj(i)->GetStyleSheet()) { @@ -1082,7 +1082,7 @@ bool SdDrawDocument::InsertBookmarkAsObject( aObjPos = Rectangle(Point(), pPage->GetSize()).Center(); } - sal_uLong nCountBefore = 0; + size_t nCountBefore = 0; if (!rExchangeList.empty() || bCalcObjCount) { @@ -1108,10 +1108,10 @@ bool SdDrawDocument::InsertBookmarkAsObject( if (!rExchangeList.empty()) { // Get number of objects after inserting. - sal_uLong nCount = pPage->GetObjCount(); + const size_t nCount = pPage->GetObjCount(); std::vector<OUString>::const_iterator pIter = rExchangeList.begin(); - for (sal_uLong nObj = nCountBefore; nObj < nCount; nObj++) + for (size_t nObj = nCountBefore; nObj < nCount; ++nObj) { // Get the name to use from the Exchange list if (pIter != rExchangeList.end()) diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index fbaf8919422d..4f9b5f494e47 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -1124,7 +1124,7 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& rOldLayoutName, const { pPage->SetLayoutName(aPageLayoutName); - for (sal_uLong nObj = 0; nObj < pPage->GetObjCount(); nObj++) + for (size_t nObj = 0; nObj < pPage->GetObjCount(); ++nObj) { SdrObject* pObj = pPage->GetObj(nObj); @@ -1167,7 +1167,7 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& rOldLayoutName, const pPage->SetLayoutName(aPageLayoutName); pPage->SetName(rNewName); - for (sal_uLong nObj = 0; nObj < pPage->GetObjCount(); nObj++) + for (size_t nObj = 0; nObj < pPage->GetObjCount(); ++nObj) { SdrObject* pObj = pPage->GetObj(nObj); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 9e368eb80cd8..4a631d9648ae 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1435,11 +1435,10 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto SdrObject* pObj = 0; bool bFound = false; - const int nShapeCount = rPage.GetObjCount(); - int nShapeIndex = 0; - while((nShapeIndex < nShapeCount) && !bFound ) + const size_t nShapeCount = rPage.GetObjCount(); + for(size_t nShapeIndex = 0; nShapeIndex < nShapeCount && !bFound; ++nShapeIndex ) { - pObj = rPage.GetObj(nShapeIndex++); + pObj = rPage.GetObj(nShapeIndex); if( pObj->IsEmptyPresObj() ) continue; @@ -1626,7 +1625,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, bool bInit, bool bCreate ) |* \************************************************************************/ -void SdPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason) +void SdPage::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason) { FmFormPage::NbcInsertObject(pObj, nPos, pReason); @@ -1651,7 +1650,7 @@ void SdPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertRea |* \************************************************************************/ -SdrObject* SdPage::RemoveObject(sal_uLong nObjNum) +SdrObject* SdPage::RemoveObject(size_t nObjNum) { onRemoveObject(GetObj( nObjNum )); return FmFormPage::RemoveObject(nObjNum); @@ -1663,7 +1662,7 @@ SdrObject* SdPage::RemoveObject(sal_uLong nObjNum) |* \************************************************************************/ -SdrObject* SdPage::NbcRemoveObject(sal_uLong nObjNum) +SdrObject* SdPage::NbcRemoveObject(size_t nObjNum) { onRemoveObject(GetObj( nObjNum )); return FmFormPage::NbcRemoveObject(nObjNum); @@ -1671,7 +1670,7 @@ SdrObject* SdPage::NbcRemoveObject(sal_uLong nObjNum) // Also overload ReplaceObject methods to realize when // objects are removed with this mechanism instead of RemoveObject -SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum) +SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, size_t nObjNum) { onRemoveObject(GetObj( nObjNum )); return FmFormPage::NbcReplaceObject(pNewObj, nObjNum); @@ -1679,7 +1678,7 @@ SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum) // Also overload ReplaceObject methods to realize when // objects are removed with this mechanism instead of RemoveObject -SdrObject* SdPage::ReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum) +SdrObject* SdPage::ReplaceObject(SdrObject* pNewObj, size_t nObjNum) { onRemoveObject(GetObj( nObjNum )); return FmFormPage::ReplaceObject(pNewObj, nObjNum); @@ -1847,9 +1846,9 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR Fraction aFractX = Fraction(aNewPageSize.Width(), nOldWidth); Fraction aFractY = Fraction(aNewPageSize.Height(), nOldHeight); - sal_uLong nObjCnt = (mbScaleObjects ? GetObjCount() : 0); + const size_t nObjCnt = (mbScaleObjects ? GetObjCount() : 0); - for (sal_uLong nObj = 0; nObj < nObjCnt; nObj++) + for (size_t nObj = 0; nObj < nObjCnt; ++nObj) { bool bIsPresObjOnMaster = false; diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index 933796038ae1..d49893a9dbce 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -143,9 +143,9 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName, boost::ptr_vector<StyleReplaceData> aReplList; bool bListsFilled = false; - sal_uLong nObjCount = GetObjCount(); + const size_t nObjCount = GetObjCount(); - for (sal_uLong nObj = 0; nObj < nObjCount; nObj++) + for (size_t nObj = 0; nObj < nObjCount; ++nObj) { SdrTextObj* pObj = (SdrTextObj*) GetObj(nObj); @@ -565,8 +565,8 @@ OString SdPage::stringify() const append((sal_Int32)meOrientation).append((sal_Int32)mnTransitionType).append((sal_Int32)mnTransitionSubtype).append(mbTransitionDirection). append(mnTransitionFadeColor).append(mfTransitionDuration);//.append(mbIsPrecious); - sal_Int32 n = GetObjCount(); - for(sal_Int32 i = 0; i < n; i++) + const size_t n = GetObjCount(); + for(size_t i = 0; i < n; ++i) aString.append(GetObj(i)->stringify()); return aString.makeStringAndClear(); } diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 50245c48e7db..d4df5db2c469 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -1036,11 +1036,11 @@ bool HtmlExport::CreateImagesForPresPages( bool bThumbnail) // get SdrTextObject with layout text of this page SdrTextObj* HtmlExport::GetLayoutTextObject(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 && @@ -1213,7 +1213,7 @@ OUString HtmlExport::CreateTextForPage(SdrOutliner* pOutliner, SdPage* pPage, { OUStringBuffer aStr; - for (sal_uInt32 i = 0; i <pPage->GetObjCount(); i++ ) + for (size_t i = 0; i <pPage->GetObjCount(); ++i ) { SdrObject* pObject = pPage->GetObj(i); PresObjKind eKind = pPage->GetPresObjKind(pObject); diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx index 136655762df8..cb9e1854d8ac 100644 --- a/sd/source/filter/xml/sdtransform.cxx +++ b/sd/source/filter/xml/sdtransform.cxx @@ -154,8 +154,8 @@ void SdTransformOOo2xDocument::transformStyle( SfxStyleSheetBase& rSheet ) void SdTransformOOo2xDocument::transformShapes( SdrObjList& rShapes ) { - sal_uInt32 nShapeCount = rShapes.GetObjCount(); - for( sal_uInt32 nShape = 0; nShape < nShapeCount; nShape++ ) + const size_t nShapeCount = rShapes.GetObjCount(); + for( size_t nShape = 0; nShape < nShapeCount; ++nShape ) { SdrObject* pObj = rShapes.GetObj( nShape ); if( pObj ) 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); } } |