mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Set Buffer to Insets when reading a document. InsetSpecialChar and InsetLine are the only Insets that are instantiated in readParToken. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31238 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d6f7945761
commit
f733221747
15
src/Text.cpp
15
src/Text.cpp
@ -394,11 +394,11 @@ void Text::readParToken(Paragraph & par, Lexer & lex,
|
||||
lex.next();
|
||||
setLyXColor(lex.getString(), font.fontInfo());
|
||||
} else if (token == "\\SpecialChar") {
|
||||
auto_ptr<Inset> inset;
|
||||
inset.reset(new InsetSpecialChar);
|
||||
inset->read(lex);
|
||||
par.insertInset(par.size(), inset.release(),
|
||||
font, change);
|
||||
auto_ptr<Inset> inset;
|
||||
inset.reset(new InsetSpecialChar);
|
||||
inset->read(lex);
|
||||
inset->setBuffer(const_cast<Buffer &>(buf));
|
||||
par.insertInset(par.size(), inset.release(), font, change);
|
||||
} else if (token == "\\backslash") {
|
||||
par.appendChar('\\', font, change);
|
||||
} else if (token == "\\LyXTable") {
|
||||
@ -406,7 +406,10 @@ void Text::readParToken(Paragraph & par, Lexer & lex,
|
||||
inset->read(lex);
|
||||
par.insertInset(par.size(), inset.release(), font, change);
|
||||
} else if (token == "\\lyxline") {
|
||||
par.insertInset(par.size(), new InsetLine, font, change);
|
||||
auto_ptr<Inset> inset;
|
||||
inset.reset(new InsetLine);
|
||||
inset->setBuffer(const_cast<Buffer &>(buf));
|
||||
par.insertInset(par.size(), inset.release(), font, change);
|
||||
} else if (token == "\\change_unchanged") {
|
||||
change = Change(Change::UNCHANGED);
|
||||
} else if (token == "\\change_inserted" || token == "\\change_deleted") {
|
||||
|
Loading…
Reference in New Issue
Block a user