sfx2/source/doc/guisaveas.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit c2b4dcc46680db854fa1e5f3c490b88bd53b7f5e
Author:     Katarina Behrens <katarina.behr...@cib.de>
AuthorDate: Tue Apr 9 15:17:17 2019 +0200
Commit:     Thorsten Behrens <thorsten.behr...@cib.de>
CommitDate: Tue Apr 9 16:07:32 2019 +0200

    Redirect filter options dialog to the main thread
    
    again avoid deadlock when called from an extension in a non-main
    thread
    
    Change-Id: I534c41dc2bd4f2ee44e82a619a10da797915e020
    Reviewed-on: https://gerrit.libreoffice.org/70461
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index a6219aa3947d..9c1c9192b96a 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -94,6 +94,7 @@
 #include <officecfg/Office/Common.hxx>
 
 #include <vcl/FilterConfigItem.hxx>
+#include <vcl/threadex.hxx>
 #include <com/sun/star/system/SystemShellExecute.hpp>
 #include <com/sun/star/system/SystemShellExecuteFlags.hpp>
 
@@ -266,6 +267,8 @@ class ModelData_Impl
 
     bool m_bRecommendReadOnly;
 
+    bool solar_execute(uno::Reference< ui::dialogs::XExecutableDialog > 
xFilterDialog);
+
 public:
     ModelData_Impl( SfxStoringHelper& aOwner,
                     const uno::Reference< frame::XModel >& xModel,
@@ -558,6 +561,10 @@ uno::Sequence< beans::PropertyValue > 
ModelData_Impl::GetPreselectedFilter_Impl(
     return aFilterProps;
 }
 
+bool ModelData_Impl::solar_execute( 
uno::Reference<ui::dialogs::XExecutableDialog> xFilterDialog)
+{
+    return xFilterDialog->execute();
+}
 
 bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName )
 {
@@ -594,7 +601,9 @@ bool ModelData_Impl::ExecuteFilterDialog_Impl( const 
OUString& aFilterName )
                             GetMediaDescr() >> aPropsForDialog;
                             xFilterProperties->setPropertyValues( 
aPropsForDialog );
 
-                            if( xFilterDialog->execute() )
+                            bool bRet = 
vcl::solarthread::syncExecute(std::bind(&ModelData_Impl::solar_execute, this, 
xFilterDialog));
+
+                            if( bRet )
                             {
                                 uno::Sequence< beans::PropertyValue > 
aPropsFromDialog =
                                                                             
xFilterProperties->getPropertyValues();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to