diff options
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 0208486ce0df..63cb370c8a91 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -1515,26 +1515,18 @@ namespace cppcanvas case META_LAYOUTMODE_ACTION: { // TODO(F2): A lot is missing here - int nLayoutMode = static_cast<MetaLayoutModeAction*>(pCurrAct)->GetLayoutMode(); + ComplexTextLayoutMode nLayoutMode = static_cast<MetaLayoutModeAction*>(pCurrAct)->GetLayoutMode(); ::cppcanvas::internal::OutDevState& rState = rStates.getState(); - switch( nLayoutMode & (TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_BIDI_STRONG) ) - { - case TEXT_LAYOUT_BIDI_LTR: - rState.textDirection = rendering::TextDirection::WEAK_LEFT_TO_RIGHT; - break; - case (TEXT_LAYOUT_BIDI_LTR | TEXT_LAYOUT_BIDI_STRONG): + ComplexTextLayoutMode nBidiLayoutMode = nLayoutMode & (TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_BIDI_STRONG); + if( nBidiLayoutMode == 0) + rState.textDirection = rendering::TextDirection::WEAK_LEFT_TO_RIGHT; + else if( nBidiLayoutMode == TEXT_LAYOUT_BIDI_STRONG) rState.textDirection = rendering::TextDirection::STRONG_LEFT_TO_RIGHT; - break; - - case TEXT_LAYOUT_BIDI_RTL: + else if( nBidiLayoutMode == TEXT_LAYOUT_BIDI_RTL) rState.textDirection = rendering::TextDirection::WEAK_RIGHT_TO_LEFT; - break; - - case (TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG): + else if( nBidiLayoutMode == (TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG)) rState.textDirection = rendering::TextDirection::STRONG_RIGHT_TO_LEFT; - break; - } rState.textAlignment = 0; // TODO(F2): rendering::TextAlignment::LEFT_ALIGNED; if( (nLayoutMode & (TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_RIGHT) ) |