summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-04 11:59:23 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-05-04 11:59:23 +0200
commit6e70103da07ec67b1c1f106a8fcd064e3df97271 (patch)
tree091834cdeb1358b9b3b0c3416f8672cc7cfb26d0 /connectivity/source
parent019a0fbdd860994ba727f19eba0879136406d0f9 (diff)
While at it, delete Any functions on sal_Bool*
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of sal_Bool across the code base Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/postgresql/pq_databasemetadata.cxx5
-rw-r--r--connectivity/source/drivers/postgresql/pq_resultset.cxx5
-rw-r--r--connectivity/source/drivers/postgresql/pq_updateableresultset.hxx5
-rw-r--r--connectivity/source/drivers/postgresql/pq_xcolumns.cxx7
-rw-r--r--connectivity/source/drivers/postgresql/pq_xindexes.cxx12
5 files changed, 15 insertions, 19 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index a7e32f7d611e..fea97b414a11 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -2469,7 +2469,7 @@ namespace
OUString currentSchema = xRow->getString( C_SCHEMA );
OUString currentTable = xRow->getString( C_TABLENAME );
OUString currentIndexName = xRow->getString( C_INDEXNAME );
- sal_Bool isNonUnique = ! xRow->getBoolean( C_IS_UNIQUE );
+ bool isNonUnique = ! xRow->getBoolean( C_IS_UNIQUE );
bool isPrimary = xRow->getBoolean( C_IS_PRIMARY );
(void)isPrimary;
sal_Int32 indexType = xRow->getBoolean( C_IS_CLUSTERED ) ?
@@ -2490,8 +2490,7 @@ namespace
result[R_TABLE_SCHEM] = makeAny(currentSchema);
result[R_TABLE_NAME] = makeAny(currentTable);
result[R_INDEX_NAME] = makeAny(currentIndexName);
- result[R_NON_UNIQUE] =
- Any( &isNonUnique, cppu::UnoType<bool>::get() );
+ result[R_NON_UNIQUE] <<= isNonUnique;
result[R_TYPE] = makeAny( indexType );
result[R_COLUMN_NAME] = makeAny( rowColumn->getString(2) );
sal_Int32 nPos = (sal_Int32)(findIt - columns.begin() +1); // MSVC++ nonsense
diff --git a/connectivity/source/drivers/postgresql/pq_resultset.cxx b/connectivity/source/drivers/postgresql/pq_resultset.cxx
index fd2b4d435ea8..4cc7254b2523 100644
--- a/connectivity/source/drivers/postgresql/pq_resultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_resultset.cxx
@@ -92,16 +92,15 @@ ResultSet::ResultSet( const ::rtl::Reference< RefCountedMutex > & refMutex,
m_ppSettings( ppSettings )
{
// LEM TODO: shouldn't these things be inherited from the statement or something like that?
- sal_Bool b = false;
// 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(
com::sun::star::sdbc::FetchDirection::UNKNOWN);
// No escape processing for now
- m_props[ BASERESULTSET_ESCAPE_PROCESSING ] = Any( &b, cppu::UnoType<bool>::get() );
+ m_props[ BASERESULTSET_ESCAPE_PROCESSING ] <<= false;
// Bookmarks not implemented for now
- m_props[ BASERESULTSET_IS_BOOKMARKABLE ] = Any( &b, cppu::UnoType<bool>::get() );
+ m_props[ BASERESULTSET_IS_BOOKMARKABLE ] <<= false;
m_props[ BASERESULTSET_RESULT_SET_CONCURRENCY ] = makeAny(
com::sun::star::sdbc::ResultSetConcurrency::READ_ONLY );
m_props[ BASERESULTSET_RESULT_SET_TYPE ] = makeAny(
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
index 4131e3239a00..2181efd664b6 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
@@ -94,16 +94,15 @@ protected:
// Why is an updatable ResultSet a sequenceresultset in the first place?
// This seems to imply that the whole data is fetched once and kept in memory. BAAAAD.
// LEM TODO: shouldn't these things be inherited from the statement or something like that?
- sal_Bool b = false;
// 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 ] = com::sun::star::uno::makeAny(
com::sun::star::sdbc::FetchDirection::UNKNOWN);
// No escape processing for now
- m_props[ BASERESULTSET_ESCAPE_PROCESSING ] = com::sun::star::uno::Any( &b, cppu::UnoType<bool>::get() );
+ m_props[ BASERESULTSET_ESCAPE_PROCESSING ] <<= false;
// Bookmarks not implemented for now
- m_props[ BASERESULTSET_IS_BOOKMARKABLE ] = com::sun::star::uno::Any( &b, cppu::UnoType<bool>::get() );
+ m_props[ BASERESULTSET_IS_BOOKMARKABLE ] <<= false;
m_props[ BASERESULTSET_RESULT_SET_CONCURRENCY ] = com::sun::star::uno::makeAny(
com::sun::star::sdbc::ResultSetConcurrency::UPDATABLE );
m_props[ BASERESULTSET_RESULT_SET_TYPE ] = com::sun::star::uno::makeAny(
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
index a26b582e1a3a..cf97b369d991 100644
--- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
@@ -74,8 +74,7 @@ namespace pq_sdbc_driver
static Any isCurrency( const OUString & typeName )
{
- sal_Bool b = typeName.equalsIgnoreAsciiCase("money");
- return Any( &b, cppu::UnoType<bool>::get() );
+ return Any( typeName.equalsIgnoreAsciiCase("money") );
}
// static sal_Bool isAutoIncrement8( const OUString & typeName )
@@ -86,7 +85,7 @@ static Any isCurrency( const OUString & typeName )
static Any isAutoIncrement( const OUString & defaultValue )
{
- sal_Bool ret = defaultValue.startsWith( "nextval(" );
+ bool ret = defaultValue.startsWith( "nextval(" );
// printf( "%s %d\n",
// OUStringToOString(defaultValue, RTL_TEXTENCODING_ASCII_US).getStr(),
// ret );
@@ -100,7 +99,7 @@ static Any isAutoIncrement( const OUString & defaultValue )
// {
// b = b || typeName.equalsIgnoreAsciiCaseAscii( serials[i] );
// }
- return Any ( &ret, cppu::UnoType<bool>::get() );
+ return Any ( ret );
}
Columns::Columns(
diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx
index 39824eff7a7b..7b415fe2e5c7 100644
--- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx
@@ -148,16 +148,16 @@ void Indexes::refresh()
m_schemaName, m_tableName );
(void) C_SCHEMA; (void) C_TABLENAME;
- sal_Bool isUnique = row->getBoolean( C_IS_UNIQUE );
- sal_Bool isPrimary = row->getBoolean( C_IS_PRIMARY );
- sal_Bool isClusterd = row->getBoolean( C_IS_CLUSTERED );
+ bool isUnique = row->getBoolean( C_IS_UNIQUE );
+ bool isPrimary = row->getBoolean( C_IS_PRIMARY );
+ bool isClusterd = row->getBoolean( C_IS_CLUSTERED );
Reference< com::sun::star::beans::XPropertySet > prop = pIndex;
pIndex->setPropertyValue_NoBroadcast_public(
- st.IS_UNIQUE, Any( &isUnique, cppu::UnoType<bool>::get() ) );
+ st.IS_UNIQUE, Any( isUnique ) );
pIndex->setPropertyValue_NoBroadcast_public(
- st.IS_PRIMARY_KEY_INDEX, Any( &isPrimary, cppu::UnoType<bool>::get() ) );
+ st.IS_PRIMARY_KEY_INDEX, Any( isPrimary ) );
pIndex->setPropertyValue_NoBroadcast_public(
- st.IS_CLUSTERED, Any( &isClusterd, cppu::UnoType<bool>::get() ) );
+ st.IS_CLUSTERED, Any( isClusterd ) );
pIndex->setPropertyValue_NoBroadcast_public(
st.NAME, makeAny( currentIndexName ) );