#include "frontends/alert.h"
#include "support/debug.h"
-#include "support/lstrings.h"
#include "support/ExceptionMessage.h"
-
#include "support/lassert.h"
+#include "support/lstrings.h"
+#include "support/unique_ptr.h"
#include <sstream>
+
using namespace std;
using namespace lyx::support;
inp.kind = InsetSeparatorParams::PLAIN;
else if (name == "parbreak")
inp.kind = InsetSeparatorParams::PARBREAK;
+ else if (name == "latexpar")
+ inp.kind = InsetSeparatorParams::LATEXPAR;
else {
lyxerr << "Wrong argument for LyX function 'separator-insert'." << endl;
break;
case EXTERNAL_CODE: {
InsetExternalParams iep;
InsetExternal::string2params(to_utf8(cmd.argument()), *buf, iep);
- auto_ptr<InsetExternal> inset(new InsetExternal(buf));
+ auto inset = make_unique<InsetExternal>(buf);
inset->setBuffer(*buf);
inset->setParams(iep);
return inset.release();
case GRAPHICS_CODE: {
InsetGraphicsParams igp;
InsetGraphics::string2params(to_utf8(cmd.argument()), *buf, igp);
- auto_ptr<InsetGraphics> inset(new InsetGraphics(buf));
+ auto inset = make_unique<InsetGraphics>(buf);
inset->setParams(igp);
return inset.release();
}
if (lex.getString() != "\\begin_inset")
LYXERR0("Buffer::readInset: Consistency check failed.");
- auto_ptr<Inset> inset;
+ unique_ptr<Inset> inset;
string tmptok;
lex >> tmptok;
//Worst case, we could put it in each case below. Better, we could
//pass the lexer to the constructor and let the params be built there.
InsetCommandParams inscmd(code);
- inscmd.read(lex);
+ inscmd.Read(lex, buf);
switch (code) {
case BIBITEM_CODE:
return 0;
}
inset->setBuffer(*buf);
- } else {
+ } else {
// FIXME This branch should be made to use inset codes
// as the preceding branch does. Unfortunately, that
// will take some doing. It requires converting the