shell/source/cmdmail/cmdmailmsg.cxx | 15 ++++++++------- shell/source/cmdmail/cmdmailsuppl.cxx | 3 +-- 2 files changed, 9 insertions(+), 9 deletions(-)
New commits: commit c6af59b234e8eb8182dc7f686290524feafd6ed6 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Oct 29 10:04:32 2021 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Oct 30 23:18:51 2021 +0200 Prepare for removal of non-const operator[] from Sequence in shell Change-Id: Ie7792d0aa3f404d9177a1eb6f75569577fc3d6a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124388 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx index 2a6a5f843af2..bb8c8bc05559 100644 --- a/shell/source/cmdmail/cmdmailmsg.cxx +++ b/shell/source/cmdmail/cmdmailmsg.cxx @@ -145,27 +145,28 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( ) sal_Int32 nItems = 0; Sequence< OUString > aRet( 7 ); + auto pRet = aRet.getArray(); if( !m_aBody.isEmpty() ) - aRet[nItems++] = "body"; + pRet[nItems++] = "body"; if( !m_aOriginator.isEmpty() ) - aRet[nItems++] = "from"; + pRet[nItems++] = "from"; if( !m_aRecipient.isEmpty() ) - aRet[nItems++] = "to"; + pRet[nItems++] = "to"; if( m_CcRecipients.hasElements() ) - aRet[nItems++] = "cc"; + pRet[nItems++] = "cc"; if( m_BccRecipients.hasElements() ) - aRet[nItems++] = "bcc"; + pRet[nItems++] = "bcc"; if( !m_aSubject.isEmpty() ) - aRet[nItems++] = "subject"; + pRet[nItems++] = "subject"; if( m_Attachments.hasElements() ) - aRet[nItems++] = "attachment"; + pRet[nItems++] = "attachment"; aRet.realloc( nItems ); return aRet; diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index c65372f5430e..00b6517c4648 100644 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -147,8 +147,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM aProperty.Name = "nodepath"; aProperty.Value <<= OUString("org.openoffice.Office.Common/ExternalMailer"); - Sequence< Any > aArgumentList( 1 ); - aArgumentList[0] <<= aProperty; + Sequence< Any > aArgumentList{ Any(aProperty) }; Reference< XNameAccess > xNameAccess( m_xConfigurationProvider->createInstanceWithArguments(