summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-05-29 20:23:09 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-30 06:41:53 +0000
commit990082f37c31380d9fedd62c5dac1b5bff4c9636 (patch)
tree8f567bbc9814fd8a5b610529d82610422da59910 /cppcanvas
parent446d0887ff5421822e0296e20cbb36f08f1e6445 (diff)
Convert FontRelief to scoped enum
Change-Id: I545c83d742db27f1a004b66e5eb1ef768f62e011 Reviewed-on: https://gerrit.libreoffice.org/25626 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/inc/outdevstate.hxx4
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx6
2 files changed, 5 insertions, 5 deletions
diff --git a/cppcanvas/source/inc/outdevstate.hxx b/cppcanvas/source/inc/outdevstate.hxx
index 9478e4360138..2d199cc860ce 100644
--- a/cppcanvas/source/inc/outdevstate.hxx
+++ b/cppcanvas/source/inc/outdevstate.hxx
@@ -62,7 +62,7 @@ namespace cppcanvas
textDirection(css::rendering::TextDirection::WEAK_LEFT_TO_RIGHT),
textAlignment(0), // TODO(Q2): Synchronize with implrenderer
// and possibly new rendering::TextAlignment
- textReliefStyle(RELIEF_NONE),
+ textReliefStyle(FontRelief::NONE),
textOverlineStyle(LINESTYLE_NONE),
textUnderlineStyle(LINESTYLE_NONE),
textStrikeoutStyle(STRIKEOUT_NONE),
@@ -103,7 +103,7 @@ namespace cppcanvas
PushFlags pushFlags;
sal_Int8 textDirection;
sal_Int8 textAlignment;
- sal_Int8 textReliefStyle;
+ FontRelief textReliefStyle;
sal_Int8 textOverlineStyle;
sal_Int8 textUnderlineStyle;
sal_Int8 textStrikeoutStyle;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index bb64de5c1e27..ab398c519186 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -905,7 +905,7 @@ namespace cppcanvas
aShadowColor.SetTransparency( aTextColor.GetTransparency() );
}
- if( rState.textReliefStyle )
+ if( rState.textReliefStyle != FontRelief::NONE )
{
// calculate relief offset (similar to outdev3.cxx)
sal_Int32 nReliefOffset = rParms.mrVDev.PixelToLogic( Size( 1, 1 ) ).Height();
@@ -913,7 +913,7 @@ namespace cppcanvas
if( nReliefOffset < 1 )
nReliefOffset = 1;
- if( rState.textReliefStyle == RELIEF_ENGRAVED )
+ if( rState.textReliefStyle == FontRelief::Engraved )
nReliefOffset = -nReliefOffset;
aReliefOffset.setWidth( nReliefOffset );
@@ -1491,7 +1491,7 @@ namespace cppcanvas
rFactoryParms );
// TODO(Q2): define and use appropriate enumeration types
- rState.textReliefStyle = (sal_Int8)rFont.GetRelief();
+ rState.textReliefStyle = rFont.GetRelief();
rState.textOverlineStyle = (sal_Int8)rFont.GetOverline();
rState.textUnderlineStyle = rParms.maFontUnderline.is_initialized() ?
(*rParms.maFontUnderline ? (sal_Int8)LINESTYLE_SINGLE : (sal_Int8)LINESTYLE_NONE) :