diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 12:47:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-07 10:34:17 +0000 |
commit | a08cb3b52ea4a071ce8eb5a1786ea45fd211ab78 (patch) | |
tree | 0667c60e438b660211a3df83c1b411e055b1de61 /vcl/source/outdev | |
parent | 62283fed204e05e3f30a8ae703762d7f96c4e88a (diff) |
convert PolyFlags to scoped enum
and remove the XPolyFlags enum, which has the same values and was being
converted to PolyFlags anyhow
Change-Id: Iaead84933c79a7603698a4e50257dd944df89c41
Reviewed-on: https://gerrit.libreoffice.org/31627
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r-- | vcl/source/outdev/font.cxx | 11 | ||||
-rw-r--r-- | vcl/source/outdev/polygon.cxx | 12 | ||||
-rw-r--r-- | vcl/source/outdev/polyline.cxx | 2 |
3 files changed, 16 insertions, 9 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 5763c8ec5c14..9b0a5ddc4823 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -292,9 +292,16 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo FontEmphasisMark eEmphasis, long nHeight, short /*nOrient*/ ) { - static const sal_uInt8 aAccentPolyFlags[24] = + static const PolyFlags aAccentPolyFlags[24] = { - 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 0, 2, 0, 2, 2 + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Normal, PolyFlags::Control, + PolyFlags::Normal, PolyFlags::Control, PolyFlags::Control }; static const long aAccentPos[48] = diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx index 76d9ec6e6963..e20caaf28d86 100644 --- a/vcl/source/outdev/polygon.cxx +++ b/vcl/source/outdev/polygon.cxx @@ -226,7 +226,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly ) // #100127# Forward beziers to sal, if any if( aPoly.HasFlags() ) { - const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry(); + const PolyFlags* pFlgAry = aPoly.GetConstFlagAry(); if( !mpGraphics->DrawPolygonBezier( nPoints, pPtAry, pFlgAry, this ) ) { aPoly = tools::Polygon::SubdivideBezier(aPoly); @@ -339,10 +339,10 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg sal_uInt32 aStackAry1[OUTDEV_POLYPOLY_STACKBUF]; PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF]; - sal_uInt8* aStackAry3[OUTDEV_POLYPOLY_STACKBUF]; + PolyFlags* aStackAry3[OUTDEV_POLYPOLY_STACKBUF]; sal_uInt32* pPointAry; - PCONSTSALPOINT* pPointAryAry; - const sal_uInt8** pFlagAryAry; + PCONSTSALPOINT* pPointAryAry; + const PolyFlags** pFlagAryAry; sal_uInt16 i = 0; sal_uInt16 j = 0; sal_uInt16 last = 0; @@ -351,13 +351,13 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg { pPointAry = new sal_uInt32[nPoly]; pPointAryAry = new PCONSTSALPOINT[nPoly]; - pFlagAryAry = new const sal_uInt8*[nPoly]; + pFlagAryAry = new const PolyFlags*[nPoly]; } else { pPointAry = aStackAry1; pPointAryAry = aStackAry2; - pFlagAryAry = const_cast<const sal_uInt8**>(aStackAry3); + pFlagAryAry = const_cast<const PolyFlags**>(aStackAry3); } do diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index b3e47804ef75..c69621b9ae37 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -91,7 +91,7 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly ) // #100127# Forward beziers to sal, if any if( aPoly.HasFlags() ) { - const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry(); + const PolyFlags* pFlgAry = aPoly.GetConstFlagAry(); if( !mpGraphics->DrawPolyLineBezier( nPoints, pPtAry, pFlgAry, this ) ) { aPoly = tools::Polygon::SubdivideBezier(aPoly); |