* lyxtext.h:

* text.C (breakAgainOneRow): removed


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7524 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-08-08 15:54:23 +00:00
parent aca0551def
commit 5dd43bfad1
3 changed files with 3 additions and 47 deletions

View File

@ -4,6 +4,9 @@
* text.C (insertChar, backspace): replace rowlist fiddling * text.C (insertChar, backspace): replace rowlist fiddling
with rebreak of full par with rebreak of full par
* lyxtext.h:
* text.C (breakAgainOneRow): removed
2003-08-07 André Pönitz <poenitz@gmx.net> 2003-08-07 André Pönitz <poenitz@gmx.net>
* paragraph.C: * paragraph.C:

View File

@ -99,8 +99,6 @@ public:
lyx::pos_type pos, lyx::pos_type pos,
LyXFont const & font, bool toggleall); LyXFont const & font, bool toggleall);
///
void breakAgainOneRow(RowList::iterator rit);
/// what you expect when pressing <enter> at cursor position /// what you expect when pressing <enter> at cursor position
void breakParagraph(ParagraphList & paragraphs, char keep_layout = 0); void breakParagraph(ParagraphList & paragraphs, char keep_layout = 0);

View File

@ -1435,51 +1435,6 @@ void LyXText::breakAgain(RowList::iterator rit)
} }
// this is just a little changed version of break again
void LyXText::breakAgainOneRow(RowList::iterator rit)
{
Assert(rit != rows().end());
pos_type z = rowBreakPoint(*rit);
RowList::iterator tmprit = rit;
RowList::iterator end = rows().end();
if (z < rit->par()->size()) {
RowList::iterator next_rit = boost::next(rit);
if (next_rit == end ||
(next_rit != end &&
next_rit->par() != rit->par())) {
// insert a new row
++z;
Row newrow(rit->par(), z);
rit = rowlist_.insert(next_rit, newrow);
} else {
++rit;
++z;
if (rit->pos() != z)
rit->pos(z);
}
} else {
// if there are some rows too much, delete them
// only if you broke the whole paragraph!
RowList::iterator tmprit2 = rit;
while (boost::next(tmprit2) != end
&& boost::next(tmprit2)->par() == rit->par()) {
++tmprit2;
}
while (tmprit2 != rit) {
--tmprit2;
removeRow(boost::next(tmprit2));
}
}
// set the dimensions of the row
tmprit->fill(fill(tmprit, workWidth()));
setHeightOfRow(tmprit);
}
void LyXText::breakParagraph(ParagraphList & paragraphs, char keep_layout) void LyXText::breakParagraph(ParagraphList & paragraphs, char keep_layout)
{ {
// allow only if at start or end, or all previous is new text // allow only if at start or end, or all previous is new text