small cleanups from andre

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2896 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2001-10-18 16:17:46 +00:00
parent 35d74b0e6f
commit 622e505857
2 changed files with 11 additions and 13 deletions

View File

@ -662,9 +662,9 @@ public:
///
Paragraph * ownerParagraph() const;
//
Paragraph * ownerParagraph(Paragraph *) const;
void ownerParagraph(Paragraph *) const;
// set it searching first for the right owner using the paragraph id
Paragraph * ownerParagraph(int id, Paragraph *) const;
void ownerParagraph(int id, Paragraph *) const;
};

View File

@ -1137,8 +1137,7 @@ void LyXText::toggleFree(BufferView * bview,
}
string
LyXText::getStringToIndex(BufferView * bview)
string LyXText::getStringToIndex(BufferView * bview)
{
string idxstring;
@ -1170,8 +1169,8 @@ LyXText::getStringToIndex(BufferView * bview)
return idxstring;
}
Paragraph::size_type
LyXText::beginningOfMainBody(Buffer const * buf,
Paragraph::size_type LyXText::beginningOfMainBody(Buffer const * buf,
Paragraph const * par) const
{
if (textclasslist.Style(buf->params.textclass,
@ -1193,7 +1192,7 @@ void LyXText::setParagraph(BufferView * bview,
bool pagebreak_top, bool pagebreak_bottom,
VSpace const & space_top,
VSpace const & space_bottom,
Spacing const & spacing,
Spacing const & spacing,
LyXAlignment align,
string labelwidthstring,
bool noindent)
@ -2070,7 +2069,7 @@ bool LyXText::updateInset(BufferView * bview, Inset * inset)
{
// first check the current paragraph
int pos = cursor.par()->getPositionOfInset(inset);
if (pos != -1){
if (pos != -1) {
checkParagraph(bview, cursor.par(), pos);
return true;
}
@ -2080,7 +2079,7 @@ bool LyXText::updateInset(BufferView * bview, Inset * inset)
Paragraph * par = firstParagraph();
do {
pos = par->getPositionOfInset(inset);
if (pos != -1){
if (pos != -1) {
checkParagraph(bview, par, pos);
return true;
}
@ -2576,17 +2575,17 @@ Paragraph * LyXText::ownerParagraph() const
}
Paragraph * LyXText::ownerParagraph(Paragraph * p) const
void LyXText::ownerParagraph(Paragraph * p) const
{
if (inset_owner) {
inset_owner->paragraph(p);
} else {
bv_owner->buffer()->paragraph = p;
}
return 0;
}
Paragraph * LyXText::ownerParagraph(int id, Paragraph * p) const
void LyXText::ownerParagraph(int id, Paragraph * p) const
{
Paragraph * op = bv_owner->buffer()->getParFromID(id);
if (op && op->inInset()) {
@ -2598,7 +2597,6 @@ Paragraph * LyXText::ownerParagraph(int id, Paragraph * p) const
bv_owner->buffer()->paragraph = p;
}
}
return 0;
}