summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-18 09:59:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-18 10:01:30 +0100
commitc7ac773480bfbfcaac15c9bfdeeab400028a96d4 (patch)
tree7bda552ac4c388638ff5154e5233030834cb99bd /sfx2
parent4eea4af8924e3b1bb00c22cf1f9d21fc4dec6e83 (diff)
Resolves: tdf#101590 cannot interact with filepicker from import category
the post-execute category dialog is picked as the toplevel parent, and gtk3 vclplug will grab events to that hierarchy, but can't interact with them in this state. Just dispose the category dialog so its not a candidate for the file dialog parent. Change-Id: I063fc6d687d556db229e2e200bb280a6cd3425f5
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/templatedlg.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 22ed084d32e6..1e6b910f8b33 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -557,10 +557,11 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg, MoveClickHdl, Button*, void)
size_t nItemId = 0;
- if(aDlg->Execute() == RET_OK)
+ if (aDlg->Execute() == RET_OK)
{
OUString sCategory = aDlg->GetSelectedCategory();
bool bIsNewCategory = aDlg->IsNewCategoryCreated();
+ aDlg.disposeAndClear();
if(bIsNewCategory)
{
if (!sCategory.isEmpty())
@@ -596,10 +597,11 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg, ImportClickHdl, Button*, void)
ScopedVclPtrInstance<SfxTemplateCategoryDialog> aDlg;
aDlg->SetCategoryLBEntries(mpLocalView->getFolderNames());
- if(aDlg->Execute() == RET_OK)
+ if (aDlg->Execute() == RET_OK)
{
OUString sCategory = aDlg->GetSelectedCategory();
bool bIsNewCategory = aDlg->IsNewCategoryCreated();
+ aDlg.disposeAndClear();
if(bIsNewCategory)
{
if(mpLocalView->createRegion(sCategory))
@@ -1146,10 +1148,10 @@ void SfxTemplateManagerDlg::OnCategoryDelete()
aDlg->SetText(SfxResId(STR_CATEGORY_DELETE).toString());
aDlg->SetSelectLabelText(SfxResId(STR_CATEGORY_SELECT).toString());
- if(aDlg->Execute() == RET_OK)
+ if (aDlg->Execute() == RET_OK)
{
OUString sCategory = aDlg->GetSelectedCategory();
- aDlg->Close();
+ aDlg.disposeAndClear();
ScopedVclPtrInstance< MessageDialog > popupDlg(this, SfxResId(STR_QMSG_SEL_FOLDER_DELETE),
VclMessageType::Question, VCL_BUTTONS_YES_NO);