summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-04 12:20:49 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-04 15:26:09 +0200
commita1c62cfc605a35f82dba4d9bfa47ab065e47cd99 (patch)
treecf3c0a434101fd9d902042aa89bc6fb6aaadeaa6
parent9c1c80bc9f679130939fccd251559c27abf675c8 (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>
-rw-r--r--connectivity/source/drivers/macab/MacabResultSet.cxx2
-rw-r--r--connectivity/source/drivers/macab/MacabStatement.cxx2
-rw-r--r--extensions/source/config/ldap/ldapuserprofilebe.cxx8
-rw-r--r--shell/source/backends/macbe/macbackend.mm52
-rw-r--r--shell/source/cmdmail/cmdmailmsg.cxx14
-rw-r--r--sw/qa/core/unocore/unocore.cxx14
-rw-r--r--toolkit/qa/cppunit/EventContainer.cxx8
7 files changed, 50 insertions, 50 deletions
diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx
index bd9dbb079cc0..4142fcb6cce0 100644
--- a/connectivity/source/drivers/macab/MacabResultSet.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSet.cxx
@@ -885,7 +885,7 @@ Any SAL_CALL MacabResultSet::getBookmark()
{
if(uidField->type == kABStringProperty)
{
- return makeAny(CFStringToOUString( static_cast<CFStringRef>(uidField->value) ));
+ return Any(CFStringToOUString( static_cast<CFStringRef>(uidField->value) ));
}
}
}
diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx
index a2fb748db7ac..95b922ce6bc7 100644
--- a/connectivity/source/drivers/macab/MacabStatement.cxx
+++ b/connectivity/source/drivers/macab/MacabStatement.cxx
@@ -472,7 +472,7 @@ Any SAL_CALL MacabCommonStatement::getWarnings( )
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
- return makeAny(m_aLastWarning);
+ return Any(m_aLastWarning);
}
void SAL_CALL MacabCommonStatement::clearWarnings( )
diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx
index 41fbe634cc34..2012afd8bbc5 100644
--- a/extensions/source/config/ldap/ldapuserprofilebe.cxx
+++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx
@@ -93,7 +93,7 @@ bool LdapUserProfileBe::readLdapConfiguration(
uno::Reference< lang::XMultiServiceFactory > xCfgProvider(
css::configuration::theDefaultProvider::get(context));
- css::beans::NamedValue aPath("nodepath", uno::makeAny(OUString("org.openoffice.LDAP/UserDirectory")) );
+ css::beans::NamedValue aPath("nodepath", uno::Any(OUString("org.openoffice.LDAP/UserDirectory")) );
uno::Sequence< uno::Any > aArgs{ uno::Any(aPath) };
@@ -172,16 +172,16 @@ css::uno::Any LdapUserProfileBe::getPropertyValue(
}
LdapData::iterator k(data_.find(PropertyName.copy(i, j - i)));
if (k != data_.end()) {
- return css::uno::makeAny(
+ return css::uno::Any(
css::beans::Optional< css::uno::Any >(
- true, css::uno::makeAny(k->second)));
+ true, css::uno::Any(k->second)));
}
if (j == PropertyName.getLength()) {
break;
}
i = j + 1;
}
- return css::uno::makeAny(css::beans::Optional< css::uno::Any >());
+ return css::uno::Any(css::beans::Optional< css::uno::Any >());
}
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) );
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 567db1d1fd52..405c279f315f 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -474,21 +474,21 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlDropdown)
{
uno::Sequence<beans::PropertyValues> aListItems = {
{
- comphelper::makePropertyValue("DisplayText", uno::makeAny(OUString("red"))),
- comphelper::makePropertyValue("Value", uno::makeAny(OUString("R"))),
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("red"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("R"))),
},
{
- comphelper::makePropertyValue("DisplayText", uno::makeAny(OUString("green"))),
- comphelper::makePropertyValue("Value", uno::makeAny(OUString("G"))),
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("green"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("G"))),
},
{
- comphelper::makePropertyValue("DisplayText", uno::makeAny(OUString("blue"))),
- comphelper::makePropertyValue("Value", uno::makeAny(OUString("B"))),
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("blue"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("B"))),
},
};
// Without the accompanying fix in place, this test would have failed with:
// An uncaught exception of type com.sun.star.beans.UnknownPropertyException
- xContentControlProps->setPropertyValue("ListItems", uno::makeAny(aListItems));
+ xContentControlProps->setPropertyValue("ListItems", uno::Any(aListItems));
}
xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
diff --git a/toolkit/qa/cppunit/EventContainer.cxx b/toolkit/qa/cppunit/EventContainer.cxx
index 7e2cb15157b6..ad62f93105e8 100644
--- a/toolkit/qa/cppunit/EventContainer.cxx
+++ b/toolkit/qa/cppunit/EventContainer.cxx
@@ -63,10 +63,10 @@ CPPUNIT_TEST_FIXTURE(EventContainerTest, testInsertOrder)
script::ScriptEventDescriptor descr2;
script::ScriptEventDescriptor descr3;
script::ScriptEventDescriptor descr4;
- xEvents->insertByName("b", makeAny(descr1));
- xEvents->insertByName("a", makeAny(descr2));
- xEvents->insertByName("1", makeAny(descr3));
- xEvents->insertByName("A", makeAny(descr4));
+ xEvents->insertByName("b", Any(descr1));
+ xEvents->insertByName("a", Any(descr2));
+ xEvents->insertByName("1", Any(descr3));
+ xEvents->insertByName("A", Any(descr4));
Sequence<OUString> aEventNames(xEvents->getElementNames());
sal_Int32 nEventCount = aEventNames.getLength();