summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortymyjan <tymyjan@yahoo.co.uk>2016-07-19 22:40:29 +0200
committerMichael Stahl <mstahl@redhat.com>2016-07-26 15:37:05 +0000
commitd2e4753c3f511cfc6b2932ce60d0bc2e09296f9f (patch)
tree80cffab973d1b937f3e14a298f84d07ca15409c4
parentd357334a0237bda6d9c090990d44e46c6af8edf3 (diff)
tdf#75280 Cleaning up of sal_uIntPtr usage #4a
Change-Id: I488baed0ffc3fea9c42bad1647a034cd5e9b28bb Reviewed-on: https://gerrit.libreoffice.org/27325 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--include/svx/svdetc.hxx46
-rw-r--r--svx/source/dialog/swframeexample.cxx28
-rw-r--r--svx/source/svdraw/svdetc.cxx24
-rw-r--r--svx/source/svdraw/svdglev.cxx8
4 files changed, 53 insertions, 53 deletions
diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index 9beca6f4ac18..20750c6a4a0b 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -65,7 +65,7 @@ class SVX_DLLPUBLIC SdrEngineDefaults
{
friend class SdrAttrObj;
Color aFontColor;
- sal_uIntPtr nFontHeight;
+ size_t nFontHeight;
Fraction aMapFraction;
private:
@@ -81,7 +81,7 @@ public:
// see below for further details). The default setting 847/100mm corresponds to about
// 24 Point. If e.g. one would use Twips (SetMapUnit(MAP_TWIP)) (20 Twip = 1 Point)
// instead, one would need to set the font height to 480, in order to get a 24 Point height.
- static sal_uIntPtr GetFontHeight() { return GetDefaults().nFontHeight; }
+ static size_t GetFontHeight() { return GetDefaults().nFontHeight; }
// The MapMode is needed for the global Outliner.
// Incidentally, every newly instantiated SdrModel is assigned this MapMode by default.
@@ -127,44 +127,44 @@ sal_uInt16* RemoveWhichRange(const sal_uInt16* pOldWhichTable, sal_uInt16 nRange
class SVX_DLLPUBLIC SvdProgressInfo
{
private:
- sal_uIntPtr m_nSumActionCount; // Sum of all Actions
- sal_uIntPtr m_nSumCurAction; // Sum of all handled Actions
+ size_t m_nSumActionCount; // Sum of all Actions
+ size_t m_nSumCurAction; // Sum of all handled Actions
- sal_uIntPtr m_nActionCount; // Count of Actions in the current object
- sal_uIntPtr m_nCurAction; // Count of handled Actions in the current object
+ size_t m_nActionCount; // Count of Actions in the current object
+ size_t m_nCurAction; // Count of handled Actions in the current object
- sal_uIntPtr m_nInsertCount; // Count of to-be-inserted Actions in the current object
- sal_uIntPtr m_nCurInsert; // Count of already inserted Actions
+ size_t m_nInsertCount; // Count of to-be-inserted Actions in the current object
+ size_t m_nCurInsert; // Count of already inserted Actions
- sal_uIntPtr m_nObjCount; // Count of selected objects
- sal_uIntPtr m_nCurObj; // Current object
+ size_t m_nObjCount; // Count of selected objects
+ size_t m_nCurObj; // Current object
Link<void*,bool> maLink;
public:
SvdProgressInfo( const Link<void*,bool>& _pLink );
- void Init( sal_uIntPtr _nSumActionCount, sal_uIntPtr _nObjCount );
+ void Init( size_t _nSumActionCount, size_t _nObjCount );
void SetNextObject();
- void SetActionCount( sal_uIntPtr _nActionCount );
- void SetInsertCount( sal_uIntPtr _nInsertCount );
+ void SetActionCount( size_t _nActionCount );
+ void SetInsertCount( size_t _nInsertCount );
- bool ReportActions( sal_uIntPtr nActionCount );
- void ReportInserts( sal_uIntPtr nInsertCount );
+ bool ReportActions( size_t nActionCount );
+ void ReportInserts( size_t nInsertCount );
- sal_uIntPtr GetSumCurAction() const { return m_nSumCurAction; };
- sal_uIntPtr GetObjCount() const { return m_nObjCount; };
- sal_uIntPtr GetCurObj() const { return m_nCurObj; };
+ size_t GetSumCurAction() const { return m_nSumCurAction; };
+ size_t GetObjCount() const { return m_nObjCount; };
+ size_t GetCurObj() const { return m_nCurObj; };
- sal_uIntPtr GetActionCount() const { return m_nActionCount; };
- sal_uIntPtr GetCurAction() const { return m_nCurAction; };
+ size_t GetActionCount() const { return m_nActionCount; };
+ size_t GetCurAction() const { return m_nCurAction; };
- sal_uIntPtr GetInsertCount() const { return m_nInsertCount; };
- sal_uIntPtr GetCurInsert() const { return m_nCurInsert; };
+ size_t GetInsertCount() const { return m_nInsertCount; };
+ size_t GetCurInsert() const { return m_nCurInsert; };
- void ReportRescales( sal_uIntPtr nRescaleCount );
+ void ReportRescales( size_t nRescaleCount );
};
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index 5c4fc1b27fae..25d4d226410f 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -102,19 +102,19 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext)
{
aPage.SetSize(GetOutputSizePixel());
- sal_uIntPtr nOutWPix = aPage.GetWidth();
- sal_uIntPtr nOutHPix = aPage.GetHeight();
+ sal_uInt32 nOutWPix = aPage.GetWidth();
+ sal_uInt32 nOutHPix = aPage.GetHeight();
// PrintArea
- sal_uIntPtr nLBorder;
- sal_uIntPtr nRBorder;
- sal_uIntPtr nTBorder;
- sal_uIntPtr nBBorder;
+ sal_uInt32 nLBorder;
+ sal_uInt32 nRBorder;
+ sal_uInt32 nTBorder;
+ sal_uInt32 nBBorder;
- sal_uIntPtr nLTxtBorder;
- sal_uIntPtr nRTxtBorder;
- sal_uIntPtr nTTxtBorder;
- sal_uIntPtr nBTxtBorder;
+ sal_uInt32 nLTxtBorder;
+ sal_uInt32 nRTxtBorder;
+ sal_uInt32 nTTxtBorder;
+ sal_uInt32 nBTxtBorder;
if (nAnchor != TextContentAnchorType_AS_CHARACTER)
{
@@ -199,8 +199,8 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext)
// Size of the frame to be positioned
if (nAnchor != TextContentAnchorType_AS_CHARACTER)
{
- sal_uIntPtr nLFBorder = nAnchor == TextContentAnchorType_AT_PAGE ? nLBorder : nLTxtBorder;
- sal_uIntPtr nRFBorder = nAnchor == TextContentAnchorType_AT_PAGE ? nRBorder : nRTxtBorder;
+ sal_uInt32 nLFBorder = nAnchor == TextContentAnchorType_AT_PAGE ? nLBorder : nLTxtBorder;
+ sal_uInt32 nRFBorder = nAnchor == TextContentAnchorType_AT_PAGE ? nRBorder : nRTxtBorder;
switch (nHRel)
{
@@ -223,7 +223,7 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext)
}
else
{
- sal_uIntPtr nFreeWidth = aPagePrtArea.GetWidth() - GetTextWidth(DEMOTEXT);
+ sal_uInt32 nFreeWidth = aPagePrtArea.GetWidth() - GetTextWidth(DEMOTEXT);
aFrmSize = Size(nFreeWidth / 2, (aTextLine.GetHeight() + 2) * 3);
aDrawObj.SetSize(Size(std::max(5L, (long)nFreeWidth / 3L), std::max(5L, aFrmSize.Height() * 3L)));
@@ -676,7 +676,7 @@ void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const Rectangl
if (nAnchor != TextContentAnchorType_AT_FRAME && aTxt.Bottom() > aParaPrtArea.Bottom())
{
// Text has been replaced by frame, so adjust parameters height
- sal_uIntPtr nDiff = aTxt.Bottom() - aParaPrtArea.Bottom();
+ sal_uInt32 nDiff = aTxt.Bottom() - aParaPrtArea.Bottom();
aParaPrtArea.Bottom() += nDiff;
aPara.Bottom() += nDiff;
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 1ca4870caaa2..1d72915d8f12 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -559,13 +559,13 @@ SvdProgressInfo::SvdProgressInfo( const Link<void*,bool>&_rLink )
m_nCurInsert = 0;
}
-void SvdProgressInfo::Init( sal_uIntPtr nSumActionCount, sal_uIntPtr nObjCount )
+void SvdProgressInfo::Init( size_t nSumActionCount, size_t nObjCount )
{
m_nSumActionCount = nSumActionCount;
m_nObjCount = nObjCount;
}
-bool SvdProgressInfo::ReportActions( sal_uIntPtr nActionCount )
+bool SvdProgressInfo::ReportActions( size_t nActionCount )
{
m_nSumCurAction += nActionCount;
m_nCurAction += nActionCount;
@@ -575,7 +575,7 @@ bool SvdProgressInfo::ReportActions( sal_uIntPtr nActionCount )
return maLink.Call(nullptr);
}
-void SvdProgressInfo::ReportInserts( sal_uIntPtr nInsertCount )
+void SvdProgressInfo::ReportInserts( size_t nInsertCount )
{
m_nSumCurAction += nInsertCount;
m_nCurInsert += nInsertCount;
@@ -583,18 +583,18 @@ void SvdProgressInfo::ReportInserts( sal_uIntPtr nInsertCount )
maLink.Call(nullptr);
}
-void SvdProgressInfo::ReportRescales( sal_uIntPtr nRescaleCount )
+void SvdProgressInfo::ReportRescales( size_t nRescaleCount )
{
m_nSumCurAction += nRescaleCount;
maLink.Call(nullptr);
}
-void SvdProgressInfo::SetActionCount( sal_uIntPtr nActionCount )
+void SvdProgressInfo::SetActionCount( size_t nActionCount )
{
m_nActionCount = nActionCount;
}
-void SvdProgressInfo::SetInsertCount( sal_uIntPtr nInsertCount )
+void SvdProgressInfo::SetInsertCount( size_t nInsertCount )
{
m_nInsertCount = nInsertCount;
}
@@ -716,12 +716,12 @@ namespace
const sal_uInt16 SPOTCOUNT(5);
Point aSpotPos[SPOTCOUNT];
Color aSpotColor[SPOTCOUNT];
- sal_uIntPtr nHeight( rArea.GetSize().Height() );
- sal_uIntPtr nWidth( rArea.GetSize().Width() );
- sal_uIntPtr nWidth14 = nWidth / 4;
- sal_uIntPtr nHeight14 = nHeight / 4;
- sal_uIntPtr nWidth34 = ( 3 * nWidth ) / 4;
- sal_uIntPtr nHeight34 = ( 3 * nHeight ) / 4;
+ sal_uInt32 nHeight( rArea.GetSize().Height() );
+ sal_uInt32 nWidth( rArea.GetSize().Width() );
+ sal_uInt32 nWidth14 = nWidth / 4;
+ sal_uInt32 nHeight14 = nHeight / 4;
+ sal_uInt32 nWidth34 = ( 3 * nWidth ) / 4;
+ sal_uInt32 nHeight34 = ( 3 * nHeight ) / 4;
sal_uInt16 i;
for ( i = 0; i < SPOTCOUNT; i++ )
diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx
index 12d74a1e7667..c6e8ae74c583 100644
--- a/svx/source/svdraw/svdglev.cxx
+++ b/svx/source/svdraw/svdglev.cxx
@@ -47,7 +47,7 @@ void SdrGlueEditView::ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, bool bConst, co
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
- sal_uIntPtr nPointCount=pPts==nullptr ? 0 : pPts->size();
+ size_t nPointCount=pPts==nullptr ? 0 : pPts->size();
if (nPointCount!=0) {
SdrGluePointList* pGPL=nullptr;
if (bConst) {
@@ -230,7 +230,7 @@ void SdrGlueEditView::DeleteMarkedGluePoints()
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
- sal_uIntPtr nPointCount=pPts==nullptr ? 0 : pPts->size();
+ size_t nPointCount=pPts==nullptr ? 0 : pPts->size();
if (nPointCount!=0)
{
SdrGluePointList* pGPL=pObj->ForceGluePointList();
@@ -275,7 +275,7 @@ void SdrGlueEditView::ImpCopyMarkedGluePoints()
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrUShortCont* pPts=pM->GetMarkedGluePoints();
SdrGluePointList* pGPL=pObj->ForceGluePointList();
- sal_uIntPtr nPointCount=pPts==nullptr ? 0 : pPts->size();
+ size_t nPointCount=pPts==nullptr ? 0 : pPts->size();
if (nPointCount!=0 && pGPL!=nullptr)
{
if( bUndo )
@@ -317,7 +317,7 @@ void SdrGlueEditView::ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const vo
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
- sal_uIntPtr nPointCount=pPts==nullptr ? 0 : pPts->size();
+ size_t nPointCount=pPts==nullptr ? 0 : pPts->size();
if (nPointCount!=0) {
SdrGluePointList* pGPL=pObj->ForceGluePointList();
if (pGPL!=nullptr)