summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-11-12 09:31:42 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-13 13:38:26 +0100
commitd55e0fbde49ad3b1e678419588dd58df6d9e06c4 (patch)
tree4c448d5a759829f4e7b6e5e594db83dd3a926009 /svx
parent811b77e0f63b91eeb05311c724e3e209bff30f68 (diff)
Revert "remove BigInt::operator tools::Long()"
This reverts commit 1397a1c8e4995b0dd336478e564880fe8ad91d1d. Reason for revert: Some discussion required Change-Id: Id39ee8260790e0722c5bf8338b0b76ca34da83d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105539 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdattr.cxx2
-rw-r--r--svx/source/svdraw/svdedtv1.cxx8
-rw-r--r--svx/source/svdraw/svdobj.cxx8
-rw-r--r--svx/source/svdraw/svdotxdr.cxx8
-rw-r--r--svx/source/svdraw/svdtrans.cxx2
-rw-r--r--svx/source/svdraw/svdxcgv.cxx4
-rw-r--r--svx/source/xoutdev/xattr.cxx2
7 files changed, 17 insertions, 17 deletions
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 58aa365e02ae..2e007ea7d513 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -855,7 +855,7 @@ void SdrMetricItem::ScaleMetrics(tools::Long nMul, tools::Long nDiv)
aVal*=nMul;
aVal+=nDiv/2; // to round accurately
aVal/=nDiv;
- SetValue(sal_Int32(aVal));
+ SetValue(tools::Long(aVal));
}
}
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 5f98c816c65f..0beba3a215aa 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -131,10 +131,10 @@ void SdrEditView::SetMarkedObjRect(const tools::Rectangle& rRect)
} else {
t=0; b=h1;
}
- aR1.SetLeft(sal_Int32(l) );
- aR1.SetRight(sal_Int32(r) );
- aR1.SetTop(sal_Int32(t) );
- aR1.SetBottom(sal_Int32(b) );
+ aR1.SetLeft(tools::Long(l) );
+ aR1.SetRight(tools::Long(r) );
+ aR1.SetTop(tools::Long(t) );
+ aR1.SetBottom(tools::Long(b) );
aR1.Move(x1,y1);
}
pO->SetSnapRect(aR1);
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 6b2db29caf7d..638c590a52cd 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1236,12 +1236,12 @@ tools::Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const
if (bEcke) { // corner point handles
bool bUseX=(aXFact<aYFact) != bBigOrtho;
if (bUseX) {
- tools::Long nNeed=sal_Int32(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
+ tools::Long nNeed=tools::Long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
if (bYNeg) nNeed=-nNeed;
if (bTop) aTmpRect.SetTop(aTmpRect.Bottom()-nNeed );
if (bBtm) aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
} else {
- tools::Long nNeed=sal_Int32(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
+ tools::Long nNeed=tools::Long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
if (bXNeg) nNeed=-nNeed;
if (bLft) aTmpRect.SetLeft(aTmpRect.Right()-nNeed );
if (bRgt) aTmpRect.SetRight(aTmpRect.Left()+nNeed );
@@ -1249,13 +1249,13 @@ tools::Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const
} else { // apex handles
if ((bLft || bRgt) && nXDiv!=0) {
tools::Long nHgt0b=aRect.Bottom()-aRect.Top();
- tools::Long nNeed=sal_Int32(BigInt(nHgt0b)*BigInt(nXMul)/BigInt(nXDiv));
+ tools::Long nNeed=tools::Long(BigInt(nHgt0b)*BigInt(nXMul)/BigInt(nXDiv));
aTmpRect.AdjustTop( -((nNeed-nHgt0b)/2) );
aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
}
if ((bTop || bBtm) && nYDiv!=0) {
tools::Long nWdt0b=aRect.Right()-aRect.Left();
- tools::Long nNeed=sal_Int32(BigInt(nWdt0b)*BigInt(nYMul)/BigInt(nYDiv));
+ tools::Long nNeed=tools::Long(BigInt(nWdt0b)*BigInt(nYMul)/BigInt(nYDiv));
aTmpRect.AdjustLeft( -((nNeed-nWdt0b)/2) );
aTmpRect.SetRight(aTmpRect.Left()+nNeed );
}
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index 429f30df1106..86adbdac2daa 100644
--- a/svx/source/svdraw/svdotxdr.cxx
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -113,12 +113,12 @@ tools::Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
if (bEcke) { // corner point handles
bool bUseX=(aXFact<aYFact) != bBigOrtho;
if (bUseX) {
- tools::Long nNeed=sal_Int32(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
+ tools::Long nNeed=tools::Long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
if (bYNeg) nNeed=-nNeed;
if (bTop) aTmpRect.SetTop(aTmpRect.Bottom()-nNeed );
if (bBtm) aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
} else {
- tools::Long nNeed=sal_Int32(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
+ tools::Long nNeed=tools::Long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
if (bXNeg) nNeed=-nNeed;
if (bLft) aTmpRect.SetLeft(aTmpRect.Right()-nNeed );
if (bRgt) aTmpRect.SetRight(aTmpRect.Left()+nNeed );
@@ -126,13 +126,13 @@ tools::Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
} else { // apex handles
if ((bLft || bRgt) && nXDiv!=0) {
tools::Long nHgt0b=maRect.Bottom()-maRect.Top();
- tools::Long nNeed=sal_Int32(BigInt(nHgt0b)*BigInt(nXMul)/BigInt(nXDiv));
+ tools::Long nNeed=tools::Long(BigInt(nHgt0b)*BigInt(nXMul)/BigInt(nXDiv));
aTmpRect.AdjustTop( -((nNeed-nHgt0b)/2) );
aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
}
if ((bTop || bBtm) && nYDiv!=0) {
tools::Long nWdt0b=maRect.Right()-maRect.Left();
- tools::Long nNeed=sal_Int32(BigInt(nWdt0b)*BigInt(nYMul)/BigInt(nYDiv));
+ tools::Long nNeed=tools::Long(BigInt(nWdt0b)*BigInt(nYMul)/BigInt(nYDiv));
aTmpRect.AdjustLeft( -((nNeed-nWdt0b)/2) );
aTmpRect.SetRight(aTmpRect.Left()+nNeed );
}
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index a098606ada05..f225e3d5d6b6 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -568,7 +568,7 @@ tools::Long BigMulDiv(tools::Long nVal, tools::Long nMul, tools::Long nDiv)
if(nDiv)
{
aVal/=nDiv;
- return sal_Int32(aVal);
+ return tools::Long(aVal);
}
return 0x7fffffff;
}
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index e658f0f4d1b2..21d0451e7f3c 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -402,8 +402,8 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po
nSizX *= aDstFr.GetDenominator();
nSizY *= double(aMapFact.Y() * rMap.GetScaleY());
nSizY /= aDstFr.GetNumerator();
- tools::Long xs=sal_Int32(nSizX);
- tools::Long ys=sal_Int32(nSizY);
+ tools::Long xs=nSizX;
+ tools::Long ys=nSizY;
Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2);
tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys);
pObj->SetLogicRect(aR);
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 072448f7121c..f8b532ab554e 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -103,7 +103,7 @@ static tools::Long ScaleMetricValue( tools::Long nVal, tools::Long nMul, tools::
aVal/=nDiv;
- return sal_Int32( aVal );
+ return tools::Long( aVal );
}
NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, sal_Int32 nIndex) :