diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-05-21 19:26:41 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-23 07:31:31 +0000 |
commit | 4a98af674c90de499909174af409d0e29cc155e2 (patch) | |
tree | 1b30c08b36349a937cd137c31189840cf9f587d1 /drawinglayer | |
parent | 72ffb6f590293fb8d3ba428f1700dc05703b014f (diff) |
Convert HatchStyle to scoped enum
Change-Id: I27878a67457d32e6922dfb6da73f896ff6ab1d01
Reviewed-on: https://gerrit.libreoffice.org/25271
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'drawinglayer')
7 files changed, 21 insertions, 21 deletions
diff --git a/drawinglayer/source/attribute/fillhatchattribute.cxx b/drawinglayer/source/attribute/fillhatchattribute.cxx index e3dd831bf35a..e55e1f71f55c 100644 --- a/drawinglayer/source/attribute/fillhatchattribute.cxx +++ b/drawinglayer/source/attribute/fillhatchattribute.cxx @@ -56,7 +56,7 @@ namespace drawinglayer } ImpFillHatchAttribute() - : meStyle(HATCHSTYLE_SINGLE), + : meStyle(HatchStyle::Single), mfDistance(0.0), mfAngle(0.0), maColor(basegfx::BColor()), diff --git a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx index a253c5fbfb85..5e4a7cc4ae8c 100644 --- a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx @@ -62,7 +62,7 @@ namespace drawinglayer // get hatch transformations switch(getFillHatch().getStyle()) { - case attribute::HATCHSTYLE_TRIPLE: + case attribute::HatchStyle::Triple: { // rotated 45 degrees texture::GeoTexSvxHatch aHatch( @@ -75,7 +75,7 @@ namespace drawinglayer SAL_FALLTHROUGH; } - case attribute::HATCHSTYLE_DOUBLE: + case attribute::HatchStyle::Double: { // rotated 90 degrees texture::GeoTexSvxHatch aHatch( @@ -88,7 +88,7 @@ namespace drawinglayer SAL_FALLTHROUGH; } - case attribute::HATCHSTYLE_SINGLE: + case attribute::HatchStyle::Single: { // angle as given texture::GeoTexSvxHatch aHatch( diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index ea58a15fb73f..3f118a9e435c 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -900,23 +900,23 @@ namespace */ drawinglayer::attribute::FillHatchAttribute createFillHatchAttribute(const Hatch& rHatch) { - drawinglayer::attribute::HatchStyle aHatchStyle(drawinglayer::attribute::HATCHSTYLE_SINGLE); + drawinglayer::attribute::HatchStyle aHatchStyle(drawinglayer::attribute::HatchStyle::Single); switch(rHatch.GetStyle()) { default : // case HATCH_SINGLE : { - aHatchStyle = drawinglayer::attribute::HATCHSTYLE_SINGLE; + aHatchStyle = drawinglayer::attribute::HatchStyle::Single; break; } case HATCH_DOUBLE : { - aHatchStyle = drawinglayer::attribute::HATCHSTYLE_DOUBLE; + aHatchStyle = drawinglayer::attribute::HatchStyle::Double; break; } case HATCH_TRIPLE : { - aHatchStyle = drawinglayer::attribute::HATCHSTYLE_TRIPLE; + aHatchStyle = drawinglayer::attribute::HatchStyle::Triple; break; } } diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx index a54c9dfeb328..43ae92607d0a 100644 --- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx @@ -140,7 +140,7 @@ namespace drawinglayer // get hatch transformations switch(getHatch().getStyle()) { - case attribute::HATCHSTYLE_TRIPLE: + case attribute::HatchStyle::Triple: { // rotated 45 degrees texture::GeoTexSvxHatch aHatch( @@ -153,7 +153,7 @@ namespace drawinglayer SAL_FALLTHROUGH; } - case attribute::HATCHSTYLE_DOUBLE: + case attribute::HatchStyle::Double: { // rotated 90 degrees texture::GeoTexSvxHatch aHatch( @@ -166,7 +166,7 @@ namespace drawinglayer SAL_FALLTHROUGH; } - case attribute::HATCHSTYLE_SINGLE: + case attribute::HatchStyle::Single: { // angle as given texture::GeoTexSvxHatch aHatch( diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 29a40e4be214..beed1caa8ec4 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1484,17 +1484,17 @@ namespace drawinglayer switch(rFillHatchAttribute.getStyle()) { - default: // attribute::HATCHSTYLE_SINGLE : + default: // attribute::HatchStyle::Single : { eHatch = SvtGraphicFill::hatchSingle; break; } - case attribute::HATCHSTYLE_DOUBLE : + case attribute::HatchStyle::Double : { eHatch = SvtGraphicFill::hatchDouble; break; } - case attribute::HATCHSTYLE_TRIPLE : + case attribute::HatchStyle::Triple : { eHatch = SvtGraphicFill::hatchTriple; break; @@ -1537,8 +1537,8 @@ namespace drawinglayer // process(rCandidate.get2DDecomposition(getViewInformation2D())); const ::tools::PolyPolygon aToolsPolyPolygon(basegfx::tools::adaptiveSubdivideByAngle(aLocalPolyPolygon)); const HatchStyle aHatchStyle( - attribute::HATCHSTYLE_SINGLE == rFillHatchAttribute.getStyle() ? HATCH_SINGLE : - attribute::HATCHSTYLE_DOUBLE == rFillHatchAttribute.getStyle() ? HATCH_DOUBLE : + attribute::HatchStyle::Single == rFillHatchAttribute.getStyle() ? HATCH_SINGLE : + attribute::HatchStyle::Double == rFillHatchAttribute.getStyle() ? HATCH_DOUBLE : HATCH_TRIPLE); mpOutputDevice->DrawHatch(aToolsPolyPolygon, diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 70d0ffbae530..2e6bc257b337 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -1124,16 +1124,16 @@ namespace drawinglayer switch(rFillHatchAttributes.getStyle()) { - default : // HATCHSTYLE_SINGLE + default : // HatchStyle::Single { break; } - case attribute::HATCHSTYLE_DOUBLE : + case attribute::HatchStyle::Double : { eHatchStyle = HATCH_DOUBLE; break; } - case attribute::HATCHSTYLE_TRIPLE : + case attribute::HatchStyle::Triple : { eHatchStyle = HATCH_TRIPLE; break; diff --git a/drawinglayer/source/texture/texture3d.cxx b/drawinglayer/source/texture/texture3d.cxx index 70939b8ec6a1..a3915d5f290d 100644 --- a/drawinglayer/source/texture/texture3d.cxx +++ b/drawinglayer/source/texture/texture3d.cxx @@ -336,7 +336,7 @@ namespace drawinglayer rHatch.getDistance(), fAngleA); - if(attribute::HATCHSTYLE_DOUBLE == rHatch.getStyle() || attribute::HATCHSTYLE_TRIPLE == rHatch.getStyle()) + if(attribute::HatchStyle::Double == rHatch.getStyle() || attribute::HatchStyle::Triple == rHatch.getStyle()) { mp1 = new GeoTexSvxHatch( aOutlineRange, @@ -345,7 +345,7 @@ namespace drawinglayer fAngleA + F_PI2); } - if(attribute::HATCHSTYLE_TRIPLE == rHatch.getStyle()) + if(attribute::HatchStyle::Triple == rHatch.getStyle()) { mp2 = new GeoTexSvxHatch( aOutlineRange, |