summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-24 11:22:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-28 10:17:47 +0000
commit198c41c4fe8be4ce8a6ddab43ae0c5f17a4889ac (patch)
tree041d55126e9770b81f68fadfaaa69e82313786b3 /connectivity
parentd3981b3e8c021ee03a2ca7103a73e56cca18df81 (diff)
new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/cpool/ZPoolCollection.cxx5
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_baseresultset.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_databasemetadata.cxx12
-rw-r--r--connectivity/source/drivers/postgresql/pq_preparedstatement.cxx18
-rw-r--r--connectivity/source/drivers/postgresql/pq_resultset.cxx9
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx18
-rw-r--r--connectivity/source/drivers/postgresql/pq_updateableresultset.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_updateableresultset.hxx11
-rw-r--r--connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx2
11 files changed, 41 insertions, 48 deletions
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 1f30e6ba419c..22ac35d02d9f 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -319,10 +319,7 @@ Reference< XInterface > OPoolCollection::createWithProvider(const Reference< XMu
{
OSL_ASSERT(_rxConfProvider.is());
Sequence< Any > args(1);
- args[0] = makeAny(
- NamedValue(
- "nodepath",
- makeAny(_rPath)));
+ args[0] <<= NamedValue( "nodepath", makeAny(_rPath));
Reference< XInterface > xInterface(
_rxConfProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess",
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 5dffd4141b76..167ff3ccf3db 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2347,7 +2347,7 @@ namespace
Sequence< PropertyValue > aProps( 1 );
aProps[0].Name = "Title";
aProps[0].Handle = -1; // n/a
- aProps[0].Value = makeAny( sNewName );
+ aProps[0].Value <<= sNewName;
Sequence< Any > aValues;
aContent.executeCommand( "setPropertyValues",makeAny(aProps) ) >>= aValues;
if(aValues.getLength() && aValues[0].hasValue())
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index 8878a6a60b58..f7e2b978114a 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -1483,7 +1483,7 @@ void OResultSet::getFastPropertyValue(
switch(nHandle)
{
case PROPERTY_ID_ISBOOKMARKABLE:
- rValue = css::uno::makeAny(isBookmarkable());
+ rValue <<= isBookmarkable();
break;
case PROPERTY_ID_CURSORNAME:
rValue <<= getCursorName();
diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
index d3df89ab25df..3d96f771e346 100644
--- a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
@@ -568,7 +568,7 @@ sal_Bool BaseResultSet::convertFastPropertyValue(
{
OUString val;
bRet = ( rValue >>= val );
- m_props[nHandle] = makeAny( val );
+ m_props[nHandle] <<= val;
break;
}
case BASERESULTSET_ESCAPE_PROCESSING:
@@ -576,7 +576,7 @@ sal_Bool BaseResultSet::convertFastPropertyValue(
{
bool val(false);
bRet = ( rValue >>= val );
- m_props[nHandle] = makeAny( val );
+ m_props[nHandle] <<= val;
break;
}
case BASERESULTSET_FETCH_DIRECTION:
@@ -586,7 +586,7 @@ sal_Bool BaseResultSet::convertFastPropertyValue(
{
sal_Int32 val;
bRet = ( rValue >>= val );
- m_props[nHandle] = makeAny( val );
+ m_props[nHandle] <<= val;
break;
}
default:
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index db26ab3abb9f..43693302452d 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -2471,14 +2471,14 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getIndexInfo(
if( findIt != columns.end() && ( ! isNonUnique || ! unique ) )
{
std::vector< Any > result( 13 );
- result[R_TABLE_SCHEM] = makeAny(currentSchema);
- result[R_TABLE_NAME] = makeAny(currentTable);
- result[R_INDEX_NAME] = makeAny(currentIndexName);
+ result[R_TABLE_SCHEM] <<= currentSchema;
+ result[R_TABLE_NAME] <<= currentTable;
+ result[R_INDEX_NAME] <<= currentIndexName;
result[R_NON_UNIQUE] <<= isNonUnique;
- result[R_TYPE] = makeAny( indexType );
- result[R_COLUMN_NAME] = makeAny( rowColumn->getString(2) );
+ result[R_TYPE] <<= indexType;
+ result[R_COLUMN_NAME] <<= rowColumn->getString(2);
sal_Int32 nPos = (sal_Int32)(findIt - columns.begin() +1); // MSVC++ nonsense
- result[R_ORDINAL_POSITION] = makeAny( nPos );
+ result[R_ORDINAL_POSITION] <<= nPos;
vec.push_back( result );
}
}
diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
index f9d74ae3aa74..8bcc770d7927 100644
--- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
@@ -172,12 +172,12 @@ PreparedStatement::PreparedStatement(
, m_multipleResultUpdateCount(0)
, m_lastOidInserted( InvalidOid )
{
- m_props[PREPARED_STATEMENT_QUERY_TIME_OUT] = makeAny( (sal_Int32)0 );
- m_props[PREPARED_STATEMENT_MAX_ROWS] = makeAny( (sal_Int32)0 );
- m_props[PREPARED_STATEMENT_RESULT_SET_CONCURRENCY] = makeAny(
- css::sdbc::ResultSetConcurrency::READ_ONLY );
- m_props[PREPARED_STATEMENT_RESULT_SET_TYPE] = makeAny(
- css::sdbc::ResultSetType::SCROLL_INSENSITIVE );
+ m_props[PREPARED_STATEMENT_QUERY_TIME_OUT] <<= (sal_Int32)0;
+ m_props[PREPARED_STATEMENT_MAX_ROWS] <<= (sal_Int32)0;
+ m_props[PREPARED_STATEMENT_RESULT_SET_CONCURRENCY] <<=
+ css::sdbc::ResultSetConcurrency::READ_ONLY;
+ m_props[PREPARED_STATEMENT_RESULT_SET_TYPE] <<=
+ css::sdbc::ResultSetType::SCROLL_INSENSITIVE;
splitSQL( m_stmt, m_splittedStatement );
int elements = 0;
@@ -703,14 +703,14 @@ sal_Bool PreparedStatement::convertFastPropertyValue(
{
OUString val;
bRet = ( rValue >>= val );
- rConvertedValue = makeAny( val );
+ rConvertedValue <<= val;
break;
}
case PREPARED_STATEMENT_ESCAPE_PROCESSING:
{
bool val(false);
bRet = ( rValue >>= val );
- rConvertedValue = makeAny( val );
+ rConvertedValue <<= val;
break;
}
case PREPARED_STATEMENT_FETCH_DIRECTION:
@@ -723,7 +723,7 @@ sal_Bool PreparedStatement::convertFastPropertyValue(
{
sal_Int32 val;
bRet = ( rValue >>= val );
- rConvertedValue = makeAny( val );
+ rConvertedValue <<= val;
break;
}
default:
diff --git a/connectivity/source/drivers/postgresql/pq_resultset.cxx b/connectivity/source/drivers/postgresql/pq_resultset.cxx
index dafe25bd04f7..51b7989c613b 100644
--- a/connectivity/source/drivers/postgresql/pq_resultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_resultset.cxx
@@ -94,16 +94,13 @@ ResultSet::ResultSet( const ::rtl::Reference< RefCountedMutex > & refMutex,
// Positioned update/delete not supported, so no cursor name
// Fetch direction and size are cursor-specific things, so not used now.
// Fetch size not set
- m_props[ BASERESULTSET_FETCH_DIRECTION ] = makeAny(
- css::sdbc::FetchDirection::UNKNOWN);
+ m_props[ BASERESULTSET_FETCH_DIRECTION ] <<= css::sdbc::FetchDirection::UNKNOWN;
// No escape processing for now
m_props[ BASERESULTSET_ESCAPE_PROCESSING ] <<= false;
// Bookmarks not implemented for now
m_props[ BASERESULTSET_IS_BOOKMARKABLE ] <<= false;
- m_props[ BASERESULTSET_RESULT_SET_CONCURRENCY ] = makeAny(
- css::sdbc::ResultSetConcurrency::READ_ONLY );
- m_props[ BASERESULTSET_RESULT_SET_TYPE ] = makeAny(
- css::sdbc::ResultSetType::SCROLL_INSENSITIVE );
+ m_props[ BASERESULTSET_RESULT_SET_CONCURRENCY ] <<= css::sdbc::ResultSetConcurrency::READ_ONLY;
+ m_props[ BASERESULTSET_RESULT_SET_TYPE ] <<= css::sdbc::ResultSetType::SCROLL_INSENSITIVE;
}
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 4dc51f926029..d4351d333ff4 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -164,12 +164,12 @@ Statement::Statement( const ::rtl::Reference< RefCountedMutex > & refMutex,
, m_multipleResultUpdateCount(0)
, m_lastOidInserted(InvalidOid)
{
- m_props[STATEMENT_QUERY_TIME_OUT] = makeAny( (sal_Int32)0 );
- m_props[STATEMENT_MAX_ROWS] = makeAny( (sal_Int32)0 );
- m_props[STATEMENT_RESULT_SET_CONCURRENCY] = makeAny(
- css::sdbc::ResultSetConcurrency::READ_ONLY );
- m_props[STATEMENT_RESULT_SET_TYPE] = makeAny(
- css::sdbc::ResultSetType::SCROLL_INSENSITIVE );
+ m_props[STATEMENT_QUERY_TIME_OUT] <<= (sal_Int32)0;
+ m_props[STATEMENT_MAX_ROWS] <<= (sal_Int32)0;
+ m_props[STATEMENT_RESULT_SET_CONCURRENCY] <<=
+ css::sdbc::ResultSetConcurrency::READ_ONLY;
+ m_props[STATEMENT_RESULT_SET_TYPE] <<=
+ css::sdbc::ResultSetType::SCROLL_INSENSITIVE;
}
Statement::~Statement()
@@ -891,14 +891,14 @@ sal_Bool Statement::convertFastPropertyValue(
{
OUString val;
bRet = ( rValue >>= val );
- rConvertedValue = makeAny( val );
+ rConvertedValue <<= val;
break;
}
case STATEMENT_ESCAPE_PROCESSING:
{
bool val(false);
bRet = ( rValue >>= val );
- rConvertedValue = makeAny( val );
+ rConvertedValue <<= val;
break;
}
case STATEMENT_FETCH_DIRECTION:
@@ -911,7 +911,7 @@ sal_Bool Statement::convertFastPropertyValue(
{
sal_Int32 val;
bRet = ( rValue >>= val );
- rConvertedValue = makeAny( val );
+ rConvertedValue <<= val;
break;
}
default:
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
index c6f0b9a4e4b6..12c525f68f01 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
@@ -113,8 +113,8 @@ css::uno::Reference< css::sdbc::XCloseable > UpdateableResultSet::createFromPGRe
{
char * val = PQgetvalue( result, row, col );
- aRow[col] = makeAny(
- OUString( val, strlen( val ), ConnectionSettings::encoding ) );
+ aRow[col] <<=
+ OUString( val, strlen( val ), ConnectionSettings::encoding );
}
}
data[row] = aRow;
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
index 2d0e55823f6f..9c21521d81cd 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
@@ -97,16 +97,15 @@ protected:
// Positioned update/delete not supported, so no cursor name
// Fetch direction and size are cursor-specific things, so not used now.
// Fetch size not set
- m_props[ BASERESULTSET_FETCH_DIRECTION ] = css::uno::makeAny(
- css::sdbc::FetchDirection::UNKNOWN);
+ m_props[ BASERESULTSET_FETCH_DIRECTION ] <<= css::sdbc::FetchDirection::UNKNOWN;
// No escape processing for now
m_props[ BASERESULTSET_ESCAPE_PROCESSING ] <<= false;
// Bookmarks not implemented for now
m_props[ BASERESULTSET_IS_BOOKMARKABLE ] <<= false;
- m_props[ BASERESULTSET_RESULT_SET_CONCURRENCY ] = css::uno::makeAny(
- css::sdbc::ResultSetConcurrency::UPDATABLE );
- m_props[ BASERESULTSET_RESULT_SET_TYPE ] = css::uno::makeAny(
- css::sdbc::ResultSetType::SCROLL_INSENSITIVE );
+ m_props[ BASERESULTSET_RESULT_SET_CONCURRENCY ] <<=
+ css::sdbc::ResultSetConcurrency::UPDATABLE;
+ m_props[ BASERESULTSET_RESULT_SET_TYPE ] <<=
+ css::sdbc::ResultSetType::SCROLL_INSENSITIVE;
}
OUString buildWhereClause();
diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx
index 16759606fc86..638bf731d346 100644
--- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx
@@ -141,7 +141,7 @@ void IndexColumns::refresh()
pIndexColumn->setPropertyValue_NoBroadcast_public(
st.IS_ASCENDING , makeAny( false ) );
- m_values[ index ] = makeAny( prop );
+ m_values[ index ] <<= prop;
m_name2index[ columnName ] = index;
}
}