sc/source/ui/inc/linkarea.hxx | 2 +- sc/source/ui/miscdlgs/linkarea.cxx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit 91ec9510e5b28aa2214d735faf11197b931c72b3 Author: Katarina Behrens <[email protected]> Date: Thu Feb 1 12:08:34 2018 +0100 Don't recycle DocumentInserter, create a new one every time After all, everyone else using DocumentInserter across the codebase does the same. For KDE4, an attempt to reuse the same filepicker dialog sporadically crashes in the depths of (old-ish, possibly buggy) libQt due to nested event loop and/or recursive repaints. (crash scenario: Calc > Sheet > Link to external data > Browse > double-click a file > Browse again > Kaboom!) Reviewed-on: https://gerrit.libreoffice.org/49082 Tested-by: Jenkins <[email protected]> Reviewed-by: Katarina Behrens <[email protected]> (cherry picked from commit a74590e4b4475253bd7752738e570cdafe45e674) Change-Id: Ib494203abd07873919b8394a442f09c5329d237c diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx index a9a8b575d6e7..0d0e4e245b18 100644 --- a/sc/source/ui/inc/linkarea.hxx +++ b/sc/source/ui/inc/linkarea.hxx @@ -47,7 +47,7 @@ private: VclPtr<OKButton> m_pBtnOk; ScDocShell* pSourceShell; - sfx2::DocumentInserter* pDocInserter; + std::unique_ptr<sfx2::DocumentInserter> pDocInserter; SfxObjectShellRef aSourceRef; diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index 143799d52ce3..0a475402dd12 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -88,9 +88,8 @@ short ScLinkedAreaDlg::Execute() IMPL_LINK_NOARG_TYPED(ScLinkedAreaDlg, BrowseHdl, Button*, void) { - if ( !pDocInserter ) - pDocInserter = new sfx2::DocumentInserter( - OUString::createFromAscii( ScDocShell::Factory().GetShortName() ) ); + pDocInserter.reset( new sfx2::DocumentInserter( + OUString::createFromAscii( ScDocShell::Factory().GetShortName() ) ) ); pDocInserter->StartExecuteModal( LINK( this, ScLinkedAreaDlg, DialogClosedHdl ) ); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
