summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-28 13:06:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-29 08:53:03 +0200
commit8a8864aeb710e4d17852dc9c0e02b03804a8bf3c (patch)
treebdec37c347a8dd6f63fdb169abe28ae667af85f6 /sc
parentce301dadcbbf8d0f0a71c7eaebca9bfad2e08801 (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 'sc')
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 4949d2bf3248..6a2bad28bd50 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -649,7 +649,7 @@ static void lcl_RemoveFields( OutlinerView& rOutView )
pOutliner->SetUpdateMode( true );
}
- if ( aOldSel.IsEqual( aSel ) ) // aSel is adjusted
+ if ( aOldSel == aSel ) // aSel is adjusted
aOldSel.nEndPos = nNewEnd;
else
aOldSel.nStartPos = nNewEnd; // if aOldSel is backwards
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 3cff01b5ddbf..1726e25a1d46 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2957,7 +2957,7 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCCOL nCellX, S
ESelection aCompare(aDocPosition.nPara, aDocPosition.nIndex);
ESelection aSelection = pEditView->GetSelection();
aSelection.Adjust(); // needed for IsLess/IsGreater
- if ( aCompare.IsLess(aSelection) || aCompare.IsGreater(aSelection) )
+ if ( aCompare < aSelection || aCompare > aSelection )
{
// clicked outside the selected text - deselect and move text cursor
MouseEvent aEvent( rPosPixel );
@@ -3006,7 +3006,7 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCCOL nCellX, S
ESelection aCompare(aDocPosition.nPara, aDocPosition.nIndex);
ESelection aSelection = pOlView->GetSelection();
aSelection.Adjust(); // needed for IsLess/IsGreater
- if ( aCompare.IsLess(aSelection) || aCompare.IsGreater(aSelection) )
+ if ( aCompare < aSelection || aCompare > aSelection )
{
// clicked outside the selected text - deselect and move text cursor
// use DrawView to allow extra handling there (none currently)