[Libreoffice-commits] core.git: 19 commits - basctl/source chart2/source cui/source include/svx reportdesign/inc reportdesign/source sc/qa sc/source sd/inc sd/qa sd/source svx/source sw/inc sw/qa sw/source
Matteo Casalin
matteo.casalin at yahoo.com
Sat Aug 16 12:53:20 PDT 2014
basctl/source/accessibility/accessibledialogwindow.cxx | 6
basctl/source/dlged/dlged.cxx | 12
basctl/source/dlged/dlgedobj.cxx | 6
basctl/source/dlged/dlgedpage.cxx | 2
basctl/source/dlged/propbrw.cxx | 6
basctl/source/inc/dlgedpage.hxx | 2
chart2/source/controller/drawinglayer/ViewElementListProvider.cxx | 2
chart2/source/controller/inc/DrawViewWrapper.hxx | 4
chart2/source/view/main/DrawModelWrapper.cxx | 4
cui/source/tabpages/swpossizetabpage.cxx | 4
cui/source/tabpages/tpline.cxx | 6
cui/source/tabpages/transfrm.cxx | 2
include/svx/fmpage.hxx | 4
include/svx/obj3d.hxx | 8
include/svx/svdhdl.hxx | 10
include/svx/svdmark.hxx | 11
include/svx/svdmrkv.hxx | 26 -
include/svx/svdpage.hxx | 24 -
include/svx/unoshape.hxx | 2
reportdesign/inc/RptPage.hxx | 4
reportdesign/source/core/sdr/RptPage.cxx | 12
reportdesign/source/ui/report/FixedTextColor.cxx | 2
reportdesign/source/ui/report/FormattedFieldBeautifier.cxx | 2
reportdesign/source/ui/report/ReportSection.cxx | 13
reportdesign/source/ui/report/SectionView.cxx | 19
reportdesign/source/ui/report/ViewsWindow.cxx | 14
reportdesign/source/ui/report/dlgedfunc.cxx | 4
reportdesign/source/ui/report/propbrw.cxx | 4
sc/qa/unit/filters-test.cxx | 2
sc/qa/unit/subsequent_filters-test.cxx | 6
sc/qa/unit/ucalc.cxx | 2
sc/source/core/data/drwlayer.cxx | 26 -
sc/source/core/tool/detfunc.cxx | 29 -
sc/source/filter/html/htmlexp2.cxx | 3
sc/source/ui/Accessibility/AccessibleDocument.cxx | 4
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 4
sc/source/ui/app/drwtrans.cxx | 4
sc/source/ui/app/seltrans.cxx | 2
sc/source/ui/drawfunc/drawsh.cxx | 6
sc/source/ui/drawfunc/drawsh2.cxx | 9
sc/source/ui/drawfunc/drawsh5.cxx | 11
sc/source/ui/drawfunc/fudraw.cxx | 6
sc/source/ui/drawfunc/fusel.cxx | 8
sc/source/ui/drawfunc/futext.cxx | 2
sc/source/ui/unoobj/viewuno.cxx | 10
sc/source/ui/view/drawvie3.cxx | 12
sc/source/ui/view/drawvie4.cxx | 8
sc/source/ui/view/drawview.cxx | 22 -
sc/source/ui/view/gridwin.cxx | 4
sc/source/ui/view/viewfun5.cxx | 2
sc/source/ui/view/viewfun7.cxx | 4
sd/inc/sdpage.hxx | 10
sd/qa/unit/import-tests.cxx | 4
sd/source/core/drawdoc2.cxx | 4
sd/source/core/drawdoc3.cxx | 8
sd/source/core/drawdoc4.cxx | 4
sd/source/core/sdpage.cxx | 21
sd/source/core/sdpage2.cxx | 8
sd/source/filter/html/htmlex.cxx | 6
sd/source/filter/xml/sdtransform.cxx | 4
sd/source/ui/animations/motionpathtag.cxx | 18
sd/source/ui/app/sdxfer.cxx | 2
sd/source/ui/dlg/animobjs.cxx | 16
sd/source/ui/dlg/dlgassim.cxx | 4
sd/source/ui/dlg/dlgolbul.cxx | 4
sd/source/ui/dlg/masterlayoutdlg.cxx | 3
sd/source/ui/docshell/docshel3.cxx | 4
sd/source/ui/func/fuconarc.cxx | 2
sd/source/ui/func/fuconbez.cxx | 4
sd/source/ui/func/fuconstr.cxx | 3
sd/source/ui/func/fucopy.cxx | 8
sd/source/ui/func/fuformatpaintbrush.cxx | 5
sd/source/ui/func/fumorph.cxx | 4
sd/source/ui/func/fuoaprms.cxx | 7
sd/source/ui/func/fuolbull.cxx | 4
sd/source/ui/func/fupoor.cxx | 2
sd/source/ui/func/fusel.cxx | 5
sd/source/ui/func/futext.cxx | 2
sd/source/ui/unoidl/SdUnoDrawView.cxx | 4
sd/source/ui/unoidl/unopage.cxx | 9
sd/source/ui/view/DocumentRenderer.cxx | 2
sd/source/ui/view/Outliner.cxx | 8
sd/source/ui/view/drawview.cxx | 8
sd/source/ui/view/drviews2.cxx | 27 -
sd/source/ui/view/drviews6.cxx | 2
sd/source/ui/view/drviews7.cxx | 8
sd/source/ui/view/drviewsa.cxx | 4
sd/source/ui/view/drviewse.cxx | 6
sd/source/ui/view/drviewsf.cxx | 4
sd/source/ui/view/drviewsg.cxx | 3
sd/source/ui/view/drviewsj.cxx | 6
sd/source/ui/view/outlview.cxx | 8
sd/source/ui/view/sdview.cxx | 17
sd/source/ui/view/sdview2.cxx | 19
sd/source/ui/view/sdview3.cxx | 10
sd/source/ui/view/viewshel.cxx | 10
svx/source/accessibility/AccessibleShape.cxx | 4
svx/source/accessibility/GraphCtlAccessibleContext.cxx | 11
svx/source/customshapes/EnhancedCustomShape2d.cxx | 16
svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 2
svx/source/dialog/connctrl.cxx | 6
svx/source/dialog/contwnd.cxx | 2
svx/source/dialog/graphctl.cxx | 2
svx/source/dialog/imapwnd.cxx | 16
svx/source/engine3d/dragmt3d.cxx | 25 -
svx/source/engine3d/obj3d.cxx | 24 -
svx/source/engine3d/scene3d.cxx | 12
svx/source/engine3d/view3d.cxx | 68 +--
svx/source/engine3d/view3d1.cxx | 10
svx/source/form/fmpage.cxx | 4
svx/source/form/fmshimp.cxx | 8
svx/source/form/fmvwimp.cxx | 22 -
svx/source/form/navigatortreemodel.cxx | 4
svx/source/sdr/properties/e3dproperties.cxx | 4
svx/source/sdr/properties/e3dsceneproperties.cxx | 22 -
svx/source/sdr/properties/groupproperties.cxx | 32 -
svx/source/sidebar/SelectionAnalyzer.cxx | 12
svx/source/svdraw/clonelist.cxx | 2
svx/source/svdraw/sdrhittesthelper.cxx | 2
svx/source/svdraw/svddrgmt.cxx | 28 -
svx/source/svdraw/svddrgv.cxx | 5
svx/source/svdraw/svdedtv.cxx | 65 +-
svx/source/svdraw/svdedtv1.cxx | 87 +--
svx/source/svdraw/svdedtv2.cxx | 218 ++++------
svx/source/svdraw/svdedxv.cxx | 6
svx/source/svdraw/svdetc.cxx | 2
svx/source/svdraw/svdfmtf.cxx | 11
svx/source/svdraw/svdfmtf.hxx | 4
svx/source/svdraw/svdglev.cxx | 16
svx/source/svdraw/svdhdl.cxx | 67 +--
svx/source/svdraw/svditer.cxx | 4
svx/source/svdraw/svdmark.cxx | 73 +--
svx/source/svdraw/svdmrkv.cxx | 152 +++---
svx/source/svdraw/svdmrkv1.cxx | 84 +--
svx/source/svdraw/svdobj.cxx | 6
svx/source/svdraw/svdoedge.cxx | 2
svx/source/svdraw/svdograf.cxx | 3
svx/source/svdraw/svdogrp.cxx | 92 +---
svx/source/svdraw/svdopath.cxx | 8
svx/source/svdraw/svdovirt.cxx | 6
svx/source/svdraw/svdpage.cxx | 94 ++--
svx/source/svdraw/svdpagv.cxx | 4
svx/source/svdraw/svdpntv.cxx | 4
svx/source/svdraw/svdpoev.cxx | 48 +-
svx/source/svdraw/svdundo.cxx | 12
svx/source/svdraw/svdview.cxx | 16
svx/source/svdraw/svdxcgv.cxx | 21
svx/source/table/svdotable.cxx | 8
svx/source/table/tablecontroller.cxx | 2
svx/source/tbxctrls/grafctrl.cxx | 2
svx/source/toolbars/extrusionbar.cxx | 36 -
svx/source/toolbars/fontworkbar.cxx | 28 -
svx/source/unodraw/unopage.cxx | 8
svx/source/unodraw/unoshap2.cxx | 14
svx/source/unodraw/unoshap3.cxx | 6
svx/source/unodraw/unoshape.cxx | 6
sw/inc/dpage.hxx | 2
sw/qa/extras/uiwriter/uiwriter.cxx | 6
sw/source/core/access/accdoc.cxx | 2
sw/source/core/doc/docdraw.cxx | 17
sw/source/core/doc/docfly.cxx | 2
sw/source/core/docnode/nodedump.cxx | 4
sw/source/core/draw/dcontact.cxx | 4
sw/source/core/draw/dpage.cxx | 2
sw/source/core/draw/dview.cxx | 34 -
sw/source/core/edit/edundo.cxx | 2
sw/source/core/frmedt/fecopy.cxx | 17
sw/source/core/frmedt/fefly1.cxx | 2
sw/source/core/frmedt/feshview.cxx | 52 +-
sw/source/core/frmedt/fews.cxx | 2
sw/source/core/layout/fly.cxx | 2
sw/source/core/layout/newfrm.cxx | 2
sw/source/core/undo/undraw.cxx | 6
sw/source/core/unocore/unodraw.cxx | 2
sw/source/core/view/vdraw.cxx | 4
sw/source/filter/ww8/ww8graf.cxx | 2
sw/source/uibase/inc/tabsh.hxx | 1
sw/source/uibase/shells/drwbassh.cxx | 4
sw/source/uibase/shells/langhelper.cxx | 23 -
sw/source/uibase/shells/listsh.cxx | 10
sw/source/uibase/shells/mediash.cxx | 3
sw/source/uibase/shells/navsh.cxx | 64 +-
sw/source/uibase/shells/tabsh.cxx | 196 ++++----
sw/source/uibase/shells/textfld.cxx | 48 +-
sw/source/uibase/uiview/viewdraw.cxx | 12
sw/source/uibase/uno/unotxvw.cxx | 2
sw/source/uibase/utlui/content.cxx | 28 -
187 files changed, 1361 insertions(+), 1476 deletions(-)
New commits:
commit bc69fc451c0c60b5054c2bfd1f79778b056778c2
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sat Aug 16 16:55:36 2014 +0200
Reserve vector capacity in advance
Change-Id: I2ee5913a274eecf86ad6bbf19b99e1fe61f0ade7
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 7496eab..175b2a0 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2248,6 +2248,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
if ( bSortFilledObjectsToBack )
{
std::vector< SdrPathObj* > vTempList;
+ vTempList.reserve(vObjectList.size());
for ( size_t i = 0; i < vObjectList.size(); ++i )
{
commit a7e2d3280f17d4cd8afd2f4006855a4fea129034
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sat Aug 16 16:52:10 2014 +0200
Simplify by early bail-out
Change-Id: Id3789fd994b54813b6f72857a625b496c7a6eef0
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 0c87d19..2f3686a 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -522,21 +522,19 @@ sal_uIntPtr SdrMarkView::GetMarkableObjCount() const
bool SdrMarkView::HasMarkableObj() const
{
- size_t nCount=0;
-
SdrPageView* pPV = GetSdrPageView();
if(pPV)
{
SdrObjList* pOL=pPV->GetObjList();
const size_t nObjAnz = pOL->GetObjCount();
- for (size_t nObjNum = 0; nObjNum<nObjAnz && nCount==0; ++nObjNum) {
+ for (size_t nObjNum = 0; nObjNum<nObjAnz; ++nObjNum) {
SdrObject* pObj=pOL->GetObj(nObjNum);
if (IsObjMarkable(pObj,pPV)) {
- nCount++;
+ return true;
}
}
}
- return nCount!=0;
+ return false;
}
void SdrMarkView::hideMarkHandles()
commit 47e2fd0dc8d88af120508e463decf5b15563a629
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sat Aug 16 12:59:11 2014 +0200
Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx
index 280b8ed..7a21338 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 c34a3b7..41230f6 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 fab4e7f..c91c800 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 c170032..86a792f 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 13d3001..b92760f 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 af648da..f304034 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 7b5d0a1..5baedd3 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 58a9246..6221929 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 e011e26..7331b1d 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 24b0c9c..9e4ed03 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 a3c4f78..ae8dbc8 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 f1db353..cf9b40a 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 518293b..b320a3e 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 242c7b4..4fa61a1 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 6b1346a..17273c6 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 2d4042e..217d725 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 b26e6bf..74c2375 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 d50a6f8..27db9c0 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 c2fe73a..3622600 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 644f7fb..d9097bf 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 79c989e..70f7634 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 6e12d9c..c71b7c5 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 5894fc6..d7cc9c4 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 6411318..c38a8dc 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 ffa2ba4..1afaa5b 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 a63cd3f..758cf0f 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 10292a9..fcbdcea 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 24a8c5a..8d7d71c 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 f5481b8..25859d3 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 c3f1a38..391b0ef 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 20c770e..288ac79 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 7190291..3bff50d 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 72fab2c..e5533b8 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 fbaf8919..4f9b5f4 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 9e368eb..4a631d9 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 9337960..d49893a 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 50245c4..d4df5db 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 1366557..cb9e185 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 1e5c887..a3fe2f1 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 a104958..0fa83e4 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 9ffff9b..1c11c3d 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 21aa64b..eb4e4fd 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 a80746e..07f91ef 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 461eee3..7f57ddf 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 541b38a..ad60555 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 272a95d..c113f38 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 821d049..3c99d4d 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 def627d..ba5445d 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 a76bb0b..f873ad4 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 c60f9e7..9d75405 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 63dde67..ec0d369 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 894de0e..04b85ba 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 9f54253..7496eab 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 6175f6e..b0bd2a3 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 82153a3..bcf2061 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 0c1df56..d1765f6 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 6156dee..36af678 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 973d307..ff32a41 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 40e606a..3978fad 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 9702cac..960fac5 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 8f194a4..9de4503 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 abf3a57..252ce39 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 7ae2d7e..6a5d790 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 736bd8b..0dc7f00 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 4bbe3ac..48dff57 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 e4421f5..0ce6be8 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 b994eb0..d4985f7 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 9960137..5eb9fba 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 6f027a4..96ca235 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 48a286f..130690d 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 ecbfae9..693268d 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;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list