summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-15 11:29:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-02-15 16:59:23 +0100
commitd5670177aacde2d722cfba6fe8083544549533e0 (patch)
treed23044e237711b3a1c2fef9848fab3786868b9e9 /editeng
parent48d655fe12bc2c4c42d6c88b8a43fade1614ee2a (diff)
use GetOutputDevice for PixelToLogic
Change-Id: I0e5dfb49554029261f98cc4abca0295aef10b892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110933 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editview.cxx2
-rw-r--r--editeng/source/editeng/impedit.cxx6
-rw-r--r--editeng/source/outliner/outlvw.cxx8
3 files changed, 8 insertions, 8 deletions
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;