[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - editeng/source
Caolán McNamara
caolanm at redhat.com
Tue Feb 28 11:03:31 UTC 2017
editeng/source/editeng/editview.cxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 48ad98b36403a04d05f6ed08e541ffbd65995af9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Feb 24 13:57:53 2017 +0000
Resolves: tdf#106123 store and restore the PaM around the menu Execute
because the loss of focus in the current editeng causes writer annotations to
save their contents, making the pContent of the current EditMaps invalid
(cherry picked from commit 71a84b69ae30458a941f38869aa994118051a063)
Change-Id: Ic01379291fa66dd58246d33287b18801f5da49c0
Reviewed-on: https://gerrit.libreoffice.org/34613
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 3245004..a246587 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -976,7 +976,18 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
aScreenPos = pImpEditView->GetWindow()->OutputToScreenPixel( aScreenPos );
aTempRect = pImpEditView->GetWindow()->LogicToPixel( Rectangle(aScreenPos, aTempRect.GetSize() ));
+ //tdf#106123 store and restore the EditPaM around the menu Execute
+ //because the loss of focus in the current editeng causes writer
+ //annotations to save their contents, making the pContent of the
+ //current EditPams invalid
+ EPaM aP = pImpEditView->pEditEngine->pImpEditEngine->CreateEPaM(aPaM);
+ EPaM aP2 = pImpEditView->pEditEngine->pImpEditEngine->CreateEPaM(aPaM2);
+
sal_uInt16 nId = aPopupMenu->Execute( pImpEditView->GetWindow(), aTempRect, PopupMenuFlags::NoMouseUpClose );
+
+ aPaM2 = pImpEditView->pEditEngine->pImpEditEngine->CreateEditPaM(aP2);
+ aPaM = pImpEditView->pEditEngine->pImpEditEngine->CreateEditPaM(aP);
+
if ( nId == MN_IGNORE )
{
OUString aWord = pImpEditView->SpellIgnoreWord();
More information about the Libreoffice-commits
mailing list