mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-19 22:40:26 +00:00
* 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:
parent
ccd07a7fb4
commit
1a413a2d98
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user