[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sfx2/source
Caolán McNamara
caolanm at redhat.com
Tue Oct 18 13:26:39 UTC 2016
sfx2/source/doc/templatedlg.cxx | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 065d396c10b69feaaf7cbff8803bf1bf5bd3acaf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 18 09:59:33 2016 +0100
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
(cherry picked from commit c7ac773480bfbfcaac15c9bfdeeab400028a96d4)
Reviewed-on: https://gerrit.libreoffice.org/29993
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index a13c05b..7ace61f 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -659,10 +659,11 @@ IMPL_LINK_NOARG_TYPED(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())
@@ -710,10 +711,11 @@ IMPL_LINK_NOARG_TYPED(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(mpCurView->createRegion(sCategory))
@@ -1264,10 +1266,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),
VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
More information about the Libreoffice-commits
mailing list