diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-28 13:06:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-29 08:53:03 +0200 |
commit | 8a8864aeb710e4d17852dc9c0e02b03804a8bf3c (patch) | |
tree | bdec37c347a8dd6f63fdb169abe28ae667af85f6 /editeng/source | |
parent | ce301dadcbbf8d0f0a71c7eaebca9bfad2e08801 (diff) |
convert IsEqual/etc methods on ESelection to operators
Change-Id: Ia8424e701b6f22d0536ee7f3bdb0ecaaed94a3b9
Reviewed-on: https://gerrit.libreoffice.org/42904
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 4 | ||||
-rw-r--r-- | editeng/source/uno/unoforou.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unotext.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unotext2.cxx | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index aaf24df25f18..f765ed5cd800 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1935,7 +1935,7 @@ void ImpEditView::dragDropEnd( const css::datatransfer::dnd::DragSourceDropEvent ESelection aToBeDelSel = pDragAndDropInfo->aBeginDragSel; ESelection aNewSel( pDragAndDropInfo->aDropSel.nEndPara, pDragAndDropInfo->aDropSel.nEndPos, pDragAndDropInfo->aDropSel.nEndPara, pDragAndDropInfo->aDropSel.nEndPos ); - bool bBeforeSelection = aDropPos.IsLess( pDragAndDropInfo->aBeginDragSel ); + bool bBeforeSelection = aDropPos < pDragAndDropInfo->aBeginDragSel; sal_Int32 nParaDiff = pDragAndDropInfo->aBeginDragSel.nEndPara - pDragAndDropInfo->aBeginDragSel.nStartPara; if ( bBeforeSelection ) { @@ -2192,7 +2192,7 @@ void ImpEditView::dragOver(const css::datatransfer::dnd::DropTargetDragEvent& rD ESelection aDestSel( aP.nPara, aP.nIndex, aP.nPara, aP.nIndex); ESelection aCurSel = pEditEngine->pImpEditEngine->CreateESel( GetEditSelection() ); aCurSel.Adjust(); - if ( !aDestSel.IsLess( aCurSel ) && !aDestSel.IsGreater( aCurSel ) ) + if ( !(aDestSel < aCurSel) && !(aDestSel > aCurSel) ) { bAccept = false; } diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index 64336df2d146..2c0bde9c2849 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -101,7 +101,7 @@ SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, EditEngineA if( mpAttribsCache && ( EditEngineAttribs::All == nOnlyHardAttrib ) ) { // have we the correct set in cache? - if( const_cast<SvxOutlinerForwarder*>(this)->maAttribCacheSelection.IsEqual(rSel) ) + if( maAttribCacheSelection == rSel ) { // yes! just return the cache return *mpAttribsCache; diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index ebc6ee10fba9..b52836cc7b38 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -1955,7 +1955,7 @@ void SAL_CALL SvxUnoTextBase::setString( const OUString& aString ) uno::Reference< container::XEnumeration > SAL_CALL SvxUnoTextBase::createEnumeration() { SolarMutexGuard aGuard; - if( maSelection.IsEqual(ESelection(0,0,0,0)) || maSelection.IsEqual(ESelection(EE_PARA_MAX_COUNT,0,0,0)) ) + if( maSelection == ESelection(0,0,0,0) || maSelection == ESelection(EE_PARA_MAX_COUNT,0,0,0) ) { ESelection aSelection; ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() ); diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index e647433ebf9c..cf3564d7cbef 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -66,7 +66,7 @@ SvxUnoTextContentEnumeration::SvxUnoTextContentEnumeration( const SvxUnoTextBase if( pIterContent && (pIterContent->mnParagraph == currentPara) ) { ESelection aIterSel = pIterContent->GetSelection(); - if( aIterSel.IsEqual( aCurrentParaSel ) ) + if( aIterSel == aCurrentParaSel ) { pContent = pIterContent; maContents.emplace_back(pContent ); @@ -408,7 +408,7 @@ SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration( const SvxUnoTextBase& rT for( auto aIter = rRanges.begin(); (aIter != rRanges.end()) && (pRange == nullptr); ++aIter ) { SvxUnoTextRange* pIterRange = dynamic_cast< SvxUnoTextRange* >( ( *aIter ) ); - if( pIterRange && pIterRange->mbPortion && ( aSel.IsEqual( pIterRange->maSelection ) ) ) + if( pIterRange && pIterRange->mbPortion && (aSel == pIterRange->maSelection) ) pRange = pIterRange; } if( pRange == nullptr ) |