]> git.lyx.org Git - features.git/blobdiff - src/lyxfunc.C
fix call to Dispatch
[features.git] / src / lyxfunc.C
index 53029a4130ba267857c869dbc85d5d22482eb82e..5c6eece450d21a820e797518a324d35a5c30c503 100644 (file)
 
 #include <config.h>
 
-#if 0
-#ifdef HAVE_SSTREAM
-#include <sstream>
-using std::istringstream;
-#else
-#include <strstream>
-#endif
-#else
 #include "Lsstream.h"
-#endif
 
 #include <time.h>
 #include <locale.h>
@@ -307,7 +298,7 @@ int LyXFunc::processKeySym(KeySym keysym, unsigned int state)
 
         bool tmp_sc = show_sc;
        show_sc = false;
-       Dispatch(action, argument.c_str());
+       Dispatch(action, argument);
        show_sc = tmp_sc;
        
        return 0;
@@ -441,7 +432,7 @@ int LyXFunc::processKeyEvent(XEvent * ev)
 
         bool tmp_sc = show_sc;
        show_sc = false;
-       Dispatch(action, argument.c_str());
+       Dispatch(action, argument);
        show_sc = tmp_sc;
        
        return 0;
@@ -659,10 +650,11 @@ LyXFunc::func_status LyXFunc::getStatus(int ac) const
 string const LyXFunc::Dispatch(string const & s) 
 {
        // Split command string into command and argument
-       string cmd, line = frontStrip(s);
+       string cmd;
+       string line = frontStrip(s);
        string arg = strip(frontStrip(split(line, cmd, ' ')));
 
-       return Dispatch(lyxaction.LookupFunc(cmd.c_str()), arg.c_str());
+       return Dispatch(lyxaction.LookupFunc(cmd.c_str()), arg);
 }
 
 
@@ -1397,7 +1389,7 @@ string const LyXFunc::Dispatch(int ac,
                Dispatch(int(LFUN_LAYOUT), 
                         textclasslist.NameOfLayout(owner->view()
                                                    ->buffer()->params.textclass,
-                                                   sel).c_str());
+                                                   sel));
                return string();
        }
                
@@ -2226,11 +2218,8 @@ string const LyXFunc::Dispatch(int ac,
                        cur_value = par->spacing.getValue();
                }
                
-//#ifdef HAVE_SSTREAM
                istringstream istr(argument);
-//#else
-//             istrstream istr(argument.c_str());
-//#endif
+
                string tmp;
                istr >> tmp;
                Spacing::Space new_spacing = cur_spacing;
@@ -2528,11 +2517,7 @@ string const LyXFunc::Dispatch(int ac,
 
        case LFUN_GOTO_PARAGRAPH:
        {
-//#ifdef HAVE_SSTREAM
                 istringstream istr(argument);
-//#else
-//                istrstream istr(argument.c_str());
-//#endif
 
                int id;
                istr >> id;