[Libreoffice-commits] core.git: editeng/source include/vcl vcl/source
Noel Grandin
noel at peralex.com
Thu May 26 09:25:19 UTC 2016
editeng/source/editeng/impedit2.cxx | 6 +++---
include/vcl/event.hxx | 8 ++++----
vcl/source/edit/textview.cxx | 4 ++--
vcl/source/window/keyevent.cxx | 6 +++---
4 files changed, 12 insertions(+), 12 deletions(-)
New commits:
commit cc12a1b7277f8b6651655462c38b1ed418722fcb
Author: Noel Grandin <noel at peralex.com>
Date: Thu May 26 10:06:56 2016 +0200
Convert TextDirectionality to scoped enum
Change-Id: I1046e791a73ec07be5a946c63a2256939a323e91
Reviewed-on: https://gerrit.libreoffice.org/25497
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 6ac1fef..843bba6 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -750,11 +750,11 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE
EditPaM aOldPaM( aPaM );
- TextDirectionality eTextDirection = TextDirectionality_LeftToRight_TopToBottom;
+ TextDirectionality eTextDirection = TextDirectionality::LeftToRight_TopToBottom;
if ( IsVertical() )
- eTextDirection = TextDirectionality_TopToBottom_RightToLeft;
+ eTextDirection = TextDirectionality::TopToBottom_RightToLeft;
else if ( IsRightToLeft( GetEditDoc().GetPos( aPaM.GetNode() ) ) )
- eTextDirection = TextDirectionality_RightToLeft_TopToBottom;
+ eTextDirection = TextDirectionality::RightToLeft_TopToBottom;
KeyEvent aTranslatedKeyEvent = rKeyEvent.LogicalTextDirectionality( eTextDirection );
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index 81232fa..bfe2f39 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -38,10 +38,10 @@ namespace com { namespace sun { namespace star { namespace awt {
struct MouseEvent;
} } } }
-enum TextDirectionality {
- TextDirectionality_LeftToRight_TopToBottom,
- TextDirectionality_RightToLeft_TopToBottom,
- TextDirectionality_TopToBottom_RightToLeft
+enum class TextDirectionality {
+ LeftToRight_TopToBottom,
+ RightToLeft_TopToBottom,
+ TopToBottom_RightToLeft
};
class VCL_DLLPUBLIC KeyEvent
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 732651e..288b981 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -1175,9 +1175,9 @@ TextSelection TextView::ImpMoveCursor( const KeyEvent& rKeyEvent )
TextPaM aPaM( mpImpl->maSelection.GetEnd() );
TextPaM aOldEnd( aPaM );
- TextDirectionality eTextDirection = TextDirectionality_LeftToRight_TopToBottom;
+ TextDirectionality eTextDirection = TextDirectionality::LeftToRight_TopToBottom;
if ( mpImpl->mpTextEngine->IsRightToLeft() )
- eTextDirection = TextDirectionality_RightToLeft_TopToBottom;
+ eTextDirection = TextDirectionality::RightToLeft_TopToBottom;
KeyEvent aTranslatedKeyEvent = rKeyEvent.LogicalTextDirectionality( eTextDirection );
diff --git a/vcl/source/window/keyevent.cxx b/vcl/source/window/keyevent.cxx
index 6b980c2..d644bc3 100644
--- a/vcl/source/window/keyevent.cxx
+++ b/vcl/source/window/keyevent.cxx
@@ -37,7 +37,7 @@ KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const
switch (eMode)
{
- case TextDirectionality_RightToLeft_TopToBottom:
+ case TextDirectionality::RightToLeft_TopToBottom:
switch (nCode)
{
case KEY_LEFT: aClone.maKeyCode = vcl::KeyCode(KEY_RIGHT, nMod); break;
@@ -45,7 +45,7 @@ KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const
}
break;
- case TextDirectionality_TopToBottom_RightToLeft:
+ case TextDirectionality::TopToBottom_RightToLeft:
switch (nCode)
{
case KEY_DOWN: aClone.maKeyCode = vcl::KeyCode(KEY_RIGHT, nMod); break;
@@ -55,7 +55,7 @@ KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const
}
break;
- case TextDirectionality_LeftToRight_TopToBottom:
+ case TextDirectionality::LeftToRight_TopToBottom:
/* do nothing */
break;
}
More information about the Libreoffice-commits
mailing list