diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 12:47:37 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-18 01:07:40 -0500 |
commit | 448a931f776f2d4e4ca2e44c49f830653af7efbc (patch) | |
tree | 4ece62bffc3f83d6fb963ef75a1b45e224b440a4 /filter | |
parent | dcbad5d45e9c658766f9b165020db8fb612d4f6e (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>
(cherry picked from commit a08cb3b52ea4a071ce8eb5a1786ea45fd211ab78)
(cherry picked from commit e13bb8d5290b27281d7742a9b7034929561d51aa)
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/flash/swfwriter1.cxx | 8 | ||||
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 16 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/actimpr.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/class4.cxx | 8 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/outact.hxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 6 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 2 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 2 |
8 files changed, 25 insertions, 25 deletions
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 720e8d7e920c..8076be51613c 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -127,10 +127,10 @@ void Writer::Impl_addPolygon( BitStream& rBits, const tools::Polygon& rPoly, boo PolyFlags P1( rPoly.GetFlags( i ) ); PolyFlags P4( rPoly.GetFlags( i + 3 ) ); - if( ( POLY_NORMAL == P1 || POLY_SMOOTH == P1 || POLY_SYMMTR == P1 ) && - ( POLY_CONTROL == rPoly.GetFlags( i + 1 ) ) && - ( POLY_CONTROL == rPoly.GetFlags( i + 2 ) ) && - ( POLY_NORMAL == P4 || POLY_SMOOTH == P4 || POLY_SYMMTR == P4 ) ) + if( ( PolyFlags::Normal == P1 || PolyFlags::Smooth == P1 || PolyFlags::Symmetric == P1 ) && + ( PolyFlags::Control == rPoly.GetFlags( i + 1 ) ) && + ( PolyFlags::Control == rPoly.GetFlags( i + 2 ) ) && + ( PolyFlags::Normal == P4 || PolyFlags::Smooth == P4 || PolyFlags::Symmetric == P4 ) ) { Impl_quadBezierApprox( rBits, aLastPoint, d*d, rPoly.GetPoint( i ).X(), rPoly.GetPoint( i ).Y(), diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 3bef3cf94f4e..9e9c92061021 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -718,9 +718,9 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) for(sal_uInt16 a(0); a + 1 < nPoints; a++) { if(bCurve - && POLY_NORMAL != aPoly.GetFlags(a + 1) + && PolyFlags::Normal != aPoly.GetFlags(a + 1) && a + 2 < nPoints - && POLY_NORMAL != aPoly.GetFlags(a + 2) + && PolyFlags::Normal != aPoly.GetFlags(a + 2) && a + 3 < nPoints) { const tools::Polygon aSnippet(4, @@ -1503,10 +1503,10 @@ void PSWriter::ImplAddPath( const tools::Polygon & rPolygon ) ImplMoveTo( rPolygon.GetPoint( 0 ) ); while ( i < nPointCount ) { - if ( ( rPolygon.GetFlags( i ) == POLY_CONTROL ) + if ( ( rPolygon.GetFlags( i ) == PolyFlags::Control ) && ( ( i + 2 ) < nPointCount ) - && ( rPolygon.GetFlags( i + 1 ) == POLY_CONTROL ) - && ( rPolygon.GetFlags( i + 2 ) != POLY_CONTROL ) ) + && ( rPolygon.GetFlags( i + 1 ) == PolyFlags::Control ) + && ( rPolygon.GetFlags( i + 2 ) != PolyFlags::Control ) ) { ImplCurveTo( rPolygon[ i ], rPolygon[ i + 1 ], rPolygon[ i + 2 ], PS_WRAP ); i += 3; @@ -1591,10 +1591,10 @@ void PSWriter::ImplPolyLine( const tools::Polygon & rPoly ) i = 1; while ( i < nPointCount ) { - if ( ( rPoly.GetFlags( i ) == POLY_CONTROL ) + if ( ( rPoly.GetFlags( i ) == PolyFlags::Control ) && ( ( i + 2 ) < nPointCount ) - && ( rPoly.GetFlags( i + 1 ) == POLY_CONTROL ) - && ( rPoly.GetFlags( i + 2 ) != POLY_CONTROL ) ) + && ( rPoly.GetFlags( i + 1 ) == PolyFlags::Control ) + && ( rPoly.GetFlags( i + 2 ) != PolyFlags::Control ) ) { ImplCurveTo( rPoly[ i ], rPoly[ i + 1 ], rPoly[ i + 2 ], PS_WRAP ); i += 3; diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 1ad3c3089f5f..0a63a8ea15dc 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -61,7 +61,7 @@ CGMImpressOutAct::CGMImpressOutAct( CGM& rCGM, const uno::Reference< frame::XMod mnGroupActCount = mnGroupLevel = 0; mpGroupLevel = new sal_uInt32[CGM_OUTACT_MAX_GROUP_LEVEL] (); mpPoints = reinterpret_cast<Point*>(new sal_Int8[ 0x2000 * sizeof( Point ) ]); - mpFlags = new sal_uInt8[ 0x2000 ]; + mpFlags = new PolyFlags[ 0x2000 ]; mnIndex = 0; mpGradient = nullptr; @@ -941,7 +941,7 @@ void CGMImpressOutAct::RegPolyLine( tools::Polygon& rPolygon, bool bReverse ) for ( sal_uInt16 i = 0; i < nPoints; i++ ) { mpPoints[ mnIndex + i ] = rPolygon.GetPoint( nPoints - i - 1 ); - mpFlags[ mnIndex + i ] = (sal_Int8)rPolygon.GetFlags( nPoints - i - 1 ); + mpFlags[ mnIndex + i ] = rPolygon.GetFlags( nPoints - i - 1 ); } } else @@ -949,7 +949,7 @@ void CGMImpressOutAct::RegPolyLine( tools::Polygon& rPolygon, bool bReverse ) for ( sal_uInt16 i = 0; i < nPoints; i++ ) { mpPoints[ mnIndex + i ] = rPolygon.GetPoint( i ); - mpFlags[ mnIndex + i ] = (sal_Int8)rPolygon.GetFlags( i ); + mpFlags[ mnIndex + i ] = rPolygon.GetFlags( i ); } } mnIndex = mnIndex + nPoints; diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx index e97781d314e7..36dad1b6d356 100644 --- a/filter/source/graphicfilter/icgm/class4.cxx +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -722,9 +722,9 @@ void CGM::ImplDoClass4() for ( sal_uInt16 i = 0; i < nNumberOfPoints; i++ ) { if ( ( i % 3 ) == 0 ) - aPolygon.SetFlags( i, POLY_NORMAL ); + aPolygon.SetFlags( i, PolyFlags::Normal ); else - aPolygon.SetFlags( i, POLY_CONTROL ); + aPolygon.SetFlags( i, PolyFlags::Control ); } } else @@ -734,8 +734,8 @@ void CGM::ImplDoClass4() switch ( i & 3 ) { case 0 : - case 3 : aPolygon.SetFlags( i, POLY_NORMAL ); break; - default : aPolygon.SetFlags( i, POLY_CONTROL ); break; + case 3 : aPolygon.SetFlags( i, PolyFlags::Normal ); break; + default : aPolygon.SetFlags( i, PolyFlags::Control ); break; } } } diff --git a/filter/source/graphicfilter/icgm/outact.hxx b/filter/source/graphicfilter/icgm/outact.hxx index a94a4991c872..a83d3b199635 100644 --- a/filter/source/graphicfilter/icgm/outact.hxx +++ b/filter/source/graphicfilter/icgm/outact.hxx @@ -46,7 +46,7 @@ class CGMImpressOutAct sal_uInt32* mpGroupLevel; sal_uInt16 mnIndex; // figure - sal_uInt8* mpFlags; + PolyFlags* mpFlags; Point* mpPoints; tools::PolyPolygon maPolyPolygon; css::awt::Gradient* mpGradient; diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 74fed8f9f290..961266bac179 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1951,7 +1951,7 @@ bool EscherPropertyContainer::CreatePolygonProperties( nTotalPoints += k; for (sal_uInt16 j = 0; j < k; ++j) { - if ( aPolyPolygon[ i ].GetFlags( j ) != POLY_CONTROL ) + if ( aPolyPolygon[ i ].GetFlags( j ) != PolyFlags::Control ) nTotalBezPoints++; } } @@ -2013,7 +2013,7 @@ bool EscherPropertyContainer::CreatePolygonProperties( if ( ( i + 1 ) != nPoints ) { *pPtr++ = 1; - if ( aPolygon.GetFlags( i + 1 ) == POLY_CONTROL ) + if ( aPolygon.GetFlags( i + 1 ) == PolyFlags::Control ) { *pPtr++ = 0x20; i += 2; @@ -4676,7 +4676,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst ) const tools::Polygon& rPoly = aPolyPoly.GetObject( a ); for ( b = 0; b < rPoly.GetSize(); b++ ) { - if ( rPoly.GetFlags( b ) != POLY_NORMAL ) + if ( rPoly.GetFlags( b ) != PolyFlags::Normal ) continue; const Point& rPt = rPoly[ b ]; sal_uInt32 nDist = (sal_uInt32)hypot( aRefPoint.X - rPt.X(), aRefPoint.Y - rPt.Y() ); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index d50f799d4e0e..66f11591fcb9 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -546,7 +546,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver ) for ( j = 0; bNotFound && ( j < rPolygon.GetSize() ); j++ ) { PolyFlags eFlags = rPolygon.GetFlags( j ); - if ( eFlags == POLY_NORMAL ) + if ( eFlags == PolyFlags::Normal ) { if ( nC == nPointCount ) { diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 1723eebf327b..68c68fd37cb8 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1833,7 +1833,7 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo { aPathData += aBlank; - if ( ( rPoly.GetFlags( n ) == POLY_CONTROL ) && ( ( n + 2 ) < nSize ) ) + if ( ( rPoly.GetFlags( n ) == PolyFlags::Control ) && ( ( n + 2 ) < nSize ) ) { if ( nCurrentMode != 'C' ) { |