summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-08-16 12:59:11 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-08-16 21:52:32 +0200
commit47e2fd0dc8d88af120508e463decf5b15563a629 (patch)
tree55ca49e099c6401643772db012fae6e3ec15c501
parentdf159d3cd0bce255e14839a81d921e73771ca886 (diff)
Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
-rw-r--r--basctl/source/accessibility/accessibledialogwindow.cxx6
-rw-r--r--basctl/source/dlged/dlged.cxx4
-rw-r--r--basctl/source/dlged/dlgedobj.cxx6
-rw-r--r--basctl/source/dlged/dlgedpage.cxx2
-rw-r--r--basctl/source/inc/dlgedpage.hxx2
-rw-r--r--chart2/source/controller/drawinglayer/ViewElementListProvider.cxx2
-rw-r--r--chart2/source/view/main/DrawModelWrapper.cxx4
-rw-r--r--cui/source/tabpages/tpline.cxx6
-rw-r--r--include/svx/fmpage.hxx4
-rw-r--r--include/svx/obj3d.hxx8
-rw-r--r--include/svx/svdpage.hxx24
-rw-r--r--include/svx/unoshape.hxx2
-rw-r--r--reportdesign/inc/RptPage.hxx4
-rw-r--r--reportdesign/source/core/sdr/RptPage.cxx12
-rw-r--r--reportdesign/source/ui/report/FixedTextColor.cxx2
-rw-r--r--reportdesign/source/ui/report/FormattedFieldBeautifier.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx2
-rw-r--r--sc/qa/unit/filters-test.cxx2
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx6
-rw-r--r--sc/qa/unit/ucalc.cxx2
-rw-r--r--sc/source/core/data/drwlayer.cxx26
-rw-r--r--sc/source/core/tool/detfunc.cxx29
-rw-r--r--sc/source/filter/html/htmlexp2.cxx3
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx4
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx6
-rw-r--r--sc/source/ui/view/drawview.cxx10
-rw-r--r--sc/source/ui/view/viewfun5.cxx2
-rw-r--r--sd/inc/sdpage.hxx10
-rw-r--r--sd/qa/unit/import-tests.cxx4
-rw-r--r--sd/source/core/drawdoc2.cxx4
-rw-r--r--sd/source/core/drawdoc3.cxx8
-rw-r--r--sd/source/core/drawdoc4.cxx4
-rw-r--r--sd/source/core/sdpage.cxx21
-rw-r--r--sd/source/core/sdpage2.cxx8
-rw-r--r--sd/source/filter/html/htmlex.cxx6
-rw-r--r--sd/source/filter/xml/sdtransform.cxx4
-rw-r--r--sd/source/ui/app/sdxfer.cxx2
-rw-r--r--sd/source/ui/dlg/animobjs.cxx10
-rw-r--r--sd/source/ui/dlg/dlgassim.cxx4
-rw-r--r--sd/source/ui/dlg/masterlayoutdlg.cxx3
-rw-r--r--sd/source/ui/docshell/docshel3.cxx4
-rw-r--r--sd/source/ui/func/fuconarc.cxx2
-rw-r--r--sd/source/ui/func/fuconbez.cxx4
-rw-r--r--sd/source/ui/func/fumorph.cxx4
-rw-r--r--sd/source/ui/unoidl/unopage.cxx9
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
-rw-r--r--sd/source/ui/view/outlview.cxx8
-rw-r--r--sd/source/ui/view/sdview2.cxx5
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx4
-rw-r--r--svx/source/accessibility/GraphCtlAccessibleContext.cxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx15
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx2
-rw-r--r--svx/source/dialog/connctrl.cxx2
-rw-r--r--svx/source/dialog/contwnd.cxx2
-rw-r--r--svx/source/dialog/imapwnd.cxx14
-rw-r--r--svx/source/engine3d/obj3d.cxx24
-rw-r--r--svx/source/engine3d/scene3d.cxx12
-rw-r--r--svx/source/engine3d/view3d.cxx10
-rw-r--r--svx/source/engine3d/view3d1.cxx2
-rw-r--r--svx/source/form/fmpage.cxx4
-rw-r--r--svx/source/form/navigatortreemodel.cxx2
-rw-r--r--svx/source/sdr/properties/e3dproperties.cxx4
-rw-r--r--svx/source/sdr/properties/e3dsceneproperties.cxx22
-rw-r--r--svx/source/sdr/properties/groupproperties.cxx32
-rw-r--r--svx/source/sidebar/SelectionAnalyzer.cxx4
-rw-r--r--svx/source/svdraw/clonelist.cxx2
-rw-r--r--svx/source/svdraw/sdrhittesthelper.cxx2
-rw-r--r--svx/source/svdraw/svdedtv.cxx21
-rw-r--r--svx/source/svdraw/svdedtv2.cxx99
-rw-r--r--svx/source/svdraw/svdetc.cxx2
-rw-r--r--svx/source/svdraw/svdfmtf.cxx11
-rw-r--r--svx/source/svdraw/svdfmtf.hxx4
-rw-r--r--svx/source/svdraw/svditer.cxx2
-rw-r--r--svx/source/svdraw/svdmark.cxx6
-rw-r--r--svx/source/svdraw/svdmrkv.cxx28
-rw-r--r--svx/source/svdraw/svdobj.cxx6
-rw-r--r--svx/source/svdraw/svdoedge.cxx2
-rw-r--r--svx/source/svdraw/svdograf.cxx3
-rw-r--r--svx/source/svdraw/svdogrp.cxx92
-rw-r--r--svx/source/svdraw/svdpage.cxx94
-rw-r--r--svx/source/svdraw/svdpagv.cxx4
-rw-r--r--svx/source/svdraw/svdpntv.cxx4
-rw-r--r--svx/source/svdraw/svdundo.cxx8
-rw-r--r--svx/source/svdraw/svdxcgv.cxx12
-rw-r--r--svx/source/table/tablecontroller.cxx2
-rw-r--r--svx/source/unodraw/unopage.cxx8
-rw-r--r--svx/source/unodraw/unoshap2.cxx12
-rw-r--r--svx/source/unodraw/unoshap3.cxx6
-rw-r--r--svx/source/unodraw/unoshape.cxx6
-rw-r--r--sw/inc/dpage.hxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx6
-rw-r--r--sw/source/core/doc/docdraw.cxx4
-rw-r--r--sw/source/core/docnode/nodedump.cxx4
-rw-r--r--sw/source/core/draw/dcontact.cxx4
-rw-r--r--sw/source/core/draw/dpage.cxx2
-rw-r--r--sw/source/core/draw/dview.cxx24
-rw-r--r--sw/source/core/frmedt/feshview.cxx4
-rw-r--r--sw/source/core/layout/fly.cxx2
-rw-r--r--sw/source/core/layout/newfrm.cxx2
-rw-r--r--sw/source/core/view/vdraw.cxx4
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx8
-rw-r--r--sw/source/uibase/utlui/content.cxx28
105 files changed, 489 insertions, 516 deletions
diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx
index 280b8ed11d0c..7a21338da7ca 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -114,9 +114,9 @@ AccessibleDialogWindow::AccessibleDialogWindow (basctl::DialogWindow* pDialogWin
if ( m_pDialogWindow )
{
SdrPage& rPage = m_pDialogWindow->GetPage();
- sal_uLong nCount = rPage.GetObjCount();
+ const size_t nCount = rPage.GetObjCount();
- for ( sal_uLong i = 0; i < nCount; ++i )
+ for ( size_t i = 0; i < nCount; ++i )
{
if (DlgEdObj* pDlgEdObj = dynamic_cast<DlgEdObj*>(rPage.GetObj(i)))
{
@@ -328,7 +328,7 @@ void AccessibleDialogWindow::UpdateChildren()
if ( m_pDialogWindow )
{
SdrPage& rPage = m_pDialogWindow->GetPage();
- for ( sal_uLong i = 0, nCount = rPage.GetObjCount(); i < nCount; ++i )
+ for ( size_t i = 0, nCount = rPage.GetObjCount(); i < nCount; ++i )
if (DlgEdObj* pDlgEdObj = dynamic_cast<DlgEdObj*>(rPage.GetObj(i)))
UpdateChild( ChildDescriptor( pDlgEdObj ) );
}
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index c34a3b7e2602..41230f6439e8 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -540,9 +540,9 @@ IMPL_LINK_NOARG(DlgEditor, PaintTimeout)
pDlgEdForm->StartListening();
// set position and size of controls
- if (sal_uLong nObjCount = pDlgEdPage->GetObjCount())
+ if (const size_t nObjCount = pDlgEdPage->GetObjCount())
{
- for ( sal_uLong i = 0 ; i < nObjCount ; i++ )
+ for ( size_t i = 0 ; i < nObjCount ; ++i )
if (DlgEdObj* pDlgEdObj = dynamic_cast<DlgEdObj*>(pDlgEdPage->GetObj(i)))
if (!dynamic_cast<DlgEdForm*>(pDlgEdObj))
pDlgEdObj->SetRectFromProps();
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index fab4e7ff06c9..c91c80029c11 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -1400,12 +1400,12 @@ void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
void DlgEdForm::UpdateStep()
{
- sal_uLong nObjCount;
SdrPage* pSdrPage = GetPage();
- if ( pSdrPage && ( ( nObjCount = pSdrPage->GetObjCount() ) > 0 ) )
+ if ( pSdrPage )
{
- for ( sal_uLong i = 0 ; i < nObjCount ; i++ )
+ const size_t nObjCount = pSdrPage->GetObjCount();
+ for ( size_t i = 0 ; i < nObjCount ; i++ )
{
DlgEdObj* pDlgEdObj = dynamic_cast<DlgEdObj*>(pSdrPage->GetObj(i));
if (pDlgEdObj && !dynamic_cast<DlgEdForm*>(pDlgEdObj))
diff --git a/basctl/source/dlged/dlgedpage.cxx b/basctl/source/dlged/dlgedpage.cxx
index c170032928dd..86a792f7ee69 100644
--- a/basctl/source/dlged/dlgedpage.cxx
+++ b/basctl/source/dlged/dlgedpage.cxx
@@ -45,7 +45,7 @@ SdrPage* DlgEdPage::Clone() const
}
-SdrObject* DlgEdPage::SetObjectOrdNum(sal_uLong nOldObjNum, sal_uLong nNewObjNum)
+SdrObject* DlgEdPage::SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
{
SdrObject* pObj = SdrPage::SetObjectOrdNum( nOldObjNum, nNewObjNum );
diff --git a/basctl/source/inc/dlgedpage.hxx b/basctl/source/inc/dlgedpage.hxx
index 13d3001c055d..b92760f68d7d 100644
--- a/basctl/source/inc/dlgedpage.hxx
+++ b/basctl/source/inc/dlgedpage.hxx
@@ -49,7 +49,7 @@ public:
void SetDlgEdForm( DlgEdForm* pForm ) { pDlgEdForm = pForm; }
DlgEdForm* GetDlgEdForm() const { return pDlgEdForm; }
- virtual SdrObject* SetObjectOrdNum(sal_uLong nOldObjNum, sal_uLong nNewObjNum) SAL_OVERRIDE;
+ virtual SdrObject* SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum) SAL_OVERRIDE;
};
} // namespace basctl
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index af648daba2ad..f304034e85c6 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -139,7 +139,7 @@ Graphic ViewElementListProvider::GetSymbolGraphic( sal_Int32 nStandardSymbol, co
return Graphic();
if(nStandardSymbol<0)
nStandardSymbol*=-1;
- if( nStandardSymbol >= static_cast<sal_Int32>(pSymbolList->GetObjCount()) )
+ if( static_cast<size_t>(nStandardSymbol) >= pSymbolList->GetObjCount() )
nStandardSymbol %= pSymbolList->GetObjCount();
SdrObject* pObj = pSymbolList->GetObj(nStandardSymbol);
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index 7b5d0a1f2417..5baedd3501c0 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -345,8 +345,8 @@ SdrObject* DrawModelWrapper::getNamedSdrObject( const OUString& rObjectCID, SdrO
{
if(!pSearchList || rObjectCID.isEmpty())
return 0;
- sal_uLong nCount = pSearchList->GetObjCount();
- for( sal_uLong nN=0; nN<nCount; nN++ )
+ const size_t nCount = pSearchList->GetObjCount();
+ for( size_t nN=0; nN<nCount; ++nN )
{
SdrObject* pObj = pSearchList->GetObj(nN);
if(!pObj)
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 58a9246be2bc..6221929980d4 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -340,7 +340,7 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton)
pInvisibleSquare->SetMergedItem(XFillTransparenceItem(100));
pInvisibleSquare->SetMergedItem(XLineTransparenceItem(100));
- for(long i=0;; ++i)
+ for(size_t i=0;; ++i)
{
SdrObject *pObj=pSymbolList->GetObj(i);
if(pObj==NULL)
@@ -1123,12 +1123,12 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
pView->hideMarkHandles();
pView->ShowSdrPage(pPage);
SdrObject *pObj=NULL;
- long nSymTmp=nSymType;
+ size_t nSymTmp = static_cast<size_t>(nSymType);
if(pSymbolList)
{
if(pSymbolList->GetObjCount())
{
- nSymTmp=nSymTmp%pSymbolList->GetObjCount(); // Treat list as cyclic!
+ nSymTmp %= pSymbolList->GetObjCount(); // Treat list as cyclic!
pObj=pSymbolList->GetObj(nSymTmp);
if(pObj)
{
diff --git a/include/svx/fmpage.hxx b/include/svx/fmpage.hxx
index e011e26d9938..7331b1de0eea 100644
--- a/include/svx/fmpage.hxx
+++ b/include/svx/fmpage.hxx
@@ -56,10 +56,10 @@ public:
virtual SdrPage* Clone() const SAL_OVERRIDE;
using SdrPage::Clone;
- virtual void InsertObject(SdrObject* pObj, sal_uLong nPos = CONTAINER_APPEND,
+ virtual void InsertObject(SdrObject* pObj, size_t nPos = SAL_MAX_SIZE,
const SdrInsertReason* pReason=NULL) SAL_OVERRIDE;
- virtual SdrObject* RemoveObject(sal_uLong nObjNum) SAL_OVERRIDE;
+ virtual SdrObject* RemoveObject(size_t nObjNum) SAL_OVERRIDE;
// access to all forms
const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms>& GetForms( bool _bForceCreate = true ) const;
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index 24b0c9cf74e4..9e4ed03e0881 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -84,10 +84,10 @@ public:
SVX_DLLPUBLIC E3dObjList(const E3dObjList& rSrcList);
SVX_DLLPUBLIC virtual ~E3dObjList();
- virtual void NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos=CONTAINER_APPEND, const SdrInsertReason* pReason=NULL) SAL_OVERRIDE;
- virtual void InsertObject(SdrObject* pObj, sal_uIntPtr nPos=CONTAINER_APPEND, const SdrInsertReason* pReason=NULL) SAL_OVERRIDE;
- virtual SdrObject* NbcRemoveObject(sal_uIntPtr nObjNum) SAL_OVERRIDE;
- virtual SdrObject* RemoveObject(sal_uIntPtr nObjNum) SAL_OVERRIDE;
+ virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE, const SdrInsertReason* pReason=NULL) SAL_OVERRIDE;
+ virtual void InsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE, const SdrInsertReason* pReason=NULL) SAL_OVERRIDE;
+ virtual SdrObject* NbcRemoveObject(size_t nObjNum) SAL_OVERRIDE;
+ virtual SdrObject* RemoveObject(size_t nObjNum) SAL_OVERRIDE;
};
/*************************************************************************
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index a3c4f78086a7..ae8dbc89a9bf 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -127,23 +127,23 @@ public:
// Neuberechnung der Objekt-Ordnungsnummern
void RecalcObjOrdNums();
bool IsObjOrdNumsDirty() const { return bObjOrdNumsDirty; }
- virtual void NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos=CONTAINER_APPEND
+ virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE
, const SdrInsertReason* pReason=NULL
);
- virtual void InsertObject(SdrObject* pObj, sal_uIntPtr nPos=CONTAINER_APPEND
+ virtual void InsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE
, const SdrInsertReason* pReason=NULL
);
// aus Liste entfernen ohne delete
- virtual SdrObject* NbcRemoveObject(sal_uIntPtr nObjNum);
- virtual SdrObject* RemoveObject(sal_uIntPtr nObjNum);
+ virtual SdrObject* NbcRemoveObject(size_t nObjNum);
+ virtual SdrObject* RemoveObject(size_t nObjNum);
// Vorhandenes Objekt durch ein anderes ersetzen.
// Wie Remove&Insert jedoch performanter, da die Ordnungsnummern
// nicht Dirty gesetzt werden muessen.
- virtual SdrObject* NbcReplaceObject(SdrObject* pNewObj, sal_uIntPtr nObjNum);
- virtual SdrObject* ReplaceObject(SdrObject* pNewObj, sal_uIntPtr nObjNum);
+ virtual SdrObject* NbcReplaceObject(SdrObject* pNewObj, size_t nObjNum);
+ virtual SdrObject* ReplaceObject(SdrObject* pNewObj, size_t nObjNum);
// Die Z-Order eines Objekts veraendern
- virtual SdrObject* NbcSetObjectOrdNum(sal_uIntPtr nOldObjNum, sal_uIntPtr nNewObjNum);
- virtual SdrObject* SetObjectOrdNum(sal_uIntPtr nOldObjNum, sal_uIntPtr nNewObjNum);
+ virtual SdrObject* NbcSetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum);
+ virtual SdrObject* SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum);
virtual void SetRectsDirty();
@@ -160,14 +160,14 @@ public:
// Die Vorlagenattribute der Zeichenobjekte in harte Attribute verwandeln.
void BurnInStyleSheetAttributes();
- sal_uIntPtr GetObjCount() const;
- SdrObject* GetObj(sal_uIntPtr nNum) const;
+ size_t GetObjCount() const;
+ SdrObject* GetObj(size_t nNum) const;
// Gelinkte Seite oder gelinktes Gruppenobjekt
virtual bool IsReadOnly() const;
// Zaehlt alle Objekte inkl. Objekte in Objektgruppen, ...
- sal_uIntPtr CountAllObjects() const;
+ size_t CountAllObjects() const;
// Alle aufgelagerten Teile (z.B. Grafiken) der Liste in den
// Speicher laden.
@@ -194,7 +194,7 @@ public:
operation is performed recursively, such that the content of
the given object contains no groups afterwards.
*/
- virtual void UnGroupObj( sal_uIntPtr nObjNum );
+ virtual void UnGroupObj( size_t nObjNum );
/** Return whether there is an explicit, user defined, object navigation
order. When there is one this method returns <TRUE/> and the
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index f1db353e576e..cf9b40a3bca5 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -392,7 +392,7 @@ class SvxShapeGroup : public SvxShape,
private:
rtl::Reference< SvxDrawPage> mxPage;
- void addUnoShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape, sal_uIntPtr nPos );
+ void addUnoShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape, size_t nPos );
public:
SvxShapeGroup( SdrObject* pObj,SvxDrawPage* pDrawPage ) throw ();
diff --git a/reportdesign/inc/RptPage.hxx b/reportdesign/inc/RptPage.hxx
index 518293b8149b..b320a3eb0861 100644
--- a/reportdesign/inc/RptPage.hxx
+++ b/reportdesign/inc/RptPage.hxx
@@ -60,8 +60,8 @@ public:
virtual SdrPage* Clone() const SAL_OVERRIDE;
using SdrPage::Clone;
- virtual void NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason) SAL_OVERRIDE;
- virtual SdrObject* RemoveObject(sal_uLong nObjNum) SAL_OVERRIDE;
+ virtual void NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason) SAL_OVERRIDE;
+ virtual SdrObject* RemoveObject(size_t nObjNum) SAL_OVERRIDE;
/** returns the index inside the object list which belongs to the report component.
@param _xObject the report component
diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx
index 242c7b4ead80..4fa61a102a6e 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -67,8 +67,8 @@ SdrPage* OReportPage::Clone() const
sal_uLong OReportPage::getIndexOf(const uno::Reference< report::XReportComponent >& _xObject)
{
- sal_uLong nCount = GetObjCount();
- sal_uLong i = 0;
+ const size_t nCount = GetObjCount();
+ size_t i = 0;
for (; i < nCount; ++i)
{
OObjectBase* pObj = dynamic_cast<OObjectBase*>(GetObj(i));
@@ -78,7 +78,7 @@ sal_uLong OReportPage::getIndexOf(const uno::Reference< report::XReportComponent
break;
}
}
- return i;
+ return static_cast<sal_uLong>(i);
}
void OReportPage::removeSdrObject(const uno::Reference< report::XReportComponent >& _xObject)
@@ -94,7 +94,7 @@ void OReportPage::removeSdrObject(const uno::Reference< report::XReportComponent
}
}
-SdrObject* OReportPage::RemoveObject(sal_uLong nObjNum)
+SdrObject* OReportPage::RemoveObject(size_t nObjNum)
{
SdrObject* pObj = SdrPage::RemoveObject(nObjNum);
if (getSpecialMode())
@@ -142,7 +142,7 @@ void OReportPage::removeTempObject(SdrObject *_pToRemoveObj)
{
if (_pToRemoveObj)
{
- for (sal_uLong i=0;i<GetObjCount();i++)
+ for (size_t i=0; i<GetObjCount(); ++i)
{
SdrObject *aObj = GetObj(i);
if (aObj && aObj == _pToRemoveObj)
@@ -171,7 +171,7 @@ void OReportPage::resetSpecialMode()
m_bSpecialInsertMode = false;
}
-void OReportPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason)
+void OReportPage::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason)
{
SdrPage::NbcInsertObject(pObj, nPos, pReason);
diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx
index 6b1346a88d2d..17273c60d498 100644
--- a/reportdesign/source/ui/report/FixedTextColor.cxx
+++ b/reportdesign/source/ui/report/FixedTextColor.cxx
@@ -165,7 +165,7 @@ namespace rptui
if ( xSection.is() )
{
OReportPage *pPage = pModel->getPage(xSection);
- sal_uLong nIndex = pPage->getIndexOf(_xFixedText.get());
+ const size_t nIndex = pPage->getIndexOf(_xFixedText.get());
if (nIndex < pPage->GetObjCount() )
{
SdrObject *pObject = pPage->GetObj(nIndex);
diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
index 2d4042e6c0a6..217d725d2820 100644
--- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -166,7 +166,7 @@ namespace rptui
if ( xSection.is() )
{
OReportPage *pPage = pModel->getPage(xSection);
- sal_uLong nIndex = pPage->getIndexOf(_xComponent);
+ const size_t nIndex = pPage->getIndexOf(_xComponent);
if (nIndex < pPage->GetObjCount() )
{
SdrObject *pObject = pPage->GetObj(nIndex);
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index b26e6bf0b21b..74c2375d7a99 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -268,7 +268,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC
pNeuObj->SetPage( m_pPage );
pNeuObj->SetModel( m_pModel.get() );
SdrInsertReason aReason(SDRREASON_VIEWCALL);
- m_pPage->InsertObject(pNeuObj,CONTAINER_APPEND,&aReason);
+ m_pPage->InsertObject(pNeuObj, SAL_MAX_SIZE, &aReason);
Rectangle aRet(VCLPoint((*pCopiesIter)->getPosition()),VCLSize((*pCopiesIter)->getSize()));
aRet.setHeight(aRet.getHeight() + 1);
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index d50a6f881071..27db9c0a3009 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -401,7 +401,7 @@ void impl_testLegacyCellAnchoredRotatedShape( ScDocument& rDoc, Rectangle& aRect
CPPUNIT_ASSERT_MESSAGE("No drawing layer.", pDrawLayer);
SdrPage* pPage = pDrawLayer->GetPage(0);
CPPUNIT_ASSERT_MESSAGE("No page instance for the 1st sheet.", pPage);
- CPPUNIT_ASSERT_EQUAL( sal_uIntPtr(1), pPage->GetObjCount() );
+ CPPUNIT_ASSERT_EQUAL( static_cast<size_t>(1), pPage->GetObjCount() );
SdrObject* pObj = pPage->GetObj(0);
const Rectangle& aSnap = pObj->GetSnapRect();
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index c2fe73a7ffbb..3622600e8b24 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -1569,10 +1569,10 @@ void ScFiltersTest::testCellAnchoredShapesODS()
ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
SdrPage* pPage = pDrawLayer->GetPage(0);
CPPUNIT_ASSERT_MESSAGE("draw page for sheet 1 should exist.", pPage);
- sal_uIntPtr nCount = pPage->GetObjCount();
+ const size_t nCount = pPage->GetObjCount();
CPPUNIT_ASSERT_EQUAL_MESSAGE(
- "There should be 2 objects.", sal_uIntPtr(2), nCount);
- for (sal_uIntPtr i = 0; i < nCount; ++i)
+ "There should be 2 objects.", static_cast<size_t>(2), nCount);
+ for (size_t i = 0; i < nCount; ++i)
{
SdrObject* pObj = pPage->GetObj(i);
CPPUNIT_ASSERT_MESSAGE("Failed to get drawing object.", pObj);
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 644f7fb70dc3..d9097bf250a2 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3046,7 +3046,7 @@ void Test::testGraphicsOnSheetMove()
pPage->InsertObject(pObj);
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be one object on the 1st sheet.", pPage->GetObjCount(), static_cast<sal_uIntPtr>(1));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be one object on the 1st sheet.", pPage->GetObjCount(), static_cast<size_t>(1));
const ScDrawObjData* pData = ScDrawLayer::GetObjData(pObj);
CPPUNIT_ASSERT_MESSAGE("Object meta-data doesn't exist.", pData);
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 79c989ebd98d..70f7634da6f4 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -472,8 +472,8 @@ void ScDrawLayer::MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SC
bool bNegativePage = pDoc && pDoc->IsNegativePage( nTab );
- sal_uLong nCount = pPage->GetObjCount();
- for ( sal_uLong i = 0; i < nCount; i++ )
+ const size_t nCount = pPage->GetObjCount();
+ for ( size_t i = 0; i < nCount; ++i )
{
SdrObject* pObj = pPage->GetObj( i );
ScDrawObjData* pData = GetObjDataTab( pObj, nTab );
@@ -522,8 +522,8 @@ void ScDrawLayer::SetPageSize( sal_uInt16 nPageNo, const Size& rSize, bool bUpda
bool bNegativePage = pDoc && pDoc->IsNegativePage( static_cast<SCTAB>(nPageNo) );
- sal_uLong nCount = pPage->GetObjCount();
- for ( sal_uLong i = 0; i < nCount; i++ )
+ const size_t nCount = pPage->GetObjCount();
+ for ( size_t i = 0; i < nCount; ++i )
{
SdrObject* pObj = pPage->GetObj( i );
ScDrawObjData* pData = GetObjDataTab( pObj, static_cast<SCTAB>(nPageNo) );
@@ -1148,10 +1148,10 @@ void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1,
pPage->RecalcObjOrdNums();
- sal_uLong nObjCount = pPage->GetObjCount();
+ const size_t nObjCount = pPage->GetObjCount();
if (nObjCount)
{
- long nDelCount = 0;
+ size_t nDelCount = 0;
Rectangle aDelRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab );
boost::scoped_array<SdrObject*> ppObj(new SdrObject*[nObjCount]);
@@ -1172,12 +1172,11 @@ void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1,
pObject = aIter.Next();
}
- long i;
if (bRecording)
- for (i=1; i<=nDelCount; i++)
+ for (size_t i=1; i<=nDelCount; ++i)
AddCalcUndo( new SdrUndoRemoveObj( *ppObj[nDelCount-i] ) );
- for (i=1; i<=nDelCount; i++)
+ for (size_t i=1; i<=nDelCount; ++i)
pPage->RemoveObject( ppObj[nDelCount-i]->GetOrdNum() );
}
}
@@ -1203,10 +1202,10 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark )
if (pPage)
{
pPage->RecalcObjOrdNums();
- sal_uLong nObjCount = pPage->GetObjCount();
+ const size_t nObjCount = pPage->GetObjCount();
if (nObjCount)
{
- long nDelCount = 0;
+ size_t nDelCount = 0;
// Rechteck um die ganze Selektion
Rectangle aMarkBound = pDoc->GetMMRect(
aMarkRange.aStart.Col(), aMarkRange.aStart.Row(),
@@ -1236,12 +1235,11 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark )
// Objekte loeschen (rueckwaerts)
- long i;
if (bRecording)
- for (i=1; i<=nDelCount; i++)
+ for (size_t i=1; i<=nDelCount; ++i)
AddCalcUndo( new SdrUndoRemoveObj( *ppObj[nDelCount-i] ) );
- for (i=1; i<=nDelCount; i++)
+ for (size_t i=1; i<=nDelCount; ++i)
pPage->RemoveObject( ppObj[nDelCount-i]->GetOrdNum() );
}
}
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 6e12d9c31fd8..c71b7c5b6e88 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -668,10 +668,10 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, bool bDestPnt )
pPage->RecalcObjOrdNums();
- sal_uLong nObjCount = pPage->GetObjCount();
+ const size_t nObjCount = pPage->GetObjCount();
if (nObjCount)
{
- long nDelCount = 0;
+ size_t nDelCount = 0;
boost::scoped_array<SdrObject*> ppObj(new SdrObject*[nObjCount]);
SdrObjListIter aIter( *pPage, IM_FLAT );
@@ -688,11 +688,10 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, bool bDestPnt )
pObject = aIter.Next();
}
- long i;
- for (i=1; i<=nDelCount; i++)
+ for (size_t i=1; i<=nDelCount; ++i)
pModel->AddCalcUndo( new SdrUndoRemoveObj( *ppObj[nDelCount-i] ) );
- for (i=1; i<=nDelCount; i++)
+ for (size_t i=1; i<=nDelCount; ++i)
pPage->RemoveObject( ppObj[nDelCount-i]->GetOrdNum() );
ppObj.reset();
@@ -732,10 +731,10 @@ void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nR
pPage->RecalcObjOrdNums();
- sal_uLong nObjCount = pPage->GetObjCount();
+ const size_t nObjCount = pPage->GetObjCount();
if (nObjCount)
{
- long nDelCount = 0;
+ size_t nDelCount = 0;
boost::scoped_array<SdrObject*> ppObj(new SdrObject*[nObjCount]);
SdrObjListIter aIter( *pPage, IM_FLAT );
@@ -754,11 +753,10 @@ void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nR
pObject = aIter.Next();
}
- long i;
- for (i=1; i<=nDelCount; i++)
+ for (size_t i=1; i<=nDelCount; ++i)
pModel->AddCalcUndo( new SdrUndoRemoveObj( *ppObj[nDelCount-i] ) );
- for (i=1; i<=nDelCount; i++)
+ for (size_t i=1; i<=nDelCount; ++i)
pPage->RemoveObject( ppObj[nDelCount-i]->GetOrdNum() );
ppObj.reset();
@@ -1241,8 +1239,8 @@ bool ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
pPage->RecalcObjOrdNums();
- long nDelCount = 0;
- sal_uLong nObjCount = pPage->GetObjCount();
+ size_t nDelCount = 0;
+ const size_t nObjCount = pPage->GetObjCount();
if (nObjCount)
{
boost::scoped_array<SdrObject*> ppObj(new SdrObject*[nObjCount]);
@@ -1276,11 +1274,10 @@ bool ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
pObject = aIter.Next();
}
- long i;
- for (i=1; i<=nDelCount; i++)
+ for (size_t i=1; i<=nDelCount; ++i)
pModel->AddCalcUndo( new SdrUndoRemoveObj( *ppObj[nDelCount-i] ) );
- for (i=1; i<=nDelCount; i++)
+ for (size_t i=1; i<=nDelCount; ++i)
pPage->RemoveObject( ppObj[nDelCount-i]->GetOrdNum() );
ppObj.reset();
@@ -1545,7 +1542,7 @@ bool ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange )
if( pObject && pObject->GetPage() && (pObject->GetPage() == pObject->GetObjList()) )
{
// Is there a previous object?
- const sal_uInt32 nOrdNum(pObject->GetOrdNum());
+ const size_t nOrdNum = pObject->GetOrdNum();
if(nOrdNum > 0)
{
diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx
index 5894fc6d563f..d7cc9c4eb6fa 100644
--- a/sc/source/filter/html/htmlexp2.cxx
+++ b/sc/source/filter/html/htmlexp2.cxx
@@ -67,8 +67,7 @@ void ScHTMLExport::PrepareGraphics( ScDrawLayer* pDrawLayer, SCTAB nTab,
void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow )
{
- sal_uLong nObjCount = pPage->GetObjCount();
- if ( nObjCount )
+ if ( pPage->GetObjCount() )
{
Rectangle aRect;
if ( !bAll )
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 64113182aab3..c38a8dc4df76 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -311,7 +311,7 @@ private:
mutable ::accessibility::AccessibleShapeTreeInfo maShapeTreeInfo;
mutable com::sun::star::uno::Reference<com::sun::star::view::XSelectionSupplier> xSelectionSupplier;
- mutable sal_uInt32 mnSdrObjCount;
+ mutable size_t mnSdrObjCount;
mutable sal_uInt32 mnShapesSelected;
ScTabViewShell* mpViewShell;
ScAccessibleDocument* mpAccessibleDocument;
@@ -544,7 +544,7 @@ sal_Int32 ScChildrenShapes::GetCount() const
{
mnSdrObjCount = pDrawPage->GetObjCount();
maZOrderedShapes.reserve(mnSdrObjCount + 1); // the table is always in
- for (sal_uInt32 i = 0; i < mnSdrObjCount; ++i)
+ for (size_t i = 0; i < mnSdrObjCount; ++i)
{
SdrObject* pObj = pDrawPage->GetObj(i);
if (pObj/* && (pObj->GetLayer() != SC_LAYER_INTERN)*/)
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index ffa2ba401caa..1afaa5bfe0af 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1101,8 +1101,8 @@ void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode
maShapeRanges[nRangeId].maMapMode = aMapMode;
ScIAccessibleViewForwarder aViewForwarder(mpViewShell, mpAccDoc, aMapMode);
maShapeRanges[nRangeId].maViewForwarder = aViewForwarder;
- sal_uInt32 nCount(pPage->GetObjCount());
- for (sal_uInt32 i = 0; i < nCount; ++i)
+ const size_t nCount(pPage->GetObjCount());
+ for (size_t i = 0; i < nCount; ++i)
{
SdrObject* pObj = pPage->GetObj(i);
if (pObj)
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index a63cd3f37bed..758cf0fa0fae 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -354,8 +354,8 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
if ( pObj->IsGroupObject() )
{
SdrObjList* pOL = pObj->GetSubList();
- sal_uLong nObj = pOL->GetObjCount();
- for ( sal_uLong index=0; index<nObj; ++index )
+ const size_t nObj = pOL->GetObjCount();
+ for ( size_t index=0; index<nObj; ++index )
{
pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), true );
pInfo->SetMacro( sMacro );
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 10292a991eb0..fcbdceaf9ba1 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -1143,10 +1143,9 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP
sal_uInt16 nHitLog = (sal_uInt16) pActiveWin->PixelToLogic(
Size(pDrawView->GetHitTolerancePixel(),0)).Width();
- sal_uInt32 nCount(pDrawPage->GetObjCount());
+ const size_t nCount(pDrawPage->GetObjCount());
bool bFound(false);
- sal_uInt32 i(0);
- while (i < nCount && !bFound)
+ for (size_t i = 0; i < nCount && !bFound; ++i)
{
SdrObject* pObj = pDrawPage->GetObj(i);
if (pObj && SdrObjectPrimitiveHit(*pObj, aPos, nHitLog, *pDrawView->GetSdrPageView(), 0, false))
@@ -1154,7 +1153,6 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP
xTarget.set(pObj->getUnoShape(), uno::UNO_QUERY);
bFound = true;
}
- ++i;
}
}
}
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 24a8c5a2d77e..8d7d71cd899b 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -330,8 +330,8 @@ void ScDrawView::RecalcScale()
{
if ( SdrPage* pPage = pPV->GetPage() )
{
- sal_uLong nCount = pPage->GetObjCount();
- for ( sal_uLong i = 0; i < nCount; i++ )
+ const size_t nCount = pPage->GetObjCount();
+ for ( size_t i = 0; i < nCount; ++i )
{
SdrObject* pObj = pPage->GetObj( i );
// Align objects to nearset grid position
@@ -433,7 +433,7 @@ void ScDrawView::MarkListHasChanged()
if ( pObj->ISA( SdrObjGroup ) )
{
const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList();
- sal_uLong nListCount = pLst->GetObjCount();
+ const size_t nListCount = pLst->GetObjCount();
if ( nListCount == 0 )
{
// An empty group (may occur during Undo) is no control or graphics object.
@@ -441,7 +441,7 @@ void ScDrawView::MarkListHasChanged()
bOnlyControls = false;
bOnlyGraf = false;
}
- for ( sal_uInt16 j = 0; j < nListCount; ++j )
+ for ( size_t j = 0; j < nListCount; ++j )
{
SdrObject *pSubObj = pLst->GetObj( j );
@@ -902,7 +902,7 @@ void ScDrawView::SyncForGrid( SdrObject* pObj )
if ( pObj->ISA( SdrObjGroup ) )
{
SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList();
- for ( sal_uLong i = 0, nCount = pLst->GetObjCount(); i < nCount; ++i )
+ for ( size_t i = 0, nCount = pLst->GetObjCount(); i < nCount; ++i )
SyncForGrid( pLst->GetObj( i ) );
}
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index f5481b8ff0f8..25859d371412 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -500,7 +500,7 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
SvxDrawingLayerImport( pModel.get(), xInputStream );
// set everything to right layer:
- sal_uLong nObjCount = 0;
+ size_t nObjCount = 0;
sal_uInt16 nPages = pModel->GetPageCount();
for (sal_uInt16 i=0; i<nPages; i++)
{
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);
}
}
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 63dde670fe5f..ec0d369fe2f9 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -1517,8 +1517,8 @@ throw (uno::RuntimeException, std::exception)
std::vector< uno::Reference<drawing::XShape> > vXShapes;
if (pGrpList)
{
- const sal_Int32 nObj = pGrpList->GetObjCount();
- for(sal_Int32 i = 0 ; i < nObj ; ++i)
+ const size_t nObj = pGrpList->GetObjCount();
+ for(size_t i = 0 ; i < nObj ; ++i)
{
SdrObject *pSubObj = pGrpList->GetObj(i);
if (pSubObj &&
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 894de0ebb32e..04b85bae28bd 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -293,7 +293,7 @@ SdrObject* SvxGraphCtrlAccessibleContext::getSdrObject( sal_Int32 nIndex )
if( NULL == mpPage )
throw DisposedException();
- if( (nIndex < 0) || ( static_cast<sal_uInt32>(nIndex) >= mpPage->GetObjCount() ) )
+ if( (nIndex < 0) || ( static_cast<size_t>(nIndex) >= mpPage->GetObjCount() ) )
throw lang::IndexOutOfBoundsException();
return mpPage->GetObj( nIndex );
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 9f542539913b..7496eab48568 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2185,7 +2185,6 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
}
SdrObject* pRet = NULL;
- sal_uInt32 i;
if ( !vObjectList.empty() )
{
@@ -2198,7 +2197,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
{
std::vector< SdrPathObj* > vTempList;
- for(i = 0L; i < vObjectList.size(); i++)
+ for(size_t i = 0; i < vObjectList.size(); ++i)
{
SdrPathObj* pObj(vObjectList[i]);
const XLineStyle eLineStyle = ((const XLineStyleItem&)pObj->GetMergedItem(XATTR_LINESTYLE)).GetValue();
@@ -2225,7 +2224,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
sal_Int32 nAreaObjectCount = 0;
// correct some values and collect content data
- for ( i = 0; i < vObjectList.size(); i++ )
+ for ( size_t i = 0; i < vObjectList.size(); ++i )
{
SdrPathObj* pObj( vObjectList[ i ] );
@@ -2250,7 +2249,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
{
std::vector< SdrPathObj* > vTempList;
- for ( i = 0; i < vObjectList.size(); i++ )
+ for ( size_t i = 0; i < vObjectList.size(); ++i )
{
SdrPathObj* pObj( vObjectList[ i ] );
@@ -2260,7 +2259,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
}
}
- for ( i = 0; i < vObjectList.size(); i++ )
+ for ( size_t i = 0; i < vObjectList.size(); ++i )
{
SdrPathObj* pObj( vObjectList[ i ] );
@@ -2279,17 +2278,17 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
if(!vObjectList.empty())
{
// copy remaining objects to pRet
- if(vObjectList.size() > 1L)
+ if(vObjectList.size() > 1)
{
pRet = new SdrObjGroup;
- for (i = 0L; i < vObjectList.size(); i++)
+ for (size_t i = 0; i < vObjectList.size(); ++i)
{
SdrObject* pObj(vObjectList[i]);
pRet->GetSubList()->NbcInsertObject(pObj);
}
}
- else if(1L == vObjectList.size())
+ else if(1 == vObjectList.size())
{
pRet = vObjectList[0L];
}
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 6175f6e405b1..b0bd2a3375d3 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -239,7 +239,7 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom
pRenderedShape = new SdrObjGroup();
((SdrObjGroup*)pRenderedShape)->GetSubList()->NbcInsertObject( pTmp );
}
- ((SdrObjGroup*)pRenderedShape)->GetSubList()->NbcInsertObject( pTextObj, CONTAINER_APPEND );
+ ((SdrObjGroup*)pRenderedShape)->GetSubList()->NbcInsertObject( pTextObj );
}
else
pRenderedShape = pTextObj;
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index 82153a3a0275..bcf20610d1ad 100644
--- a/svx/source/dialog/connctrl.cxx
+++ b/svx/source/dialog/connctrl.cxx
@@ -215,7 +215,7 @@ void SvxXConnectionPreview::Paint( const Rectangle& )
// New stuff: Use a ObjectContactOfObjListPainter.
sdr::contact::SdrObjectVector aObjectVector;
- for(sal_uInt32 a(0L); a < pObjList->GetObjCount(); a++)
+ for(size_t a = 0; a < pObjList->GetObjCount(); ++a)
{
SdrObject* pObject = pObjList->GetObj(a);
DBG_ASSERT(pObject,
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index 0c1df56fca24..d1765f6ee936 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -101,7 +101,7 @@ const PolyPolygon& ContourWindow::GetPolyPolygon()
if ( pPage && pPage->GetObjCount() )
{
- SdrPathObj* pPathObj = (SdrPathObj*)pPage->GetObj(0L);
+ SdrPathObj* pPathObj = (SdrPathObj*)pPage->GetObj(0);
// Not sure if subdivision is needed for ContourWindow, but maybe it cannot handle
// curves at all. Keeping subdivision here for security
const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::tools::adaptiveSubdivideByAngle(pPathObj->GetPathPoly()));
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 6156dee9a7e8..36af678166ff 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -151,12 +151,15 @@ const ImageMap& IMapWindow::GetImageMap()
if ( pPage )
{
- const long nCount = pPage->GetObjCount();
+ const size_t nCount = pPage->GetObjCount();
aIMap.ClearImageMap();
- for ( long i = nCount - 1; i > -1; i-- )
+ for ( size_t i = nCount; i; )
+ {
+ --i;
aIMap.InsertIMapObject( *( ( (IMapUserData*) pPage->GetObj( i )->GetUserData( 0 ) )->GetObject() ) );
+ }
}
pModel->SetChanged( false );
@@ -426,12 +429,11 @@ SdrObject* IMapWindow::GetHitSdrObj( const Point& rPosPixel ) const
if ( Rectangle( Point(), GetGraphicSize() ).IsInside( aPt ) )
{
SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 );
- sal_uIntPtr nCount;
-
- if ( pPage && ( ( nCount = pPage->GetObjCount() ) > 0 ) )
+ if ( pPage )
{
- for ( long i = nCount - 1; i >= 0; i-- )
+ for ( size_t i = pPage->GetObjCount(); i > 0; )
{
+ --i;
SdrObject* pTestObj = pPage->GetObj( i );
IMapObject* pIMapObj = GetIMapObj( pTestObj );
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);
}
}
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index abf3a57c54d5..252ce39752fd 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -119,7 +119,7 @@ SdrPage* FmFormPage::Clone() const
}
-void FmFormPage::InsertObject(SdrObject* pObj, sal_uLong nPos,
+void FmFormPage::InsertObject(SdrObject* pObj, size_t nPos,
const SdrInsertReason* pReason)
{
SdrPage::InsertObject( pObj, nPos, pReason );
@@ -206,7 +206,7 @@ bool FmFormPage::RequestHelp( Window* pWindow, SdrView* pView,
}
-SdrObject* FmFormPage::RemoveObject(sal_uLong nObjNum)
+SdrObject* FmFormPage::RemoveObject(size_t nObjNum)
{
SdrObject* pObj = SdrPage::RemoveObject(nObjNum);
if (pObj && GetModel())
diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx
index 7ae2d7eb8385..6a5d79058e69 100644
--- a/svx/source/form/navigatortreemodel.cxx
+++ b/svx/source/form/navigatortreemodel.cxx
@@ -785,7 +785,7 @@ namespace svxform
if ( pObject->ISA(SdrObjGroup) )
{ // rekursiv absteigen
const SdrObjList *pChildren = ((SdrObjGroup*)pObject)->GetSubList();
- for ( sal_uInt16 i=0; i<pChildren->GetObjCount(); ++i )
+ for ( size_t i=0; i<pChildren->GetObjCount(); ++i )
{
SdrObject* pCurrent = pChildren->GetObj(i);
if (!InsertFormComponent(rHint, pCurrent))
diff --git a/svx/source/sdr/properties/e3dproperties.cxx b/svx/source/sdr/properties/e3dproperties.cxx
index 736bd8b0cd78..0dc7f00cee9f 100644
--- a/svx/source/sdr/properties/e3dproperties.cxx
+++ b/svx/source/sdr/properties/e3dproperties.cxx
@@ -82,9 +82,9 @@ namespace sdr
// propagate call to contained objects
const SdrObjList* pSub = ((const E3dObject&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
pSub->GetObj(a)->GetProperties().SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
}
diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx
index 4bbe3ac29bef..48dff578d838 100644
--- a/svx/source/sdr/properties/e3dsceneproperties.cxx
+++ b/svx/source/sdr/properties/e3dsceneproperties.cxx
@@ -74,9 +74,9 @@ namespace sdr
// collect all ItemSets of contained 3d objects
const SdrObjList* pSub = ((const E3dScene&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
SdrObject* pObj = pSub->GetObj(a);
@@ -115,7 +115,7 @@ namespace sdr
{
// Set SDRATTR_3DOBJ_ range at contained objects.
const SdrObjList* pSub = ((const E3dScene&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
if(nCount)
{
@@ -131,7 +131,7 @@ namespace sdr
if(pNewSet->Count())
{
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
SdrObject* pObj = pSub->GetObj(a);
@@ -151,9 +151,9 @@ namespace sdr
void E3dSceneProperties::SetMergedItem(const SfxPoolItem& rItem)
{
const SdrObjList* pSub = ((const E3dScene&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
pSub->GetObj(a)->SetMergedItem(rItem);
}
@@ -165,9 +165,9 @@ namespace sdr
void E3dSceneProperties::ClearMergedItem(const sal_uInt16 nWhich)
{
const SdrObjList* pSub = ((const E3dScene&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
pSub->GetObj(a)->ClearMergedItem(nWhich);
}
@@ -239,7 +239,7 @@ namespace sdr
const SdrObjList* pSub = ((const E3dScene&)GetSdrObject()).GetSubList();
const sal_uInt32 nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
pSub->GetObj(a)->SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
}
@@ -250,9 +250,9 @@ namespace sdr
SfxStyleSheet* pRetval = 0L;
const SdrObjList* pSub = ((const E3dScene&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
SfxStyleSheet* pCandidate = pSub->GetObj(a)->GetStyleSheet();
diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx
index e4421f57c602..0ce6be8028b0 100644
--- a/svx/source/sdr/properties/groupproperties.cxx
+++ b/svx/source/sdr/properties/groupproperties.cxx
@@ -82,9 +82,9 @@ namespace sdr
// collect all ItemSets in mpItemSet
const SdrObjList* pSub = ((const SdrObjGroup&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
const SfxItemSet& rSet = pSub->GetObj(a)->GetMergedItemSet();
SfxWhichIter aIter(rSet);
@@ -114,9 +114,9 @@ namespace sdr
{
// iterate over contained SdrObjects
const SdrObjList* pSub = ((const SdrObjGroup&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
SdrObject* pObj = pSub->GetObj(a);
@@ -155,9 +155,9 @@ namespace sdr
void GroupProperties::SetMergedItem(const SfxPoolItem& rItem)
{
const SdrObjList* pSub = ((const SdrObjGroup&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
pSub->GetObj(a)->GetProperties().SetMergedItem(rItem);
}
@@ -166,9 +166,9 @@ namespace sdr
void GroupProperties::ClearMergedItem(const sal_uInt16 nWhich)
{
const SdrObjList* pSub = ((const SdrObjGroup&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
pSub->GetObj(a)->GetProperties().ClearMergedItem(nWhich);
}
@@ -205,9 +205,9 @@ namespace sdr
SfxStyleSheet* pRetval = 0L;
const SdrObjList* pSub = ((const SdrObjGroup&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
SfxStyleSheet* pCandidate = pSub->GetObj(a)->GetStyleSheet();
@@ -231,9 +231,9 @@ namespace sdr
void GroupProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr)
{
const SdrObjList* pSub = ((const SdrObjGroup&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
pSub->GetObj(a)->SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
}
@@ -249,9 +249,9 @@ namespace sdr
if(pSrcPool && pDestPool && (pSrcPool != pDestPool))
{
const SdrObjList* pSub = ((const SdrObjGroup&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
pSub->GetObj(a)->GetProperties().MoveToItemPool(pSrcPool, pDestPool, pNewModel);
}
@@ -274,9 +274,9 @@ namespace sdr
void GroupProperties::ForceStyleToHardAttributes()
{
const SdrObjList* pSub = ((const SdrObjGroup&)GetSdrObject()).GetSubList();
- const sal_uInt32 nCount(pSub->GetObjCount());
+ const size_t nCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nCount; a++)
+ for(size_t a = 0; a < nCount; ++a)
{
pSub->GetObj(a)->GetProperties().ForceStyleToHardAttributes();
}
diff --git a/svx/source/sidebar/SelectionAnalyzer.cxx b/svx/source/sidebar/SelectionAnalyzer.cxx
index b994eb014324..d4985f74bcee 100644
--- a/svx/source/sidebar/SelectionAnalyzer.cxx
+++ b/svx/source/sidebar/SelectionAnalyzer.cxx
@@ -341,7 +341,7 @@ sal_uInt16 SelectionAnalyzer::GetObjectTypeFromGroup (const SdrObject* pObj)
SdrObjList* pObjList = pObj->GetSubList();
if (pObjList)
{
- const sal_uLong nSubObjCount (pObjList->GetObjCount());
+ const size_t nSubObjCount (pObjList->GetObjCount());
if (nSubObjCount>0)
{
@@ -357,7 +357,7 @@ sal_uInt16 SelectionAnalyzer::GetObjectTypeFromGroup (const SdrObject* pObj)
if (IsTextObjType(nResultType))
nResultType = OBJ_TEXT;
- for (sal_uInt16 nIndex=1; nIndex<nSubObjCount; ++nIndex)
+ for (size_t nIndex=1; nIndex<nSubObjCount; ++nIndex)
{
pSubObj = pObjList->GetObj(nIndex);
sal_uInt16 nType (pSubObj->GetObjIdentifier());
diff --git a/svx/source/svdraw/clonelist.cxx b/svx/source/svdraw/clonelist.cxx
index 9960137d0959..5eb9fba929be 100644
--- a/svx/source/svdraw/clonelist.cxx
+++ b/svx/source/svdraw/clonelist.cxx
@@ -48,7 +48,7 @@ void CloneList::AddPair(const SdrObject* pOriginal, SdrObject* pClone)
if(pOriginalList && pCloneList
&& pOriginalList->GetObjCount() == pCloneList->GetObjCount())
{
- for(sal_uInt32 a(0); a < pOriginalList->GetObjCount(); a++)
+ for(size_t a = 0; a < pOriginalList->GetObjCount(); ++a)
{
// recursive call
AddPair(pOriginalList->GetObj(a), pCloneList->GetObj(a));
diff --git a/svx/source/svdraw/sdrhittesthelper.cxx b/svx/source/svdraw/sdrhittesthelper.cxx
index 6f027a4a79e8..96ca23562f02 100644
--- a/svx/source/svdraw/sdrhittesthelper.cxx
+++ b/svx/source/svdraw/sdrhittesthelper.cxx
@@ -98,7 +98,7 @@ SdrObject* SdrObjListPrimitiveHit(
const SetOfByte* pVisiLayer,
bool bTextOnly)
{
- sal_uInt32 nObjNum(rList.GetObjCount());
+ size_t nObjNum(rList.GetObjCount());
SdrObject* pRetval = 0;
while(!pRetval && nObjNum > 0)
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 48a286f45017..130690d19761 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -123,9 +123,8 @@ SdrLayer* SdrEditView::InsertNewLayer(const OUString& rName, sal_uInt16 nPos)
bool SdrEditView::ImpDelLayerCheck(SdrObjList* pOL, SdrLayerID nDelID) const
{
bool bDelAll(true);
- sal_uInt32 nObjAnz(pOL->GetObjCount());
- for(sal_uInt32 nObjNum(nObjAnz); nObjNum > 0 && bDelAll;)
+ for(size_t nObjNum = pOL->GetObjCount(); nObjNum > 0 && bDelAll;)
{
nObjNum--;
SdrObject* pObj = pOL->GetObj(nObjNum);
@@ -153,13 +152,13 @@ bool SdrEditView::ImpDelLayerCheck(SdrObjList* pOL, SdrLayerID nDelID) const
void SdrEditView::ImpDelLayerDelObjs(SdrObjList* pOL, SdrLayerID nDelID)
{
- sal_uInt32 nObjAnz(pOL->GetObjCount());
+ const size_t nObjAnz(pOL->GetObjCount());
// make sure OrdNums are correct
pOL->GetObj(0)->GetOrdNum();
const bool bUndo = GetModel()->IsUndoEnabled();
- for(sal_uInt32 nObjNum(nObjAnz); nObjNum > 0;)
+ for(size_t nObjNum = nObjAnz; nObjNum > 0;)
{
nObjNum--;
SdrObject* pObj = pOL->GetObj(nObjNum);
@@ -223,13 +222,13 @@ void SdrEditView::DeleteLayer(const OUString& rName)
{
// over all pages
SdrPage* pPage = (bMaPg) ? pMod->GetMasterPage(nPgNum) : pMod->GetPage(nPgNum);
- sal_uInt32 nObjAnz(pPage->GetObjCount());
+ const size_t nObjAnz(pPage->GetObjCount());
// make sure OrdNums are correct
if(nObjAnz)
pPage->GetObj(0)->GetOrdNum();
- for(sal_uInt32 nObjNum(nObjAnz); nObjNum > 0;)
+ for(size_t nObjNum(nObjAnz); nObjNum > 0;)
{
nObjNum--;
SdrObject* pObj = pPage->GetObj(nObjNum);
@@ -672,7 +671,7 @@ void SdrEditView::ForceMarkedObjToAnotherPage()
{
pM->GetPageView()->GetObjList()->RemoveObject(pObj->GetOrdNum());
SdrInsertReason aReason(SDRREASON_VIEWCALL);
- pPV->GetObjList()->InsertObject(pObj,CONTAINER_APPEND,&aReason);
+ pPV->GetObjList()->InsertObject(pObj, SAL_MAX_SIZE, &aReason);
pM->SetPageView(pPV);
InvalidateAllWin(aObjRect);
bFlg=true;
@@ -726,7 +725,7 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
SdrMark* pM = rMark.GetMark(nm);
SdrObject* pObj = pM->GetMarkedSdrObj();
SdrObjList* pOL = pObj->GetObjList();
- const sal_uInt32 nOrdNum(pObj->GetOrdNumDirect());
+ const size_t nOrdNum(pObj->GetOrdNumDirect());
bool bIs3D = dynamic_cast< E3dObject* >(pObj);
// set up a scene updater if object is a 3d object
@@ -902,7 +901,7 @@ void SdrEditView::CopyMarkedObj()
SdrObject* pO=pM->GetMarkedSdrObj()->Clone();
if (pO!=NULL) {
SdrInsertReason aReason(SDRREASON_VIEWCALL);
- pM->GetPageView()->GetObjList()->InsertObject(pO,CONTAINER_APPEND,&aReason);
+ pM->GetPageView()->GetObjList()->InsertObject(pO, SAL_MAX_SIZE, &aReason);
if( bUndo )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoCopyObject(*pO));
@@ -967,9 +966,9 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, sal_uInt
if (!pObj->IsInserted()) {
SdrInsertReason aReason(SDRREASON_VIEWCALL);
if ((nOptions & SDRINSERT_NOBROADCAST)!=0) {
- rPV.GetObjList()->NbcInsertObject(pObj,CONTAINER_APPEND,&aReason);
+ rPV.GetObjList()->NbcInsertObject(pObj, SAL_MAX_SIZE, &aReason);
} else {
- rPV.GetObjList()->InsertObject(pObj,CONTAINER_APPEND,&aReason);
+ rPV.GetObjList()->InsertObject(pObj, SAL_MAX_SIZE, &aReason);
}
}
if( IsUndoEnabled() )
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index ecbfae9baee8..693268de30df 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -78,7 +78,7 @@ void SdrEditView::MovMarkedToTop()
}
bool bChg=false;
SdrObjList* pOL0=NULL;
- sal_uIntPtr nNewPos=0;
+ size_t nNewPos=0;
for (size_t nm=nAnz; nm>0;)
{
--nm;
@@ -87,16 +87,16 @@ void SdrEditView::MovMarkedToTop()
SdrObjList* pOL=pObj->GetObjList();
if (pOL!=pOL0)
{
- nNewPos=sal_uIntPtr(pOL->GetObjCount()-1);
+ nNewPos = pOL->GetObjCount()-1;
pOL0=pOL;
}
- sal_uIntPtr nNowPos=pObj->GetOrdNumDirect();
+ const size_t nNowPos = pObj->GetOrdNumDirect();
const Rectangle& rBR=pObj->GetCurrentBoundRect();
- sal_uIntPtr nCmpPos=nNowPos+1;
+ size_t nCmpPos = nNowPos+1;
SdrObject* pMaxObj=GetMaxToTopObj(pObj);
if (pMaxObj!=NULL)
{
- sal_uIntPtr nMaxPos=pMaxObj->GetOrdNum();
+ size_t nMaxPos=pMaxObj->GetOrdNum();
if (nMaxPos!=0)
nMaxPos--;
if (nNewPos>nMaxPos)
@@ -166,7 +166,7 @@ void SdrEditView::MovMarkedToBtm()
bool bChg=false;
SdrObjList* pOL0=NULL;
- sal_uIntPtr nNewPos=0;
+ size_t nNewPos=0;
for (size_t nm=0; nm<nAnz; ++nm)
{
SdrMark* pM=GetSdrMarkByIndex(nm);
@@ -177,13 +177,15 @@ void SdrEditView::MovMarkedToBtm()
nNewPos=0;
pOL0=pOL;
}
- sal_uIntPtr nNowPos=pObj->GetOrdNumDirect();
+ const size_t nNowPos = pObj->GetOrdNumDirect();
const Rectangle& rBR=pObj->GetCurrentBoundRect();
- sal_uIntPtr nCmpPos=nNowPos; if (nCmpPos>0) nCmpPos--;
+ size_t nCmpPos = nNowPos;
+ if (nCmpPos>0)
+ --nCmpPos;
SdrObject* pMaxObj=GetMaxToBtmObj(pObj);
if (pMaxObj!=NULL)
{
- sal_uIntPtr nMinPos=pMaxObj->GetOrdNum()+1;
+ const size_t nMinPos=pMaxObj->GetOrdNum()+1;
if (nNewPos<nMinPos)
nNewPos=nMinPos; // neither go faster...
if (nNewPos>nNowPos)
@@ -276,7 +278,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
}
bool bChg=false;
SdrObjList* pOL0=NULL;
- sal_uIntPtr nNewPos=0;
+ size_t nNewPos=0;
for (size_t nm=nAnz; nm>0;)
{
--nm;
@@ -287,14 +289,14 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
SdrObjList* pOL=pObj->GetObjList();
if (pOL!=pOL0)
{
- nNewPos=sal_uIntPtr(pOL->GetObjCount()-1);
+ nNewPos=pOL->GetObjCount()-1;
pOL0=pOL;
}
- sal_uIntPtr nNowPos=pObj->GetOrdNumDirect();
+ const size_t nNowPos=pObj->GetOrdNumDirect();
SdrObject* pMaxObj=GetMaxToTopObj(pObj);
if (pMaxObj!=NULL)
{
- sal_uIntPtr nMaxOrd=pMaxObj->GetOrdNum(); // sadly doesn't work any other way
+ size_t nMaxOrd=pMaxObj->GetOrdNum(); // sadly doesn't work any other way
if (nMaxOrd>0)
nMaxOrd--;
if (nNewPos>nMaxOrd)
@@ -306,7 +308,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
{
if (pRefObj->GetObjList()==pObj->GetObjList())
{
- sal_uIntPtr nMaxOrd=pRefObj->GetOrdNum(); // sadly doesn't work any other way
+ const size_t nMaxOrd=pRefObj->GetOrdNum(); // sadly doesn't work any other way
if (nNewPos>nMaxOrd)
nNewPos=nMaxOrd; // neither go faster...
if (nNewPos<nNowPos)
@@ -376,7 +378,7 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
}
bool bChg=false;
SdrObjList* pOL0=NULL;
- sal_uIntPtr nNewPos=0;
+ size_t nNewPos=0;
for (size_t nm=0; nm<nAnz; ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
@@ -386,16 +388,16 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
nNewPos=0;
pOL0=pOL;
}
- sal_uIntPtr nNowPos=pObj->GetOrdNumDirect();
+ const size_t nNowPos=pObj->GetOrdNumDirect();
SdrObject* pMinObj=GetMaxToBtmObj(pObj);
if (pMinObj!=NULL) {
- sal_uIntPtr nMinOrd=pMinObj->GetOrdNum()+1; // sadly doesn't work any differently
+ const size_t nMinOrd=pMinObj->GetOrdNum()+1; // sadly doesn't work any differently
if (nNewPos<nMinOrd) nNewPos=nMinOrd; // neither go faster...
if (nNewPos>nNowPos) nNewPos=nNowPos; // nor go into the other direction
}
if (pRefObj!=NULL) {
if (pRefObj->GetObjList()==pObj->GetObjList()) {
- sal_uIntPtr nMinOrd=pRefObj->GetOrdNum(); // sadly doesn't work any differently
+ const size_t nMinOrd=pRefObj->GetOrdNum(); // sadly doesn't work any differently
if (nNewPos<nMinOrd) nNewPos=nMinOrd; // neither go faster...
if (nNewPos>nNowPos) nNewPos=nNowPos; // nor go into the other direction
} else {
@@ -447,8 +449,8 @@ void SdrEditView::ReverseOrderOfMarked()
while (a<c) {
SdrObject* pObj1=GetMarkedObjectByIndex(a);
SdrObject* pObj2=GetMarkedObjectByIndex(c);
- sal_uIntPtr nOrd1=pObj1->GetOrdNumDirect();
- sal_uIntPtr nOrd2=pObj2->GetOrdNumDirect();
+ const size_t nOrd1=pObj1->GetOrdNumDirect();
+ const size_t nOrd2=pObj2->GetOrdNumDirect();
if( bUndo )
{
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj1,nOrd1,nOrd2));
@@ -482,38 +484,38 @@ void SdrEditView::ImpCheckToTopBtmPossible()
{ // special-casing for single selection
SdrObject* pObj=GetMarkedObjectByIndex(0);
SdrObjList* pOL=pObj->GetObjList();
- sal_uIntPtr nMax=pOL->GetObjCount();
- sal_uIntPtr nMin=0;
- sal_uIntPtr nObjNum=pObj->GetOrdNum();
+ size_t nMax=pOL->GetObjCount();
+ size_t nMin=0;
+ const size_t nObjNum=pObj->GetOrdNum();
SdrObject* pRestrict=GetMaxToTopObj(pObj);
if (pRestrict!=NULL) {
- sal_uIntPtr nRestrict=pRestrict->GetOrdNum();
+ const size_t nRestrict=pRestrict->GetOrdNum();
if (nRestrict<nMax) nMax=nRestrict;
}
pRestrict=GetMaxToBtmObj(pObj);
if (pRestrict!=NULL) {
- sal_uIntPtr nRestrict=pRestrict->GetOrdNum();
+ const size_t nRestrict=pRestrict->GetOrdNum();
if (nRestrict>nMin) nMin=nRestrict;
}
- bToTopPossible=nObjNum<sal_uIntPtr(nMax-1);
+ bToTopPossible=nObjNum<nMax-1;
bToBtmPossible=nObjNum>nMin;
} else { // multiple selection
SdrObjList* pOL0=NULL;
- long nPos0=-1;
+ size_t nPos0 = 0;
for (size_t nm = 0; !bToBtmPossible && nm<nAnz; ++nm) { // check 'send to background'
SdrObject* pObj=GetMarkedObjectByIndex(nm);
SdrObjList* pOL=pObj->GetObjList();
if (pOL!=pOL0) {
- nPos0=-1;
+ nPos0 = 0;
pOL0=pOL;
}
- sal_uIntPtr nPos=pObj->GetOrdNum();
- bToBtmPossible=nPos>sal_uIntPtr(nPos0+1);
- nPos0=long(nPos);
+ const size_t nPos = pObj->GetOrdNum();
+ bToBtmPossible = nPos && (nPos-1 > nPos0);
+ nPos0 = nPos;
}
pOL0=NULL;
- nPos0=0x7FFFFFFF;
+ nPos0 = SAL_MAX_SIZE;
for (size_t nm=nAnz; !bToTopPossible && nm>0; ) { // check 'bring to front'
--nm;
SdrObject* pObj=GetMarkedObjectByIndex(nm);
@@ -522,8 +524,8 @@ void SdrEditView::ImpCheckToTopBtmPossible()
nPos0=pOL->GetObjCount();
pOL0=pOL;
}
- sal_uIntPtr nPos=pObj->GetOrdNum();
- bToTopPossible=nPos+1<sal_uIntPtr(nPos0);
+ const size_t nPos = pObj->GetOrdNum();
+ bToTopPossible = nPos+1 < nPos0;
nPos0=nPos;
}
}
@@ -998,7 +1000,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
if( bUndo )
BegUndo();
- sal_uInt32 nInsPos=0xFFFFFFFF;
+ size_t nInsPos = SAL_MAX_SIZE;
const SdrObject* pAttrObj = NULL;
basegfx::B2DPolyPolygon aMergePolyPolygonA;
basegfx::B2DPolyPolygon aMergePolyPolygonB;
@@ -1214,7 +1216,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly)
SdrMarkList aRemoveMerker;
SortMarkedObjects();
- sal_uInt32 nInsPos(0xFFFFFFFF);
+ size_t nInsPos = SAL_MAX_SIZE;
SdrObjList* pInsOL = 0L;
SdrPageView* pInsPV = 0L;
const SdrObject* pAttrObj = 0L;
@@ -1448,7 +1450,7 @@ bool SdrEditView::ImpCanDismantle(const SdrObject* pObj, bool bMakeLines) const
return bMin1PolyPoly && !bOtherObjs;
}
-void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, sal_uIntPtr& rPos, SdrPageView* pPV, bool bMakeLines)
+void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, size_t& rPos, SdrPageView* pPV, bool bMakeLines)
{
const SdrPathObj* pSrcPath = PTR_CAST(SdrPathObj, pObj);
const SdrObjCustomShape* pCustomShape = PTR_CAST(SdrObjCustomShape, pObj);
@@ -1624,8 +1626,8 @@ void SdrEditView::DismantleMarkedObjects(bool bMakeLines)
if (pOL!=pOL0) { pOL0=pOL; pObj->GetOrdNum(); } // make sure OrdNums are correct!
if (ImpCanDismantle(pObj,bMakeLines)) {
aRemoveMerker.InsertEntry(SdrMark(pObj,pM->GetPageView()));
- sal_uIntPtr nPos0=pObj->GetOrdNumDirect();
- sal_uIntPtr nPos=nPos0+1;
+ const size_t nPos0=pObj->GetOrdNumDirect();
+ size_t nPos=nPos0+1;
SdrObjList* pSubList=pObj->GetSubList();
if (pSubList!=NULL && !pObj->Is3DObj()) {
SdrObjListIter aIter(*pSubList,IM_DEEPNOGROUPS);
@@ -1699,7 +1701,7 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
SdrObjList* pDstLst=NULL;
// if all selected objects come from foreign object lists.
// the group object is the last one in the list.
- sal_uIntPtr nInsPos=pSrcLst->GetObjCount();
+ size_t nInsPos=pSrcLst->GetObjCount();
bool bNeedInsPos=true;
for (size_t nm=GetMarkedObjectCount(); nm>0;)
{
@@ -1752,13 +1754,13 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
if (pGrp!=NULL)
{
aNewMark.InsertEntry(SdrMark(pGrp,pPV));
- sal_uIntPtr nAnz=pDstLst->GetObjCount();
+ const size_t nAnz=pDstLst->GetObjCount();
SdrInsertReason aReason(SDRREASON_VIEWCALL,pRefObj);
pAktLst->InsertObject(pGrp,nInsPos,&aReason);
if( bUndo )
{
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pGrp,true)); // no recalculation!
- for (sal_uIntPtr no=0; no<nAnz; no++)
+ for (size_t no=0; no<nAnz; ++no)
{
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoInsertObject(*pDstLst->GetObj(no)));
}
@@ -1809,25 +1811,24 @@ void SdrEditView::UnGroupMarked()
bNameOk = false;
}
}
- sal_uIntPtr nDstCnt=pGrp->GetOrdNum();
+ size_t nDstCnt=pGrp->GetOrdNum();
SdrObjList* pDstLst=pM->GetPageView()->GetObjList();
// FIRST move contained objects to parent of group, so that
// the contained objects are NOT migrated to the UNDO-ItemPool
// when AddUndo(new SdrUndoDelObj(*pGrp)) is called.
- sal_uIntPtr nAnz=pSrcLst->GetObjCount();
- sal_uIntPtr no;
+ const size_t nAnz=pSrcLst->GetObjCount();
if( bUndo )
{
- for (no=nAnz; no>0;)
+ for (size_t no=nAnz; no>0;)
{
no--;
SdrObject* pObj=pSrcLst->GetObj(no);
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoRemoveObject(*pObj));
}
}
- for (no=0; no<nAnz; no++)
+ for (size_t no=0; no<nAnz; ++no)
{
SdrObject* pObj=pSrcLst->RemoveObject(0);
SdrInsertReason aReason(SDRREASON_VIEWCALL,pGrp);
@@ -1993,7 +1994,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrPageView* pPV=pM->GetPageView();
SdrObjList* pOL=pObj->GetObjList();
- sal_uIntPtr nInsPos=pObj->GetOrdNum()+1;
+ const size_t nInsPos=pObj->GetOrdNum()+1;
SdrGrafObj* pGraf=PTR_CAST(SdrGrafObj,pObj);
SdrOle2Obj* pOle2=PTR_CAST(SdrOle2Obj,pObj);
sal_uIntPtr nInsAnz=0;
@@ -2029,7 +2030,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
{
// transformation
GeoStat aGeoStat(pGraf ? pGraf->GetGeoStat() : pOle2->GetGeoStat());
- sal_uIntPtr nObj=nInsPos;
+ size_t nObj=nInsPos;
if(aGeoStat.nShearWink)
{
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index ec9245379231..569d59923a56 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -652,7 +652,7 @@ namespace
bool bRet(false);
bool bMaster(rList.GetPage() && rList.GetPage()->IsMasterPage());
- for(sal_uIntPtr no(rList.GetObjCount()); !bRet && no > 0; )
+ for(size_t no(rList.GetObjCount()); !bRet && no > 0; )
{
no--;
SdrObject* pObj = rList.GetObj(no);
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index e7cbae2d0edd..e907b2377a62 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -213,10 +213,10 @@ void ImpSdrGDIMetaFileImport::DoLoopActions(GDIMetaFile& rMtf, SvdProgressInfo*
}
}
-sal_uInt32 ImpSdrGDIMetaFileImport::DoImport(
+size_t ImpSdrGDIMetaFileImport::DoImport(
const GDIMetaFile& rMtf,
SdrObjList& rOL,
- sal_uLong nInsPos,
+ size_t nInsPos,
SvdProgressInfo* pProgrInfo)
{
// setup some global scale parameter
@@ -290,14 +290,11 @@ sal_uInt32 ImpSdrGDIMetaFileImport::DoImport(
nActionsToReport = 0;
// insert all objects cached in aTmpList now into rOL from nInsPos
- if(nInsPos > rOL.GetObjCount())
- {
- nInsPos = rOL.GetObjCount();
- }
+ nInsPos = std::min(nInsPos, rOL.GetObjCount());
SdrInsertReason aReason(SDRREASON_VIEWCALL);
- for(sal_uInt32 i(0); i < maTmpList.size(); i++)
+ for(size_t i = 0; i < maTmpList.size(); ++i)
{
SdrObject* pObj = maTmpList[i];
rOL.NbcInsertObject(pObj, nInsPos, &aReason);
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index 733339433bee..16e2dddcc5ce 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -162,10 +162,10 @@ public:
const Rectangle& rRect);
~ImpSdrGDIMetaFileImport();
- sal_uInt32 DoImport(
+ size_t DoImport(
const GDIMetaFile& rMtf,
SdrObjList& rDestList,
- sal_uLong nInsPos = CONTAINER_APPEND,
+ size_t nInsPos = SAL_MAX_SIZE,
SvdProgressInfo* pProgrInfo = 0);
};
diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx
index 6b2b419c80e5..b6af65bf6130 100644
--- a/svx/source/svdraw/svditer.cxx
+++ b/svx/source/svdraw/svditer.cxx
@@ -61,7 +61,7 @@ SdrObjListIter::SdrObjListIter( const SdrMarkList& rMarkList, SdrIterMode eMode,
void SdrObjListIter::ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMode eMode, bool bUseZOrder)
{
- for( sal_uIntPtr nIdx = 0, nCount = rObjList.GetObjCount(); nIdx < nCount; ++nIdx )
+ for( size_t nIdx = 0, nCount = rObjList.GetObjCount(); nIdx < nCount; ++nIdx )
{
SdrObject* pObj = bUseZOrder ?
rObjList.GetObj( nIdx ) : rObjList.GetObjectForNavigationPosition( nIdx );
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index 784dfa3395b8..391afa307f07 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -514,9 +514,9 @@ bool SdrMarkList::InsertPageView(const SdrPageView& rPV)
DeletePageView(rPV); // delete all of them, then append the entire page
SdrObject* pObj;
const SdrObjList* pOL = rPV.GetObjList();
- sal_uLong nObjAnz(pOL->GetObjCount());
+ const size_t nObjAnz(pOL->GetObjCount());
- for(sal_uLong nO(0L); nO < nObjAnz; nO++)
+ for(size_t nO = 0; nO < nObjAnz; ++nO)
{
pObj = pOL->GetObj(nO);
bool bDoIt(rPV.IsObjMarkable(pObj));
@@ -830,7 +830,7 @@ namespace sdr
{
SdrObjList* pList = pObj->GetSubList();
- for(sal_uLong a(0L); a < pList->GetObjCount(); a++)
+ for(size_t a = 0; a < pList->GetObjCount(); ++a)
{
SdrObject* pObj2 = pList->GetObj(a);
ImplCollectCompleteSelection(pObj2);
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index acf38ab54a3f..0c87d19a61f8 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -509,8 +509,8 @@ sal_uIntPtr SdrMarkView::GetMarkableObjCount() const
if(pPV)
{
SdrObjList* pOL=pPV->GetObjList();
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr nObjNum=0; nObjNum<nObjAnz; nObjNum++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t nObjNum=0; nObjNum<nObjAnz; ++nObjNum) {
SdrObject* pObj=pOL->GetObj(nObjNum);
if (IsObjMarkable(pObj,pPV)) {
nCount++;
@@ -522,14 +522,14 @@ sal_uIntPtr SdrMarkView::GetMarkableObjCount() const
bool SdrMarkView::HasMarkableObj() const
{
- sal_uIntPtr nCount=0;
+ size_t nCount=0;
SdrPageView* pPV = GetSdrPageView();
if(pPV)
{
SdrObjList* pOL=pPV->GetObjList();
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr nObjNum=0; nObjNum<nObjAnz && nCount==0; nObjNum++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t nObjNum = 0; nObjNum<nObjAnz && nCount==0; ++nObjNum) {
SdrObject* pObj=pOL->GetObj(nObjNum);
if (IsObjMarkable(pObj,pPV)) {
nCount++;
@@ -1344,7 +1344,7 @@ bool SdrMarkView::MarkNextObj(bool bPrev)
SortMarkedObjects();
const size_t nMarkAnz=GetMarkedObjectCount();
size_t nChgMarkNum = SAL_MAX_SIZE; // number of the MarkEntry we want to replace
- sal_uIntPtr nSearchObjNum = bPrev ? 0 : ULONG_MAX;
+ size_t nSearchObjNum = bPrev ? 0 : SAL_MAX_SIZE;
if (nMarkAnz!=0) {
nChgMarkNum=bPrev ? 0 : nMarkAnz-1;
SdrMark* pM=GetSdrMarkByIndex(nChgMarkNum);
@@ -1355,7 +1355,7 @@ bool SdrMarkView::MarkNextObj(bool bPrev)
SdrObject* pMarkObj=NULL;
SdrObjList* pSearchObjList=pPageView->GetObjList();
- sal_uIntPtr nObjAnz=pSearchObjList->GetObjCount();
+ const size_t nObjAnz = pSearchObjList->GetObjCount();
if (nObjAnz!=0) {
if (nSearchObjNum>nObjAnz) nSearchObjNum=nObjAnz;
while (pMarkObj==NULL && ((!bPrev && nSearchObjNum>0) || (bPrev && nSearchObjNum<nObjAnz)))
@@ -1426,9 +1426,9 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
}
if (pBtmMarkHit==NULL) { pBtmMarkHit=pTopMarkHit; nBtmMarkHit=nTopMarkHit; }
SdrObject* pBtmObjHit=pBtmMarkHit->GetMarkedSdrObj();
- sal_uIntPtr nObjAnz=pObjList->GetObjCount();
+ const size_t nObjAnz = pObjList->GetObjCount();
- sal_uInt32 nSearchBeg;
+ size_t nSearchBeg = 0;
E3dScene* pScene = NULL;
SdrObject* pObjHit = (bPrev) ? pBtmObjHit : pTopObjHit;
bool bRemap = pObjHit->ISA(E3dCompoundObject)
@@ -1458,7 +1458,7 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
nSearchBeg = nOrdNumTop;
}
- sal_uIntPtr no=nSearchBeg;
+ size_t no=nSearchBeg;
SdrObject* pFndObj=NULL;
while (pFndObj==NULL && ((!bPrev && no>0) || (bPrev && no<nObjAnz))) {
if (!bPrev) no--;
@@ -1505,9 +1505,9 @@ bool SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark)
{
pObjList=pPV->GetObjList();
Rectangle aFrm1(aR);
- sal_uIntPtr nObjAnz=pObjList->GetObjCount();
+ const size_t nObjAnz = pObjList->GetObjCount();
SdrObject* pObj;
- for (sal_uIntPtr nO=0; nO<nObjAnz; nO++) {
+ for (size_t nO=0; nO<nObjAnz; ++nO) {
pObj=pObjList->GetObj(nO);
Rectangle aRect(pObj->GetCurrentBoundRect());
if (aFrm1.IsInside(aRect)) {
@@ -1661,8 +1661,8 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
bool bRemap(pOL->GetOwnerObj() && pOL->GetOwnerObj()->ISA(E3dScene));
E3dScene* pRemapScene = (bRemap ? (E3dScene*)pOL->GetOwnerObj() : 0L);
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- sal_uIntPtr nObjNum=bBack ? 0 : nObjAnz;
+ const size_t nObjAnz=pOL->GetObjCount();
+ size_t nObjNum=bBack ? 0 : nObjAnz;
while (pRet==NULL && (bBack ? nObjNum<nObjAnz : nObjNum>0)) {
if (!bBack) nObjNum--;
SdrObject* pObj;
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 9ab9a97e8c02..8b0ee8484829 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -658,8 +658,8 @@ void SdrObject::getMergedHierarchyLayerSet(SetOfByte& rSet) const
rSet.Set(GetLayer());
SdrObjList* pOL=GetSubList();
if (pOL!=NULL) {
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr nObjNum=0; nObjNum<nObjAnz; nObjNum++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t nObjNum = 0; nObjNum<nObjAnz; ++nObjNum) {
pOL->GetObj(nObjNum)->getMergedHierarchyLayerSet(rSet);
}
}
@@ -2699,7 +2699,7 @@ SdrObject* SdrObject::ConvertToContourObj(SdrObject* pRet, bool bForceLineDash)
SdrObject* pGroup = new SdrObjGroup;
pGroup->SetModel(pRet->GetModel());
- for(sal_uInt32 a=0;a<pObjList2->GetObjCount();a++)
+ for(size_t a=0; a<pObjList2->GetObjCount(); ++a)
{
SdrObject* pIterObj = pObjList2->GetObj(a);
pGroup->GetSubList()->NbcInsertObject(ConvertToContourObj(pIterObj, bForceLineDash));
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index caca40f780ab..68665776f134 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2115,7 +2115,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
aMouseRect.Right() +=aHalfConSiz.Width();
aMouseRect.Bottom()+=aHalfConSiz.Height();
sal_uInt16 nBoundHitTol=(sal_uInt16)aHalfConSiz.Width()/2; if (nBoundHitTol==0) nBoundHitTol=1;
- sal_uIntPtr no=pOL->GetObjCount();
+ size_t no=pOL->GetObjCount();
bool bFnd = false;
SdrObjConnection aTestCon;
SdrObjConnection aBestCon;
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index f5c263246b17..339b0dfd2464 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1083,9 +1083,8 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const
// Sort into group and return ONLY those objects that can be created from the MetaFile.
ImpSdrGDIMetaFileImport aFilter(*GetModel(), GetLayer(), aRect);
SdrObjGroup* pGrp = new SdrObjGroup();
- sal_uInt32 nInsAnz = aFilter.DoImport(aMtf, *pGrp->GetSubList(), 0);
- if(nInsAnz)
+ if(aFilter.DoImport(aMtf, *pGrp->GetSubList(), 0))
{
{
// copy transformation
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 418545819c7e..87634138df20 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -88,8 +88,8 @@ void SdrObjGroup::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
{
rInfo.bNoContortion=false;
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
SdrObjTransformInfoRec aInfo;
pObj->TakeObjInfo(aInfo);
@@ -152,8 +152,8 @@ SdrLayerID SdrObjGroup::GetLayer() const
bool b1st = true;
SdrLayerID nLay=SdrLayerID(SdrObject::GetLayer());
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrLayerID nLay1=pOL->GetObj(i)->GetLayer();
if (b1st) { nLay=nLay1; b1st = false; }
else if (nLay1!=nLay) return 0;
@@ -166,8 +166,8 @@ void SdrObjGroup::NbcSetLayer(SdrLayerID nLayer)
{
SdrObject::NbcSetLayer(nLayer);
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
pOL->GetObj(i)->NbcSetLayer(nLayer);
}
}
@@ -334,9 +334,9 @@ void SdrObjGroup::RecalcSnapRect()
basegfx::B2DPolyPolygon SdrObjGroup::TakeXorPoly() const
{
basegfx::B2DPolyPolygon aRetval;
- const sal_uInt32 nObjCount(pSub->GetObjCount());
+ const size_t nObjCount(pSub->GetObjCount());
- for(sal_uInt32 a(0L); a < nObjCount; a++)
+ for(size_t a = 0; a < nObjCount; ++a)
{
SdrObject* pObj = pSub->GetObj(a);
aRetval.append(pObj->TakeXorPoly());
@@ -365,10 +365,9 @@ bool SdrObjGroup::BegCreate(SdrDragStat& /*rStat*/)
long SdrObjGroup::GetRotateAngle() const
{
- const sal_uInt32 nObjCount(pSub->GetObjCount());
long nRetval(0);
- if(nObjCount)
+ if(pSub->GetObjCount())
{
SdrObject* pObj = pSub->GetObj(0);
@@ -381,10 +380,9 @@ long SdrObjGroup::GetRotateAngle() const
long SdrObjGroup::GetShearAngle(bool /*bVertical*/) const
{
- const sal_uInt32 nObjCount(pSub->GetObjCount());
long nRetval(0);
- if(nObjCount)
+ if(pSub->GetObjCount())
{
SdrObject* pObj = pSub->GetObj(0);
@@ -426,8 +424,8 @@ void SdrObjGroup::NbcMove(const Size& rSiz)
MovePoint(aRefPoint,rSiz);
if (pSub->GetObjCount()!=0) {
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
pObj->NbcMove(rSiz);
}
@@ -458,8 +456,8 @@ void SdrObjGroup::NbcResize(const Point& rRef, const Fraction& xFact, const Frac
ResizePoint(aRefPoint,rRef,xFact,yFact);
if (pSub->GetObjCount()!=0) {
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
pObj->NbcResize(rRef,xFact,yFact);
}
@@ -475,8 +473,8 @@ void SdrObjGroup::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
SetGlueReallyAbsolute(true);
RotatePoint(aRefPoint,rRef,sn,cs);
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
pObj->NbcRotate(rRef,nWink,sn,cs);
}
@@ -490,8 +488,8 @@ void SdrObjGroup::NbcMirror(const Point& rRef1, const Point& rRef2)
SetGlueReallyAbsolute(true);
MirrorPoint(aRefPoint,rRef1,rRef2); // implementation missing in SvdEtc!
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
pObj->NbcMirror(rRef1,rRef2);
}
@@ -505,8 +503,8 @@ void SdrObjGroup::NbcShear(const Point& rRef, long nWink, double tn, bool bVShea
SetGlueReallyAbsolute(true);
ShearPoint(aRefPoint,rRef,tn);
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
pObj->NbcShear(rRef,nWink,tn,bVShear);
}
@@ -521,8 +519,8 @@ void SdrObjGroup::NbcSetAnchorPos(const Point& rPnt)
Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y());
MovePoint(aRefPoint,aSiz);
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz=pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
pObj->NbcSetAnchorPos(rPnt);
}
@@ -568,13 +566,12 @@ void SdrObjGroup::Move(const Size& rSiz)
if (pSub->GetObjCount()!=0) {
// first move the connectors, then everything else
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- sal_uIntPtr i;
- for (i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
if (pObj->IsEdgeObj()) pObj->Move(rSiz);
}
- for (i=0; i<nObjAnz; i++) {
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
if (!pObj->IsEdgeObj()) pObj->Move(rSiz);
}
@@ -613,13 +610,12 @@ void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fractio
if (pSub->GetObjCount()!=0) {
// move the connectors first, everything else afterwards
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- sal_uIntPtr i;
- for (i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
if (pObj->IsEdgeObj()) pObj->Resize(rRef,xFact,yFact,bUnsetRelative);
}
- for (i=0; i<nObjAnz; i++) {
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
if (!pObj->IsEdgeObj()) pObj->Resize(rRef,xFact,yFact,bUnsetRelative);
}
@@ -643,13 +639,12 @@ void SdrObjGroup::Rotate(const Point& rRef, long nWink, double sn, double cs)
RotatePoint(aRefPoint,rRef,sn,cs);
// move the connectors first, everything else afterwards
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- sal_uIntPtr i;
- for (i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
if (pObj->IsEdgeObj()) pObj->Rotate(rRef,nWink,sn,cs);
}
- for (i=0; i<nObjAnz; i++) {
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
if (!pObj->IsEdgeObj()) pObj->Rotate(rRef,nWink,sn,cs);
}
@@ -669,13 +664,12 @@ void SdrObjGroup::Mirror(const Point& rRef1, const Point& rRef2)
MirrorPoint(aRefPoint,rRef1,rRef2); // implementation missing in SvdEtc!
// move the connectors first, everything else afterwards
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- sal_uIntPtr i;
- for (i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
if (pObj->IsEdgeObj()) pObj->Mirror(rRef1,rRef2);
}
- for (i=0; i<nObjAnz; i++) {
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
if (!pObj->IsEdgeObj()) pObj->Mirror(rRef1,rRef2);
}
@@ -695,13 +689,12 @@ void SdrObjGroup::Shear(const Point& rRef, long nWink, double tn, bool bVShear)
ShearPoint(aRefPoint,rRef,tn);
// move the connectors first, everything else afterwards
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- sal_uIntPtr i;
- for (i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
if (pObj->IsEdgeObj()) pObj->Shear(rRef,nWink,tn,bVShear);
}
- for (i=0; i<nObjAnz; i++) {
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
if (!pObj->IsEdgeObj()) pObj->Shear(rRef,nWink,tn,bVShear);
}
@@ -723,14 +716,13 @@ void SdrObjGroup::SetAnchorPos(const Point& rPnt)
MovePoint(aRefPoint,aSiz);
// move the connectors first, everything else afterwards
SdrObjList* pOL=pSub;
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- sal_uIntPtr i;
- for (i=0; i<nObjAnz; i++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t i=0; i<nObjAnz; ++i) {
SdrObject* pObj=pOL->GetObj(i);
if (pObj->IsEdgeObj()) pObj->SetAnchorPos(rPnt);
}
- for (i=0; i<nObjAnz; i++) {
- SdrObject* pObj=pOL->GetObj(i);
+ for (size_t i=0; i<nObjAnz; ++i) {
+ SdrObject* pObj = pOL->GetObj(i);
if (!pObj->IsEdgeObj()) pObj->SetAnchorPos(rPnt);
}
if (bChg) {
@@ -771,7 +763,7 @@ SdrObject* SdrObjGroup::DoConvertToPolyObj(bool bBezier, bool bAddText) const
SdrObject* pGroup = new SdrObjGroup;
pGroup->SetModel(GetModel());
- for(sal_uInt32 a=0;a<pSub->GetObjCount();a++)
+ for(size_t a=0; a<pSub->GetObjCount(); ++a)
{
SdrObject* pIterObj = pSub->GetObj(a);
SdrObject* pResult = pIterObj->DoConvertToPolyObj(bBezier, bAddText);
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index f56886bd10ca..efd8d1663eef 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -126,11 +126,10 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
Clear();
bObjOrdNumsDirty=false;
bRectsDirty =false;
- sal_uIntPtr nCloneErrCnt=0;
- sal_uIntPtr nAnz=rSrcList.GetObjCount();
+ size_t nCloneErrCnt = 0;
+ const size_t nAnz = rSrcList.GetObjCount();
SdrInsertReason aReason(SDRREASON_COPY);
- sal_uIntPtr no;
- for (no=0; no<nAnz; no++) {
+ for (size_t no=0; no<nAnz; ++no) {
SdrObject* pSO=rSrcList.GetObj(no);
SdrObject* pDO = pSO->Clone();
@@ -138,7 +137,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
if (pDO!=NULL) {
pDO->SetModel(pModel);
pDO->SetPage(pPage);
- NbcInsertObject(pDO,CONTAINER_APPEND,&aReason);
+ NbcInsertObject(pDO, SAL_MAX_SIZE, &aReason);
} else {
nCloneErrCnt++;
}
@@ -153,7 +152,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
// BOOL SdrExchangeView::Paste(const SdrModel& rMod,...)
// void SdrEditView::CopyMarked()
if (nCloneErrCnt==0) {
- for (no=0; no<nAnz; no++) {
+ for (size_t no=0; no<nAnz; ++no) {
const SdrObject* pSrcOb=rSrcList.GetObj(no);
SdrEdgeObj* pSrcEdge=PTR_CAST(SdrEdgeObj,pSrcOb);
if (pSrcEdge!=NULL) {
@@ -254,8 +253,8 @@ void SdrObjList::SetPage(SdrPage* pNewPage)
{
if (pPage!=pNewPage) {
pPage=pNewPage;
- sal_uIntPtr nAnz=GetObjCount();
- for (sal_uIntPtr no=0; no<nAnz; no++) {
+ const size_t nAnz = GetObjCount();
+ for (size_t no=0; no<nAnz; ++no) {
SdrObject* pObj=GetObj(no);
pObj->SetPage(pPage);
}
@@ -271,8 +270,8 @@ void SdrObjList::SetModel(SdrModel* pNewModel)
{
if (pModel!=pNewModel) {
pModel=pNewModel;
- sal_uIntPtr nAnz=GetObjCount();
- for (sal_uIntPtr i=0; i<nAnz; i++) {
+ const size_t nAnz = GetObjCount();
+ for (size_t i=0; i<nAnz; ++i) {
SdrObject* pObj=GetObj(i);
pObj->SetModel(pModel);
}
@@ -281,8 +280,8 @@ void SdrObjList::SetModel(SdrModel* pNewModel)
void SdrObjList::RecalcObjOrdNums()
{
- sal_uIntPtr nAnz=GetObjCount();
- for (sal_uIntPtr no=0; no<nAnz; no++) {
+ const size_t nAnz = GetObjCount();
+ for (size_t no=0; no<nAnz; ++no) {
SdrObject* pObj=GetObj(no);
pObj->SetOrdNum(no);
}
@@ -293,9 +292,8 @@ void SdrObjList::RecalcRects()
{
aOutRect=Rectangle();
aSnapRect=aOutRect;
- sal_uIntPtr nAnz=GetObjCount();
- sal_uIntPtr i;
- for (i=0; i<nAnz; i++) {
+ const size_t nAnz = GetObjCount();
+ for (size_t i=0; i<nAnz; ++i) {
SdrObject* pObj=GetObj(i);
if (i==0) {
aOutRect=pObj->GetCurrentBoundRect();
@@ -323,12 +321,12 @@ void SdrObjList::impChildInserted(SdrObject& rChild) const
}
}
-void SdrObjList::NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrInsertReason* /*pReason*/)
+void SdrObjList::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* /*pReason*/)
{
DBG_ASSERT(pObj!=NULL,"SdrObjList::NbcInsertObject(NULL)");
if (pObj!=NULL) {
DBG_ASSERT(!pObj->IsInserted(),"ZObjekt already has the status Inserted.");
- sal_uIntPtr nAnz=GetObjCount();
+ const size_t nAnz = GetObjCount();
if (nPos>nAnz) nPos=nAnz;
InsertObjectIntoContainer(*pObj,nPos);
@@ -349,7 +347,7 @@ void SdrObjList::NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrIns
}
}
-void SdrObjList::InsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrInsertReason* pReason)
+void SdrObjList::InsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason)
{
DBG_ASSERT(pObj!=NULL,"SdrObjList::InsertObject(NULL)");
@@ -391,7 +389,7 @@ void SdrObjList::InsertObject(SdrObject* pObj, sal_uIntPtr nPos, const SdrInsert
}
}
-SdrObject* SdrObjList::NbcRemoveObject(sal_uIntPtr nObjNum)
+SdrObject* SdrObjList::NbcRemoveObject(size_t nObjNum)
{
if (nObjNum >= maList.size())
{
@@ -399,7 +397,7 @@ SdrObject* SdrObjList::NbcRemoveObject(sal_uIntPtr nObjNum)
return NULL;
}
- sal_uIntPtr nAnz=GetObjCount();
+ const size_t nAnz = GetObjCount();
SdrObject* pObj=maList[nObjNum];
RemoveObjectFromContainer(nObjNum);
@@ -413,7 +411,7 @@ SdrObject* SdrObjList::NbcRemoveObject(sal_uIntPtr nObjNum)
pObj->SetObjList(NULL);
pObj->SetPage(NULL);
if (!bObjOrdNumsDirty) { // optimizing for the case that the last object has to be removed
- if (nObjNum!=sal_uIntPtr(nAnz-1)) {
+ if (nObjNum+1!=nAnz) {
bObjOrdNumsDirty=true;
}
}
@@ -422,7 +420,7 @@ SdrObject* SdrObjList::NbcRemoveObject(sal_uIntPtr nObjNum)
return pObj;
}
-SdrObject* SdrObjList::RemoveObject(sal_uIntPtr nObjNum)
+SdrObject* SdrObjList::RemoveObject(size_t nObjNum)
{
if (nObjNum >= maList.size())
{
@@ -430,7 +428,7 @@ SdrObject* SdrObjList::RemoveObject(sal_uIntPtr nObjNum)
return NULL;
}
- sal_uIntPtr nAnz=GetObjCount();
+ const size_t nAnz = GetObjCount();
SdrObject* pObj=maList[nObjNum];
RemoveObjectFromContainer(nObjNum);
@@ -454,7 +452,7 @@ SdrObject* SdrObjList::RemoveObject(sal_uIntPtr nObjNum)
pObj->SetObjList(NULL);
pObj->SetPage(NULL);
if (!bObjOrdNumsDirty) { // optimization for the case that the last object is removed
- if (nObjNum!=sal_uIntPtr(nAnz-1)) {
+ if (nObjNum+1!=nAnz) {
bObjOrdNumsDirty=true;
}
}
@@ -470,7 +468,7 @@ SdrObject* SdrObjList::RemoveObject(sal_uIntPtr nObjNum)
return pObj;
}
-SdrObject* SdrObjList::NbcReplaceObject(SdrObject* pNewObj, sal_uIntPtr nObjNum)
+SdrObject* SdrObjList::NbcReplaceObject(SdrObject* pNewObj, size_t nObjNum)
{
if (nObjNum >= maList.size() || pNewObj == NULL)
{
@@ -505,7 +503,7 @@ SdrObject* SdrObjList::NbcReplaceObject(SdrObject* pNewObj, sal_uIntPtr nObjNum)
return pObj;
}
-SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, sal_uIntPtr nObjNum)
+SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, size_t nObjNum)
{
if (nObjNum >= maList.size())
{
@@ -561,7 +559,7 @@ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, sal_uIntPtr nObjNum)
return pObj;
}
-SdrObject* SdrObjList::NbcSetObjectOrdNum(sal_uIntPtr nOldObjNum, sal_uIntPtr nNewObjNum)
+SdrObject* SdrObjList::NbcSetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
{
if (nOldObjNum >= maList.size() || nNewObjNum >= maList.size())
{
@@ -589,7 +587,7 @@ SdrObject* SdrObjList::NbcSetObjectOrdNum(sal_uIntPtr nOldObjNum, sal_uIntPtr nN
return pObj;
}
-SdrObject* SdrObjList::SetObjectOrdNum(sal_uIntPtr nOldObjNum, sal_uIntPtr nNewObjNum)
+SdrObject* SdrObjList::SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
{
if (nOldObjNum >= maList.size() || nNewObjNum >= maList.size())
{
@@ -648,8 +646,8 @@ const Rectangle& SdrObjList::GetAllObjBoundRect() const
void SdrObjList::NbcReformatAllTextObjects()
{
- sal_uIntPtr nAnz=GetObjCount();
- sal_uIntPtr nNum=0;
+ size_t nAnz=GetObjCount();
+ size_t nNum=0;
while (nNum<nAnz)
{
@@ -689,13 +687,13 @@ void SdrObjList::ReformatAllEdgeObjects()
void SdrObjList::BurnInStyleSheetAttributes()
{
- for(sal_uInt32 a(0L); a < GetObjCount(); a++)
+ for(size_t a = 0; a < GetObjCount(); ++a)
{
GetObj(a)->BurnInStyleSheetAttributes();
}
}
-sal_uIntPtr SdrObjList::GetObjCount() const
+size_t SdrObjList::GetObjCount() const
{
return maList.size();
}
@@ -703,7 +701,7 @@ sal_uIntPtr SdrObjList::GetObjCount() const
-SdrObject* SdrObjList::GetObj(sal_uIntPtr nNum) const
+SdrObject* SdrObjList::GetObj(size_t nNum) const
{
if (nNum >= maList.size())
{
@@ -724,11 +722,11 @@ bool SdrObjList::IsReadOnly() const
return bRet;
}
-sal_uIntPtr SdrObjList::CountAllObjects() const
+size_t SdrObjList::CountAllObjects() const
{
- sal_uIntPtr nCnt=GetObjCount();
- sal_uIntPtr nAnz=nCnt;
- for (sal_uInt16 nNum=0; nNum<nAnz; nNum++) {
+ const size_t nAnz=GetObjCount();
+ size_t nCnt=nAnz;
+ for (size_t nNum=0; nNum<nAnz; nNum++) {
SdrObjList* pSubOL=GetObj(nNum)->GetSubList();
if (pSubOL!=NULL) {
nCnt+=pSubOL->CountAllObjects();
@@ -739,8 +737,7 @@ sal_uIntPtr SdrObjList::CountAllObjects() const
void SdrObjList::ForceSwapInObjects() const
{
- sal_uIntPtr nObjAnz=GetObjCount();
- for (sal_uIntPtr nObjNum=nObjAnz; nObjNum>0;) {
+ for (size_t nObjNum=GetObjCount(); nObjNum>0;) {
SdrObject* pObj=GetObj(--nObjNum);
SdrGrafObj* pGrafObj=PTR_CAST(SdrGrafObj,pObj);
if (pGrafObj!=NULL) {
@@ -755,8 +752,8 @@ void SdrObjList::ForceSwapInObjects() const
void SdrObjList::ForceSwapOutObjects() const
{
- sal_uIntPtr nObjAnz=GetObjCount();
- for (sal_uIntPtr nObjNum=nObjAnz; nObjNum>0;) {
+ const size_t nObjAnz = GetObjCount();
+ for (size_t nObjNum=nObjAnz; nObjNum>0;) {
SdrObject* pObj=GetObj(--nObjNum);
SdrGrafObj* pGrafObj=PTR_CAST(SdrGrafObj,pObj);
if (pGrafObj!=NULL) {
@@ -771,13 +768,12 @@ void SdrObjList::ForceSwapOutObjects() const
void SdrObjList::FlattenGroups()
{
- sal_Int32 nObj = GetObjCount();
- sal_Int32 i;
- for( i=nObj-1; i>=0; --i)
- UnGroupObj(i);
+ const size_t nObj = GetObjCount();
+ for( size_t i = nObj; i>0; )
+ UnGroupObj(--i);
}
-void SdrObjList::UnGroupObj( sal_uIntPtr nObjNum )
+void SdrObjList::UnGroupObj( size_t nObjNum )
{
// if the given object is no group, this method is a noop
SdrObject* pUngroupObj = GetObj( nObjNum );
@@ -794,11 +790,11 @@ void SdrObjList::UnGroupObj( sal_uIntPtr nObjNum )
pSrcLst->FlattenGroups();
// the position at which we insert the members of rUngroupGroup
- sal_Int32 nInsertPos( pUngroupGroup->GetOrdNum() );
+ size_t nInsertPos( pUngroupGroup->GetOrdNum() );
SdrObject* pObj;
- sal_Int32 i, nAnz = pSrcLst->GetObjCount();
- for( i=0; i<nAnz; ++i )
+ const size_t nAnz = pSrcLst->GetObjCount();
+ for( size_t i=0; i<nAnz; ++i )
{
pObj = pSrcLst->RemoveObject(0);
SdrInsertReason aReason(SDRREASON_VIEWCALL, pUngroupGroup);
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index addcc38352ca..c4cc0849544f 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -674,7 +674,7 @@ bool SdrPageView::IsObjMarkable(SdrObject* pObj) const
{
bool bGroupIsMarkable(false);
- for(sal_uInt32 a(0L); !bGroupIsMarkable && a < pObjList->GetObjCount(); a++)
+ for(size_t a = 0; !bGroupIsMarkable && a < pObjList->GetObjCount(); ++a)
{
SdrObject* pCandidate = pObjList->GetObj(a);
@@ -816,7 +816,7 @@ bool SdrPageView::EnterGroup(SdrObject* pObj)
// else select nothing and let the user decide what to do next
if(pNewObjList && pNewObjList->GetObjCount() == 1)
{
- SdrObject* pFirstObject = pNewObjList->GetObj(0L);
+ SdrObject* pFirstObject = pNewObjList->GetObj(0);
if(GetView().GetSdrPageView())
{
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 161e8aa38cd9..3ab08d480cd4 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -895,8 +895,8 @@ void SdrPaintView::GlueInvalidate() const
if(mpPageView)
{
const SdrObjList* pOL=mpPageView->GetObjList();
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr nObjNum=0; nObjNum<nObjAnz; nObjNum++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t nObjNum=0; nObjNum<nObjAnz; ++nObjNum) {
const SdrObject* pObj=pOL->GetObj(nObjNum);
const SdrGluePointList* pGPL=pObj->GetGluePointList();
if (pGPL!=NULL && pGPL->GetCount()!=0) {
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 430965a5690c..05e8af3fea04 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -285,9 +285,9 @@ SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1, bool bSave
{
// it's a group object!
pUndoGroup = new SdrUndoGroup(*pObj->GetModel());
- sal_uInt32 nObjAnz(pOL->GetObjCount());
+ const size_t nObjAnz(pOL->GetObjCount());
- for(sal_uInt32 nObjNum(0); nObjNum < nObjAnz; nObjNum++)
+ for(size_t nObjNum = 0; nObjNum < nObjAnz; ++nObjNum)
{
pUndoGroup->AddAction(
new SdrUndoAttrObj(*pOL->GetObj(nObjNum), bStyleSheet1));
@@ -612,8 +612,8 @@ SdrUndoGeoObj::SdrUndoGeoObj(SdrObject& rNewObj)
// If this were 3D scene, we'd only add an Undo for the scene itself
// (which we do elsewhere).
pUndoGroup=new SdrUndoGroup(*pObj->GetModel());
- sal_uIntPtr nObjAnz=pOL->GetObjCount();
- for (sal_uIntPtr nObjNum=0; nObjNum<nObjAnz; nObjNum++) {
+ const size_t nObjAnz = pOL->GetObjCount();
+ for (size_t nObjNum = 0; nObjNum<nObjAnz; ++nObjNum) {
pUndoGroup->AddAction(new SdrUndoGeoObj(*pOL->GetObj(nObjNum)));
}
}
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 8f229b04791e..535f4fc3259c 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -288,15 +288,15 @@ bool SdrExchangeView::Paste(
ResizeRect(aR,aPt0,xResize,yResize);
Point aDist(aPos-aR.Center());
Size aSiz(aDist.X(),aDist.Y());
- sal_uIntPtr nCloneErrCnt=0;
- sal_uIntPtr nOb,nObAnz=pSrcPg->GetObjCount();
+ size_t nCloneErrCnt = 0;
+ const size_t nObAnz = pSrcPg->GetObjCount();
bool bMark=pMarkPV!=NULL && !IsTextEdit() && (nOptions&SDRINSERT_DONTMARK)==0;
// #i13033#
// New mechanism to re-create the connections of cloned connectors
CloneList aCloneList;
- for (nOb=0; nOb<nObAnz; nOb++)
+ for (size_t nOb=0; nOb<nObAnz; ++nOb)
{
const SdrObject* pSrcOb=pSrcPg->GetObj(nOb);
@@ -344,7 +344,7 @@ bool SdrExchangeView::Paste(
}
SdrInsertReason aReason(SDRREASON_VIEWCALL);
- pDstLst->InsertObject(pNeuObj,CONTAINER_APPEND,&aReason);
+ pDstLst->InsertObject(pNeuObj, SAL_MAX_SIZE, &aReason);
if( bUndo )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNeuObj));
@@ -422,7 +422,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po
Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys);
pObj->SetLogicRect(aR);
SdrInsertReason aReason(SDRREASON_VIEWCALL);
- rLst.InsertObject(pObj,CONTAINER_APPEND,&aReason);
+ rLst.InsertObject(pObj, SAL_MAX_SIZE, &aReason);
if( IsUndoEnabled() )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj));
@@ -766,7 +766,7 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const
}
SdrInsertReason aReason(SDRREASON_VIEWCALL);
- pNeuPag->InsertObject(pNeuObj,CONTAINER_APPEND,&aReason);
+ pNeuPag->InsertObject(pNeuObj, SAL_MAX_SIZE, &aReason);
// #i13033#
aCloneList.AddPair(pObj, pNeuObj);
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 2902607e3bb8..707496679062 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2398,7 +2398,7 @@ bool SvxTableController::GetMarkedObjModel( SdrPage* pNewPage )
pNewTableObj->SetModel( pNewPage->GetModel() );
SdrInsertReason aReason(SDRREASON_VIEWCALL);
- pNewPage->InsertObject(pNewTableObj,CONTAINER_APPEND,&aReason);
+ pNewPage->InsertObject(pNewTableObj, SAL_MAX_SIZE, &aReason);
return true;
}
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index cfad41b4c34c..f8caf5b6d0f0 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -294,8 +294,8 @@ void SAL_CALL SvxDrawPage::remove( const Reference< drawing::XShape >& xShape )
if (pObj)
{
// remove SdrObject from page
- sal_uInt32 nCount = mpPage->GetObjCount();
- for( sal_uInt32 nNum = 0; nNum < nCount; nNum++ )
+ const size_t nCount = mpPage->GetObjCount();
+ for( size_t nNum = 0; nNum < nCount; ++nNum )
{
if(mpPage->GetObj(nNum) == pObj)
{
@@ -336,7 +336,7 @@ sal_Int32 SAL_CALL SvxDrawPage::getCount()
if( (mpModel == 0) || (mpPage == 0) )
throw lang::DisposedException();
- return( (sal_Int32) mpPage->GetObjCount() );
+ return static_cast<sal_Int32>( mpPage->GetObjCount() );
}
uno::Any SAL_CALL SvxDrawPage::getByIndex( sal_Int32 Index )
@@ -347,7 +347,7 @@ uno::Any SAL_CALL SvxDrawPage::getByIndex( sal_Int32 Index )
if( (mpModel == 0) || (mpPage == 0) )
throw lang::DisposedException();
- if ( Index < 0 || Index >= (sal_Int32)mpPage->GetObjCount() )
+ if ( Index < 0 || static_cast<size_t>(Index) >= mpPage->GetObjCount() )
throw lang::IndexOutOfBoundsException();
SdrObject* pObj = mpPage->GetObj( Index );
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 13a38104a3a6..de1ffe4e9e38 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -186,7 +186,7 @@ void SAL_CALL SvxShapeGroup::leaveGroup( ) throw(uno::RuntimeException, std::ex
// pDrView->LeaveOneGroup();
}
-void SvxShapeGroup::addUnoShape( const uno::Reference< drawing::XShape >& xShape, sal_uIntPtr nPos )
+void SvxShapeGroup::addUnoShape( const uno::Reference< drawing::XShape >& xShape, size_t nPos )
{
if (!mpObj.is() || !mxPage.is())
{
@@ -235,7 +235,7 @@ void SAL_CALL SvxShapeGroup::add( const uno::Reference< drawing::XShape >& xShap
::SolarMutexGuard aGuard;
// Add to the top of the stack (i.e. bottom of the list) by default.
- addUnoShape(xShape, 0xFFFF);
+ addUnoShape(xShape, SAL_MAX_SIZE);
}
@@ -255,8 +255,8 @@ void SAL_CALL SvxShapeGroup::remove( const uno::Reference< drawing::XShape >& xS
SdrObjList& rList = *pSdrShape->GetObjList();
- const sal_uInt32 nObjCount = rList.GetObjCount();
- sal_uInt32 nObjNum = 0;
+ const size_t nObjCount = rList.GetObjCount();
+ size_t nObjNum = 0;
while( nObjNum < nObjCount )
{
if(rList.GetObj( nObjNum ) == pSdrShape )
@@ -297,7 +297,7 @@ void SAL_CALL SvxShapeGroup::addTop( const uno::Reference< drawing::XShape >& xS
SolarMutexGuard aGuard;
// Add to the top of the stack (i.e. bottom of the list).
- addUnoShape(xShape, 0xFFFF);
+ addUnoShape(xShape, SAL_MAX_SIZE);
}
void SAL_CALL SvxShapeGroup::addBottom( const uno::Reference< drawing::XShape >& xShape )
@@ -335,7 +335,7 @@ uno::Any SAL_CALL SvxShapeGroup::getByIndex( sal_Int32 Index )
if( !mpObj.is() || mpObj->GetSubList() == NULL )
throw uno::RuntimeException();
- if( mpObj->GetSubList()->GetObjCount() <= (sal_uInt32)Index )
+ if( Index<0 || mpObj->GetSubList()->GetObjCount() <= static_cast<size_t>(Index) )
throw lang::IndexOutOfBoundsException();
SdrObject* pDestObj = mpObj->GetSubList()->GetObj( Index );
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index 58e4af4f8419..4b42b8ca86ed 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -172,8 +172,8 @@ void SAL_CALL Svx3DSceneObject::remove( const Reference< drawing::XShape >& xSha
{
SdrObjList& rList = *pSdrShape->GetObjList();
- const sal_uInt32 nObjCount = rList.GetObjCount();
- sal_uInt32 nObjNum = 0;
+ const size_t nObjCount = rList.GetObjCount();
+ size_t nObjNum = 0;
while( nObjNum < nObjCount )
{
if(rList.GetObj( nObjNum ) == pSdrShape )
@@ -216,7 +216,7 @@ uno::Any SAL_CALL Svx3DSceneObject::getByIndex( sal_Int32 Index )
if( !mpObj.is() || mpObj->GetSubList() == NULL )
throw uno::RuntimeException();
- if( mpObj->GetSubList()->GetObjCount() <= (sal_uInt32)Index )
+ if( Index<0 || mpObj->GetSubList()->GetObjCount() <= static_cast<size_t>(Index) )
throw lang::IndexOutOfBoundsException();
SdrObject* pDestObj = mpObj->GetSubList()->GetObj( Index );
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 918d0e7e6afe..5d8bfb232687 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1329,8 +1329,8 @@ void SAL_CALL SvxShape::dispose() throw(uno::RuntimeException, std::exception)
SdrPage* pPage = mpObj->GetPage();
// SdrObject aus der Page loeschen
- sal_uInt32 nCount = pPage->GetObjCount();
- for ( sal_uInt32 nNum = 0; nNum < nCount; ++nNum )
+ const size_t nCount = pPage->GetObjCount();
+ for ( size_t nNum = 0; nNum < nCount; ++nNum )
{
if ( pPage->GetObj( nNum ) == mpObj.get() )
{
@@ -2201,7 +2201,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
#ifdef DBG_UTIL
SdrObject* pCheck =
#endif
- pObjList->SetObjectOrdNum( mpObj->GetOrdNum(), (sal_uIntPtr)nNewOrdNum );
+ pObjList->SetObjectOrdNum( mpObj->GetOrdNum(), static_cast<size_t>(nNewOrdNum) );
DBG_ASSERT( pCheck == mpObj.get(), "GetOrdNum() failed!" );
}
return true;
diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx
index 5881dd938a26..5de97850654b 100644
--- a/sw/inc/dpage.hxx
+++ b/sw/inc/dpage.hxx
@@ -38,7 +38,7 @@ public:
// #i3694#
// This GetOffset() method is not needed anymore, it even leads to errors.
// virtual Point GetOffset() const;
- virtual SdrObject* ReplaceObject( SdrObject* pNewObj, sal_uLong nObjNum ) SAL_OVERRIDE;
+ virtual SdrObject* ReplaceObject( SdrObject* pNewObj, size_t nObjNum ) SAL_OVERRIDE;
virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV,
const Rectangle *pRect) const SAL_OVERRIDE;
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index e12af858a32a..0665f492d080 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -318,14 +318,14 @@ void SwUiWriterTest::testShapeTextboxDelete()
SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
SdrObject* pObject = pPage->GetObj(0);
pWrtShell->SelectObj(Point(), 0, pObject);
- sal_Int32 nActual = pPage->GetObjCount();
+ size_t nActual = pPage->GetObjCount();
// Two objects on the draw page: the shape and its textbox.
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2), nActual);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), nActual);
pWrtShell->DelSelectedObj();
nActual = pPage->GetObjCount();
// Both (not only the shape) should be removed by now (the textbox wasn't removed, so this was 1).
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nActual);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), nActual);
}
void SwUiWriterTest::testCp1000071()
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 767fec89f256..178e31d28e1a 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -333,7 +333,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
- for ( sal_uInt16 i2 = 0; i2 < pLst->GetObjCount(); ++i2 )
+ for ( size_t i2 = 0; i2 < pLst->GetObjCount(); ++i2 )
{
SdrObject* pSubObj = pLst->GetObj( i2 );
SwDrawFrmFmt *pFmt = MakeDrawFrmFmt( sDrwFmtNm,
@@ -345,7 +345,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
pFmtsAndObjs[i].push_back( std::pair< SwDrawFrmFmt*, SdrObject* >( pFmt, pSubObj ) );
if( bUndo )
- pUndo->AddObj( i2, pFmt );
+ pUndo->AddObj( static_cast<sal_uInt16>(i2), pFmt );
}
}
}
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index cd57a487a10a..f3041cfb5cb7 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -140,8 +140,8 @@ void lcl_dumpSdrModel(WriterHelper& writer, const SdrModel* pModel)
writer.writeFormatAttribute("ptr", "%p", pPage);
if (pPage)
{
- sal_Int32 nObjCount = pPage->GetObjCount();
- for (sal_Int32 i = 0; i < nObjCount; ++i)
+ const size_t nObjCount = pPage->GetObjCount();
+ for (size_t i = 0; i < nObjCount; ++i)
{
const SdrObject* pObject = pPage->GetObj(i);
writer.startElement("sdrObject");
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index cfb59bcbd217..2533d89d6aa0 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -311,7 +311,7 @@ void SwContact::_MoveObjToLayer( const bool _bToVisible,
static_cast<SdrObjGroup*>(_pDrawObj)->GetSubList();
if ( pLst )
{
- for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i )
+ for ( size_t i = 0; i < pLst->GetObjCount(); ++i )
{
_MoveObjToLayer( _bToVisible, pLst->GetObj( i ) );
}
@@ -564,7 +564,7 @@ bool CheckControlLayer( const SdrObject *pObj )
if ( pObj->ISA( SdrObjGroup ) )
{
const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList();
- for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i )
+ for ( size_t i = 0; i < pLst->GetObjCount(); ++i )
{
if ( ::CheckControlLayer( pLst->GetObj( i ) ) )
{
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 6653cbe4542a..1033a3189a8c 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -61,7 +61,7 @@ SwDPage::~SwDPage()
delete pGridLst;
}
-SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, sal_uLong nObjNum )
+SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, size_t nObjNum )
{
SdrObject *pOld = GetObj( nObjNum );
OSL_ENSURE( pOld, "Oups, Object not replaced" );
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index b8f834b89f7d..5890121d420c 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -257,7 +257,7 @@ SdrObject* SwDrawView::GetMaxToTopObj( SdrObject* pObj ) const
const SwPageFrm *pPage = pFly->FindPageFrm();
if ( pPage->GetSortedObjs() )
{
- sal_uInt32 nOrdNum = 0;
+ size_t nOrdNum = 0;
for ( sal_uInt16 i = 0; i < pPage->GetSortedObjs()->Count(); ++i )
{
const SdrObject *pO =
@@ -317,8 +317,8 @@ sal_uInt32 SwDrawView::_GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
OSL_ENSURE( pDrawPage,
"<SwDrawView::_GetMaxChildOrdNum(..) - missing drawing page at parent object - crash!" );
- sal_uInt32 nObjCount = pDrawPage->GetObjCount();
- for ( sal_uInt32 i = nObjCount-1; i > _rParentObj.GetDrawObj()->GetOrdNum() ; --i )
+ const size_t nObjCount = pDrawPage->GetObjCount();
+ for ( size_t i = nObjCount-1; i > _rParentObj.GetDrawObj()->GetOrdNum() ; --i )
{
const SdrObject* pObj = pDrawPage->GetObj( i );
@@ -358,7 +358,7 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
SdrPage* pDrawPage = GetModel()->GetPage( 0 );
// move 'repeated' ones to the same order number as the already moved one.
- sal_uInt32 nNewPos = _rMovedAnchoredObj.GetDrawObj()->GetOrdNum();
+ const size_t nNewPos = _rMovedAnchoredObj.GetDrawObj()->GetOrdNum();
while ( !aAnchoredObjs.empty() )
{
SwAnchoredObject* pAnchoredObj = aAnchoredObjs.back();
@@ -395,7 +395,7 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
pContact->GetAnchoredObjs( aAnchoredObjs );
}
// move 'repeated' ones to the same order number as the already moved one.
- const sal_uInt32 nTmpNewPos = pChildObj->GetOrdNum();
+ const size_t nTmpNewPos = pChildObj->GetOrdNum();
while ( !aAnchoredObjs.empty() )
{
SwAnchoredObject* pAnchoredObj = aAnchoredObjs.back();
@@ -437,7 +437,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
SdrPage* pDrawPage = GetModel()->GetPage( 0 );
if ( pDrawPage->IsObjOrdNumsDirty() )
pDrawPage->RecalcObjOrdNums();
- const sal_uInt32 nObjCount = pDrawPage->GetObjCount();
+ const size_t nObjCount = pDrawPage->GetObjCount();
SwAnchoredObject* pMovedAnchoredObj =
::GetUserCall( pObj )->GetAnchoredObj( pObj );
@@ -451,7 +451,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
{
if ( bMovedForward )
{
- sal_uInt32 nMaxChildOrdNumWithoutMoved =
+ const size_t nMaxChildOrdNumWithoutMoved =
_GetMaxChildOrdNum( *pParentAnchoredObj, pMovedAnchoredObj->GetDrawObj() );
if ( nNewPos > nMaxChildOrdNumWithoutMoved+1 )
{
@@ -462,7 +462,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
}
else
{
- const sal_uInt32 nParentOrdNum = pParentAnchoredObj->GetDrawObj()->GetOrdNum();
+ const size_t nParentOrdNum = pParentAnchoredObj->GetDrawObj()->GetOrdNum();
if ( nNewPos < nParentOrdNum )
{
// set position to the bottom of the 'child' object group
@@ -482,7 +482,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
pDrawPage->GetObj( bMovedForward ? nNewPos - 1 : nNewPos + 1 );
if ( pTmpObj )
{
- sal_uInt32 nTmpNewPos( nNewPos );
+ size_t nTmpNewPos( nNewPos );
if ( bMovedForward )
{
// move before the top 'repeated' object
@@ -519,7 +519,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
{
// determine position before the object before its top 'child' object
const SdrObject* pTmpObj = pDrawPage->GetObj( nMaxChildOrdNum );
- sal_uInt32 nTmpNewPos = ::GetUserCall( pTmpObj )->GetMaxOrdNum() + 1;
+ size_t nTmpNewPos = ::GetUserCall( pTmpObj )->GetMaxOrdNum() + 1;
if ( nTmpNewPos >= nObjCount )
{
--nTmpNewPos;
@@ -538,7 +538,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
if ( ( bMovedForward && nNewPos < nObjCount - 1 ) ||
( !bMovedForward && nNewPos > 0 ) )
{
- sal_uInt32 nTmpNewPos( nNewPos );
+ size_t nTmpNewPos( nNewPos );
const SwFrmFmt* pParentFrmFmt =
pParentAnchoredObj ? &(pParentAnchoredObj->GetFrmFmt()) : 0L;
const SdrObject* pTmpObj = pDrawPage->GetObj( nNewPos + 1 );
@@ -590,7 +590,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
rImp.AddAccessibleFrm( pFlyFrm );
const sal_uInt32 nChildNewPos = bMovedForward ? nNewPos : nNewPos+1;
- sal_uInt32 i = bMovedForward ? nOldPos : nObjCount-1;
+ size_t i = bMovedForward ? nOldPos : nObjCount-1;
do
{
SdrObject* pTmpObj = pDrawPage->GetObj( i );
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 09473b94c11d..49dd779dd40e 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1149,7 +1149,7 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
if ( bRet )
{
const SdrPage* pPage = pIDDMA->GetDrawModel()->GetPage(0);
- for(sal_uInt32 a(pObj->GetOrdNum() + 1); bRet && a < pPage->GetObjCount(); a++)
+ for(size_t a = pObj->GetOrdNum()+1; bRet && a < pPage->GetObjCount(); ++a)
{
SdrObject *pCandidate = pPage->GetObj(a);
@@ -1181,7 +1181,7 @@ static bool lcl_IsControlGroup( const SdrObject *pObj )
{
bRet = true;
const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList();
- for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i )
+ for ( size_t i = 0; i < pLst->GetObjCount(); ++i )
if( !::lcl_IsControlGroup( pLst->GetObj( i ) ) )
return false;
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index b744ec834a22..987594488998 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -374,7 +374,7 @@ SwVirtFlyDrawObj* SwFlyFrm::CreateNewRef( SwFlyDrawContact *pContact )
SdrPage* pPg( 0L );
if ( 0 != ( pPg = pContact->GetMaster()->GetPage() ) )
{
- const sal_uInt32 nOrdNum = pContact->GetMaster()->GetOrdNum();
+ const size_t nOrdNum = pContact->GetMaster()->GetOrdNum();
pPg->ReplaceObject( pDrawObj, nOrdNum );
}
// #i27030# - insert new <SwVirtFlyDrawObj> instance
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index efb1fc9078f9..6ca48a712c46 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -609,7 +609,7 @@ SwRootFrm::~SwRootFrm()
void SwRootFrm::RemoveMasterObjs( SdrPage *pPg )
{
// Remove all master objects from the Page. But don't delete!
- for( sal_uLong i = pPg ? pPg->GetObjCount() : 0; i; )
+ for( size_t i = pPg ? pPg->GetObjCount() : 0; i; )
{
SdrObject* pObj = pPg->GetObj( --i );
if( pObj->ISA(SwFlyDrawObj ) )
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index e8a8bdb89726..872537f00d16 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -207,8 +207,8 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
OSL_ENSURE( pSh->getIDocumentDrawModelAccess()->GetDrawModel(), "NotifySizeChg without DrawModel" );
SdrPage* pPage = pSh->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 );
- const sal_uLong nObjs = pPage->GetObjCount();
- for( sal_uLong nObj = 0; nObj < nObjs; ++nObj )
+ const size_t nObjs = pPage->GetObjCount();
+ for( size_t nObj = 0; nObj < nObjs; ++nObj )
{
SdrObject *pObj = pPage->GetObj( nObj );
if( !pObj->ISA(SwVirtFlyDrawObj) )
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 9a470507b28c..4a0141450a96 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2748,7 +2748,7 @@ SwFrmFmt* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject,
// Objekt ist Bestandteil einer Gruppe?
SdrObject* pGroupObject = pSdrTextObj->GetUpGroup();
- sal_uInt32 nOrdNum = pSdrTextObj->GetOrdNum();
+ const size_t nOrdNum = pSdrTextObj->GetOrdNum();
bool bEraseThisObject;
InsertTxbxText( pSdrTextObj, &aObjSize, pRecord->aTextId.nTxBxS,
pRecord->aTextId.nSequence, nGrafAnchorCp, pRetFrmFmt,
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index f5eb9aa1895d..81a1c1bc910c 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -688,9 +688,9 @@ bool SwView::HasDrwObj(SdrObject *pSdrObj) const
if (pSdrObj->IsGroupObject())
{
SdrObjList* pList = pSdrObj->GetSubList();
- sal_uInt32 nCnt = pList->GetObjCount();
+ const size_t nCnt = pList->GetObjCount();
- for (sal_uInt32 i = 0; i < nCnt; i++)
+ for (size_t i = 0; i < nCnt; ++i)
if ((bRet = HasDrwObj(pList->GetObj(i))))
break;
}
@@ -707,9 +707,9 @@ bool SwView::HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const
if (pSdrObj->IsGroupObject())
{
SdrObjList* pList = pSdrObj->GetSubList();
- sal_uInt32 nCnt = pList->GetObjCount();
+ const size_t nCnt = pList->GetObjCount();
- for (sal_uInt32 i = 0; i < nCnt; i++)
+ for (size_t i = 0; i < nCnt; ++i)
if ((bRet = HasOnlyObj(pList->GetObj(i), eObjInventor)) == false)
break;
}
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 70e6e2246b43..eb2889cc7a8c 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -419,8 +419,8 @@ void SwContentType::Init(bool* pbInvalidateWindow)
if(pModel)
{
SdrPage* pPage = pModel->GetPage(0);
- sal_uInt32 nCount = pPage->GetObjCount();
- for( sal_uInt32 i=0; i< nCount; i++ )
+ const size_t nCount = pPage->GetObjCount();
+ for( size_t i=0; i<nCount; ++i )
{
SdrObject* pTemp = pPage->GetObj(i);
// #i51726# - all drawing objects can be named now
@@ -747,8 +747,8 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
if(pModel)
{
SdrPage* pPage = pModel->GetPage(0);
- sal_uInt32 nCount = pPage->GetObjCount();
- for( sal_uInt32 i=0; i< nCount; i++ )
+ const size_t nCount = pPage->GetObjCount();
+ for( size_t i=0; i<nCount; ++i )
{
SdrObject* pTemp = pPage->GetObj(i);
// #i51726# - all drawing objects can be named now
@@ -873,8 +873,8 @@ OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const
{
SwDrawModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
SdrPage* pPage = pDrawModel->GetPage(0);
- const sal_uInt32 nCount = pPage->GetObjCount();
- for( sal_uInt32 i=0; i< nCount; i++ )
+ const size_t nCount = pPage->GetObjCount();
+ for( size_t i=0; i<nCount; ++i )
{
pTemp = pPage->GetObj(i);
sal_uInt16 nCmpId;
@@ -965,8 +965,8 @@ OUString SwContentTree::GetEntryLongDescription( SvTreeListEntry* pEntry ) const
{
SwDrawModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
SdrPage* pPage = pDrawModel->GetPage(0);
- sal_uInt32 nCount = pPage->GetObjCount();
- for( sal_uInt32 i=0; i< nCount; i++ )
+ const size_t nCount = pPage->GetObjCount();
+ for( size_t i=0; i<nCount; ++i )
{
pTemp = pPage->GetObj(i);
sal_uInt16 nCmpId;
@@ -1407,9 +1407,9 @@ SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
{
SwDrawModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
SdrPage* pPage = pDrawModel->GetPage(0);
- sal_uInt32 nCount = pPage->GetObjCount();
+ const size_t nCount = pPage->GetObjCount();
- for( sal_uInt32 i=0; i< nCount; i++ )
+ for( size_t i=0; i<nCount; ++i )
{
SdrObject* pTemp = pPage->GetObj(i);
if( pTemp->GetName() == pCnt->GetName())
@@ -2669,7 +2669,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
SwDrawModel* pDrawModel = pActiveShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel();
SdrPage* pPage = pDrawModel->GetPage(0);
- sal_uInt32 nCount = pPage->GetObjCount();
+ const size_t nCount = pPage->GetObjCount();
bool hasObjectMarked = false;
SdrObject* pObject = NULL;
@@ -2684,7 +2684,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
}
}
- for( sal_uInt32 i=0; i< nCount; i++ )
+ for( size_t i=0; i<nCount; ++i )
{
SdrObject* pTemp = pPage->GetObj(i);
bool bMark = pDrawView->IsObjMarked(pTemp);
@@ -3343,8 +3343,8 @@ void SwContentTree::GotoContent(SwContent* pCnt)
pDrawView->UnmarkAll();
SwDrawModel* _pModel = pActiveShell->getIDocumentDrawModelAccess()->GetDrawModel();
SdrPage* pPage = _pModel->GetPage(0);
- sal_uInt32 nCount = pPage->GetObjCount();
- for( sal_uInt32 i=0; i< nCount; i++ )
+ const size_t nCount = pPage->GetObjCount();
+ for( size_t i=0; i<nCount; ++i )
{
SdrObject* pTemp = pPage->GetObj(i);
// #i51726# - all drawing objects can be named now