]> git.lyx.org Git - features.git/commitdiff
lyxlex-2-a.diff
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 14 Apr 2003 13:12:40 +0000 (13:12 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 14 Apr 2003 13:12:40 +0000 (13:12 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6795 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/frontends/xforms/FormPreferences.C
src/lyxlex.C
src/lyxlex.h
src/lyxlex_pimpl.C
src/paragraph_funcs.C
src/trans.C

index 8844b1b9583f4817606f47adc11f399551aec0ab..809138fe7423722a94149be2606a9207648d2104 100644 (file)
@@ -1,3 +1,9 @@
+2003-04-14  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * lyxlex.[Ch] (text): delete function
+       * trans.C (Load): adjust
+       * paragraph_funcs.C (readParToken): adjust
+
 2003-04-14  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * lyxlex_pimpl.h: get rid of LEX_MAX_BUFF, change buff to be a
index 6630f8c81308e08e9a51f2ec62a317961fc73be6..91f47461c20c333ae940472531be78b33c789716 100644 (file)
@@ -223,7 +223,7 @@ void FormPreferences::build()
                folder = lang_opts_tab_->tabfolder_inner;
                fl_set_tabfolder_autofit(folder, FL_FIT);
        }
-       
+
        // Stack tabs
        // Now add them to the tabfolder
        fl_addto_tabfolder(dialog_->tabfolder_prefs,
index da19717fa9a9fd392fd6367affc22b42c9e75abe..c590c74c534c5a568fda0d2a23785e945ccd4bd3 100644 (file)
@@ -52,12 +52,6 @@ int LyXLex::getLineNo() const
 }
 
 
-string const LyXLex::text() const
-{
-       return pimpl_->getString();
-}
-
-
 istream & LyXLex::getStream()
 {
        return pimpl_->is;
index 5f94fc4d6871bef08736a89e9310ee3fcad111f0..f78a653c9cc3f512108c61107d89c6a115e374f8 100644 (file)
@@ -99,9 +99,6 @@ public:
        ///
        int findToken(char const * str[]);
 
-       ///
-       string const text() const;
-
        /** Pushes a token list on a stack and replaces it with a new one.
         */
        void pushTable(keyword_item *, int);
index 3248c4a849945ada2300767b53c802fbd902874a..90e68b8ecdc75e8b8343293687f24263b4273646 100644 (file)
@@ -171,7 +171,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                                // That is not fast... (Lgb)
                                string dummy;
                                getline(is, dummy);
-                               
+
                                lyxerr[Debug::LYXLEX] << "Comment read: `" << c
                                                      << dummy << '\'' << endl;
 #else
@@ -184,7 +184,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
 
                        if (c == '\"') {
                                buff.clear();
-                               
+
                                do {
                                        is.get(cc);
                                        c = cc;
@@ -212,7 +212,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                                // lot better to use the functions from cctype
                        if (c > ' ' && is)  {
                                buff.clear();
-                               
+
                                do {
                                        buff.push_back(c);
                                        is.get(cc);
@@ -255,7 +255,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                        if (c == '\\') {
                                // escape
                                buff.clear();
-                               
+
                                do {
                                        if (c == '\\') {
                                                // escape the next char
@@ -277,7 +277,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                                // That is still not fast... (Lgb)
                                string dummy;
                                getline(is, dummy);
-                               
+
                                lyxerr[Debug::LYXLEX] << "Comment read: `" << c
                                                      << dummy << '\'' << endl;
 #else
@@ -292,7 +292,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                        // string
                        if (c == '\"') {
                                buff.clear();
-                               
+
                                bool escaped = false;
                                do {
                                        escaped = false;
@@ -326,7 +326,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
 
                        if (c > ' ' && is) {
                                buff.clear();
-                               
+
                                do {
                                        if (c == '\\') {
                                                // escape the next char
@@ -384,7 +384,7 @@ int LyXLex::Pimpl::lex()
 bool LyXLex::Pimpl::eatLine()
 {
        buff.clear();
-       
+
        unsigned char c = '\0';
        char cc = 0;
        while (is && c != '\n') {
@@ -433,7 +433,7 @@ bool LyXLex::Pimpl::nextToken()
                c = cc;
                if (c >= ' ' && is) {
                        buff.clear();
-                       
+
                        if (c == '\\') { // first char == '\\'
                                do {
                                        buff.push_back(c);
index cd3937c8c408e317a9c092f3b4f3bfb7fe2d1a04..1f807c05f907c67c4dca1c26466363c69c7e7ffb 100644 (file)
@@ -973,11 +973,11 @@ int readParToken(Buffer & buf, Paragraph & par, LyXLex & lex, string const & tok
                lex.eatLine();
 #if USE_BOOST_FORMAT
                boost::format fmt(_("Unknown token: %1$s %2$s\n"));
-               fmt % token % lex.text();
+               fmt % token % lex.getString();
                string const s = fmt.str();
 #else
                string const s = _("Unknown token: ") + token
-                       + ' ' + lex.text() + '\n';
+                       + ' ' + lex.getString() + '\n';
 #endif
                // we can do this here this way because we're actually reading
                // the buffer and don't care about LyXText right now.
index 683869db6274eddf270a95180a43bb51fb36d18f..3c191cdd9e7aa1404e25f60d42e71e566930e8ce 100644 (file)
@@ -115,10 +115,10 @@ int Trans::Load(LyXLex & lex)
                case KMOD:
                {
                        if (lyxerr.debugging(Debug::KBMAP))
-                               lyxerr << "KMOD:\t" << lex.text() << endl;
+                               lyxerr << "KMOD:\t" << lex.getString() << endl;
                        if (lex.next(true)) {
                                if (lyxerr.debugging(Debug::KBMAP))
-                                       lyxerr << "key\t`" << lex.text()
+                                       lyxerr << "key\t`" << lex.getString()
                                               << '\'' << endl;
                        } else
                                return -1;
@@ -127,7 +127,7 @@ int Trans::Load(LyXLex & lex)
 
                        if (lex.next(true)) {
                                if (lyxerr.debugging(Debug::KBMAP))
-                                       lyxerr << "accent\t`" << lex.text()
+                                       lyxerr << "accent\t`" << lex.getString()
                                               << '\'' << endl;
                        } else
                                return -1;
@@ -143,7 +143,7 @@ int Trans::Load(LyXLex & lex)
                        // so that this field is not present anymore.
                        if (lex.next(true)) {
                                if (lyxerr.debugging(Debug::KBMAP))
-                                       lyxerr << "allowed\t`" << lex.text()
+                                       lyxerr << "allowed\t`" << lex.getString()
                                               << '\'' << endl;
                        } else
                                return -1;
@@ -160,7 +160,7 @@ int Trans::Load(LyXLex & lex)
 
                        lyxerr[Debug::KBMAP] << "KCOMB:" << endl;
                        if (lex.next(true)) {
-                               str= lex.text();
+                               str = lex.getString();
                                lyxerr[Debug::KBMAP] << str << endl;
                        } else
                                return -1;
@@ -169,7 +169,7 @@ int Trans::Load(LyXLex & lex)
                        if (accent_1 == TEX_NOACCENT) return -1;
 
                        if (lex.next(true)) {
-                               str = lex.text();
+                               str = lex.getString();
                                lyxerr[Debug::KBMAP] << str << endl;
                        } else
                                return -1;
@@ -214,17 +214,17 @@ int Trans::Load(LyXLex & lex)
                        unsigned char key_from;
 
                        if (lyxerr.debugging(Debug::KBMAP))
-                               lyxerr << "KMAP:\t" << lex.text() << endl;
+                               lyxerr << "KMAP:\t" << lex.getString() << endl;
                        if (lex.next(true)) {
-                               key_from = lex.text()[0];
+                               key_from = lex.getString()[0];
                                if (lyxerr.debugging(Debug::KBMAP))
-                                       lyxerr << "\t`" << lex.text() << '\''
+                                       lyxerr << "\t`" << lex.getString() << '\''
                                               << endl;
                        } else
                                return -1;
 
                        if (lex.next(true)) {
-                               string string_to = lex.text();
+                               string const string_to = lex.getString();
                                keymap_[key_from] = string_to;
                                if (lyxerr.debugging(Debug::KBMAP))
                                        lyxerr << "\t`" << string_to << '\''
@@ -240,10 +240,10 @@ int Trans::Load(LyXLex & lex)
                        string str;
 
                        if (lyxerr.debugging(Debug::KBMAP))
-                               lyxerr << "KXMOD:\t" << lex.text() << endl;
+                               lyxerr << "KXMOD:\t" << lex.getString() << endl;
                        if (lex.next(true)) {
                                if (lyxerr.debugging(Debug::KBMAP))
-                                       lyxerr << "\t`" << lex.text() << '\''
+                                       lyxerr << "\t`" << lex.getString() << '\''
                                               << endl;
                                accent = getkeymod(lex.getString());
                        } else
@@ -251,17 +251,17 @@ int Trans::Load(LyXLex & lex)
 
                        if (lex.next(true)) {
                                if (lyxerr.debugging(Debug::KBMAP))
-                                       lyxerr << "\t`" << lex.text() << '\''
+                                       lyxerr << "\t`" << lex.getString() << '\''
                                               << endl;
-                               key = lex.text()[0];
+                               key = lex.getString()[0];
                        } else
                                return -1;
 
                        if (lex.next(true)) {
                                if (lyxerr.debugging(Debug::KBMAP))
-                                       lyxerr << "\t`" << lex.text() << '\''
+                                       lyxerr << "\t`" << lex.getString() << '\''
                                               << endl;
-                               str = lex.text();
+                               str = lex.getString();
                        } else
                                return -1;