summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-05-29 17:20:50 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-30 06:41:41 +0000
commit446d0887ff5421822e0296e20cbb36f08f1e6445 (patch)
treed98773fb0a647d57e02dc67e2f3e2dffb49d215a /drawinglayer
parentc47b170c71ecdcaacf2e12e5ce28e7d411bb52e6 (diff)
Convert TextEffectStyle2D to scoped enum
Change-Id: I1ef784473408a220788f0ce7550bf16809fa2cd2 Reviewed-on: https://gerrit.libreoffice.org/25625 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx12
-rw-r--r--drawinglayer/source/primitive2d/texteffectprimitive2d.cxx18
-rw-r--r--drawinglayer/source/primitive2d/textprimitive2d.cxx2
3 files changed, 16 insertions, 16 deletions
diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index cefbbb827c2f..c2222b242372 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -248,28 +248,28 @@ namespace drawinglayer
// be view-dependent
const basegfx::BColor aBBlack(0.0, 0.0, 0.0);
const bool bDefaultTextColor(aBBlack == getFontColor());
- TextEffectStyle2D aTextEffectStyle2D(TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED);
+ TextEffectStyle2D aTextEffectStyle2D(TextEffectStyle2D::ReliefEmbossed);
if(bDefaultTextColor)
{
if(TEXT_RELIEF_ENGRAVED == getTextRelief())
{
- aTextEffectStyle2D = TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED_DEFAULT;
+ aTextEffectStyle2D = TextEffectStyle2D::ReliefEngravedDefault;
}
else
{
- aTextEffectStyle2D = TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT;
+ aTextEffectStyle2D = TextEffectStyle2D::ReliefEmbossedDefault;
}
}
else
{
if(TEXT_RELIEF_ENGRAVED == getTextRelief())
{
- aTextEffectStyle2D = TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED;
+ aTextEffectStyle2D = TextEffectStyle2D::ReliefEngraved;
}
else
{
- aTextEffectStyle2D = TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED;
+ aTextEffectStyle2D = TextEffectStyle2D::ReliefEmbossed;
}
}
@@ -288,7 +288,7 @@ namespace drawinglayer
aRetval,
aDecTrans.getTranslate(),
aDecTrans.getRotate(),
- TEXTEFFECTSTYLE2D_OUTLINE));
+ TextEffectStyle2D::Outline));
aRetval = Primitive2DContainer { aNewTextEffect };
}
diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
index cd13281c86aa..2e0838d33c0a 100644
--- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
@@ -43,10 +43,10 @@ namespace drawinglayer
switch(getTextEffectStyle2D())
{
- case TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED:
- case TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED:
- case TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT:
- case TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED_DEFAULT:
+ case TextEffectStyle2D::ReliefEmbossed:
+ case TextEffectStyle2D::ReliefEngraved:
+ case TextEffectStyle2D::ReliefEmbossedDefault:
+ case TextEffectStyle2D::ReliefEngravedDefault:
{
// prepare transform of sub-group back to (0,0) and align to X-Axis
basegfx::B2DHomMatrix aBackTransform(basegfx::tools::createTranslateB2DHomMatrix(
@@ -59,11 +59,11 @@ namespace drawinglayer
// create transformation for one discrete unit
const bool bEmbossed(
- TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED == getTextEffectStyle2D()
- || TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT == getTextEffectStyle2D());
+ TextEffectStyle2D::ReliefEmbossed == getTextEffectStyle2D()
+ || TextEffectStyle2D::ReliefEmbossedDefault == getTextEffectStyle2D());
const bool bDefaultTextColor(
- TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT == getTextEffectStyle2D()
- || TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED_DEFAULT == getTextEffectStyle2D());
+ TextEffectStyle2D::ReliefEmbossedDefault == getTextEffectStyle2D()
+ || TextEffectStyle2D::ReliefEngravedDefault == getTextEffectStyle2D());
basegfx::B2DHomMatrix aTransform(aBackTransform);
aRetval.resize(2);
@@ -128,7 +128,7 @@ namespace drawinglayer
break;
}
- case TEXTEFFECTSTYLE2D_OUTLINE:
+ case TextEffectStyle2D::Outline:
{
// create transform primitives in all directions
basegfx::B2DHomMatrix aTransform;
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index 11bbc23ebeb1..be1c4e70f710 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -205,7 +205,7 @@ namespace drawinglayer
aRetval,
aTranslate,
fRotate,
- TEXTEFFECTSTYLE2D_OUTLINE));
+ TextEffectStyle2D::Outline));
aRetval = Primitive2DContainer { aNewTextEffect };
}