summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-20 15:20:42 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-22 17:51:35 +0000
commitdfc6b7506738465b14c6bcce63ce5eb7266c969a (patch)
treec19619e76047628d563ca5ac1825366f3cb25097 /vcl
parenta0ac522f6b9850c478c28bb54cafe82fed95a389 (diff)
Convert WinMtfFillStyleType to scoped enum
Change-Id: Ifcbcac1883285d175e1b72e99f300afad2f4d092 Reviewed-on: https://gerrit.libreoffice.org/25200 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx4
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx13
2 files changed, 8 insertions, 9 deletions
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index ac6fac938b68..2228bbcee734 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -912,7 +912,7 @@ void WinMtfOutput::UpdateFillStyle()
if (!( maLatestFillStyle == maFillStyle ) )
{
maLatestFillStyle = maFillStyle;
- if (maFillStyle.aType == FillStyleSolid)
+ if (maFillStyle.aType == WinMtfFillStyleType::Solid)
mpGDIMetaFile->AddAction( new MetaFillColorAction( maFillStyle.aFillColor, !maFillStyle.bTransparent ) );
}
}
@@ -1211,7 +1211,7 @@ void WinMtfOutput::DrawPolygon( tools::Polygon& rPolygon, bool bRecordPath )
{
UpdateLineStyle();
- if (maLatestFillStyle.aType != FillStylePattern)
+ if (maLatestFillStyle.aType != WinMtfFillStyleType::Pattern)
mpGDIMetaFile->AddAction( new MetaPolygonAction( rPolygon ) );
else {
SvtGraphicFill aFill = SvtGraphicFill( tools::PolyPolygon( rPolygon ),
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index 3f4182ee44bf..cff2763dab67 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -299,11 +299,10 @@ struct WinMtfFontStyle : GDIObj
};
-typedef enum
+enum class WinMtfFillStyleType
{
- FillStyleSolid,
- FillStylePattern
-} WinMtfFillStyleType;
+ Solid, Pattern
+};
struct WinMtfFillStyle : GDIObj
{
@@ -315,18 +314,18 @@ struct WinMtfFillStyle : GDIObj
WinMtfFillStyle()
: aFillColor(Color(COL_BLACK))
, bTransparent(false)
- , aType(FillStyleSolid)
+ , aType(WinMtfFillStyleType::Solid)
{}
WinMtfFillStyle(const Color& rColor, bool bTrans = false)
: aFillColor(rColor)
, bTransparent(bTrans)
- , aType(FillStyleSolid)
+ , aType(WinMtfFillStyleType::Solid)
{}
explicit WinMtfFillStyle(Bitmap& rBmp)
: bTransparent(false)
- , aType(FillStylePattern)
+ , aType(WinMtfFillStyleType::Pattern)
, aBmp(rBmp)
{}