string command;
switch (kind_) {
case NORMAL:
- command = "\\space";
+ command = "\\space{}";
break;
case PROTECTED:
command = "~";
break;
case THIN:
- command = "\\,";
+ command = "\\thinspace{}";
break;
case QUAD:
command = "\\quad{}";
}
-// This function will not be necessary when lyx3
void InsetSpace::read(Buffer const &, LyXLex & lex)
{
- lex.nextToken();
+ lex.next();
string const command = lex.getString();
- if (command == "\\space")
+ if (command == "\\space{}")
kind_ = NORMAL;
else if (command == "~")
kind_ = PROTECTED;
- else if (command == "\\,")
+ else if (command == "\\thinspace{}")
kind_ = THIN;
else if (command == "\\quad{}")
kind_ = QUAD;
}
-auto_ptr<InsetBase> InsetSpace::clone() const
+int InsetSpace::textString(Buffer const & buf, ostream & os,
+ OutputParams const & op) const
+{
+ return plaintext(buf, os, op);
+}
+
+
+auto_ptr<InsetBase> InsetSpace::doClone() const
{
return auto_ptr<InsetBase>(new InsetSpace(kind_));
}
{
return true;
}
-
-bool InsetSpace::isLineSeparator() const
-{
- return false;
-}