[Libreoffice-commits] core.git: sfx2/source

Caolán McNamara caolanm at redhat.com
Tue Oct 18 09:01:53 UTC 2016


 sfx2/source/doc/templatedlg.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit c7ac773480bfbfcaac15c9bfdeeab400028a96d4
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

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 22ed084..1e6b910 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);
 


More information about the Libreoffice-commits mailing list