summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-04 17:11:14 +0000
committerAndras Timar <andras.timar@collabora.com>2015-02-23 10:30:37 +0100
commit47e38347eb85e6a71363e4cea84c5de1916027be (patch)
treea6d720e0d628ec13143a1c7cd26e242a3bd08cec /sw
parentb570bcb28c0f34e5f3d3f5213ec017143551ce01 (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> (cherry picked from commit 9980636a5c3a499c299a8b6f4b93965f18bb4311)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/fldui/javaedit.cxx9
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();