From 47e2fd0dc8d88af120508e463decf5b15563a629 Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Sat, 16 Aug 2014 12:59:11 +0200 Subject: Consistently use size_t and SAL_MAX_SIZE Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec --- 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 | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'reportdesign') 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(GetObj(i)); @@ -78,7 +78,7 @@ sal_uLong OReportPage::getIndexOf(const uno::Reference< report::XReportComponent break; } } - return i; + return static_cast(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;igetPage(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); -- cgit v1.2.3