Kaydet (Commit) a74590e4 authored tarafından Katarina Behrens's avatar Katarina Behrens

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!)

Change-Id: Ib494203abd07873919b8394a442f09c5329d237c
Reviewed-on: https://gerrit.libreoffice.org/49082Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst 1037e375
......@@ -46,7 +46,7 @@ private:
VclPtr<OKButton> m_pBtnOk;
ScDocShell* pSourceShell;
sfx2::DocumentInserter* pDocInserter;
std::unique_ptr<sfx2::DocumentInserter> pDocInserter;
SfxObjectShellRef aSourceRef;
......
......@@ -83,8 +83,7 @@ void ScLinkedAreaDlg::dispose()
IMPL_LINK_NOARG(ScLinkedAreaDlg, BrowseHdl, Button*, void)
{
if ( !pDocInserter )
pDocInserter = new sfx2::DocumentInserter(this, ScDocShell::Factory().GetFactoryName());
pDocInserter.reset( new sfx2::DocumentInserter(this, ScDocShell::Factory().GetFactoryName()) );
pDocInserter->StartExecuteModal( LINK( this, ScLinkedAreaDlg, DialogClosedHdl ) );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment