[Libreoffice-commits] core.git: editeng/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Dec 11 13:55:06 UTC 2020
editeng/source/editeng/editview.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit e5e3a05f13f47d44276cfe8d88e8ec9d4d559a66
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Dec 11 11:08:07 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Dec 11 14:54:27 2020 +0100
spelling context menu misplaced in margin comments
in writer, comments in margin, right clicking on a misspelt word
and the menu is misplaced, very misplaced if the comment is long
enough that the comment has a scrollbar and the word is near the end
Change-Id: I8e806346bdca08e33c3926dae008d71de4fe03d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107590
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 884817f415b6..d7642736cf27 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1080,10 +1080,12 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
aPopupMenu->RemoveDisabledEntries( true, true );
+ // PaMtoEditCursor returns Logical units
tools::Rectangle aTempRect = pImpEditView->pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GetCursorFlags::TextOnly );
- Point aScreenPos = pImpEditView->GetWindowPos( aTempRect.TopLeft() );
- aScreenPos = pImpEditView->GetWindow()->OutputToScreenPixel( aScreenPos );
- aTempRect = pImpEditView->GetWindow()->LogicToPixel( tools::Rectangle(aScreenPos, aTempRect.GetSize() ));
+ // GetWindowPos works in Logical units
+ aTempRect = pImpEditView->GetWindowPos(aTempRect);
+ // Convert to pixels
+ aTempRect = pImpEditView->GetWindow()->LogicToPixel(aTempRect);
//tdf#106123 store and restore the EditPaM around the menu Execute
//because the loss of focus in the current editeng causes writer
More information about the Libreoffice-commits
mailing list