summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@libreoffice.org>2021-04-18 16:28:49 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-05-20 12:02:32 +0200
commit7a4fffb19fb3d573d9afd3f7136cd0e5b545b706 (patch)
treef9739b3eff12c71154264453bc1d9245be6e61e2 /shell
parent825673eac77e2ccef29cfe2d9a1f375c6f5606d7 (diff)
shell : use std::mutex in CmdMailMsg
Change-Id: I2aac780ce17e327a2f5ddbc835583bad1056bfc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114244 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'shell')
-rw-r--r--shell/source/cmdmail/cmdmailmsg.cxx35
-rw-r--r--shell/source/cmdmail/cmdmailmsg.hxx3
2 files changed, 19 insertions, 19 deletions
diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx
index bd8657577b75..2a6a5f843af2 100644
--- a/shell/source/cmdmail/cmdmailmsg.cxx
+++ b/shell/source/cmdmail/cmdmailmsg.cxx
@@ -21,7 +21,6 @@
using com::sun::star::container::NoSuchElementException;
using com::sun::star::container::XNameAccess;
-using osl::MutexGuard;
using namespace cppu;
using namespace com::sun::star::uno;
@@ -29,91 +28,91 @@ using namespace com::sun::star::uno;
void SAL_CALL CmdMailMsg::setBody( const OUString& aBody )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
m_aBody = aBody;
}
OUString SAL_CALL CmdMailMsg::getBody( )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
return m_aBody;
}
void SAL_CALL CmdMailMsg::setRecipient( const OUString& aRecipient )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
m_aRecipient = aRecipient;
}
OUString SAL_CALL CmdMailMsg::getRecipient( )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
return m_aRecipient;
}
void SAL_CALL CmdMailMsg::setCcRecipient( const Sequence< OUString >& aCcRecipient )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
m_CcRecipients = aCcRecipient;
}
Sequence< OUString > SAL_CALL CmdMailMsg::getCcRecipient( )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
return m_CcRecipients;
}
void SAL_CALL CmdMailMsg::setBccRecipient( const Sequence< OUString >& aBccRecipient )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
m_BccRecipients = aBccRecipient;
}
Sequence< OUString > SAL_CALL CmdMailMsg::getBccRecipient( )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
return m_BccRecipients;
}
void SAL_CALL CmdMailMsg::setOriginator( const OUString& aOriginator )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
m_aOriginator = aOriginator;
}
OUString SAL_CALL CmdMailMsg::getOriginator( )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
return m_aOriginator;
}
void SAL_CALL CmdMailMsg::setSubject( const OUString& aSubject )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
m_aSubject = aSubject;
}
OUString SAL_CALL CmdMailMsg::getSubject( )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
return m_aSubject;
}
void SAL_CALL CmdMailMsg::setAttachement( const Sequence< OUString >& aAttachment )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
m_Attachments = aAttachment;
}
Sequence< OUString > SAL_CALL CmdMailMsg::getAttachement( )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
return m_Attachments;
}
Any SAL_CALL CmdMailMsg::getByName( const OUString& aName )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
if( aName == "body" && !m_aBody.isEmpty() )
return makeAny( m_aBody );
@@ -142,7 +141,7 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName )
Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
sal_Int32 nItems = 0;
Sequence< OUString > aRet( 7 );
@@ -174,7 +173,7 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( )
sal_Bool SAL_CALL CmdMailMsg::hasByName( const OUString& aName )
{
- MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
if( aName == "body" && !m_aBody.isEmpty() )
return true;
diff --git a/shell/source/cmdmail/cmdmailmsg.hxx b/shell/source/cmdmail/cmdmailmsg.hxx
index 43e40c1abf77..b481403953a5 100644
--- a/shell/source/cmdmail/cmdmailmsg.hxx
+++ b/shell/source/cmdmail/cmdmailmsg.hxx
@@ -20,6 +20,7 @@
#ifndef INCLUDED_SHELL_SOURCE_CMDMAIL_CMDMAILMSG_HXX
#define INCLUDED_SHELL_SOURCE_CMDMAIL_CMDMAILMSG_HXX
+#include <mutex>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -41,7 +42,7 @@ class CmdMailMsg :
css::uno::Sequence< OUString > m_BccRecipients;
css::uno::Sequence< OUString > m_Attachments;
- ::osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
public: