diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-02 00:25:49 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-02 20:18:02 +0100 |
commit | 95412052fadffb323d21eba1c1d54c9803baabd2 (patch) | |
tree | fd532e60fc879f42a6ff97449bb37a1a19aeb48d /editeng | |
parent | 3ebec5e576c851b8a5da939297b20d3c6107aab3 (diff) |
sal_Bool to bool and some optimizations
Change-Id: I6a42b78caaff962368b83def8e291d6b6c50abb1
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editdoc.cxx | 10 | ||||
-rw-r--r-- | editeng/source/editeng/editdoc.hxx | 4 |
2 files changed, 4 insertions, 10 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 3ee2d5de0804..f44898e0eead 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1212,17 +1212,11 @@ EditSelection& EditSelection::operator = ( const EditPaM& rPaM ) return *this; } -sal_Bool EditSelection::IsInvalid() const +bool EditSelection::IsInvalid() const { EditPaM aEmptyPaM; - if ( aStartPaM == aEmptyPaM ) - return sal_True; - - if ( aEndPaM == aEmptyPaM ) - return sal_True; - - return sal_False; + return ( aStartPaM == aEmptyPaM ) || ( aEndPaM == aEmptyPaM ); } void EditSelection::Adjust( const EditDoc& rNodes ) diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 1ff19793d10f..a73de4a6f420 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -710,8 +710,8 @@ public: const EditPaM& Min() const { return aStartPaM; } const EditPaM& Max() const { return aEndPaM; } - sal_Bool HasRange() const { return aStartPaM != aEndPaM; } - sal_Bool IsInvalid() const; + bool HasRange() const { return aStartPaM != aEndPaM; } + bool IsInvalid() const; bool DbgIsBuggy( EditDoc& rDoc ); void Adjust( const EditDoc& rNodes ); |