]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcommand.C
fix typo that put too many include paths for most people
[lyx.git] / src / insets / insetcommand.C
index cb40f395ea2c273ce5f86dce0795a15219caf33b..8c64fd76e5dd211c4f859bc9e4bc4506b0147fa4 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
@@ -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) {
@@ -84,7 +84,7 @@ void InsetCommandParams::scanCommand(string const & cmd)
        if (cmd.empty()) return;
 
        enum { WS, CMDNAME, OPTION, CONTENT } state = WS;
-       
+
        // Used to handle things like \command[foo[bar]]{foo{bar}}
        int nestdepth = 0;
 
@@ -105,11 +105,11 @@ void InsetCommandParams::scanCommand(string const & cmd)
                }
                if ((state == OPTION  && c == '[') ||
                    (state == CONTENT && c == '{')) {
-                       ++nestdepth;
+                       ++nestdepth;
                }
                switch (state) {
                case CMDNAME:   tcmdname += c; break;
-               case OPTION:    toptions += c; break;
+               case OPTION:    toptions += c; break;
                case CONTENT:   tcontents += c; break;
                case WS:
                        if (c == '\\') {
@@ -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
@@ -141,7 +141,7 @@ void InsetCommandParams::scanCommand(string const & cmd)
 
 // This function will not be necessary when lyx3
 void InsetCommandParams::read(LyXLex & lex)
-{    
+{
        string token;
 
        if (lex.eatLine()) {
@@ -150,7 +150,7 @@ void InsetCommandParams::read(LyXLex & lex)
        } else {
                lex.printError("InsetCommand: Parse error: `$$Token'");
        }
-       
+
        while (lex.isOK()) {
                lex.nextToken();
                token = lex.getString();
@@ -171,7 +171,7 @@ void InsetCommandParams::write(ostream & os) const
 
 
 string const InsetCommandParams::getCommand() const
-{      
+{
        string s;
        if (!getCmdName().empty()) s += "\\"+getCmdName();
        if (!getOptions().empty()) s += "["+getOptions()+']';
@@ -181,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());
 }