diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 17:11:14 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 20:36:27 +0000 |
commit | 38a65f76bc944ea730ebac7640dc135248ec3da0 (patch) | |
tree | bbb8e1f8671cb69e81eadfd7a64e1c2a5ac98580 /sw/source/ui | |
parent | 7e1eb03a39b776adf0f479e2801214b1e2d0f6cc (diff) |
Resolves: fdo#68137 crash in traversing script fields
use the same guards as the SwFldEditDlg does
Change-Id: I7d135cf969d9925cec57a90ef0fba8fe40f664eb
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/fldui/javaedit.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index e67d532fda94..0e270865bf2e 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -73,7 +73,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) : aFont.SetWeight( WEIGHT_LIGHT ); m_pEditED->SetFont( aFont ); - pMgr = new SwFldMgr; + pMgr = new SwFldMgr(pSh); pFld = static_cast<SwScriptField*>(pMgr->GetCurFld()); bNew = !(pFld && pFld->GetTyp()->Which() == RES_SCRIPTFLD); @@ -88,6 +88,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) : SwJavaEditDialog::~SwJavaEditDialog() { + pSh->EnterStdMode(); delete pMgr; delete pFileDlg; Application::SetDefDialogParent( pOldDefDlgParent ); @@ -95,6 +96,8 @@ SwJavaEditDialog::~SwJavaEditDialog() IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, PrevHdl) { + pSh->EnterStdMode(); + SetFld(); pMgr->GoPrev(); pFld = static_cast<SwScriptField*>(pMgr->GetCurFld()); @@ -107,6 +110,8 @@ IMPL_LINK_NOARG_INLINE_END(SwJavaEditDialog, PrevHdl) IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, NextHdl) { + pSh->EnterStdMode(); + SetFld(); pMgr->GoNext(); pFld = static_cast<SwScriptField*>(pMgr->GetCurFld()); |