mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
* 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:
parent
aca0551def
commit
5dd43bfad1
@ -4,6 +4,9 @@
|
||||
* text.C (insertChar, backspace): replace rowlist fiddling
|
||||
with rebreak of full par
|
||||
|
||||
* lyxtext.h:
|
||||
* text.C (breakAgainOneRow): removed
|
||||
|
||||
2003-08-07 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* paragraph.C:
|
||||
|
@ -99,8 +99,6 @@ public:
|
||||
lyx::pos_type pos,
|
||||
LyXFont const & font, bool toggleall);
|
||||
|
||||
///
|
||||
void breakAgainOneRow(RowList::iterator rit);
|
||||
/// what you expect when pressing <enter> at cursor position
|
||||
void breakParagraph(ParagraphList & paragraphs, char keep_layout = 0);
|
||||
|
||||
|
45
src/text.C
45
src/text.C
@ -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)
|
||||
{
|
||||
// allow only if at start or end, or all previous is new text
|
||||
|
Loading…
Reference in New Issue
Block a user