sc/source/ui/attrdlg/scdlgfact.cxx |    5 +++++
 sc/source/ui/attrdlg/scdlgfact.hxx |    3 ++-
 sc/source/ui/view/viewfun5.cxx     |    1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 6c8a7fcb01beeedaa72b4a4c31d1b849000bad39
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Nov 8 11:47:09 2019 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Nov 8 15:51:21 2019 +0100

    Resolves: tdf#128667 crash in csv import from paste
    
    Change-Id: Id50d0a7e4f176ccf83292495cb229da492fbf381
    Reviewed-on: https://gerrit.libreoffice.org/82287
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index 3c4b3ec9c92a..af0bcfdef27e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -75,6 +75,11 @@ short AbstractScImportAsciiDlg_Impl::Execute()
     return m_xDlg->run();
 }
 
+bool 
AbstractScImportAsciiDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext
 &rCtx)
+{
+    return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short AbstractScAutoFormatDlg_Impl::Execute()
 {
     return m_xDlg->run();
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index d6790a7f40a6..60e5a6bc35d8 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -101,13 +101,14 @@ OString Class::GetScreenshotId() const              \
 
 class AbstractScImportAsciiDlg_Impl : public AbstractScImportAsciiDlg
 {
-    std::unique_ptr<ScImportAsciiDlg> m_xDlg;
+    std::shared_ptr<ScImportAsciiDlg> m_xDlg;
 public:
     explicit AbstractScImportAsciiDlg_Impl(std::unique_ptr<ScImportAsciiDlg> p)
         : m_xDlg(std::move(p))
     {
     }
     virtual short Execute() override;
+    virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) 
override;
     virtual void                        GetOptions( ScAsciiOptions& rOpt ) 
override;
     virtual void                        SaveParameters() override;
 
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 2cc61bca2fd9..1cffceff6e57 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -378,6 +378,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId 
nFormatId,
 
                         if (bShowErrorDialog)
                             ErrorMessage(STR_PASTE_ERROR);
+                        pDlg->disposeOnce();
                     });
                     return true;
                 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to