summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-11-07 14:10:49 +0900
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-07 06:38:02 +0000
commit12ca2d6d32d750abe0d452387c0b51bcedf54f58 (patch)
tree5a282d2cabea36d6f792be82f791fd5a5fb54798 /sc
parent8285af5e56cbc9d3871f75454781ce0f5386ec08 (diff)
Avoid crash when calling a Worksheet's ShowDataForm()
in VBA, e.g.: Option VBASupport 1 Sub Main Worksheets(1).ShowDataForm() End Sub Change-Id: Ice6cfccc4fc15a4d0044d6464c7d6c04243e86ae Reviewed-on: https://gerrit.libreoffice.org/30619 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 8ac9cc62eecb..28c9573177c3 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -900,8 +900,8 @@ ScVbaWorksheet::ShowDataForm( ) throw (uno::RuntimeException, std::exception)
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- AbstractScDataFormDlg* pDlg = pFact->CreateScDataFormDlg(pTabViewShell->GetDialogParent(),
- pTabViewShell);
+ ScopedVclPtr<AbstractScDataFormDlg> pDlg(pFact->CreateScDataFormDlg(pTabViewShell->GetDialogParent(),
+ pTabViewShell));
OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->Execute();