#include "FuncRequest.h"
#include "FuncStatus.h"
#include "Lexer.h"
-#include "Text.h"
#include "MetricsInfo.h"
#include "OutputParams.h"
+#include "Text.h"
#include "support/debug.h"
#include "support/gettext.h"
+#include "support/lassert.h"
#include "frontends/Application.h"
#include "frontends/FontMetrics.h"
VSpace vspace;
InsetVSpace::string2params(to_utf8(cmd.argument()), vspace);
status.setOnOff(vspace == space_);
- } else {
- status.enabled(true);
- }
+ }
+ status.setEnabled(true);
return true;
default:
return Inset::getStatus(cur, cmd, status);
void InsetVSpace::read(Lexer & lex)
{
- BOOST_ASSERT(lex.isOK());
+ LASSERT(lex.isOK(), /**/);
string vsp;
lex >> vsp;
if (lex)
space_ = VSpace(vsp);
-
- string end_token;
- lex >> end_token;
- if (end_token != "\\end_inset")
- lex.printError("Missing \\end_inset at this point. "
- "Read: `$$Token'");
+ lex >> "\\end_inset";
}
return;
istringstream data(in);
- Lexer lex(0,0);
+ Lexer lex;
lex.setStream(data);
-
- string name;
- lex >> name;
- if (!lex || name != "ert") {
- LYXERR0("InsetVSPace::string2params(" << in << ")\n"
- "Expected arg 1 to be \"vspace\"\n");
- return;
- }
-
- string vsp;
- lex >> vsp;
- if (lex)
- vspace = VSpace(vsp);
+ lex.setContext("InsetVSpace::string2params");
+ lex >> "vspace" >> vspace;
}