diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-30 14:00:22 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-03 11:34:23 +0000 |
commit | 52225a3b7fd48f79e8376caf498564b7cffc152b (patch) | |
tree | 73fafae95a446e7db3d1908c53cc79749faa30b6 /drawinglayer | |
parent | 1741c0ff36e57f0629ff360a79b18c2d11bb8092 (diff) |
Convert ComplexTextLayoutMode to scoped enum
Change-Id: I257f8e15fec92f0701235a6fe4b6a2272498c4f1
Reviewed-on: https://gerrit.libreoffice.org/25667
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 12 | ||||
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index ff6d69426158..a691c8dee92a 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -88,7 +88,7 @@ namespace /// font, etc. vcl::Font maFont; RasterOp maRasterOp; - ComplexTextLayoutMode mnLayoutMode; + ComplexTextLayoutFlags mnLayoutMode; LanguageType maLanguageType; PushFlags mnPushFlags; @@ -115,7 +115,7 @@ namespace maClipPolyPoygon(), maFont(), maRasterOp(ROP_OVERPAINT), - mnLayoutMode(TEXT_LAYOUT_DEFAULT), + mnLayoutMode(ComplexTextLayoutFlags::Default), maLanguageType(0), mnPushFlags(PushFlags::NONE), mbLineColor(false), @@ -183,8 +183,8 @@ namespace bool isRasterOpForceBlack() const { return ROP_0 == maRasterOp; } bool isRasterOpActive() const { return isRasterOpInvert() || isRasterOpForceBlack(); } - ComplexTextLayoutMode getLayoutMode() const { return mnLayoutMode; } - void setLayoutMode(ComplexTextLayoutMode nNew) { if(nNew != mnLayoutMode) mnLayoutMode = nNew; } + ComplexTextLayoutFlags getLayoutMode() const { return mnLayoutMode; } + void setLayoutMode(ComplexTextLayoutFlags nNew) { if(nNew != mnLayoutMode) mnLayoutMode = nNew; } LanguageType getLanguageType() const { return maLanguageType; } void setLanguageType(LanguageType aNew) { if(aNew != maLanguageType) maLanguageType = aNew; } @@ -1220,8 +1220,8 @@ namespace drawinglayer::primitive2d::getFontAttributeFromVclFont( aFontScaling, rFont, - bool(rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_RTL), - bool(rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_STRONG))); + bool(rProperty.getLayoutMode() & ComplexTextLayoutFlags::BiDiRtl), + bool(rProperty.getLayoutMode() & ComplexTextLayoutFlags::BiDiStrong))); // add FontScaling rTextTransform.scale(aFontScaling.getX(), aFontScaling.getY()); diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index b235827d3988..bb1d8e2f26f4 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -246,12 +246,12 @@ namespace drawinglayer const basegfx::BColor aRGBFontColor(maBColorModifierStack.getModifiedColor(rTextCandidate.getFontColor())); const basegfx::B2DPoint aPoint(aLocalTransform * basegfx::B2DPoint(0.0, 0.0)); const Point aStartPoint(basegfx::fround(aPoint.getX()), basegfx::fround(aPoint.getY())); - const ComplexTextLayoutMode nOldLayoutMode(mpOutputDevice->GetLayoutMode()); + const ComplexTextLayoutFlags nOldLayoutMode(mpOutputDevice->GetLayoutMode()); if(rTextCandidate.getFontAttribute().getRTL()) { - ComplexTextLayoutMode nRTLLayoutMode(nOldLayoutMode & ~(TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG)); - nRTLLayoutMode |= TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_TEXTORIGIN_LEFT; + ComplexTextLayoutFlags nRTLLayoutMode(nOldLayoutMode & ~ComplexTextLayoutFlags(ComplexTextLayoutFlags::ComplexDisabled|ComplexTextLayoutFlags::BiDiStrong)); + nRTLLayoutMode |= ComplexTextLayoutFlags::BiDiRtl|ComplexTextLayoutFlags::TextOriginLeft; mpOutputDevice->SetLayoutMode(nRTLLayoutMode); } |