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 /canvas/source/vcl | |
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 'canvas/source/vcl')
-rw-r--r-- | canvas/source/vcl/canvashelper.cxx | 12 | ||||
-rw-r--r-- | canvas/source/vcl/textlayout.cxx | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 0dc936043476..ea67fa1f1ecb 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -596,22 +596,22 @@ namespace vclcanvas return uno::Reference< rendering::XCachedPrimitive >(nullptr); // no output necessary // change text direction and layout mode - ComplexTextLayoutMode nLayoutMode(TEXT_LAYOUT_DEFAULT); + ComplexTextLayoutFlags nLayoutMode(ComplexTextLayoutFlags::Default); switch( textDirection ) { case rendering::TextDirection::WEAK_LEFT_TO_RIGHT: // FALLTHROUGH intended case rendering::TextDirection::STRONG_LEFT_TO_RIGHT: - nLayoutMode |= TEXT_LAYOUT_BIDI_STRONG; - nLayoutMode |= TEXT_LAYOUT_TEXTORIGIN_LEFT; + nLayoutMode |= ComplexTextLayoutFlags::BiDiStrong; + nLayoutMode |= ComplexTextLayoutFlags::TextOriginLeft; break; case rendering::TextDirection::WEAK_RIGHT_TO_LEFT: - nLayoutMode |= TEXT_LAYOUT_BIDI_RTL; + nLayoutMode |= ComplexTextLayoutFlags::BiDiRtl; SAL_FALLTHROUGH; case rendering::TextDirection::STRONG_RIGHT_TO_LEFT: - nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG; - nLayoutMode |= TEXT_LAYOUT_TEXTORIGIN_RIGHT; + nLayoutMode |= ComplexTextLayoutFlags::BiDiRtl | ComplexTextLayoutFlags::BiDiStrong; + nLayoutMode |= ComplexTextLayoutFlags::TextOriginRight; break; } diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx index 982efe88233f..f1951c6c6c5b 100644 --- a/canvas/source/vcl/textlayout.cxx +++ b/canvas/source/vcl/textlayout.cxx @@ -48,19 +48,19 @@ namespace vclcanvas sal_Int8 nTextDirection ) { // TODO(P3): avoid if already correctly set - ComplexTextLayoutMode nLayoutMode = TEXT_LAYOUT_DEFAULT; + ComplexTextLayoutFlags nLayoutMode = ComplexTextLayoutFlags::Default; switch( nTextDirection ) { case rendering::TextDirection::WEAK_LEFT_TO_RIGHT: break; case rendering::TextDirection::STRONG_LEFT_TO_RIGHT: - nLayoutMode = TEXT_LAYOUT_BIDI_STRONG; + nLayoutMode = ComplexTextLayoutFlags::BiDiStrong; break; case rendering::TextDirection::WEAK_RIGHT_TO_LEFT: - nLayoutMode = TEXT_LAYOUT_BIDI_RTL; + nLayoutMode = ComplexTextLayoutFlags::BiDiRtl; break; case rendering::TextDirection::STRONG_RIGHT_TO_LEFT: - nLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG; + nLayoutMode = ComplexTextLayoutFlags::BiDiRtl | ComplexTextLayoutFlags::BiDiStrong; break; default: break; @@ -68,7 +68,7 @@ namespace vclcanvas // set calculated layout mode. Origin is always the left edge, // as required at the API spec - rOutDev.SetLayoutMode( nLayoutMode | TEXT_LAYOUT_TEXTORIGIN_LEFT ); + rOutDev.SetLayoutMode( nLayoutMode | ComplexTextLayoutFlags::TextOriginLeft ); } } |