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(