Kaydet (Commit) 38a65f76 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#68137 crash in traversing script fields

use the same guards as the SwFldEditDlg does

Change-Id: I7d135cf969d9925cec57a90ef0fba8fe40f664eb
üst 7e1eb03a
...@@ -73,7 +73,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) : ...@@ -73,7 +73,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) :
aFont.SetWeight( WEIGHT_LIGHT ); aFont.SetWeight( WEIGHT_LIGHT );
m_pEditED->SetFont( aFont ); m_pEditED->SetFont( aFont );
pMgr = new SwFldMgr; pMgr = new SwFldMgr(pSh);
pFld = static_cast<SwScriptField*>(pMgr->GetCurFld()); pFld = static_cast<SwScriptField*>(pMgr->GetCurFld());
bNew = !(pFld && pFld->GetTyp()->Which() == RES_SCRIPTFLD); bNew = !(pFld && pFld->GetTyp()->Which() == RES_SCRIPTFLD);
...@@ -88,6 +88,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) : ...@@ -88,6 +88,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) :
SwJavaEditDialog::~SwJavaEditDialog() SwJavaEditDialog::~SwJavaEditDialog()
{ {
pSh->EnterStdMode();
delete pMgr; delete pMgr;
delete pFileDlg; delete pFileDlg;
Application::SetDefDialogParent( pOldDefDlgParent ); Application::SetDefDialogParent( pOldDefDlgParent );
...@@ -95,6 +96,8 @@ SwJavaEditDialog::~SwJavaEditDialog() ...@@ -95,6 +96,8 @@ SwJavaEditDialog::~SwJavaEditDialog()
IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, PrevHdl) IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, PrevHdl)
{ {
pSh->EnterStdMode();
SetFld(); SetFld();
pMgr->GoPrev(); pMgr->GoPrev();
pFld = static_cast<SwScriptField*>(pMgr->GetCurFld()); pFld = static_cast<SwScriptField*>(pMgr->GetCurFld());
...@@ -107,6 +110,8 @@ IMPL_LINK_NOARG_INLINE_END(SwJavaEditDialog, PrevHdl) ...@@ -107,6 +110,8 @@ IMPL_LINK_NOARG_INLINE_END(SwJavaEditDialog, PrevHdl)
IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, NextHdl) IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, NextHdl)
{ {
pSh->EnterStdMode();
SetFld(); SetFld();
pMgr->GoNext(); pMgr->GoNext();
pFld = static_cast<SwScriptField*>(pMgr->GetCurFld()); pFld = static_cast<SwScriptField*>(pMgr->GetCurFld());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment