From 95412052fadffb323d21eba1c1d54c9803baabd2 Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Sun, 2 Mar 2014 00:25:49 +0100 Subject: sal_Bool to bool and some optimizations Change-Id: I6a42b78caaff962368b83def8e291d6b6c50abb1 --- editeng/source/editeng/editdoc.cxx | 10 ++-------- editeng/source/editeng/editdoc.hxx | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'editeng') 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 ); -- cgit