summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-04 19:32:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-04 22:29:41 +0200
commit1f110bf567bc5ea85d19a5a4d273ac072f8aaced (patch)
tree2596961923487b3e8e796ac92ae25f65d29bb46a /connectivity/source/commontools
parentcc6247a064360c943421a1cdcb996bf9a7324c2f (diff)
Just use Any ctor instead of makeAny in connectivity
Change-Id: I68e7354f094ee0e673d105dd8770a658810703d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133838 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source/commontools')
-rw-r--r--connectivity/source/commontools/FValue.cxx4
-rw-r--r--connectivity/source/commontools/TKeys.cxx2
-rw-r--r--connectivity/source/commontools/conncleanup.cxx2
-rw-r--r--connectivity/source/commontools/dbtools.cxx24
-rw-r--r--connectivity/source/commontools/dbtools2.cxx2
-rw-r--r--connectivity/source/commontools/filtermanager.cxx10
-rw-r--r--connectivity/source/commontools/parameters.cxx2
-rw-r--r--connectivity/source/commontools/paramwrapper.cxx2
-rw-r--r--connectivity/source/commontools/warningscontainer.cxx6
9 files changed, 27 insertions, 27 deletions
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 85da5fba30b3..4ac0235ac4e4 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -2285,11 +2285,11 @@ void ORowSetValue::impl_fill( const sal_Int32 _nType, bool _bNullable, const det
(*this) = _rValueSource.getLong();
break;
case DataType::CLOB:
- (*this) = css::uno::makeAny(_rValueSource.getClob());
+ (*this) = css::uno::Any(_rValueSource.getClob());
setTypeKind(DataType::CLOB);
break;
case DataType::BLOB:
- (*this) = css::uno::makeAny(_rValueSource.getBlob());
+ (*this) = css::uno::Any(_rValueSource.getBlob());
setTypeKind(DataType::BLOB);
break;
case DataType::OTHER:
diff --git a/connectivity/source/commontools/TKeys.cxx b/connectivity/source/commontools/TKeys.cxx
index ab16752677b5..1a73a349b479 100644
--- a/connectivity/source/commontools/TKeys.cxx
+++ b/connectivity/source/commontools/TKeys.cxx
@@ -236,7 +236,7 @@ sdbcx::ObjectType OKeysHelper::appendObject( const OUString& _rForName, const Re
OUString sName = xRow->getString(nColumn);
if ( !m_pElements->exists(sName) ) // this name wasn't inserted yet so it must be the new one
{
- descriptor->setPropertyValue( rPropMap.getNameByIndex( PROPERTY_ID_NAME ), makeAny( sName ) );
+ descriptor->setPropertyValue( rPropMap.getNameByIndex( PROPERTY_ID_NAME ), Any( sName ) );
sNewName = sName;
break;
}
diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx
index 210c618d6a60..52bbf2104b10 100644
--- a/connectivity/source/commontools/conncleanup.cxx
+++ b/connectivity/source/commontools/conncleanup.cxx
@@ -50,7 +50,7 @@ namespace dbtools
try
{
- xProps->setPropertyValue( ACTIVE_CONNECTION_PROPERTY_NAME, makeAny( _rxConnection ) );
+ xProps->setPropertyValue( ACTIVE_CONNECTION_PROPERTY_NAME, Any( _rxConnection ) );
m_xOriginalConnection = _rxConnection;
startPropertyListening( xProps );
}
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index ce6f3a6a03ba..7f6f5fb177c5 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -278,7 +278,7 @@ static Reference< XConnection > getConnection_allowException(
Reference<XInitialization> xIni(xDataSource, UNO_QUERY);
if (xIni.is())
{
- Sequence< Any > aArgs{ Any(NamedValue( "ParentWindow", makeAny(_rxParent) )) };
+ Sequence< Any > aArgs{ Any(NamedValue( "ParentWindow", Any(_rxParent) )) };
xIni->initialize(aArgs);
}
@@ -316,7 +316,7 @@ static Reference< XConnection > getConnection_allowException(
if (xIni.is())
{
- Sequence< Any > aArgs{ Any(NamedValue( "ParentWindow", makeAny(Reference<XWindow>()) )) };
+ Sequence< Any > aArgs{ Any(NamedValue( "ParentWindow", Any(Reference<XWindow>()) )) };
xIni->initialize(aArgs);
}
@@ -380,7 +380,7 @@ static SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet,
|| ( xExistingConn = findConnection( _rxRowSet ) ).is()
)
{
- xRowSetProps->setPropertyValue("ActiveConnection", makeAny( xExistingConn ) );
+ xRowSetProps->setPropertyValue("ActiveConnection", Any( xExistingConn ) );
// no auto disposer needed, since we did not create the connection
xConnection.reset( xExistingConn, SharedConnection::NoTakeOwnership );
@@ -425,8 +425,8 @@ static SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet,
if (!sUser.isEmpty())
{ // use user and pwd together with the url
auto aInfo(::comphelper::InitPropertySequence({
- { "user", makeAny(sUser) },
- { "password", makeAny(sPwd) }
+ { "user", Any(sUser) },
+ { "password", Any(sPwd) }
}));
xPureConnection = xDriverManager->getConnectionWithInfo( sURL, aInfo );
}
@@ -453,7 +453,7 @@ static SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet,
else
xRowSetProps->setPropertyValue(
"ActiveConnection",
- makeAny( xConnection.getTyped() )
+ Any( xConnection.getTyped() )
);
}
catch(Exception&)
@@ -683,7 +683,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect
try
{
if ( xStatementProps.is() )
- xStatementProps->setPropertyValue( "MaxRows", makeAny( sal_Int32( 0 ) ) );
+ xStatementProps->setPropertyValue( "MaxRows", Any( sal_Int32( 0 ) ) );
}
catch( const Exception& )
{
@@ -743,7 +743,7 @@ SQLException prependErrorInfo( const SQLException& _rChainedException, const Ref
{
return SQLException( _rAdditionalError, _rxContext,
_eSQLState == StandardSQLState::ERROR_UNSPECIFIED ? OUString() : getStandardSQLState( _eSQLState ),
- 0, makeAny( _rChainedException ) );
+ 0, Any( _rChainedException ) );
}
namespace
@@ -1058,13 +1058,13 @@ try
{ // (to convert an OUString into a date will not always succeed, because it might be bound to a text-column,
// but we can work with a double)
Date aDate = DBTypeConversion::toDate(getDouble(aEffectiveDefault));
- xNewProps->setPropertyValue(sPropDefaultDate, makeAny(aDate));
+ xNewProps->setPropertyValue(sPropDefaultDate, Any(aDate));
}
if (hasProperty(sPropDefaultTime, xNewProps) && !bIsString)
{ // Completely analogous to time
css::util::Time aTime = DBTypeConversion::toTime(getDouble(aEffectiveDefault));
- xNewProps->setPropertyValue(sPropDefaultTime, makeAny(aTime));
+ xNewProps->setPropertyValue(sPropDefaultTime, Any(aTime));
}
if (hasProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), xNewProps) && !bIsString)
@@ -1134,7 +1134,7 @@ try
nKey = xFormats->addNew(sNewFormat, _rLocale);
}
- xNewProps->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FORMATKEY), makeAny(nKey));
+ xNewProps->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FORMATKEY), Any(nKey));
}
// min-/max-Value
@@ -1713,7 +1713,7 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer,
Reference<XIndexAccess> xWrappedParameters = new OParameterWrapper(std::move(aNewParameterSet),xParamsAsIndicies);
aRequest.Parameters = xWrappedParameters;
aRequest.Connection = _xConnection;
- rtl::Reference<OInteractionRequest> pRequest = new OInteractionRequest(makeAny(aRequest));
+ rtl::Reference<OInteractionRequest> pRequest = new OInteractionRequest(Any(aRequest));
// some knittings
pRequest->addContinuation(pAbort);
pRequest->addContinuation(pParams);
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 74d427d248a9..b6a4a48754d9 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -814,7 +814,7 @@ void collectColumnInformation(const Reference< XConnection>& _xConnection,
{
::utl::SharedUNOComponent< XStatement > xStmt( _xConnection->createStatement() );
Reference< XPropertySet > xStatementProps( xStmt, UNO_QUERY_THROW );
- xStatementProps->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_ESCAPEPROCESSING ), makeAny( false ) );
+ xStatementProps->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_ESCAPEPROCESSING ), Any( false ) );
Reference< XResultSet > xResult( xStmt->executeQuery( sSelect ), UNO_SET_THROW );
Reference< XResultSetMetaDataSupplier > xSuppMeta( xResult, UNO_QUERY_THROW );
Reference< XResultSetMetaData > xMeta( xSuppMeta->getMetaData(), UNO_SET_THROW );
diff --git a/connectivity/source/commontools/filtermanager.cxx b/connectivity/source/commontools/filtermanager.cxx
index ee39aa87830e..07d93984f30a 100644
--- a/connectivity/source/commontools/filtermanager.cxx
+++ b/connectivity/source/commontools/filtermanager.cxx
@@ -49,7 +49,7 @@ namespace dbtools
OSL_ENSURE( m_xComponentAggregate.is(), "FilterManager::initialize: invalid arguments!" );
if ( m_xComponentAggregate.is() )
- m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_APPLYFILTER), makeAny( true ) );
+ m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_APPLYFILTER), Any( true ) );
}
@@ -108,14 +108,14 @@ namespace dbtools
[[fallthrough]];
case FilterComponent::LinkFilter:
if (propagate)
- m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FILTER), makeAny( getComposedFilter() ) );
+ m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FILTER), Any( getComposedFilter() ) );
break;
case FilterComponent::PublicHaving:
propagate = propagate && m_bApplyPublicFilter;
[[fallthrough]];
case FilterComponent::LinkHaving:
if (propagate)
- m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HAVINGCLAUSE), makeAny( getComposedHaving() ) );
+ m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HAVINGCLAUSE), Any( getComposedHaving() ) );
break;
}
}
@@ -140,9 +140,9 @@ namespace dbtools
{
// only where/if something changed
if (!getFilterComponent( FilterComponent::PublicFilter ).isEmpty())
- m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FILTER), makeAny( getComposedFilter() ) );
+ m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FILTER), Any( getComposedFilter() ) );
if (!getFilterComponent( FilterComponent::PublicHaving ).isEmpty())
- m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HAVINGCLAUSE), makeAny( getComposedHaving() ) );
+ m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HAVINGCLAUSE), Any( getComposedHaving() ) );
}
}
catch( const Exception& )
diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index 117282fbd7f3..c18fc2831ff3 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -650,7 +650,7 @@ namespace dbtools
ParametersRequest aRequest;
aRequest.Parameters = m_pOuterParameters.get();
aRequest.Connection = _rxConnection;
- rtl::Reference<OInteractionRequest> pRequest = new OInteractionRequest( makeAny( aRequest ) );
+ rtl::Reference<OInteractionRequest> pRequest = new OInteractionRequest( Any( aRequest ) );
// some knittings
pRequest->addContinuation( pAbort );
diff --git a/connectivity/source/commontools/paramwrapper.cxx b/connectivity/source/commontools/paramwrapper.cxx
index 8616277c7ddf..aab6daa243d1 100644
--- a/connectivity/source/commontools/paramwrapper.cxx
+++ b/connectivity/source/commontools/paramwrapper.cxx
@@ -313,7 +313,7 @@ namespace dbtools::param
if ( ( _nIndex < 0 ) || ( _nIndex >= static_cast<sal_Int32>(m_aParameters.size()) ) )
throw IndexOutOfBoundsException();
- return makeAny( Reference< XPropertySet >( m_aParameters[ _nIndex ] ) );
+ return Any( Reference< XPropertySet >( m_aParameters[ _nIndex ] ) );
}
diff --git a/connectivity/source/commontools/warningscontainer.cxx b/connectivity/source/commontools/warningscontainer.cxx
index 733bf5b4a450..ba7825612519 100644
--- a/connectivity/source/commontools/warningscontainer.cxx
+++ b/connectivity/source/commontools/warningscontainer.cxx
@@ -61,19 +61,19 @@ namespace dbtools
void WarningsContainer::appendWarning(const SQLException& _rWarning)
{
- lcl_concatWarnings( m_aOwnWarnings, makeAny( _rWarning ) );
+ lcl_concatWarnings( m_aOwnWarnings, Any( _rWarning ) );
}
void WarningsContainer::appendWarning( const SQLContext& _rContext )
{
- lcl_concatWarnings( m_aOwnWarnings, makeAny( _rContext ));
+ lcl_concatWarnings( m_aOwnWarnings, Any( _rContext ));
}
void WarningsContainer::appendWarning(const SQLWarning& _rWarning)
{
- lcl_concatWarnings( m_aOwnWarnings, makeAny( _rWarning ) );
+ lcl_concatWarnings( m_aOwnWarnings, Any( _rWarning ) );
}