MakeDisplayPath(fname, 50));
return false;
}
+
+ char c = ifs.peek();
+
LyXLex lex(0, 0);
lex.setStream(ifs);
- char c; ifs.get(c);
- ifs.putback(c);
bool res = true;
bool a = false;
while (par) {
// this has to be done before the delete
+#ifndef NEW_INSETS
if (par->footnoteflag != LyXParagraph::CLOSED_FOOTNOTE)
+#endif
text->SetCursor(this, cursor, par, 0);
if (par->AutoDeleteInsets()){
a = true;
+#ifndef NEW_INSETS
if (par->footnoteflag != LyXParagraph::CLOSED_FOOTNOTE){
+#endif
text->RedoParagraphs(this, cursor,
cursor.par()->Next());
text->FullRebreak(this);
+#ifndef NEW_INSETS
}
+#endif
}
par = par->next;
}
// Save the cursor position
LyXCursor cursor = text->cursor;
+#ifndef NEW_INSETS
// This is drastic, but it's the only fix, I could find. (Asger)
allFloats(1, 0);
allFloats(1, 1);
+#endif
for (TeXErrors::Errors::const_iterator cit = terr.begin();
cit != terr.end();
int tmpid = -1;
int tmppos = -1;
- buffer()->texrow.getIdFromRow(errorrow, tmpid, tmppos);
-
+ if (buffer()->texrow.getIdFromRow(errorrow, tmpid, tmppos)) {
+ buffer()->texrow.increasePos(tmpid, tmppos);
+ }
+
LyXParagraph * texrowpar = 0;
if (tmpid == -1) {
text->CursorLeft(this);
update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
new_inset->Edit(this, 0, 0, 0);
+ return true;
}
/* This is also a buffer property (ale) */
return false;
}
+
+#ifndef NEW_INSETS
void BufferView::allFloats(char flag, char figmar)
{
if (!available()) return;
LyXCursor cursor = text->cursor;
- if (!flag && cursor.par()->footnoteflag != LyXParagraph::NO_FOOTNOTE
+ if (!flag
+ && cursor.par()->footnoteflag != LyXParagraph::NO_FOOTNOTE
&& ((figmar
&& cursor.par()->footnotekind != LyXParagraph::FOOTNOTE
- && cursor.par()->footnotekind != LyXParagraph::MARGIN)
+ && cursor.par()->footnotekind != LyXParagraph::MARGIN
+ )
|| (!figmar
&& cursor.par()->footnotekind != LyXParagraph::FIG
&& cursor.par()->footnotekind != LyXParagraph::TAB
fitCursor();
//updateScrollbar();
}
+#endif
void BufferView::insertNote()
}
+#ifndef NEW_INSETS
void BufferView::openStuff()
{
if (available()) {
setState();
}
}
+#endif
void BufferView::menuUndo()
{
if (kind == Undo::EDIT) // in this case insets would not be stored!
kind = Undo::FINISH;
text->SetUndo(buffer(), kind,
+#ifndef NEW_INSETS
text->cursor.par()->
ParFromPos(text->cursor.pos())->previous,
text->cursor.par()->
- ParFromPos(text->cursor.pos())->next);
+ ParFromPos(text->cursor.pos())->next
+#else
+ text->cursor.par()->previous,
+ text->cursor.par()->next
+#endif
+ );
}
LyXParagraph * par = buffer()->paragraph;
LyXCursor cursor = text->cursor;
LyXCursor tmpcursor = cursor;
+#ifndef NEW_INSETS
cursor.par(tmpcursor.par()->ParFromPos(tmpcursor.pos()));
cursor.pos(tmpcursor.par()->PositionInParFromPos(tmpcursor.pos()));
+#else
+ cursor.par(tmpcursor.par());
+ cursor.pos(tmpcursor.pos());
+#endif
while (par) {
bool flag2 = false;
}
if (flag2) {
flag = true;
+#ifndef NEW_INSETS
if (par->footnoteflag != LyXParagraph::CLOSED_FOOTNOTE){
+#endif
// this is possible now, since SetCursor takes
// care about footnotes
text->SetCursorIntern(this, par, 0);
text->RedoParagraphs(this, text->cursor,
text->cursor.par()->Next());
text->FullRebreak(this);
+#ifndef NEW_INSETS
}
+#endif
}
par = par->next;
}