[Libreoffice-commits] core.git: sc/source

Takeshi Abe tabe at fixedpoint.jp
Mon Nov 7 06:38:24 UTC 2016


 sc/source/ui/vba/vbaworksheet.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 12ca2d6d32d750abe0d452387c0b51bcedf54f58
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Mon Nov 7 14:10:49 2016 +0900

    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 at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 8ac9cc6..28c9573 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();


More information about the Libreoffice-commits mailing list