]> git.lyx.org Git - features.git/commitdiff
Remove XForms RTL hacks.
authorDekel Tsur <dekelts@tau.ac.il>
Wed, 15 Jan 2003 14:23:21 +0000 (14:23 +0000)
committerDekel Tsur <dekelts@tau.ac.il>
Wed, 15 Jan 2003 14:23:21 +0000 (14:23 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5959 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlSpellchecker.C
src/frontends/controllers/ControlSpellchecker.h
src/paragraph.C

index 5988f0d6011c4c704dd15e1edd6125b01aa3b367..d24276a67ad9fea791d324ca20658505c79e5fb6 100644 (file)
@@ -1,3 +1,7 @@
+2003-01-15  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * paragraph.C (asString): Remove XForms RTL hacks.
+
 2003-01-13  Alfredo Braunstein <abraunst@libero.it>
        * buffer.C: fix typo
 
index 1c29e38de942b06961e0b14bb6fea5d57f54cd8b..0814620aa86298fafdcbdcb0d3fbae05400cfdd9 100644 (file)
@@ -1,3 +1,7 @@
+2003-01-15  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * ControlSpellchecker.[Ch]: Remove XForms RTL hacks.
+
 2003-01-11  Juergen Spitzmueller  <j.spitzmueller@gmx.de>
 
        * helper_funcs.[Ch]: implement browseDir (browse directory) [bug 824]
index 03ce407d5a21a4e79dea572dab696a60fa61009f..8e94118f0b3366e66a2688197618b0f83b4854b2 100644 (file)
 
 #include "frontends/Alert.h"
 
-#include "support/lstrings.h"
-
 #include "BoostFormat.h"
 
 ControlSpellchecker::ControlSpellchecker(LyXView & lv, Dialogs & d)
        : ControlDialogBD(lv, d),
-         rtl_(false), newval_(0.0), oldval_(0), newvalue_(0), count_(0),
+         newval_(0.0), oldval_(0), newvalue_(0), count_(0),
          stop_(false), speller_(0)
 {}
 
@@ -64,14 +62,6 @@ void ControlSpellchecker::setParams()
        }
 #endif
 
-       if (lyxrc.isp_use_alt_lang) {
-               Language const * lang = languages.getLanguage(tmp);
-               if (lang)
-                       rtl_ = lang->RightToLeft();
-       } else {
-               rtl_ = buffer()->params.language->RightToLeft();
-       }
-
        if (!speller_->error().empty()) {
                emergency_exit_ = true;
                Alert::alert("The spellchecker has failed", speller_->error());
@@ -153,21 +143,13 @@ void ControlSpellchecker::insert()
 
 string const ControlSpellchecker::getSuggestion() const
 {
-       string miss(speller_->nextMiss());
-
-       if (rtl_)
-               std::reverse(miss.begin(), miss.end());
-
-       return miss;
+       return speller_->nextMiss();
 }
 
 
 string const ControlSpellchecker::getWord() const
 {
-       string tmp = word_.word();
-       if (rtl_)
-               std::reverse(tmp.begin(), tmp.end());
-       return tmp;
+       return word_.word();
 }
 
 
@@ -231,7 +213,6 @@ void ControlSpellchecker::clearParams()
                view().partialUpdate(2);
 
        // reset values to initial
-       rtl_ = false;
        newval_ = 0.0;
        oldval_ = 0;
        newvalue_ = 0;
index aa359865cda33bb97fe953c898115967f9c2706e..8d026dc9acc6a16d0b3047d70d7d971ec720f79a 100644 (file)
@@ -71,9 +71,6 @@ private:
        /// not needed.
        virtual void apply() {}
 
-       /// right to left
-       bool rtl_;
-
        /// current word being checked and lang code
        WordLangTuple word_;
 
index 248b349d5310593582690e1df9ed6abcf58bd620..bd4a227814be2b1df0bb51bc9a916fa80c6080a3 100644 (file)
@@ -49,7 +49,6 @@ using std::fstream;
 using std::ios;
 using std::lower_bound;
 using std::upper_bound;
-using std::reverse;
 
 using lyx::pos_type;
 
@@ -1748,9 +1747,6 @@ string const Paragraph::asString(Buffer const * buffer, bool label) const
                }
        }
 
-       if (isRightToLeftPar(bparams))
-               reverse(s.begin() + len,s.end());
-
        return s;
 }