summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2020-11-12 12:29:08 +0200
committerCaolán McNamara <caolanm@redhat.com>2020-11-14 20:43:07 +0100
commit0f04b8204a77ecaee7d9ebe6868808445c8b138a (patch)
tree92da7b71ed889bde2595cc0bff3a82f429aa14c7 /vcl/source/outdev
parent4ad0459494303745b377c848c681a747f294fc64 (diff)
remove SalPoint
<caolan> that "SalPoint" doesn't really seem to to have a purpose except to highlight that "Point" is assumed to use LONG under windows and can be passed unchanged to those windows drawing apis <caolan> so I guess remove SalPoint entirely, use Point instead, and convert to "POINT" under windows ? Change-Id: Ic15a7f4516e2075a228fa65cac4e8494d5b3abaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105634 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/curvedshapes.cxx8
-rw-r--r--vcl/source/outdev/line.cxx4
-rw-r--r--vcl/source/outdev/polygon.cxx22
-rw-r--r--vcl/source/outdev/polyline.cxx6
-rw-r--r--vcl/source/outdev/rect.cxx4
5 files changed, 22 insertions, 22 deletions
diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx
index d25d69ad1918..a02abfb6e69e 100644
--- a/vcl/source/outdev/curvedshapes.cxx
+++ b/vcl/source/outdev/curvedshapes.cxx
@@ -55,7 +55,7 @@ void OutputDevice::DrawEllipse( const tools::Rectangle& rRect )
tools::Polygon aRectPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
if ( aRectPoly.GetSize() >= 2 )
{
- SalPoint* pPtAry = reinterpret_cast<SalPoint*>(aRectPoly.GetPointAry());
+ Point* pPtAry = aRectPoly.GetPointAry();
if ( !mbFillColor )
mpGraphics->DrawPolyLine( aRectPoly.GetSize(), pPtAry, this );
else
@@ -103,7 +103,7 @@ void OutputDevice::DrawArc( const tools::Rectangle& rRect,
if ( aArcPoly.GetSize() >= 2 )
{
- SalPoint* pPtAry = reinterpret_cast<SalPoint*>(aArcPoly.GetPointAry());
+ Point* pPtAry = aArcPoly.GetPointAry();
mpGraphics->DrawPolyLine( aArcPoly.GetSize(), pPtAry, this );
}
@@ -144,7 +144,7 @@ void OutputDevice::DrawPie( const tools::Rectangle& rRect,
if ( aPiePoly.GetSize() >= 2 )
{
- SalPoint* pPtAry = reinterpret_cast<SalPoint*>(aPiePoly.GetPointAry());
+ Point* pPtAry = aPiePoly.GetPointAry();
if ( !mbFillColor )
mpGraphics->DrawPolyLine( aPiePoly.GetSize(), pPtAry, this );
else
@@ -192,7 +192,7 @@ void OutputDevice::DrawChord( const tools::Rectangle& rRect,
if ( aChordPoly.GetSize() >= 2 )
{
- SalPoint* pPtAry = reinterpret_cast<SalPoint*>(aChordPoly.GetPointAry());
+ Point* pPtAry = aChordPoly.GetPointAry();
if ( !mbFillColor )
mpGraphics->DrawPolyLine( aChordPoly.GetSize(), pPtAry, this );
else
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index a715c25521ae..95d2c44458d7 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -252,7 +252,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin
tools::Polygon aPolygon(rB2DPolygon);
mpGraphics->DrawPolyLine(
aPolygon.GetSize(),
- reinterpret_cast<SalPoint*>(aPolygon.GetPointAry()),
+ aPolygon.GetPointAry(),
this);
}
}
@@ -287,7 +287,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin
// need to subdivide, mpGraphics->DrawPolygon ignores curves
aPolygon.AdaptiveSubdivide(aPolygon);
- mpGraphics->DrawPolygon(aPolygon.GetSize(), reinterpret_cast<const SalPoint*>(aPolygon.GetConstPointAry()), this);
+ mpGraphics->DrawPolygon(aPolygon.GetSize(), aPolygon.GetConstPointAry(), this);
}
}
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index 4d76578d376a..208858fc381b 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -230,7 +230,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly )
}
tools::Polygon aPoly = ImplLogicToDevicePixel( rPoly );
- const SalPoint* pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry());
+ const Point* pPtAry = aPoly.GetConstPointAry();
// #100127# Forward beziers to sal, if any
if( aPoly.HasFlags() )
@@ -239,7 +239,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly )
if( !mpGraphics->DrawPolygonBezier( nPoints, pPtAry, pFlgAry, this ) )
{
aPoly = tools::Polygon::SubdivideBezier(aPoly);
- pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry());
+ pPtAry = aPoly.GetConstPointAry();
mpGraphics->DrawPolygon( aPoly.GetSize(), pPtAry, this );
}
}
@@ -356,10 +356,10 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg
return;
sal_uInt32 aStackAry1[OUTDEV_POLYPOLY_STACKBUF];
- PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF];
+ const Point* aStackAry2[OUTDEV_POLYPOLY_STACKBUF];
PolyFlags* aStackAry3[OUTDEV_POLYPOLY_STACKBUF];
sal_uInt32* pPointAry;
- PCONSTSALPOINT* pPointAryAry;
+ const Point** pPointAryAry;
const PolyFlags** pFlagAryAry;
sal_uInt16 i = 0;
sal_uInt16 j = 0;
@@ -368,7 +368,7 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg
if ( nPoly > OUTDEV_POLYPOLY_STACKBUF )
{
pPointAry = new sal_uInt32[nPoly];
- pPointAryAry = new PCONSTSALPOINT[nPoly];
+ pPointAryAry = new const Point*[nPoly];
pFlagAryAry = new const PolyFlags*[nPoly];
}
else
@@ -385,7 +385,7 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg
if ( nSize )
{
pPointAry[j] = nSize;
- pPointAryAry[j] = reinterpret_cast<PCONSTSALPOINT>(rPoly.GetConstPointAry());
+ pPointAryAry[j] = rPoly.GetConstPointAry();
pFlagAryAry[j] = rPoly.GetConstFlagAry();
last = i;
@@ -406,7 +406,7 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg
if( !mpGraphics->DrawPolygonBezier( *pPointAry, *pPointAryAry, *pFlagAryAry, this ) )
{
tools::Polygon aPoly = tools::Polygon::SubdivideBezier( rPolyPoly.GetObject( last ) );
- mpGraphics->DrawPolygon( aPoly.GetSize(), reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry()), this );
+ mpGraphics->DrawPolygon( aPoly.GetSize(), aPoly.GetConstPointAry(), this );
}
}
else
@@ -452,7 +452,7 @@ void OutputDevice::ImplDrawPolygon( const tools::Polygon& rPoly, const tools::Po
if ( nPoints < 2 )
return;
- const SalPoint* pPtAry = reinterpret_cast<const SalPoint*>(rPoly.GetConstPointAry());
+ const Point* pPtAry = rPoly.GetConstPointAry();
mpGraphics->DrawPolygon( nPoints, pPtAry, this );
}
}
@@ -477,7 +477,7 @@ void OutputDevice::ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, con
if( nSize >= 2 )
{
- const SalPoint* pPtAry = reinterpret_cast<const SalPoint*>(rPoly.GetConstPointAry());
+ const Point* pPtAry = rPoly.GetConstPointAry();
mpGraphics->DrawPolygon( nSize, pPtAry, this );
}
}
@@ -485,7 +485,7 @@ void OutputDevice::ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, con
{
sal_uInt16 nCount = pPolyPoly->Count();
std::unique_ptr<sal_uInt32[]> pPointAry(new sal_uInt32[nCount]);
- std::unique_ptr<PCONSTSALPOINT[]> pPointAryAry(new PCONSTSALPOINT[nCount]);
+ std::unique_ptr<const Point*[]> pPointAryAry(new const Point*[nCount]);
sal_uInt16 i = 0;
do
{
@@ -494,7 +494,7 @@ void OutputDevice::ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, con
if ( nSize )
{
pPointAry[i] = nSize;
- pPointAryAry[i] = reinterpret_cast<PCONSTSALPOINT>(rPoly.GetConstPointAry());
+ pPointAryAry[i] = rPoly.GetConstPointAry();
i++;
}
else
diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx
index a1bd0df6f82e..a79ebf74ab6f 100644
--- a/vcl/source/outdev/polyline.cxx
+++ b/vcl/source/outdev/polyline.cxx
@@ -82,7 +82,7 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly )
if(!bDrawn)
{
tools::Polygon aPoly = ImplLogicToDevicePixel( rPoly );
- SalPoint* pPtAry = reinterpret_cast<SalPoint*>(aPoly.GetPointAry());
+ Point* pPtAry = aPoly.GetPointAry();
// #100127# Forward beziers to sal, if any
if( aPoly.HasFlags() )
@@ -91,7 +91,7 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly )
if( !mpGraphics->DrawPolyLineBezier( nPoints, pPtAry, pFlgAry, this ) )
{
aPoly = tools::Polygon::SubdivideBezier(aPoly);
- pPtAry = reinterpret_cast<SalPoint*>(aPoly.GetPointAry());
+ pPtAry = aPoly.GetPointAry();
mpGraphics->DrawPolyLine( aPoly.GetSize(), pPtAry, this );
}
}
@@ -280,7 +280,7 @@ void OutputDevice::drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLi
nPoints = aPoly.GetSize();
}
- mpGraphics->DrawPolyLine(nPoints, reinterpret_cast<SalPoint*>(aPoly.GetPointAry()), this);
+ mpGraphics->DrawPolyLine(nPoints, aPoly.GetPointAry(), this);
}
if( mpAlphaVDev )
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 9252959d0f5e..c6a53fbee3c0 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -131,7 +131,7 @@ void OutputDevice::DrawRect( const tools::Rectangle& rRect,
if ( aRoundRectPoly.GetSize() >= 2 )
{
- SalPoint* pPtAry = reinterpret_cast<SalPoint*>(aRoundRectPoly.GetPointAry());
+ Point* pPtAry = aRoundRectPoly.GetPointAry();
if ( !mbFillColor )
mpGraphics->DrawPolyLine( aRoundRectPoly.GetSize(), pPtAry, this );
@@ -202,7 +202,7 @@ void OutputDevice::Invert( const tools::Polygon& rPoly, InvertFlags nFlags )
nSalFlags |= SalInvert::N50;
if ( nFlags & InvertFlags::TrackFrame )
nSalFlags |= SalInvert::TrackFrame;
- const SalPoint* pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry());
+ const Point* pPtAry = aPoly.GetConstPointAry();
mpGraphics->Invert( nPoints, pPtAry, nSalFlags, this );
}