#include "insets/insetlatexaccent.h"
#include "insets/insettabular.h"
#include "insets/insethfill.h"
-#include "insets/inseterror.h"
#include "insets/insetnewline.h"
extern string bibitemWidest(Buffer const *);
tmp->setLabelWidthString(par->params().labelWidthString());
}
- bool const isempty = (par->layout()->keepempty && par->empty());
+ bool const isempty = (par->allowEmpty() && par->empty());
if (!isempty && (par->size() > pos || par->empty() || flag == 2)) {
tmp->layout(par->layout());
InsetOptArg * optArgInset(Paragraph const & par)
{
// Find the entry.
- InsetList::iterator it = par.insetlist.begin();
- InsetList::iterator end = par.insetlist.end();
+ InsetList::const_iterator it = par.insetlist.begin();
+ InsetList::const_iterator end = par.insetlist.end();
for (; it != end; ++it) {
- Inset * ins = it.getInset();
+ Inset * ins = it->inset;
if (ins->lyxCode() == Inset::OPTARG_CODE) {
return static_cast<InsetOptArg *>(ins);
}
lex.next();
font.setLyXColor(lex.getString());
} else if (token == "\\InsetSpace" || token == "\\SpecialChar") {
- LyXLayout_ptr const & layout = par.layout();
// Insets don't make sense in a free-spacing context! ---Kayvan
- if (layout->free_spacing || par.isFreeSpacing()) {
+ if (par.isFreeSpacing()) {
if (token == "\\InsetSpace")
par.insertChar(par.size(), ' ', font, change);
else if (lex.isOK()) {
lex.eatLine();
string const s = bformat(_("Unknown token: %1$s %2$s\n"),
token, lex.getString());
- // we can do this here this way because we're actually reading
- // the buffer and don't care about LyXText right now.
- par.insertInset(par.size(), new InsetError(s), font);
+
+ buf.parseError(ErrorItem(_("Unknown token"), s,
+ par.id(), 0, par.size()));
return 1;
}
return 0;