diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-02 00:21:49 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-02 20:18:01 +0100 |
commit | 3ebec5e576c851b8a5da939297b20d3c6107aab3 (patch) | |
tree | f0214fabf48c05b8f541f765e041177f393d8808 /editeng | |
parent | 7cfccf98c18f5402b9e4a0e1e01937a36837e19d (diff) |
Return value of EditSelection::Adjust is never used
Change-Id: I32770f34819cf737beeef4d22a26538d9ac357a5
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editdoc.cxx | 12 | ||||
-rw-r--r-- | editeng/source/editeng/editdoc.hxx | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index c5a49189c17e..3ee2d5de0804 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1225,7 +1225,7 @@ sal_Bool EditSelection::IsInvalid() const return sal_False; } -sal_Bool EditSelection::Adjust( const EditDoc& rNodes ) +void EditSelection::Adjust( const EditDoc& rNodes ) { DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index out of range in Adjust(1)" ); DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index out of range in Adjust(2)" ); @@ -1239,11 +1239,9 @@ sal_Bool EditSelection::Adjust( const EditDoc& rNodes ) DBG_ASSERT( nStartNode != SAL_MAX_INT32, "Node out of range in Adjust(1)" ); DBG_ASSERT( nEndNode != SAL_MAX_INT32, "Node out of range in Adjust(2)" ); - sal_Bool bSwap = sal_False; - if ( nStartNode > nEndNode ) - bSwap = sal_True; - else if ( ( nStartNode == nEndNode ) && ( aStartPaM.GetIndex() > aEndPaM.GetIndex() ) ) - bSwap = sal_True; + const bool bSwap = ( nStartNode > nEndNode ) || + ( ( nStartNode == nEndNode ) && + ( aStartPaM.GetIndex() > aEndPaM.GetIndex() ) ); if ( bSwap ) { @@ -1251,8 +1249,6 @@ sal_Bool EditSelection::Adjust( const EditDoc& rNodes ) aStartPaM = aEndPaM; aEndPaM = aTmpPaM; } - - return bSwap; } bool operator == ( const EditPaM& r1, const EditPaM& r2 ) diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index fb490ada3a52..1ff19793d10f 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -714,7 +714,7 @@ public: sal_Bool IsInvalid() const; bool DbgIsBuggy( EditDoc& rDoc ); - sal_Bool Adjust( const EditDoc& rNodes ); + void Adjust( const EditDoc& rNodes ); EditSelection& operator = ( const EditPaM& r ); bool operator == ( const EditSelection& r ) const |