summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-11-08 10:34:22 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-11-10 14:47:02 +0100
commit42344398a839eddf1b498c266d8fe8ac0b3bb6b6 (patch)
tree78bd33eb6e798973c329c08da2f08d58814c80f4 /editeng
parentbff8d843bd4e5dcca5dc1a60c2c7852b1b72a00b (diff)
editeng: Simplify calls to HasSelection()
Change-Id: I424cd5aee41334aebfd9bc41e1f8a9aeb69b9827 Reviewed-on: https://gerrit.libreoffice.org/44582 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editview.cxx4
-rw-r--r--editeng/source/editeng/impedit.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 0e9b9d23e8aa..9a932217eb4f 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -254,7 +254,7 @@ void EditView::SetSelection( const ESelection& rESel )
{
// If someone has just left an empty attribute, and then the outliner
// manipulates the selection:
- if ( !pImpEditView->GetEditSelection().HasRange() )
+ if ( !HasSelection() )
{
const ContentNode* pNode = pImpEditView->GetEditSelection().Max().GetNode();
pImpEditView->pEditEngine->CursorMoved( pNode );
@@ -781,7 +781,7 @@ void EditView::TransliterateText( TransliterationFlags nTransliterationMode )
void EditView::CompleteAutoCorrect( vcl::Window const * pFrameWin )
{
- if ( !pImpEditView->HasSelection() && pImpEditView->pEditEngine->pImpEditEngine->GetStatus().DoAutoCorrect() )
+ if ( !HasSelection() && pImpEditView->pEditEngine->pImpEditEngine->GetStatus().DoAutoCorrect() )
{
pImpEditView->DrawSelectionXOR();
EditSelection aSel = pImpEditView->GetEditSelection();
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index f613f419b74b..1cadc38a7539 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1542,7 +1542,7 @@ bool ImpEditView::IsBulletArea( const Point& rPos, sal_Int32* pPara )
void ImpEditView::CutCopy( css::uno::Reference< css::datatransfer::clipboard::XClipboard > const & rxClipboard, bool bCut )
{
- if ( rxClipboard.is() && GetEditSelection().HasRange() )
+ if ( rxClipboard.is() && HasSelection() )
{
uno::Reference<datatransfer::XTransferable> xData = pEditEngine->CreateTransferable( GetEditSelection() );
@@ -1848,7 +1848,7 @@ void ImpEditView::dragGestureRecognized(const css::datatransfer::dnd::DragGestur
EditSelection aCopySel( GetEditSelection() );
aCopySel.Adjust( pEditEngine->GetEditDoc() );
- if ( GetEditSelection().HasRange() && bClickedInSelection )
+ if ( HasSelection() && bClickedInSelection )
{
pDragAndDropInfo.reset(new DragAndDropInfo());
}