editeng/source/editeng/editview.cxx | 2 +- editeng/source/editeng/impedit.cxx | 6 +++--- editeng/source/outliner/outlvw.cxx | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-)
New commits: commit d5670177aacde2d722cfba6fe8083544549533e0 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Feb 15 11:29:52 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Feb 15 16:59:23 2021 +0100 use GetOutputDevice for PixelToLogic Change-Id: I0e5dfb49554029261f98cc4abca0295aef10b892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110933 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 4849b81b6898..7f0a0bb7a809 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -190,7 +190,7 @@ tools::Rectangle EditView::GetInvalidateRect() const else { tools::Rectangle aRect( pImpEditView->aOutArea ); - tools::Long nMore = pImpEditView->GetWindow()->PixelToLogic( Size( pImpEditView->GetInvalidateMore(), 0 ) ).Width(); + tools::Long nMore = pImpEditView->GetOutputDevice().PixelToLogic( Size( pImpEditView->GetInvalidateMore(), 0 ) ).Width(); aRect.AdjustLeft( -nMore ); aRect.AdjustRight(nMore ); aRect.AdjustTop( -nMore ); diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 40d551eab27f..ac51af7597ab 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -879,7 +879,7 @@ void ImpEditView::ResetOutputArea( const tools::Rectangle& rRect ) return; // #i119885# use grown area if needed; do when getting bigger OR smaller - const sal_Int32 nMore(DoInvalidateMore() ? GetWindow()->PixelToLogic(Size(nInvMore, 0)).Width() : 0); + const sal_Int32 nMore(DoInvalidateMore() ? GetOutputDevice().PixelToLogic(Size(nInvMore, 0)).Width() : 0); if(aOldArea.Left() > aOutArea.Left()) { @@ -2192,7 +2192,7 @@ void ImpEditView::dragGestureRecognized(const css::datatransfer::dnd::DragGestur // Field?! sal_Int32 nPara; sal_Int32 nPos; - Point aMousePos = GetWindow()->PixelToLogic( aMousePosPixel ); + Point aMousePos = GetOutputDevice().PixelToLogic( aMousePosPixel ); const SvxFieldItem* pField = GetField( aMousePos, &nPara, &nPos ); if ( pField ) { @@ -2237,7 +2237,7 @@ void ImpEditView::dragGestureRecognized(const css::datatransfer::dnd::DragGestur // Sensitive area to be scrolled. Size aSz( 5, 0 ); - aSz = GetWindow()->PixelToLogic( aSz ); + aSz = GetOutputDevice().PixelToLogic( aSz ); pDragAndDropInfo->nSensibleRange = static_cast<sal_uInt16>(aSz.Width()); pDragAndDropInfo->nCursorWidth = static_cast<sal_uInt16>(aSz.Width()) / 2; pDragAndDropInfo->aBeginDragSel = pEditEngine->pImpEditEngine->CreateESel( aCopySel ); diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 487431995636..3c5db2437d88 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -243,7 +243,7 @@ sal_Int32 OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTa { sal_Int32 nPara = EE_PARA_NOT_FOUND; - Point aMousePosWin = pEditView->GetWindow()->PixelToLogic( rPosPix ); + Point aMousePosWin = pEditView->GetOutputDevice().PixelToLogic( rPosPix ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) { reTarget = MouseTarget::Outside; @@ -287,7 +287,7 @@ bool OutlinerView::MouseMove( const MouseEvent& rMEvt ) if( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode()) return pEditView->MouseMove( rMEvt ); - Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) ); + Point aMousePosWin( pEditView->GetOutputDevice().PixelToLogic( rMEvt.GetPosPixel() ) ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) return false; @@ -302,7 +302,7 @@ bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode() ) return pEditView->MouseButtonDown( rMEvt ); - Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) ); + Point aMousePosWin( pEditView->GetOutputDevice().PixelToLogic( rMEvt.GetPosPixel() ) ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) return false; @@ -350,7 +350,7 @@ bool OutlinerView::MouseButtonUp( const MouseEvent& rMEvt ) if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode() ) return pEditView->MouseButtonUp( rMEvt ); - Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) ); + Point aMousePosWin( pEditView->GetOutputDevice().PixelToLogic( rMEvt.GetPosPixel() ) ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) return false; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits