editeng/source/editeng/editview.cxx | 4 ++-- editeng/source/editeng/impedit.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit 42344398a839eddf1b498c266d8fe8ac0b3bb6b6 Author: Samuel Mehrbrodt <[email protected]> Date: Wed Nov 8 10:34:22 2017 +0100 editeng: Simplify calls to HasSelection() Change-Id: I424cd5aee41334aebfd9bc41e1f8a9aeb69b9827 Reviewed-on: https://gerrit.libreoffice.org/44582 Tested-by: Jenkins <[email protected]> Reviewed-by: Samuel Mehrbrodt <[email protected]> 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()); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
