Kaydet (Commit) 0ddd15c1 authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Noel Grandin

tdf#114818 hold the mutex before executing the error dialog

Also add an assert to ErrorBox to ensure the mutex is acquired

Change-Id: I3e426024dad6ddfc5cffc7861b0cba9e8989c018
Reviewed-on: https://gerrit.libreoffice.org/47388Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 0a1b0458
......@@ -702,6 +702,7 @@ void SearchAndParseThread::execute()
{
// in case of a returned CommandFailedException
// SimpleFileAccess serves it, returning an empty stream
SolarMutexGuard aGuard;
sError = CuiResId(RID_SVXSTR_SEARCHERROR);
sError = sError.replaceAll("%1", m_aURL);
m_pPersonaDialog->SetProgress( OUString() );
......@@ -714,6 +715,7 @@ void SearchAndParseThread::execute()
{
// a catch all clause, in case the exception is not
// served elsewhere
SolarMutexGuard aGuard;
sError = CuiResId(RID_SVXSTR_SEARCHERROR);
sError = sError.replaceAll("%1", m_aURL);
m_pPersonaDialog->SetProgress( OUString() );
......@@ -754,6 +756,7 @@ void SearchAndParseThread::execute()
{
if( m_bDirectURL )
{
SolarMutexGuard aGuard;
sError = CuiResId(RID_SVXSTR_SEARCHERROR);
sError = sError.replaceAll("%1", m_aURL);
m_pPersonaDialog->SetProgress( OUString() );
......@@ -837,6 +840,7 @@ void SearchAndParseThread::execute()
}
catch ( const uno::Exception & )
{
SolarMutexGuard aGuard;
sError = CuiResId( RID_SVXSTR_SEARCHERROR );
sError = sError.replaceAll("%1", m_aURL);
m_pPersonaDialog->SetProgress( OUString() );
......
......@@ -433,6 +433,7 @@ OUString WarningBox::GetStandardText()
ErrorBox::ErrorBox( vcl::Window* pParent, const OUString& rMessage ) :
MessBox( pParent, MessBoxStyle::Ok | MessBoxStyle::DefaultOk, 0, OUString(), rMessage )
{
DBG_TESTSOLARMUTEX();
// Default Text is the display title from the application
if ( GetText().isEmpty() )
SetText( GetStandardText() );
......@@ -450,6 +451,7 @@ ErrorBox::ErrorBox( vcl::Window* pParent, MessBoxStyle nStyle, WinBits nWinBits,
const OUString& rMessage ) :
MessBox( pParent, nStyle, nWinBits, OUString(), rMessage )
{
DBG_TESTSOLARMUTEX();
// Default Text is the display title from the application
if ( GetText().isEmpty() )
SetText( GetStandardText() );
......
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