[Libreoffice-commits] core.git: editeng/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Dec 18 20:39:30 UTC 2020


 editeng/source/editeng/editview.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 0d6063a61c15688998c1a7f865b090fd9b1f8fff
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Dec 18 10:26:28 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Dec 18 21:38:46 2020 +0100

    use the OutputDevice view
    
    Change-Id: I017c7a8a39068263a9b3dc74714300abd3cb6159
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107959
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 99e3f67730d5..7b70f98b6ef7 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -951,7 +951,8 @@ static void LOKSendSpellPopupMenu(const weld::Menu& rMenu, LanguageType nGuessLa
 
 void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void> const * pCallBack )
 {
-    Point aPos(pImpEditView->GetOutputDevice().PixelToLogic(rPosPixel));
+    OutputDevice& rDevice = pImpEditView->GetOutputDevice();
+    Point aPos(rDevice.PixelToLogic(rPosPixel));
     aPos = pImpEditView->GetDocPos( aPos );
     EditPaM aPaM = pImpEditView->pEditEngine->GetPaM(aPos, false);
     Reference< linguistic2::XSpellChecker1 >  xSpeller( pImpEditView->pEditEngine->pImpEditEngine->GetSpeller() );
@@ -964,7 +965,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
     // GetWindowPos works in Logical units
     aTempRect = pImpEditView->GetWindowPos(aTempRect);
     // Convert to pixels
-    aTempRect = pImpEditView->GetWindow()->LogicToPixel(aTempRect);
+    aTempRect = rDevice.LogicToPixel(aTempRect);
 
     weld::Widget* pPopupParent = pImpEditView->GetPopupParent(aTempRect);
     std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "editeng/ui/spellmenu.ui"));


More information about the Libreoffice-commits mailing list