diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 17:11:14 +0000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-02-06 13:49:18 +0000 |
commit | 9980636a5c3a499c299a8b6f4b93965f18bb4311 (patch) | |
tree | a665fa599948932d91d06bde1e297fcb4228d433 | |
parent | acb11982c66f1226659d45cb51f594fae493298d (diff) |
Resolves: tdf#68137 crash in traversing script fields
use the same guards as the SwFldEditDlg does
(cherry picked from commit 38a65f76bc944ea730ebac7640dc135248ec3da0)
Conflicts:
sw/source/ui/fldui/javaedit.cxx
Change-Id: I7d135cf969d9925cec57a90ef0fba8fe40f664eb
Reviewed-on: https://gerrit.libreoffice.org/14324
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sw/source/ui/fldui/javaedit.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index 68412714a77b..4d70536f9c8c 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -77,8 +77,8 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) : aFont.SetWeight( WEIGHT_LIGHT ); m_pEditED->SetFont( aFont ); - pMgr = new SwFldMgr; - pFld = (SwScriptField*)pMgr->GetCurFld(); + pMgr = new SwFldMgr(pSh); + pFld = static_cast<SwScriptField*>(pMgr->GetCurFld()); bNew = !(pFld && pFld->GetTyp()->Which() == RES_SCRIPTFLD); @@ -92,6 +92,7 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) : SwJavaEditDialog::~SwJavaEditDialog() { + pSh->EnterStdMode(); delete pMgr; delete pFileDlg; Application::SetDefDialogParent( pOldDefDlgParent ); @@ -99,6 +100,8 @@ SwJavaEditDialog::~SwJavaEditDialog() IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, PrevHdl) { + pSh->EnterStdMode(); + SetFld(); pMgr->GoPrev(); pFld = (SwScriptField*)pMgr->GetCurFld(); @@ -111,6 +114,8 @@ IMPL_LINK_NOARG_INLINE_END(SwJavaEditDialog, PrevHdl) IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, NextHdl) { + pSh->EnterStdMode(); + SetFld(); pMgr->GoNext(); pFld = (SwScriptField*)pMgr->GetCurFld(); |