[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - sfx2/source

Katarina Behrens (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 9 14:07:55 UTC 2019


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

New commits:
commit c2b4dcc46680db854fa1e5f3c490b88bd53b7f5e
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Tue Apr 9 15:17:17 2019 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at 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.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at 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();


More information about the Libreoffice-commits mailing list