diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-04 12:20:49 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-04 15:26:09 +0200 |
commit | a1c62cfc605a35f82dba4d9bfa47ab065e47cd99 (patch) | |
tree | cf3c0a434101fd9d902042aa89bc6fb6aaadeaa6 /shell | |
parent | 9c1c80bc9f679130939fccd251559c27abf675c8 (diff) |
Just use Any ctor instead of makeAny (macOS)
Change-Id: I6c185eecf943205f78567393f0ef588580ee4dab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133821
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/backends/macbe/macbackend.mm | 52 | ||||
-rw-r--r-- | shell/source/cmdmail/cmdmailmsg.cxx | 14 |
2 files changed, 33 insertions, 33 deletions
diff --git a/shell/source/backends/macbe/macbackend.mm b/shell/source/backends/macbe/macbackend.mm index 04ab5569e606..cb35a4b9d066 100644 --- a/shell/source/backends/macbe/macbackend.mm +++ b/shell/source/backends/macbe/macbackend.mm @@ -204,9 +204,9 @@ css::uno::Any MacOSXBackend::getPropertyValue( if( aDocDir.getLength() > 0 && osl_getFileURLFromSystemPath( aDocDir.pData, &aDocURL.pData ) == osl_File_E_None ) { - return css::uno::makeAny( + return css::uno::Any( css::beans::Optional< css::uno::Any >( - true, css::uno::makeAny( aDocURL ) ) ); + true, css::uno::Any( aDocURL ) ) ); } else { @@ -217,7 +217,7 @@ css::uno::Any MacOSXBackend::getPropertyValue( { SAL_WARN("shell", "Got nil or empty list of user document directories" ); } - return css::uno::makeAny(css::beans::Optional< css::uno::Any >()); + return css::uno::Any(css::beans::Optional< css::uno::Any >()); } else if ( PropertyName == "ooInetFTPProxyName" ) { char host[MAXHOSTNAMELEN]; @@ -231,12 +231,12 @@ css::uno::Any MacOSXBackend::getPropertyValue( auto const Server = OUString::createFromAscii( host ); if( Server.getLength() > 0 ) { - return css::uno::makeAny( + return css::uno::Any( css::beans::Optional< css::uno::Any >( - true, uno::makeAny( Server ) ) ); + true, uno::Any( Server ) ) ); } } - return css::uno::makeAny(css::beans::Optional< css::uno::Any >()); + return css::uno::Any(css::beans::Optional< css::uno::Any >()); } else if ( PropertyName == "ooInetFTPProxyPort" ) { char host[MAXHOSTNAMELEN]; @@ -247,11 +247,11 @@ css::uno::Any MacOSXBackend::getPropertyValue( if (retVal && port > 0) { - return css::uno::makeAny( + return css::uno::Any( css::beans::Optional< css::uno::Any >( - true, uno::makeAny( sal_Int32(port) ) ) ); + true, uno::Any( sal_Int32(port) ) ) ); } - return css::uno::makeAny(css::beans::Optional< css::uno::Any >()); + return css::uno::Any(css::beans::Optional< css::uno::Any >()); } else if ( PropertyName == "ooInetHTTPProxyName" ) { char host[MAXHOSTNAMELEN]; @@ -265,12 +265,12 @@ css::uno::Any MacOSXBackend::getPropertyValue( auto const Server = OUString::createFromAscii( host ); if( Server.getLength() > 0 ) { - return css::uno::makeAny( + return css::uno::Any( css::beans::Optional< css::uno::Any >( - true, uno::makeAny( Server ) ) ); + true, uno::Any( Server ) ) ); } } - return css::uno::makeAny(css::beans::Optional< css::uno::Any >()); + return css::uno::Any(css::beans::Optional< css::uno::Any >()); } else if ( PropertyName == "ooInetHTTPProxyPort" ) { char host[MAXHOSTNAMELEN]; @@ -281,11 +281,11 @@ css::uno::Any MacOSXBackend::getPropertyValue( if (retVal && port > 0) { - return css::uno::makeAny( + return css::uno::Any( css::beans::Optional< css::uno::Any >( - true, uno::makeAny( sal_Int32(port) ) ) ); + true, uno::Any( sal_Int32(port) ) ) ); } - return css::uno::makeAny(css::beans::Optional< css::uno::Any >()); + return css::uno::Any(css::beans::Optional< css::uno::Any >()); } else if ( PropertyName == "ooInetHTTPSProxyName" ) { char host[MAXHOSTNAMELEN]; @@ -299,12 +299,12 @@ css::uno::Any MacOSXBackend::getPropertyValue( auto const Server = OUString::createFromAscii( host ); if( Server.getLength() > 0 ) { - return css::uno::makeAny( + return css::uno::Any( css::beans::Optional< css::uno::Any >( - true, uno::makeAny( Server ) ) ); + true, uno::Any( Server ) ) ); } } - return css::uno::makeAny(css::beans::Optional< css::uno::Any >()); + return css::uno::Any(css::beans::Optional< css::uno::Any >()); } else if ( PropertyName == "ooInetHTTPSProxyPort" ) { char host[MAXHOSTNAMELEN]; @@ -315,17 +315,17 @@ css::uno::Any MacOSXBackend::getPropertyValue( if (retVal && port > 0) { - return css::uno::makeAny( + return css::uno::Any( css::beans::Optional< css::uno::Any >( - true, uno::makeAny( sal_Int32(port) ) ) ); + true, uno::Any( sal_Int32(port) ) ) ); } - return css::uno::makeAny(css::beans::Optional< css::uno::Any >()); + return css::uno::Any(css::beans::Optional< css::uno::Any >()); } else if ( PropertyName == "ooInetProxyType" ) { // override default for ProxyType, which is "0" meaning "No proxies". - return css::uno::makeAny( + return css::uno::Any( css::beans::Optional< css::uno::Any >( - true, uno::makeAny( sal_Int32(1) ) ) ); + true, uno::Any( sal_Int32(1) ) ) ); } else if ( PropertyName == "ooInetNoProxy" ) { OUString aProxyBypassList; @@ -357,12 +357,12 @@ css::uno::Any MacOSXBackend::getPropertyValue( // fill proxy bypass list if( aProxyBypassList.getLength() > 0 ) { - return css::uno::makeAny( + return css::uno::Any( css::beans::Optional< css::uno::Any >( true, - uno::makeAny( aProxyBypassList.replace( SPACE, SEMI_COLON ) ) ) ); + uno::Any( aProxyBypassList.replace( SPACE, SEMI_COLON ) ) ) ); } - return css::uno::makeAny(css::beans::Optional< css::uno::Any >()); + return css::uno::Any(css::beans::Optional< css::uno::Any >()); } else { throw css::beans::UnknownPropertyException( PropertyName, static_cast< cppu::OWeakObject * >(this)); diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx index bb8c8bc05559..8d6c0865a609 100644 --- a/shell/source/cmdmail/cmdmailmsg.cxx +++ b/shell/source/cmdmail/cmdmailmsg.cxx @@ -115,25 +115,25 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName ) std::scoped_lock aGuard( m_aMutex ); if( aName == "body" && !m_aBody.isEmpty() ) - return makeAny( m_aBody ); + return Any( m_aBody ); if( aName == "from" && !m_aOriginator.isEmpty() ) - return makeAny( m_aOriginator ); + return Any( m_aOriginator ); else if( aName == "to" && !m_aRecipient.isEmpty() ) - return makeAny( m_aRecipient ); + return Any( m_aRecipient ); else if( aName == "cc" && m_CcRecipients.hasElements() ) - return makeAny( m_CcRecipients ); + return Any( m_CcRecipients ); else if( aName == "bcc" && m_BccRecipients.hasElements() ) - return makeAny( m_BccRecipients ); + return Any( m_BccRecipients ); else if( aName == "subject" && !m_aSubject.isEmpty() ) - return makeAny( m_aSubject ); + return Any( m_aSubject ); else if( aName == "attachment" && m_Attachments.hasElements() ) - return makeAny( m_Attachments ); + return Any( m_Attachments ); throw NoSuchElementException("key not found: " + aName, static_cast < XNameAccess * > (this) ); |