]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcommand.C
Don't remove cell selections after fontchange.
[lyx.git] / src / insets / insetcommand.C
index dba48236cdb414d3dbeb170dcc02b122a0d95018..a5d2f391c5d230700939757af3c76fd4282d4bdd 100644 (file)
@@ -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;
 }