From b3548c1f720d261e503ad2012be7e6822097f88e Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 29 Apr 2007 08:29:16 +0000 Subject: [PATCH] * Cursor::isRTL(): new method that gives the RTL state of the paragraph. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18080 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Cursor.cpp | 6 ++++++ src/Cursor.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 134017e865..5c4b3ab7da 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -1327,4 +1327,10 @@ void Cursor::fixIfBroken() } +bool Cursor::isRTL() const +{ + return top().paragraph().isRightToLeftPar(bv().buffer()->params()); +} + + } // namespace lyx diff --git a/src/Cursor.h b/src/Cursor.h index 8ef6448c0e..13ca0e7cdd 100644 --- a/src/Cursor.h +++ b/src/Cursor.h @@ -307,6 +307,8 @@ public: Encoding const * getEncoding() const; /// font at cursor position LyXFont getFont() const; + /// + bool isRTL() const; };