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.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski
2021-10-29 10:04:32 +03:00
parent 94f34c57be
commit c6af59b234
2 changed files with 9 additions and 9 deletions

View File

@@ -145,27 +145,28 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( )
sal_Int32 nItems = 0; sal_Int32 nItems = 0;
Sequence< OUString > aRet( 7 ); Sequence< OUString > aRet( 7 );
auto pRet = aRet.getArray();
if( !m_aBody.isEmpty() ) if( !m_aBody.isEmpty() )
aRet[nItems++] = "body"; pRet[nItems++] = "body";
if( !m_aOriginator.isEmpty() ) if( !m_aOriginator.isEmpty() )
aRet[nItems++] = "from"; pRet[nItems++] = "from";
if( !m_aRecipient.isEmpty() ) if( !m_aRecipient.isEmpty() )
aRet[nItems++] = "to"; pRet[nItems++] = "to";
if( m_CcRecipients.hasElements() ) if( m_CcRecipients.hasElements() )
aRet[nItems++] = "cc"; pRet[nItems++] = "cc";
if( m_BccRecipients.hasElements() ) if( m_BccRecipients.hasElements() )
aRet[nItems++] = "bcc"; pRet[nItems++] = "bcc";
if( !m_aSubject.isEmpty() ) if( !m_aSubject.isEmpty() )
aRet[nItems++] = "subject"; pRet[nItems++] = "subject";
if( m_Attachments.hasElements() ) if( m_Attachments.hasElements() )
aRet[nItems++] = "attachment"; pRet[nItems++] = "attachment";
aRet.realloc( nItems ); aRet.realloc( nItems );
return aRet; return aRet;

View File

@@ -147,8 +147,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
aProperty.Name = "nodepath"; aProperty.Name = "nodepath";
aProperty.Value <<= OUString("org.openoffice.Office.Common/ExternalMailer"); aProperty.Value <<= OUString("org.openoffice.Office.Common/ExternalMailer");
Sequence< Any > aArgumentList( 1 ); Sequence< Any > aArgumentList{ Any(aProperty) };
aArgumentList[0] <<= aProperty;
Reference< XNameAccess > xNameAccess( Reference< XNameAccess > xNameAccess(
m_xConfigurationProvider->createInstanceWithArguments( m_xConfigurationProvider->createInstanceWithArguments(