]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetert.C
hopefully fix tex2lyx linking.
[lyx.git] / src / insets / insetert.C
index 2bc7bc89b4898916ae649ffd432a6fa0171fc292..b10d3d5c633bdd4f90e6b16685d642507db87f6c 100644 (file)
 
 #include <sstream>
 
-using lyx::docstring;
-using lyx::odocstream;
-using lyx::pos_type;
-using lyx::support::token;
+
+namespace lyx {
+
+using support::token;
 
 using std::endl;
 using std::min;
@@ -62,7 +62,7 @@ void InsetERT::init()
        text_.current_font.setLanguage(latex_language);
        text_.real_current_font.setLanguage(latex_language);
 
-       setInsetName("ERT");
+       setInsetName(from_ascii("ERT"));
 }
 
 
@@ -178,7 +178,7 @@ int InsetERT::plaintext(Buffer const &, odocstream &,
 }
 
 
-int InsetERT::docbook(Buffer const &, ostream & os,
+int InsetERT::docbook(Buffer const &, odocstream & os,
                      OutputParams const &) const
 {
        ParagraphList::const_iterator par = paragraphs().begin();
@@ -213,7 +213,7 @@ void InsetERT::doDispatch(LCursor & cur, FuncRequest & cmd)
        }
        case LFUN_INSET_MODIFY: {
                InsetCollapsable::CollapseStatus st;
-               InsetERTMailer::string2params(lyx::to_utf8(cmd.argument()), st);
+               InsetERTMailer::string2params(to_utf8(cmd.argument()), st);
                setStatus(cur, st);
                break;
        }
@@ -352,6 +352,8 @@ bool InsetERT::getStatus(LCursor & cur, FuncRequest const & cmd,
                case LFUN_INSET_INSERT:
                case LFUN_PARAGRAPH_PARAMS_APPLY:
                case LFUN_PARAGRAPH_UPDATE:
+               case LFUN_NOMENCL_INSERT:
+               case LFUN_NOMENCL_PRINT:
                case LFUN_NOACTION:
                        status.enabled(false);
                        return true;
@@ -368,7 +370,7 @@ bool InsetERT::getStatus(LCursor & cur, FuncRequest const & cmd,
                // solution, we consider only the first action of the sequence
                case LFUN_COMMAND_SEQUENCE: {
                        // argument contains ';'-terminated commands
-                       string const firstcmd = token(lyx::to_utf8(cmd.argument()), ';', 0);
+                       string const firstcmd = token(to_utf8(cmd.argument()), ';', 0);
                        FuncRequest func(lyxaction.lookupFunc(firstcmd));
                        func.origin = cmd.origin;
                        return getStatus(cur, func, status);
@@ -472,3 +474,6 @@ InsetERTMailer::params2string(InsetCollapsable::CollapseStatus status)
        data << name_ << ' ' << status;
        return data.str();
 }
+
+
+} // namespace lyx