* src/paragraph.h:

* src/paragraph.C: stripLeadingSpaces(); return boolean indicating
	whether any character has been deleted - either physically or logically


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16798 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Michael Schmitt 2007-01-21 21:11:27 +00:00
parent ccd07a7fb4
commit 1a413a2d98
2 changed files with 5 additions and 4 deletions

View File

@ -561,7 +561,7 @@ void Paragraph::makeSameLayout(Paragraph const & par)
}
int Paragraph::stripLeadingSpaces(bool trackChanges)
bool Paragraph::stripLeadingSpaces(bool trackChanges)
{
if (isFreeSpacing())
return 0;
@ -576,7 +576,7 @@ int Paragraph::stripLeadingSpaces(bool trackChanges)
++pos;
}
return count;
return count + pos > 0;
}

View File

@ -341,8 +341,9 @@ public:
/// returns -1 if inset not found
int getPositionOfInset(InsetBase const * inset) const;
/// Returns the number of line breaks and white-space stripped at the start
int stripLeadingSpaces(bool trackChanges);
/// returns true if at least one line break or line separator has been deleted
/// at the beginning of the paragraph (either physically or logically)
bool stripLeadingSpaces(bool trackChanges);
/// return true if we allow multiple spaces
bool isFreeSpacing() const;