diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-05-08 09:21:17 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-09 09:41:34 +0000 |
commit | 50ac0f503b763d08aef4a193c38e64b70220bfba (patch) | |
tree | 9e02808b2736ac75852060bb3367c8236b9ac334 /drawinglayer | |
parent | 26d314d2e25945941d49a4872d7ffa27cfc2fdc8 (diff) |
convert FONT_EMPHASIS_MARK to scoped enum
Change-Id: I137c78b337e57d3442db08334128e79d186b278f
Reviewed-on: https://gerrit.libreoffice.org/24753
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'drawinglayer')
3 files changed, 20 insertions, 19 deletions
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 094e186f283c..ea58a15fb73f 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -1292,7 +1292,7 @@ namespace LINESTYLE_NONE != rFont.GetOverline() || LINESTYLE_NONE != rFont.GetUnderline() || STRIKEOUT_NONE != rFont.GetStrikeout() - || EMPHASISMARK_NONE != (rFont.GetEmphasisMark() & EMPHASISMARK_STYLE) + || FontEmphasisMark::NONE != (rFont.GetEmphasisMark() & FontEmphasisMark::Style) || RELIEF_NONE != rFont.GetRelief() || rFont.IsShadow() || bWordLineMode); @@ -1308,18 +1308,19 @@ namespace const bool bUnderlineAbove(drawinglayer::primitive2d::TEXT_LINE_NONE != eFontLineStyle && isUnderlineAbove(rFont)); // prepare emphasis mark data - drawinglayer::primitive2d::TextEmphasisMark eTextEmphasisMark(drawinglayer::primitive2d::TEXT_EMPHASISMARK_NONE); + drawinglayer::primitive2d::TextEmphasisMark eTextEmphasisMark(drawinglayer::primitive2d::TEXT_FONT_EMPHASIS_MARK_NONE); - switch(rFont.GetEmphasisMark() & EMPHASISMARK_STYLE) + switch(rFont.GetEmphasisMark() & FontEmphasisMark::Style) { - case EMPHASISMARK_DOT : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_DOT; break; - case EMPHASISMARK_CIRCLE : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_CIRCLE; break; - case EMPHASISMARK_DISC : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_DISC; break; - case EMPHASISMARK_ACCENT : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_ACCENT; break; + case FontEmphasisMark::Dot : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_FONT_EMPHASIS_MARK_DOT; break; + case FontEmphasisMark::Circle : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_FONT_EMPHASIS_MARK_CIRCLE; break; + case FontEmphasisMark::Disc : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_FONT_EMPHASIS_MARK_DISC; break; + case FontEmphasisMark::Accent : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_FONT_EMPHASIS_MARK_ACCENT; break; + default: break; } - const bool bEmphasisMarkAbove(rFont.GetEmphasisMark() & EMPHASISMARK_POS_ABOVE); - const bool bEmphasisMarkBelow(rFont.GetEmphasisMark() & EMPHASISMARK_POS_BELOW); + const bool bEmphasisMarkAbove(rFont.GetEmphasisMark() & FontEmphasisMark::PosAbove); + const bool bEmphasisMarkBelow(rFont.GetEmphasisMark() & FontEmphasisMark::PosBelow); // prepare font relief data drawinglayer::primitive2d::TextRelief eTextRelief(drawinglayer::primitive2d::TEXT_RELIEF_NONE); diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index eaae44d8e5a5..d8d2f9a26f08 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -352,7 +352,7 @@ namespace drawinglayer return (TEXT_LINE_NONE != getFontOverline() || TEXT_LINE_NONE != getFontUnderline() || TEXT_STRIKEOUT_NONE != getTextStrikeout() - || TEXT_EMPHASISMARK_NONE != getTextEmphasisMark() + || TEXT_FONT_EMPHASIS_MARK_NONE != getTextEmphasisMark() || TEXT_RELIEF_NONE != getTextRelief() || getShadow()); } diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index f5d24cf001cb..ec31b509c456 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -179,27 +179,27 @@ namespace drawinglayer // set EmphasisMark attribute - FontEmphasisMark eFontEmphasisMark = EMPHASISMARK_NONE; + FontEmphasisMark eFontEmphasisMark = FontEmphasisMark::NONE; switch( pTCPP->getTextEmphasisMark() ) { default: SAL_WARN("drawinglayer", "Unknown EmphasisMark style " << pTCPP->getTextEmphasisMark() ); // fall through - case primitive2d::TEXT_EMPHASISMARK_NONE: eFontEmphasisMark = EMPHASISMARK_NONE; break; - case primitive2d::TEXT_EMPHASISMARK_DOT: eFontEmphasisMark = EMPHASISMARK_DOT; break; - case primitive2d::TEXT_EMPHASISMARK_CIRCLE: eFontEmphasisMark = EMPHASISMARK_CIRCLE; break; - case primitive2d::TEXT_EMPHASISMARK_DISC: eFontEmphasisMark = EMPHASISMARK_DISC; break; - case primitive2d::TEXT_EMPHASISMARK_ACCENT: eFontEmphasisMark = EMPHASISMARK_ACCENT; break; + case primitive2d::TEXT_FONT_EMPHASIS_MARK_NONE: eFontEmphasisMark = FontEmphasisMark::NONE; break; + case primitive2d::TEXT_FONT_EMPHASIS_MARK_DOT: eFontEmphasisMark = FontEmphasisMark::Dot; break; + case primitive2d::TEXT_FONT_EMPHASIS_MARK_CIRCLE: eFontEmphasisMark = FontEmphasisMark::Circle; break; + case primitive2d::TEXT_FONT_EMPHASIS_MARK_DISC: eFontEmphasisMark = FontEmphasisMark::Disc; break; + case primitive2d::TEXT_FONT_EMPHASIS_MARK_ACCENT: eFontEmphasisMark = FontEmphasisMark::Accent; break; } - if( eFontEmphasisMark != EMPHASISMARK_NONE ) + if( eFontEmphasisMark != FontEmphasisMark::NONE ) { DBG_ASSERT( (pTCPP->getEmphasisMarkAbove() != pTCPP->getEmphasisMarkBelow()), "DrawingLayer: Bad EmphasisMark position!" ); if( pTCPP->getEmphasisMarkAbove() ) - eFontEmphasisMark |= EMPHASISMARK_POS_ABOVE; + eFontEmphasisMark |= FontEmphasisMark::PosAbove; else - eFontEmphasisMark |= EMPHASISMARK_POS_BELOW; + eFontEmphasisMark |= FontEmphasisMark::PosBelow; aFont.SetEmphasisMark( eFontEmphasisMark ); } |