X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetCommandParams.cpp;h=ca248155d23a0a5907235b75fee9fb285c6b6f6e;hb=9383f4c3c6f9cfab2d658701ba66e2b54cd68bea;hp=5a9ee9f7b95aa996d6b85e1ae98ef5bc0d64b06c;hpb=4ca3a3d59c5cae6332dd74e0f5fe43a04806ca33;p=lyx.git diff --git a/src/insets/InsetCommandParams.cpp b/src/insets/InsetCommandParams.cpp index 5a9ee9f7b9..ca248155d2 100644 --- a/src/insets/InsetCommandParams.cpp +++ b/src/insets/InsetCommandParams.cpp @@ -27,24 +27,21 @@ #include "InsetRef.h" #include "InsetTOC.h" -#include "debug.h" -#include "gettext.h" +#include "support/debug.h" +#include "support/gettext.h" #include "Lexer.h" #include "support/ExceptionMessage.h" #include "support/lstrings.h" +#include "support/docstream.h" #include +using namespace std; namespace lyx { using support::findToken; - -using std::string; -using std::endl; -using std::ostream; - using support::ExceptionMessage; using support::WarningException; @@ -180,8 +177,8 @@ bool InsetCommandParams::isCompatibleCommand( void InsetCommandParams::setCmdName(string const & name) { if (!isCompatibleCommand(insetCode_, cmdName_)){ - lyxerr << "InsetCommand: Incompatible command name " << - name << "." << std::endl; + LYXERR0("InsetCommand: Incompatible command name " << + name << "."); throw ExceptionMessage(WarningException, _("InsetCommand Error: "), from_utf8("Incompatible command name.")); } @@ -189,8 +186,8 @@ void InsetCommandParams::setCmdName(string const & name) cmdName_ = name; CommandInfo const * const info = findInfo(insetCode_, cmdName_); if (!info) { - lyxerr << "Command '" << name << "' is not compatible with a '" << - insetType() << "' inset." << std::endl; + LYXERR0("Command '" << name << "' is not compatible with a '" << + insetType() << "' inset."); return; } ParamVector params(info->n); @@ -274,7 +271,7 @@ void InsetCommandParams::read(Lexer & lex) } -void InsetCommandParams::write(ostream & os) const +void InsetCommandParams::write(std::ostream & os) const { os << "CommandInset " << insetType() << '\n'; os << "LatexCommand " << cmdName_ << '\n';