X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetcommand.C;h=a5d2f391c5d230700939757af3c76fd4282d4bdd;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=dba48236cdb414d3dbeb170dcc02b122a0d95018;hpb=fd054e60b18496cef6527be18a99cd2ec3e48346;p=lyx.git diff --git a/src/insets/insetcommand.C b/src/insets/insetcommand.C index dba48236cd..a5d2f391c5 100644 --- a/src/insets/insetcommand.C +++ b/src/insets/insetcommand.C @@ -27,9 +27,9 @@ InsetCommandParams::InsetCommandParams() {} -InsetCommandParams::InsetCommandParams( string const & n, +InsetCommandParams::InsetCommandParams(string const & n, string const & c, - string const & o ) + string const & o) : cmdname(n), contents(c), options(o) {} @@ -40,7 +40,7 @@ string const InsetCommandParams::getAsString() const } -void InsetCommandParams::setFromString( string const & b ) +void InsetCommandParams::setFromString(string const & b) { string::size_type idx = b.find("|++|"); if (idx == string::npos) { @@ -126,9 +126,9 @@ void InsetCommandParams::scanCommand(string const & cmd) } // Don't mess with this. - if (!tcmdname.empty()) setCmdName( tcmdname ); - if (!toptions.empty()) setOptions( toptions ); - if (!tcontents.empty()) setContents( tcontents ); + if (!tcmdname.empty()) setCmdName(tcmdname); + if (!toptions.empty()) setOptions(toptions); + if (!tcontents.empty()) setContents(tcontents); if (lyxerr.debugging(Debug::PARSER)) lyxerr << "Command <" << cmd @@ -144,14 +144,16 @@ void InsetCommandParams::read(LyXLex & lex) { string token; - if (lex.EatLine()) { - token = lex.GetString(); + if (lex.eatLine()) { + token = lex.getString(); scanCommand(token); - } else + } else { lex.printError("InsetCommand: Parse error: `$$Token'"); - while (lex.IsOK()) { + } + + while (lex.isOK()) { lex.nextToken(); - token = lex.GetString(); + token = lex.getString(); if (token == "\\end_inset") break; } @@ -179,15 +181,15 @@ string const InsetCommandParams::getCommand() const InsetCommand::InsetCommand(InsetCommandParams const & p, bool) - : p_( p.getCmdName(), p.getContents(), p.getOptions() ) + : p_(p.getCmdName(), p.getContents(), p.getOptions()) {} -void InsetCommand::setParams(InsetCommandParams const & p ) +void InsetCommand::setParams(InsetCommandParams const & p) { - p_.setCmdName( p.getCmdName() ); - p_.setContents( p.getContents() ); - p_.setOptions( p.getOptions() ); + p_.setCmdName(p.getCmdName()); + p_.setContents(p.getContents()); + p_.setOptions(p.getOptions()); } @@ -211,7 +213,7 @@ int InsetCommand::linuxdoc(Buffer const *, ostream &) const } -int InsetCommand::docBook(Buffer const *, ostream &) const +int InsetCommand::docbook(Buffer const *, ostream &) const { return 0; }