diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-16 12:59:11 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-16 21:52:32 +0200 |
commit | 47e2fd0dc8d88af120508e463decf5b15563a629 (patch) | |
tree | 55ca49e099c6401643772db012fae6e3ec15c501 /reportdesign | |
parent | df159d3cd0bce255e14839a81d921e73771ca886 (diff) |
Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/inc/RptPage.hxx | 4 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/RptPage.cxx | 12 | ||||
-rw-r--r-- | reportdesign/source/ui/report/FixedTextColor.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/FormattedFieldBeautifier.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportSection.cxx | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/reportdesign/inc/RptPage.hxx b/reportdesign/inc/RptPage.hxx index 518293b8149b..b320a3eb0861 100644 --- a/reportdesign/inc/RptPage.hxx +++ b/reportdesign/inc/RptPage.hxx @@ -60,8 +60,8 @@ public: virtual SdrPage* Clone() const SAL_OVERRIDE; using SdrPage::Clone; - virtual void NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason) SAL_OVERRIDE; - virtual SdrObject* RemoveObject(sal_uLong nObjNum) SAL_OVERRIDE; + virtual void NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason) SAL_OVERRIDE; + virtual SdrObject* RemoveObject(size_t nObjNum) SAL_OVERRIDE; /** returns the index inside the object list which belongs to the report component. @param _xObject the report component diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx index 242c7b4ead80..4fa61a102a6e 100644 --- a/reportdesign/source/core/sdr/RptPage.cxx +++ b/reportdesign/source/core/sdr/RptPage.cxx @@ -67,8 +67,8 @@ SdrPage* OReportPage::Clone() const sal_uLong OReportPage::getIndexOf(const uno::Reference< report::XReportComponent >& _xObject) { - sal_uLong nCount = GetObjCount(); - sal_uLong i = 0; + const size_t nCount = GetObjCount(); + size_t i = 0; for (; i < nCount; ++i) { OObjectBase* pObj = dynamic_cast<OObjectBase*>(GetObj(i)); @@ -78,7 +78,7 @@ sal_uLong OReportPage::getIndexOf(const uno::Reference< report::XReportComponent break; } } - return i; + return static_cast<sal_uLong>(i); } void OReportPage::removeSdrObject(const uno::Reference< report::XReportComponent >& _xObject) @@ -94,7 +94,7 @@ void OReportPage::removeSdrObject(const uno::Reference< report::XReportComponent } } -SdrObject* OReportPage::RemoveObject(sal_uLong nObjNum) +SdrObject* OReportPage::RemoveObject(size_t nObjNum) { SdrObject* pObj = SdrPage::RemoveObject(nObjNum); if (getSpecialMode()) @@ -142,7 +142,7 @@ void OReportPage::removeTempObject(SdrObject *_pToRemoveObj) { if (_pToRemoveObj) { - for (sal_uLong i=0;i<GetObjCount();i++) + for (size_t i=0; i<GetObjCount(); ++i) { SdrObject *aObj = GetObj(i); if (aObj && aObj == _pToRemoveObj) @@ -171,7 +171,7 @@ void OReportPage::resetSpecialMode() m_bSpecialInsertMode = false; } -void OReportPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason) +void OReportPage::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason) { SdrPage::NbcInsertObject(pObj, nPos, pReason); diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx index 6b1346a88d2d..17273c60d498 100644 --- a/reportdesign/source/ui/report/FixedTextColor.cxx +++ b/reportdesign/source/ui/report/FixedTextColor.cxx @@ -165,7 +165,7 @@ namespace rptui if ( xSection.is() ) { OReportPage *pPage = pModel->getPage(xSection); - sal_uLong nIndex = pPage->getIndexOf(_xFixedText.get()); + const size_t nIndex = pPage->getIndexOf(_xFixedText.get()); if (nIndex < pPage->GetObjCount() ) { SdrObject *pObject = pPage->GetObj(nIndex); diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx index 2d4042e6c0a6..217d725d2820 100644 --- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx +++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx @@ -166,7 +166,7 @@ namespace rptui if ( xSection.is() ) { OReportPage *pPage = pModel->getPage(xSection); - sal_uLong nIndex = pPage->getIndexOf(_xComponent); + const size_t nIndex = pPage->getIndexOf(_xComponent); if (nIndex < pPage->GetObjCount() ) { SdrObject *pObject = pPage->GetObj(nIndex); diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index b26e6bf0b21b..74c2375d7a99 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -268,7 +268,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC pNeuObj->SetPage( m_pPage ); pNeuObj->SetModel( m_pModel.get() ); SdrInsertReason aReason(SDRREASON_VIEWCALL); - m_pPage->InsertObject(pNeuObj,CONTAINER_APPEND,&aReason); + m_pPage->InsertObject(pNeuObj, SAL_MAX_SIZE, &aReason); Rectangle aRet(VCLPoint((*pCopiesIter)->getPosition()),VCLSize((*pCopiesIter)->getSize())); aRet.setHeight(aRet.getHeight() + 1); |