summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-27 17:12:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-28 12:47:31 +0100
commitefe22f3fa2375c233b86d9a4556e2cd7eed85f9d (patch)
tree6c8283a52080c266f54ea416befd31d3f7456893 /svx
parent398d10a506f9f1c4109d012f22f0e85ee571fe9f (diff)
drop old tools/gen methods in reportdesign..xmloff
Change-Id: I398831c526ba51d861557fa6c13c0e2fb44dfbe0 Reviewed-on: https://gerrit.libreoffice.org/50447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/_contdlg.cxx10
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx6
-rw-r--r--svx/source/xoutdev/_xpoly.cxx44
3 files changed, 36 insertions, 24 deletions
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 7e4180b8f986..62f18c8ddb26 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -158,9 +158,15 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
double fWH = static_cast<double>(aSizePix.Width()) / aSizePix.Height();
if( fWH <= 1.0 )
- aSizePix.setWidth( FRound( ( aSizePix.Height() = 512 ) * fWH ) );
+ {
+ aSizePix.setHeight(512);
+ aSizePix.setWidth( FRound( ( aSizePix.Height() ) * fWH ) );
+ }
else
- aSizePix.setHeight( FRound( ( aSizePix.Width() = 512 ) / fWH ) );
+ {
+ aSizePix.setWidth(512);
+ aSizePix.setHeight( FRound( ( aSizePix.Width() ) / fWH ) );
+ }
}
if( pVDev->SetOutputSizePixel( aSizePix ) )
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 4da581ed1241..6cce3e4a620a 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -180,9 +180,11 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
Point aEnd(aBLPos.X() + nRectWidth * 9 / 10,0);
for( sal_uInt16 i = 11; i < 100; i += 33)
{
- aStart.Y() = aEnd.Y() = aBLPos.Y() + nRectHeight * i / 100;
+ aStart.setY( aBLPos.Y() + nRectHeight * i / 100 );
+ aEnd.setY( aStart.Y() );
pVDev->DrawLine(aStart, aEnd);
- aStart.Y() = aEnd.Y() = aBLPos.Y() + nRectHeight * (i + 11) / 100;
+ aStart.setY( aBLPos.Y() + nRectHeight * (i + 11) / 100 );
+ aEnd.setY( aStart.Y() );
pVDev->DrawLine(aStart, aEnd);
}
}
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index 9f98aa2df29d..05fe65b17d89 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -405,8 +405,8 @@ void XPolygon::Move( long nHorzMove, long nVertMove )
for ( sal_uInt16 i = 0; i < nCount; i++ )
{
Point* pPt = &(pImpXPolygon->pPointAry[i]);
- pPt->X() += nHorzMove;
- pPt->Y() += nVertMove;
+ pPt->AdjustX( nHorzMove );
+ pPt->AdjustY( nVertMove );
}
}
@@ -536,28 +536,28 @@ void XPolygon::SubdivideBezier(sal_uInt16 nPos, bool bCalcFirst, double fT)
nPosInc = 1;
nIdxInc = 1;
}
- pPoints[nPos].X() = static_cast<long>(fU3 * pPoints[nIdx ].X() +
+ pPoints[nPos].setX( static_cast<long>(fU3 * pPoints[nIdx ].X() +
fT * fU2 * pPoints[nIdx+1].X() * 3 +
fT2 * fU * pPoints[nIdx+2].X() * 3 +
- fT3 * pPoints[nIdx+3].X());
- pPoints[nPos].Y() = static_cast<long>(fU3 * pPoints[nIdx ].Y() +
+ fT3 * pPoints[nIdx+3].X()) );
+ pPoints[nPos].setY( static_cast<long>(fU3 * pPoints[nIdx ].Y() +
fT * fU2 * pPoints[nIdx+1].Y() * 3 +
fT2 * fU * pPoints[nIdx+2].Y() * 3 +
- fT3 * pPoints[nIdx+3].Y());
+ fT3 * pPoints[nIdx+3].Y()) );
nPos = nPos + nPosInc;
nIdx = nIdx + nIdxInc;
- pPoints[nPos].X() = static_cast<long>(fU2 * pPoints[nIdx ].X() +
+ pPoints[nPos].setX( static_cast<long>(fU2 * pPoints[nIdx ].X() +
fT * fU * pPoints[nIdx+1].X() * 2 +
- fT2 * pPoints[nIdx+2].X());
- pPoints[nPos].Y() = static_cast<long>(fU2 * pPoints[nIdx ].Y() +
+ fT2 * pPoints[nIdx+2].X()) );
+ pPoints[nPos].setY( static_cast<long>(fU2 * pPoints[nIdx ].Y() +
fT * fU * pPoints[nIdx+1].Y() * 2 +
- fT2 * pPoints[nIdx+2].Y());
+ fT2 * pPoints[nIdx+2].Y()) );
nPos = nPos + nPosInc;
nIdx = nIdx + nIdxInc;
- pPoints[nPos].X() = static_cast<long>(fU * pPoints[nIdx ].X() +
- fT * pPoints[nIdx+1].X());
- pPoints[nPos].Y() = static_cast<long>(fU * pPoints[nIdx ].Y() +
- fT * pPoints[nIdx+1].Y());
+ pPoints[nPos].setX( static_cast<long>(fU * pPoints[nIdx ].X() +
+ fT * pPoints[nIdx+1].X()) );
+ pPoints[nPos].setY( static_cast<long>(fU * pPoints[nIdx ].Y() +
+ fT * pPoints[nIdx+1].Y()) );
}
/// Generate a Bézier arc
@@ -580,22 +580,26 @@ void XPolygon::GenBezArc(const Point& rCenter, long nRx, long nRy,
if ( nQuad == 0 || nQuad == 2 )
{
- pPoints[nFirst].X() += nRx; pPoints[nFirst+3].Y() += nRy;
+ pPoints[nFirst].AdjustX( nRx );
+ pPoints[nFirst+3].AdjustY( nRy );
}
else
{
- pPoints[nFirst].Y() += nRy; pPoints[nFirst+3].X() += nRx;
+ pPoints[nFirst].AdjustY( nRy );
+ pPoints[nFirst+3].AdjustX( nRx );
}
pPoints[nFirst+1] = pPoints[nFirst];
pPoints[nFirst+2] = pPoints[nFirst+3];
if ( nQuad == 0 || nQuad == 2 )
{
- pPoints[nFirst+1].Y() += nYHdl; pPoints[nFirst+2].X() += nXHdl;
+ pPoints[nFirst+1].AdjustY( nYHdl );
+ pPoints[nFirst+2].AdjustX( nXHdl );
}
else
{
- pPoints[nFirst+1].X() += nXHdl; pPoints[nFirst+2].Y() += nYHdl;
+ pPoints[nFirst+1].AdjustX( nXHdl );
+ pPoints[nFirst+2].AdjustY( nYHdl );
}
if ( nStart > 0 )
SubdivideBezier(nFirst, false, static_cast<double>(nStart) / 900);
@@ -769,8 +773,8 @@ void XPolygon::Scale(double fSx, double fSy)
for (sal_uInt16 i = 0; i < nPntCnt; i++)
{
Point& rPnt = pImpXPolygon->pPointAry[i];
- rPnt.X() = static_cast<long>(fSx * rPnt.X());
- rPnt.Y() = static_cast<long>(fSy * rPnt.Y());
+ rPnt.setX( static_cast<long>(fSx * rPnt.X()) );
+ rPnt.setY( static_cast<long>(fSy * rPnt.Y()) );
}
}