Kaydet (Commit) 559fa3d0 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt Kaydeden (comit) Thorsten Behrens

tdf#123728 Always print on main thread to avoid deadlocks

Change-Id: Ia8c2600aee42c3063e18032d1e485ad417ec4639
Reviewed-on: https://gerrit.libreoffice.org/68421
Tested-by: Jenkins
Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit 11080306)
Reviewed-on: https://gerrit.libreoffice.org/68461Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 1cc66501
......@@ -91,6 +91,7 @@
#include <framework/titlehelper.hxx>
#include <comphelper/numberedcollection.hxx>
#include <unotools/ucbhelper.hxx>
#include <vcl/threadex.hxx>
#include <sfx2/sfxbasecontroller.hxx>
#include <sfx2/viewfac.hxx>
......@@ -1411,14 +1412,22 @@ void SAL_CALL SfxBaseModel::setPrinter(const Sequence< beans::PropertyValue >& r
m_pData->m_xPrintable->setPrinter( rPrinter );
}
static bool ImplPrintStatic(const Reference<view::XPrintable>& m_xPrintable,
const Sequence<beans::PropertyValue>& rOptions)
{
m_xPrintable->print(rOptions);
return true;
}
void SAL_CALL SfxBaseModel::print(const Sequence< beans::PropertyValue >& rOptions)
{
SfxModelGuard aGuard( *this );
impl_getPrintHelper();
m_pData->m_xPrintable->print( rOptions );
}
// tdf#123728 Always print on main thread to avoid deadlocks
vcl::solarthread::syncExecute(std::bind(&ImplPrintStatic, m_pData->m_xPrintable, rOptions));
}
// XStorable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment