summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:12:07 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:20 +0100
commitc0bd59c15b4a6e8523693c8a354456b9fadb8832 (patch)
tree67a35c16019355b6eac3faff74ce63d44eddfa96 /connectivity
parent047239d5ca229bb8ad85a2d9fcd2ae7b6f35b976 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: Iefeeb51c2b101c097a8d77a4625f84baf1f2da44
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/CommonTools.cxx4
-rw-r--r--connectivity/source/commontools/ConnectionWrapper.cxx6
-rw-r--r--connectivity/source/commontools/DriversConfig.cxx4
-rw-r--r--connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx28
-rw-r--r--connectivity/source/commontools/FValue.cxx20
-rw-r--r--connectivity/source/commontools/TColumnsHelper.cxx8
-rw-r--r--connectivity/source/commontools/TConnection.cxx2
-rw-r--r--connectivity/source/commontools/TIndexes.cxx4
-rw-r--r--connectivity/source/commontools/TKeys.cxx6
-rw-r--r--connectivity/source/commontools/TSortIndex.cxx2
-rw-r--r--connectivity/source/commontools/TTableHelper.cxx8
-rw-r--r--connectivity/source/commontools/dbexception.cxx6
-rw-r--r--connectivity/source/commontools/dbmetadata.cxx2
-rw-r--r--connectivity/source/commontools/dbtools.cxx8
-rw-r--r--connectivity/source/commontools/dbtools2.cxx4
-rw-r--r--connectivity/source/commontools/parameters.cxx6
-rw-r--r--connectivity/source/commontools/sqlerror.cxx6
-rw-r--r--connectivity/source/cpool/ZDriverWrapper.cxx6
-rw-r--r--connectivity/source/cpool/ZPoolCollection.cxx2
-rw-r--r--connectivity/source/cpool/Zregistration.cxx2
-rw-r--r--connectivity/source/drivers/calc/CConnection.cxx2
-rw-r--r--connectivity/source/drivers/calc/CDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/calc/CDriver.cxx2
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx6
-rw-r--r--connectivity/source/drivers/calc/Cservices.cxx4
-rw-r--r--connectivity/source/drivers/dbase/DConnection.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DDriver.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx12
-rw-r--r--connectivity/source/drivers/dbase/DIndexIter.cxx34
-rw-r--r--connectivity/source/drivers/dbase/DResultSet.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx32
-rw-r--r--connectivity/source/drivers/dbase/DTables.cxx4
-rw-r--r--connectivity/source/drivers/dbase/Dservices.cxx4
-rw-r--r--connectivity/source/drivers/dbase/dindexnode.cxx10
-rw-r--r--connectivity/source/drivers/evoab2/EApi.cxx8
-rw-r--r--connectivity/source/drivers/evoab2/NColumns.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NConnection.cxx6
-rw-r--r--connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx20
-rw-r--r--connectivity/source/drivers/evoab2/NDriver.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NPreparedStatement.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.cxx80
-rw-r--r--connectivity/source/drivers/evoab2/NServices.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx24
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.hxx6
-rw-r--r--connectivity/source/drivers/evoab2/NTables.cxx2
-rw-r--r--connectivity/source/drivers/file/FColumns.cxx2
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx6
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/file/FDriver.cxx4
-rw-r--r--connectivity/source/drivers/file/FNoException.cxx2
-rw-r--r--connectivity/source/drivers/file/FPreparedStatement.cxx4
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx44
-rw-r--r--connectivity/source/drivers/file/FResultSetMetaData.cxx2
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx46
-rw-r--r--connectivity/source/drivers/file/FTable.cxx16
-rw-r--r--connectivity/source/drivers/file/fanalyzer.cxx2
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx58
-rw-r--r--connectivity/source/drivers/firebird/Blob.cxx2
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx14
-rw-r--r--connectivity/source/drivers/firebird/Driver.cxx8
-rw-r--r--connectivity/source/drivers/firebird/PreparedStatement.cxx10
-rw-r--r--connectivity/source/drivers/firebird/ResultSet.cxx14
-rw-r--r--connectivity/source/drivers/firebird/Services.cxx4
-rw-r--r--connectivity/source/drivers/firebird/Statement.cxx4
-rw-r--r--connectivity/source/drivers/firebird/Statement.hxx2
-rw-r--r--connectivity/source/drivers/firebird/StatementCommonBase.cxx2
-rw-r--r--connectivity/source/drivers/firebird/StatementCommonBase.hxx2
-rw-r--r--connectivity/source/drivers/firebird/SubComponent.hxx4
-rw-r--r--connectivity/source/drivers/firebird/Util.cxx4
-rw-r--r--connectivity/source/drivers/flat/EConnection.cxx2
-rw-r--r--connectivity/source/drivers/flat/EDriver.cxx2
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx4
-rw-r--r--connectivity/source/drivers/flat/Eservices.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HConnection.cxx6
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx8
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageAccess.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HTable.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HTables.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HTerminateListener.hxx2
-rw-r--r--connectivity/source/drivers/hsqldb/Hservices.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/Array.cxx18
-rw-r--r--connectivity/source/drivers/jdbc/Blob.cxx12
-rw-r--r--connectivity/source/drivers/jdbc/Boolean.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/CallableStatement.cxx54
-rw-r--r--connectivity/source/drivers/jdbc/Class.cxx10
-rw-r--r--connectivity/source/drivers/jdbc/Clob.cxx12
-rw-r--r--connectivity/source/drivers/jdbc/ContextClassLoader.cxx12
-rw-r--r--connectivity/source/drivers/jdbc/DatabaseMetaData.cxx356
-rw-r--r--connectivity/source/drivers/jdbc/Date.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx6
-rw-r--r--connectivity/source/drivers/jdbc/Exception.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/InputStream.cxx10
-rw-r--r--connectivity/source/drivers/jdbc/JBigDecimal.cxx14
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx84
-rw-r--r--connectivity/source/drivers/jdbc/JStatement.cxx78
-rw-r--r--connectivity/source/drivers/jdbc/Object.cxx46
-rw-r--r--connectivity/source/drivers/jdbc/PreparedStatement.cxx74
-rw-r--r--connectivity/source/drivers/jdbc/Reader.cxx10
-rw-r--r--connectivity/source/drivers/jdbc/Ref.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/ResultSet.cxx164
-rw-r--r--connectivity/source/drivers/jdbc/ResultSetMetaData.cxx44
-rw-r--r--connectivity/source/drivers/jdbc/SQLException.cxx10
-rw-r--r--connectivity/source/drivers/jdbc/SQLWarning.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/String.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/Throwable.cxx8
-rw-r--r--connectivity/source/drivers/jdbc/Timestamp.cxx18
-rw-r--r--connectivity/source/drivers/jdbc/jservices.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/tools.cxx28
-rw-r--r--connectivity/source/drivers/mork/MColumns.cxx2
-rw-r--r--connectivity/source/drivers/mork/MConnection.cxx6
-rw-r--r--connectivity/source/drivers/mork/MDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx2
-rw-r--r--connectivity/source/drivers/mork/MNSFolders.cxx6
-rw-r--r--connectivity/source/drivers/mork/MNSINIParser.cxx2
-rw-r--r--connectivity/source/drivers/mork/MPreparedStatement.cxx10
-rw-r--r--connectivity/source/drivers/mork/MQueryHelper.cxx10
-rw-r--r--connectivity/source/drivers/mork/MResultSet.cxx34
-rw-r--r--connectivity/source/drivers/mork/MResultSetMetaData.cxx2
-rw-r--r--connectivity/source/drivers/mork/MServices.cxx4
-rw-r--r--connectivity/source/drivers/mork/MStatement.cxx12
-rw-r--r--connectivity/source/drivers/mork/MTables.cxx2
-rw-r--r--connectivity/source/drivers/mork/MorkParser.cxx22
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx6
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx6
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx2
-rw-r--r--connectivity/source/drivers/mysql/YDriver.cxx2
-rw-r--r--connectivity/source/drivers/mysql/YTable.cxx2
-rw-r--r--connectivity/source/drivers/mysql/YTables.cxx4
-rw-r--r--connectivity/source/drivers/mysql/Yservices.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OConnection.cxx12
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaData.cxx6
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx118
-rw-r--r--connectivity/source/drivers/odbc/ODriver.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OFunctions.cxx110
-rw-r--r--connectivity/source/drivers/odbc/OPreparedStatement.cxx18
-rw-r--r--connectivity/source/drivers/odbc/ORealDriver.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx36
-rw-r--r--connectivity/source/drivers/odbc/OResultSetMetaData.cxx8
-rw-r--r--connectivity/source/drivers/odbc/OStatement.cxx10
-rw-r--r--connectivity/source/drivers/odbc/oservices.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_baseresultset.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_connection.cxx38
-rw-r--r--connectivity/source/drivers/postgresql/pq_connection.hxx8
-rw-r--r--connectivity/source/drivers/postgresql/pq_driver.cxx8
-rw-r--r--connectivity/source/drivers/postgresql/pq_preparedstatement.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_preparedstatement.hxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_resultset.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.hxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_statics.cxx16
-rw-r--r--connectivity/source/drivers/postgresql/pq_statics.hxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx8
-rw-r--r--connectivity/source/drivers/postgresql/pq_updateableresultset.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_xtable.cxx2
-rw-r--r--connectivity/source/inc/dbase/DIndex.hxx4
-rw-r--r--connectivity/source/inc/dbase/dindexnode.hxx20
-rw-r--r--connectivity/source/inc/file/fanalyzer.hxx2
-rw-r--r--connectivity/source/inc/file/fcode.hxx6
-rw-r--r--connectivity/source/inc/flat/ETable.hxx2
-rw-r--r--connectivity/source/inc/hsqldb/HStorageAccess.hxx8
-rw-r--r--connectivity/source/inc/java/ContextClassLoader.hxx2
-rw-r--r--connectivity/source/inc/java/lang/Object.hxx6
-rw-r--r--connectivity/source/inc/java/sql/DatabaseMetaData.hxx2
-rw-r--r--connectivity/source/inc/java/sql/ResultSet.hxx2
-rw-r--r--connectivity/source/inc/java/tools.hxx2
-rw-r--r--connectivity/source/inc/odbc/OBoundParam.hxx6
-rw-r--r--connectivity/source/manager/mregistration.cxx2
-rw-r--r--connectivity/source/parse/sqliterator.cxx140
-rw-r--r--connectivity/source/parse/sqlnode.cxx94
-rw-r--r--connectivity/source/resource/sharedresources.cxx6
-rw-r--r--connectivity/source/sdbcx/VCatalog.cxx8
-rw-r--r--connectivity/source/sdbcx/VDescriptor.cxx4
-rw-r--r--connectivity/source/sdbcx/VGroup.cxx4
-rw-r--r--connectivity/source/sdbcx/VIndex.cxx4
-rw-r--r--connectivity/source/sdbcx/VKey.cxx4
-rw-r--r--connectivity/source/sdbcx/VTable.cxx16
-rw-r--r--connectivity/source/sdbcx/VUser.cxx4
178 files changed, 1357 insertions, 1357 deletions
diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx
index d97bc0758564..8a0f25b2d316 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -135,7 +135,7 @@ namespace connectivity
else
{
sal_Int32 nValue = 0;
- jvmaccess::VirtualMachine* pJVM = NULL;
+ jvmaccess::VirtualMachine* pJVM = nullptr;
if ( uaJVM >>= nValue )
pJVM = reinterpret_cast< jvmaccess::VirtualMachine* > (nValue);
else
@@ -166,7 +166,7 @@ namespace connectivity
OString sClassName = OUStringToOString(_sClassName, RTL_TEXTENCODING_ASCII_US);
sClassName = sClassName.replace('.','/');
jobject out = pEnv->FindClass(sClassName.getStr());
- bRet = out != NULL;
+ bRet = out != nullptr;
pEnv->DeleteLocalRef( out );
}
}
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx
index f7b5427dbe4e..26ef016aae29 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -51,7 +51,7 @@ void OConnectionWrapper::setDelegation(Reference< XAggregation >& _rxProxyConnec
{
// transfer the (one and only) real ref to the aggregate to our member
m_xProxyConnection = _rxProxyConnection;
- _rxProxyConnection = NULL;
+ _rxProxyConnection = nullptr;
::comphelper::query_aggregation(m_xProxyConnection,m_xConnection);
m_xTypeProvider.set(m_xConnection,UNO_QUERY);
m_xUnoTunnel.set(m_xConnection,UNO_QUERY);
@@ -100,7 +100,7 @@ m_xConnection.clear();
OConnectionWrapper::~OConnectionWrapper()
{
if (m_xProxyConnection.is())
- m_xProxyConnection->setDelegator(NULL);
+ m_xProxyConnection->setDelegator(nullptr);
}
// XServiceInfo
@@ -166,7 +166,7 @@ sal_Int64 SAL_CALL OConnectionWrapper::getSomething( const Sequence< sal_Int8 >&
Sequence< sal_Int8 > OConnectionWrapper::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx
index 908159d133e8..ef7c03ab30b5 100644
--- a/connectivity/source/commontools/DriversConfig.cxx
+++ b/connectivity/source/commontools/DriversConfig.cxx
@@ -206,7 +206,7 @@ const ::comphelper::NamedValueCollection& DriversConfig::getMetaData(const OUStr
const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const OUString& _sURL,sal_Int32 _nProps) const
{
const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB);
- const ::comphelper::NamedValueCollection* pRet = NULL;
+ const ::comphelper::NamedValueCollection* pRet = nullptr;
OUString sOldPattern;
TInstalledDrivers::const_iterator aIter = rDrivers.begin();
TInstalledDrivers::const_iterator aEnd = rDrivers.end();
@@ -230,7 +230,7 @@ const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const OUString
sOldPattern = aIter->first;
}
} // for(;aIter != aEnd;++aIter)
- if ( pRet == NULL )
+ if ( pRet == nullptr )
{
static const ::comphelper::NamedValueCollection s_sEmpty;
pRet = &s_sEmpty;
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index 0662f68d8797..59507f5d4b35 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -55,8 +55,8 @@ using namespace ::com::sun::star::lang;
ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet()
:ODatabaseMetaDataResultSet_BASE(m_aMutex)
,::comphelper::OPropertyContainer(ODatabaseMetaDataResultSet_BASE::rBHelper)
- ,m_aStatement(NULL)
- ,m_xMetaData(NULL)
+ ,m_aStatement(nullptr)
+ ,m_xMetaData(nullptr)
,m_nColPos(0)
,m_bBOF(true)
,m_bEOF(true)
@@ -68,8 +68,8 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet()
ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet( MetaDataResultSetType _eType )
:ODatabaseMetaDataResultSet_BASE(m_aMutex)
,::comphelper::OPropertyContainer(ODatabaseMetaDataResultSet_BASE::rBHelper)
- ,m_aStatement(NULL)
- ,m_xMetaData(NULL)
+ ,m_aStatement(nullptr)
+ ,m_xMetaData(nullptr)
,m_nColPos(0)
,m_bBOF(true)
,m_bEOF(true)
@@ -124,7 +124,7 @@ void ODatabaseMetaDataResultSet::disposing()
OPropertySetHelper::disposing();
::osl::MutexGuard aGuard(m_aMutex);
- m_aStatement = NULL;
+ m_aStatement = nullptr;
m_xMetaData.clear();
m_aRowsIter = m_aRows.end();
m_aRows.clear();
@@ -193,12 +193,12 @@ void ODatabaseMetaDataResultSet::checkIndex(sal_Int32 columnIndex ) throw(::com:
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
@@ -271,25 +271,25 @@ Reference< XResultSetMetaData > SAL_CALL ODatabaseMetaDataResultSet::getMetaData
Reference< XArray > SAL_CALL ODatabaseMetaDataResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< XClob > SAL_CALL ODatabaseMetaDataResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< XBlob > SAL_CALL ODatabaseMetaDataResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< XRef > SAL_CALL ODatabaseMetaDataResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
@@ -889,10 +889,10 @@ namespace
{
cppu::ImplementationEntry entries[] = {
{ &ODatabaseMetaDataResultSet_CreateInstance, &ODatabaseMetaDataResultSet::getImplementationName_Static, &ODatabaseMetaDataResultSet::getSupportedServiceNames_Static,
- &cppu::createSingleComponentFactory, 0, 0 },
+ &cppu::createSingleComponentFactory, nullptr, 0 },
{ &ParameterSubstitution::create, &ParameterSubstitution::getImplementationName_Static, &ParameterSubstitution::getSupportedServiceNames_Static,
- &cppu::createSingleComponentFactory, 0, 0 },
- { 0, 0, 0, 0, 0, 0 }
+ &cppu::createSingleComponentFactory, nullptr, 0 },
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
}
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 1b92f570b9c3..e6927497e9c4 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -186,7 +186,7 @@ namespace tracing
const sal_Char* pName;
sal_Int32 nAllocatedUnits;
- AllocationType( ) : pName( NULL ), nAllocatedUnits( 0 ) { }
+ AllocationType( ) : pName( nullptr ), nAllocatedUnits( 0 ) { }
};
@@ -350,36 +350,36 @@ void ORowSetValue::free()
case DataType::LONGVARCHAR:
OSL_ENSURE(m_aValue.m_pString,"String pointer is null!");
rtl_uString_release(m_aValue.m_pString);
- m_aValue.m_pString = NULL;
+ m_aValue.m_pString = nullptr;
break;
case DataType::DATE:
delete static_cast<css::util::Date*>(m_aValue.m_pValue);
TRACE_FREE( Date )
- m_aValue.m_pValue = NULL;
+ m_aValue.m_pValue = nullptr;
break;
case DataType::TIME:
delete static_cast<css::util::Time*>(m_aValue.m_pValue);
TRACE_FREE( tools::Time )
- m_aValue.m_pValue = NULL;
+ m_aValue.m_pValue = nullptr;
break;
case DataType::TIMESTAMP:
delete static_cast<css::util::DateTime*>(m_aValue.m_pValue);
TRACE_FREE( DateTime )
- m_aValue.m_pValue = NULL;
+ m_aValue.m_pValue = nullptr;
break;
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
delete static_cast<Sequence<sal_Int8>*>(m_aValue.m_pValue);
TRACE_FREE( Sequence_sal_Int8 )
- m_aValue.m_pValue = NULL;
+ m_aValue.m_pValue = nullptr;
break;
case DataType::BLOB:
case DataType::CLOB:
case DataType::OBJECT:
delete static_cast<Any*>(m_aValue.m_pValue);
TRACE_FREE( Any )
- m_aValue.m_pValue = NULL;
+ m_aValue.m_pValue = nullptr;
break;
case DataType::BIT:
case DataType::TINYINT:
@@ -396,7 +396,7 @@ void ORowSetValue::free()
{
delete static_cast<Any*>(m_aValue.m_pValue);
TRACE_FREE( Any )
- m_aValue.m_pValue = NULL;
+ m_aValue.m_pValue = nullptr;
}
break;
@@ -2257,7 +2257,7 @@ namespace detail
virtual Sequence< sal_Int8 > getBytes() const override { return m_xRow->getBytes( m_nPos ); };
virtual Reference< XBlob > getBlob() const override { return m_xRow->getBlob( m_nPos ); };
virtual Reference< XClob > getClob() const override { return m_xRow->getClob( m_nPos ); };
- virtual Any getObject() const override { return m_xRow->getObject( m_nPos ,NULL); };
+ virtual Any getObject() const override { return m_xRow->getObject( m_nPos ,nullptr); };
virtual bool wasNull() const override { return m_xRow->wasNull( ); };
private:
@@ -2288,7 +2288,7 @@ namespace detail
virtual Sequence< sal_Int8 > getBytes() const override { return m_xColumn->getBytes(); };
virtual Reference< XBlob > getBlob() const override { return m_xColumn->getBlob(); };
virtual Reference< XClob > getClob() const override { return m_xColumn->getClob(); };
- virtual Any getObject() const override { return m_xColumn->getObject( NULL ); };
+ virtual Any getObject() const override { return m_xColumn->getObject( nullptr ); };
virtual bool wasNull() const override { return m_xColumn->wasNull( ); };
private:
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx
index 3a14693a934c..fef9a9f07c51 100644
--- a/connectivity/source/commontools/TColumnsHelper.cxx
+++ b/connectivity/source/commontools/TColumnsHelper.cxx
@@ -64,15 +64,15 @@ OColumnsHelper::OColumnsHelper( ::cppu::OWeakObject& _rParent
,const TStringVector &_rVector
,bool _bUseHardRef
) : OCollection(_rParent,_bCase,_rMutex,_rVector,false,_bUseHardRef)
- ,m_pImpl(NULL)
- ,m_pTable(NULL)
+ ,m_pImpl(nullptr)
+ ,m_pTable(nullptr)
{
}
OColumnsHelper::~OColumnsHelper()
{
delete m_pImpl;
- m_pImpl = NULL;
+ m_pImpl = nullptr;
}
@@ -180,7 +180,7 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const OUString& _rForName, const
OUString aSql = "ALTER TABLE " +
::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::eInTableDefinitions, false, false, true ) +
" ADD " +
- ::dbtools::createStandardColumnPart(descriptor,m_pTable->getConnection(),NULL,m_pTable->getTypeCreatePattern());
+ ::dbtools::createStandardColumnPart(descriptor,m_pTable->getConnection(),nullptr,m_pTable->getTypeCreatePattern());
Reference< XStatement > xStmt = m_pTable->getConnection()->createStatement( );
if ( xStmt.is() )
diff --git a/connectivity/source/commontools/TConnection.cxx b/connectivity/source/commontools/TConnection.cxx
index ab74964f0cae..e613468454b7 100644
--- a/connectivity/source/commontools/TConnection.cxx
+++ b/connectivity/source/commontools/TConnection.cxx
@@ -65,7 +65,7 @@ sal_Int64 SAL_CALL OMetaConnection::getSomething( const ::com::sun::star::uno::S
Sequence< sal_Int8 > OMetaConnection::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx
index 6b3b8d9197dd..2dc5164caa8e 100644
--- a/connectivity/source/commontools/TIndexes.cxx
+++ b/connectivity/source/commontools/TIndexes.cxx
@@ -52,7 +52,7 @@ sdbcx::ObjectType OIndexesHelper::createObject(const OUString& _rName)
{
Reference< XConnection> xConnection = m_pTable->getConnection();
if ( !xConnection.is() )
- return NULL;
+ return nullptr;
sdbcx::ObjectType xRet;
OUString aName,aQualifier;
@@ -125,7 +125,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const
{
Reference< XConnection> xConnection = m_pTable->getConnection();
if ( !xConnection.is() )
- return NULL;
+ return nullptr;
if ( m_pTable->isNew() )
return cloneDescriptor( descriptor );
diff --git a/connectivity/source/commontools/TKeys.cxx b/connectivity/source/commontools/TKeys.cxx
index f24a9f2a19a2..7856f522b568 100644
--- a/connectivity/source/commontools/TKeys.cxx
+++ b/connectivity/source/commontools/TKeys.cxx
@@ -52,7 +52,7 @@ OKeysHelper::OKeysHelper( OTableHelper* _pTable,
sdbcx::ObjectType OKeysHelper::createObject(const OUString& _rName)
{
- sdbcx::ObjectType xRet = NULL;
+ sdbcx::ObjectType xRet = nullptr;
if(!_rName.isEmpty())
{
@@ -83,7 +83,7 @@ Reference< XPropertySet > OKeysHelper::createDescriptor()
*/
OUString getKeyRuleString(bool _bUpdate,sal_Int32 _nKeyRule)
{
- const char* pKeyRule = NULL;
+ const char* pKeyRule = nullptr;
switch ( _nKeyRule )
{
case KeyRule::CASCADE:
@@ -128,7 +128,7 @@ sdbcx::ObjectType OKeysHelper::appendObject( const OUString& _rForName, const Re
{
Reference< XConnection> xConnection = m_pTable->getConnection();
if ( !xConnection.is() )
- return NULL;
+ return nullptr;
if ( m_pTable->isNew() )
{
Reference< XPropertySet > xNewDescriptor( cloneDescriptor( descriptor ) );
diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx
index 09c58ed1dc3c..59d170d1b564 100644
--- a/connectivity/source/commontools/TSortIndex.cxx
+++ b/connectivity/source/commontools/TSortIndex.cxx
@@ -126,7 +126,7 @@ void OSortIndex::Freeze()
for(;aIter != m_aKeyValues.end();++aIter)
{
delete aIter->second;
- aIter->second = NULL;
+ aIter->second = nullptr;
}
m_bFrozen = true;
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index b33f6bf49f0d..95aede3a8005 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -87,7 +87,7 @@ public:
virtual void SAL_CALL disposing( const EventObject& /*_rSource*/ ) throw (RuntimeException, std::exception) override
{
}
- void clear() { m_pComponent = NULL; }
+ void clear() { m_pComponent = nullptr; }
inline void add(const OUString& _sRefName) { m_aRefNames.insert(::std::map< OUString,bool>::value_type(_sRefName,true)); }
};
}
@@ -180,8 +180,8 @@ void SAL_CALL OTableHelper::disposing()
}
OTable_TYPEDEF::disposing();
- m_pImpl->m_xConnection = NULL;
- m_pImpl->m_xMetaData = NULL;
+ m_pImpl->m_xConnection = nullptr;
+ m_pImpl->m_xMetaData = nullptr;
}
@@ -306,7 +306,7 @@ void OTableHelper::refreshColumns()
const ColumnDesc* OTableHelper::getColumnDescription(const OUString& _sName) const
{
- const ColumnDesc* pRet = NULL;
+ const ColumnDesc* pRet = nullptr;
::std::vector< ColumnDesc >::const_iterator aEnd = m_pImpl->m_aColumnDesc.end();
for (::std::vector< ColumnDesc >::const_iterator aIter = m_pImpl->m_aColumnDesc.begin();aIter != aEnd;++aIter)
{
diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx
index 391f15374033..da440efd1a13 100644
--- a/connectivity/source/commontools/dbexception.cxx
+++ b/connectivity/source/commontools/dbexception.cxx
@@ -226,7 +226,7 @@ void SQLExceptionInfo::append( TYPE _eType, const OUString& _rErrorMessage, cons
// find the end of the current chain
Any* pChainIterator = &m_aContent;
- SQLException* pLastException = NULL;
+ SQLException* pLastException = nullptr;
const Type& aSQLExceptionType( cppu::UnoType<SQLException>::get() );
while ( pChainIterator )
{
@@ -259,7 +259,7 @@ void SQLExceptionInfo::doThrow()
}
SQLExceptionIteratorHelper::SQLExceptionIteratorHelper( const SQLExceptionInfo& _rChainStart )
- :m_pCurrent( NULL )
+ :m_pCurrent( nullptr )
,m_eCurrentType( SQLExceptionInfo::UNDEFINED )
{
if ( _rChainStart.isValid() )
@@ -315,7 +315,7 @@ const ::com::sun::star::sdbc::SQLException* SQLExceptionIteratorHelper::next()
if ( !isAssignableFrom( aTypeException, aNextElementType ) )
{
// no SQLException at all in the next chain element
- m_pCurrent = NULL;
+ m_pCurrent = nullptr;
m_eCurrentType = SQLExceptionInfo::UNDEFINED;
return pReturn;
}
diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx
index 48f1bcba26df..1498478a711f 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -113,7 +113,7 @@ namespace dbtools
{
::connectivity::SharedResources aResources;
const OUString sError( aResources.getResourceString(STR_NO_CONNECTION_GIVEN));
- throwSQLException( sError, SQL_CONNECTION_DOES_NOT_EXIST, NULL );
+ throwSQLException( sError, SQL_CONNECTION_DOES_NOT_EXIST, nullptr );
}
}
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 247b8d71dd72..16e0b1250f30 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -239,7 +239,7 @@ Reference< XDataSource> getDataSource_allowException(
const OUString& _rsTitleOrPath,
const Reference< XComponentContext >& _rxContext )
{
- ENSURE_OR_RETURN( !_rsTitleOrPath.isEmpty(), "getDataSource_allowException: invalid arg !", NULL );
+ ENSURE_OR_RETURN( !_rsTitleOrPath.isEmpty(), "getDataSource_allowException: invalid arg !", nullptr );
Reference< XDatabaseContext> xDatabaseContext = DatabaseContext::create(_rxContext);
@@ -295,7 +295,7 @@ Reference< XConnection > getConnection_allowException(
if (xConnectionCompletion.is())
{ // instantiate the default SDB interaction handler
Reference< XInteractionHandler > xHandler(
- InteractionHandler::createWithParent(_rxContext, 0), UNO_QUERY );
+ InteractionHandler::createWithParent(_rxContext, nullptr), UNO_QUERY );
xConnection = xConnectionCompletion->connectWithCompletion(xHandler);
}
}
@@ -1910,7 +1910,7 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams,
STR_UNKNOWN_PARA_TYPE,
"$position$", OUString::number(parameterIndex)
) );
- ::dbtools::throwGenericSQLException(sError,NULL);
+ ::dbtools::throwGenericSQLException(sError,nullptr);
}
}
}
@@ -1979,7 +1979,7 @@ void release(oslInterlockedCount& _refCount,
{
::osl::MutexGuard aGuard( rBHelper.rMutex );
xParent = _xInterface;
- _xInterface = NULL;
+ _xInterface = nullptr;
}
// First dispose
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 97dd6d7c1d80..632345565d91 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -927,7 +927,7 @@ sal_Int32 DBTypeConversion::convertUnicodeString( const OUString& _rSource, OStr
throw SQLException(
sMessage,
- NULL,
+ nullptr,
OUString( "22018" ),
22018,
Any()
@@ -953,7 +953,7 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const OUString& _rSour
throw SQLException(
sMessage,
- NULL,
+ nullptr,
OUString( "22001" ),
22001,
Any()
diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index 20fce17e255c..dd87288b6076 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -59,7 +59,7 @@ namespace dbtools
:m_rMutex ( _rMutex )
,m_aParameterListeners( _rMutex )
,m_xContext ( _rxContext )
- ,m_pOuterParameters ( NULL )
+ ,m_pOuterParameters ( nullptr )
,m_nInnerCount ( 0 )
,m_bUpToDate ( false )
{
@@ -98,7 +98,7 @@ namespace dbtools
m_xInnerParamColumns.clear();
if ( m_pOuterParameters.is() )
m_pOuterParameters->dispose();
- m_pOuterParameters = NULL;
+ m_pOuterParameters = nullptr;
m_nInnerCount = 0;
ParameterInformation aEmptyInfo;
m_aParameterInformation.swap( aEmptyInfo );
@@ -299,7 +299,7 @@ namespace dbtools
// remember meta information about this new parameter
::std::pair< ParameterInformation::iterator, bool > aInsertionPos =
m_aParameterInformation.insert(
- ParameterInformation::value_type( sNewParamName, ParameterMetaData( NULL ) )
+ ParameterInformation::value_type( sNewParamName, ParameterMetaData( nullptr ) )
);
OSL_ENSURE( aInsertionPos.second, "ParameterManager::classifyLinks: there already was a parameter with this name!" );
aInsertionPos.first->second.eType = eLinkedByColumnName;
diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx
index 6c5a8e179cf0..3b5eda4372e3 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -182,7 +182,7 @@ namespace connectivity
{
raiseTypedException(
_eCondition,
- NULL,
+ nullptr,
::cppu::UnoType< SQLException >::get(),
_rParamValue1,
_rParamValue2,
@@ -198,7 +198,7 @@ namespace connectivity
throw ::std::bad_cast();
// default-construct an exception of the desired type
- Any aException( NULL, _rExceptionType );
+ Any aException( nullptr, _rExceptionType );
// fill it
SQLException* pException = static_cast< SQLException* >( aException.pData );
@@ -273,7 +273,7 @@ namespace connectivity
m_bAttemptedInit = true;
m_pResources.reset( new ::comphelper::OfficeResourceBundle( m_aContext, "sdberr" ) );
- return m_pResources.get() != NULL;
+ return m_pResources.get() != nullptr;
}
SQLError::SQLError( const Reference<XComponentContext> & _rxContext )
diff --git a/connectivity/source/cpool/ZDriverWrapper.cxx b/connectivity/source/cpool/ZDriverWrapper.cxx
index d780e3181e42..af6d2fba0488 100644
--- a/connectivity/source/cpool/ZDriverWrapper.cxx
+++ b/connectivity/source/cpool/ZDriverWrapper.cxx
@@ -44,7 +44,7 @@ namespace connectivity
{
// transfer the (one and only) real ref to the aggregate to our member
m_xDriverAggregate = _rxAggregateDriver;
- _rxAggregateDriver = NULL;
+ _rxAggregateDriver = nullptr;
// a second "real" reference
m_xDriver.set(m_xDriverAggregate, UNO_QUERY);
@@ -60,11 +60,11 @@ namespace connectivity
ODriverWrapper::~ODriverWrapper()
{
if (m_xDriverAggregate.is())
- m_xDriverAggregate->setDelegator(NULL);
+ m_xDriverAggregate->setDelegator(nullptr);
if (m_pConnectionPool)
m_pConnectionPool->release();
- m_pConnectionPool = NULL;
+ m_pConnectionPool = nullptr;
}
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 1c9637a32a69..4e4bbc231863 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -297,7 +297,7 @@ OConnectionPool* OPoolCollection::getConnectionPool(const OUString& _sImplName,
const Reference< XDriver >& _xDriver,
const Reference< XInterface >& _xDriverNode)
{
- OConnectionPool *pRet = 0;
+ OConnectionPool *pRet = nullptr;
OConnectionPools::const_iterator aFind = m_aPools.find(_sImplName);
if (aFind != m_aPools.end())
pRet = aFind->second;
diff --git a/connectivity/source/cpool/Zregistration.cxx b/connectivity/source/cpool/Zregistration.cxx
index bd21ccf74659..d17800159fed 100644
--- a/connectivity/source/cpool/Zregistration.cxx
+++ b/connectivity/source/cpool/Zregistration.cxx
@@ -33,7 +33,7 @@ extern "C"
SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbpool2_component_getFactory(const sal_Char* _pImplName, void * _pServiceManager, void* /*_pRegistryKey*/)
{
- void* pRet = NULL;
+ void* pRet = nullptr;
if (OPoolCollection::getImplementationName_Static().equalsAscii(_pImplName))
{
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx
index 40270cba361d..9859e65962b5 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -266,7 +266,7 @@ Reference< XPreparedStatement > SAL_CALL OCalcConnection::prepareCall( const OUS
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
::dbtools::throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this );
- return NULL;
+ return nullptr;
}
diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
index 1cf99631b348..b58dae027531 100644
--- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
@@ -399,7 +399,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables(
OUString aName = aSheetNames[nSheet];
if ( !lcl_IsEmptyOrHidden( xSheets, aName ) && match(tableNamePattern,aName,'\0') )
{
- ODatabaseMetaDataResultSet::ORow aRow { NULL, NULL, NULL };
+ ODatabaseMetaDataResultSet::ORow aRow { nullptr, nullptr, nullptr };
aRow.reserve(6);
aRow.push_back(new ORowSetValueDecorator(aName));
aRow.push_back(new ORowSetValueDecorator(aTable));
@@ -424,7 +424,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables(
OUString aName = aDBNames[nRange];
if ( !lcl_IsUnnamed( xRanges, aName ) && match(tableNamePattern,aName,'\0') )
{
- ODatabaseMetaDataResultSet::ORow aRow { NULL, NULL, NULL };
+ ODatabaseMetaDataResultSet::ORow aRow { nullptr, nullptr, nullptr };
aRow.reserve(6);
aRow.push_back(new ORowSetValueDecorator(aName));
aRow.push_back(new ORowSetValueDecorator(aTable));
diff --git a/connectivity/source/drivers/calc/CDriver.cxx b/connectivity/source/drivers/calc/CDriver.cxx
index 55ac71457dd1..132ed1708c73 100644
--- a/connectivity/source/drivers/calc/CDriver.cxx
+++ b/connectivity/source/drivers/calc/CDriver.cxx
@@ -66,7 +66,7 @@ Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url,
throw DisposedException();
if ( ! acceptsURL(url) )
- return NULL;
+ return nullptr;
OCalcConnection* pCon = new OCalcConnection(this);
pCon->construct(url,info);
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index f353db13b07c..acc7a139e61f 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -640,10 +640,10 @@ void SAL_CALL OCalcTable::disposing()
{
OFileTable::disposing();
::osl::MutexGuard aGuard(m_aMutex);
- m_aColumns = NULL;
+ m_aColumns = nullptr;
if ( m_pConnection )
m_pConnection->releaseDoc();
- m_pConnection = NULL;
+ m_pConnection = nullptr;
}
@@ -686,7 +686,7 @@ Any SAL_CALL OCalcTable::queryInterface( const Type & rType ) throw(RuntimeExcep
Sequence< sal_Int8 > OCalcTable::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
diff --git a/connectivity/source/drivers/calc/Cservices.cxx b/connectivity/source/drivers/calc/Cservices.cxx
index edcf547705c8..83be72e0cbde 100644
--- a/connectivity/source/drivers/calc/Cservices.cxx
+++ b/connectivity/source/drivers/calc/Cservices.cxx
@@ -63,7 +63,7 @@ struct ProviderRequest
{
try
{
- xRet = creator( xServiceManager, sImplementationName,Factory, Services,0);
+ xRet = creator( xServiceManager, sImplementationName,Factory, Services,nullptr);
}
catch(...)
{
@@ -81,7 +81,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL connectivity_calc_component_getFa
void* pServiceManager,
void* /*pRegistryKey*/)
{
- void* pRet = 0;
+ void* pRet = nullptr;
if (pServiceManager)
{
ProviderRequest aReq(pServiceManager,pImplementationName);
diff --git a/connectivity/source/drivers/dbase/DConnection.cxx b/connectivity/source/drivers/dbase/DConnection.cxx
index f4881b079936..ce0d73cabf73 100644
--- a/connectivity/source/drivers/dbase/DConnection.cxx
+++ b/connectivity/source/drivers/dbase/DConnection.cxx
@@ -109,7 +109,7 @@ Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareStatement( con
Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareCall( const OUString& /*sql*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this );
- return NULL;
+ return nullptr;
}
diff --git a/connectivity/source/drivers/dbase/DDriver.cxx b/connectivity/source/drivers/dbase/DDriver.cxx
index 0a5b3018d96d..ca398f824cd5 100644
--- a/connectivity/source/drivers/dbase/DDriver.cxx
+++ b/connectivity/source/drivers/dbase/DDriver.cxx
@@ -59,7 +59,7 @@ Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const S
throw DisposedException();
if ( ! acceptsURL(url) )
- return NULL;
+ return nullptr;
ODbaseConnection* pCon = new ODbaseConnection(this);
pCon->construct(url,info);
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 4652a11feffc..f325fea7d3fe 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -57,7 +57,7 @@ IMPLEMENT_SERVICE_INFO(ODbaseIndex,"com.sun.star.sdbcx.driver.dbase.Index","com.
ODbaseIndex::ODbaseIndex(ODbaseTable* _pTable)
: OIndex(true/*_pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()*/)
- , m_pFileStream(NULL)
+ , m_pFileStream(nullptr)
, m_nCurNode(NODE_NOTFOUND)
, m_nPageCount(0)
, m_nRootPage(0)
@@ -72,7 +72,7 @@ ODbaseIndex::ODbaseIndex( ODbaseTable* _pTable,
const NDXHeader& _rHeader,
const OUString& _rName)
: OIndex(_rName, OUString(), _rHeader.db_unique, false, false, true)
- , m_pFileStream(NULL)
+ , m_pFileStream(nullptr)
, m_aHeader(_rHeader)
, m_nCurNode(NODE_NOTFOUND)
, m_nPageCount(0)
@@ -108,7 +108,7 @@ void ODbaseIndex::refreshColumns()
Sequence< sal_Int8 > ODbaseIndex::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
@@ -137,7 +137,7 @@ ONDXPagePtr ODbaseIndex::getRoot()
{
m_nRootPage = m_aHeader.db_rootpage;
m_nPageCount = m_aHeader.db_pagecount;
- m_aRoot = CreatePage(m_nRootPage,NULL,true);
+ m_aRoot = CreatePage(m_nRootPage,nullptr,true);
}
return m_aRoot;
}
@@ -169,7 +169,7 @@ bool ODbaseIndex::openIndexFile()
}
}
- return m_pFileStream != NULL;
+ return m_pFileStream != nullptr;
}
OIndexIterator* ODbaseIndex::createIterator(OBoolOperator* pOp,
@@ -325,7 +325,7 @@ void ODbaseIndex::closeImpl()
if(m_pFileStream)
{
delete m_pFileStream;
- m_pFileStream = NULL;
+ m_pFileStream = nullptr;
}
}
diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx
index 070cf542b4ef..e77f03e2c946 100644
--- a/connectivity/source/drivers/dbase/DIndexIter.cxx
+++ b/connectivity/source/drivers/dbase/DIndexIter.cxx
@@ -104,23 +104,23 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey)
i++;
- ONDXKey* pFoundKey = NULL;
+ ONDXKey* pFoundKey = nullptr;
if (!pPage->IsLeaf())
{
// descend further
ONDXPagePtr aPage = (i==0) ? pPage->GetChild(m_pIndex)
: ((*pPage)[i-1]).GetChild(m_pIndex, pPage);
- pFoundKey = aPage.Is() ? GetFirstKey(aPage, rKey) : NULL;
+ pFoundKey = aPage.Is() ? GetFirstKey(aPage, rKey) : nullptr;
}
else if (i == pPage->Count())
{
- pFoundKey = NULL;
+ pFoundKey = nullptr;
}
else
{
pFoundKey = &(*pPage)[i].GetKey();
if (!m_pOperator->operate(pFoundKey,&rKey))
- pFoundKey = NULL;
+ pFoundKey = nullptr;
m_aCurLeaf = pPage;
m_nCurNode = pFoundKey ? i : i - 1;
@@ -131,7 +131,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey)
sal_uIntPtr OIndexIterator::GetCompare(bool bFirst)
{
- ONDXKey* pKey = NULL;
+ ONDXKey* pKey = nullptr;
sal_Int32 ePredicateType = dynamic_cast<file::OOp_COMPARE&>(*m_pOperator).getPredicateType();
if (bFirst)
@@ -154,13 +154,13 @@ sal_uIntPtr OIndexIterator::GetCompare(bool bFirst)
switch (ePredicateType)
{
case SQLFilterOperator::NOT_EQUAL:
- while ( ( ( pKey = GetNextKey() ) != NULL ) && !m_pOperator->operate(pKey,m_pOperand)) ;
+ while ( ( ( pKey = GetNextKey() ) != nullptr ) && !m_pOperator->operate(pKey,m_pOperand)) ;
break;
case SQLFilterOperator::LESS:
- while ( ( ( pKey = GetNextKey() ) != NULL ) && pKey->getValue().isNull()) ;
+ while ( ( ( pKey = GetNextKey() ) != nullptr ) && pKey->getValue().isNull()) ;
break;
case SQLFilterOperator::LESS_EQUAL:
- while ( ( pKey = GetNextKey() ) != NULL ) ;
+ while ( ( pKey = GetNextKey() ) != nullptr ) ;
break;
case SQLFilterOperator::GREATER_EQUAL:
case SQLFilterOperator::EQUAL:
@@ -169,7 +169,7 @@ sal_uIntPtr OIndexIterator::GetCompare(bool bFirst)
case SQLFilterOperator::GREATER:
pKey = GetFirstKey(m_aRoot,*m_pOperand);
if ( !pKey )
- while ( ( ( pKey = GetNextKey() ) != NULL ) && !m_pOperator->operate(pKey,m_pOperand)) ;
+ while ( ( ( pKey = GetNextKey() ) != nullptr ) && !m_pOperator->operate(pKey,m_pOperand)) ;
}
}
else
@@ -177,15 +177,15 @@ sal_uIntPtr OIndexIterator::GetCompare(bool bFirst)
switch (ePredicateType)
{
case SQLFilterOperator::NOT_EQUAL:
- while ( ( ( pKey = GetNextKey() ) != NULL ) && !m_pOperator->operate(pKey,m_pOperand))
+ while ( ( ( pKey = GetNextKey() ) != nullptr ) && !m_pOperator->operate(pKey,m_pOperand))
;
break;
case SQLFilterOperator::LESS:
case SQLFilterOperator::LESS_EQUAL:
case SQLFilterOperator::EQUAL:
- if ( ( ( pKey = GetNextKey() ) == NULL ) || !m_pOperator->operate(pKey,m_pOperand))
+ if ( ( ( pKey = GetNextKey() ) == nullptr ) || !m_pOperator->operate(pKey,m_pOperand))
{
- pKey = NULL;
+ pKey = nullptr;
m_aCurLeaf.Clear();
}
break;
@@ -213,7 +213,7 @@ sal_uIntPtr OIndexIterator::GetLike(bool bFirst)
}
ONDXKey* pKey;
- while ( ( ( pKey = GetNextKey() ) != NULL ) && !m_pOperator->operate(pKey,m_pOperand))
+ while ( ( ( pKey = GetNextKey() ) != nullptr ) && !m_pOperator->operate(pKey,m_pOperand))
;
return pKey ? pKey->GetRecord() : NODE_NOTFOUND;
}
@@ -232,9 +232,9 @@ sal_uIntPtr OIndexIterator::GetNull(bool bFirst)
}
ONDXKey* pKey;
- if ( ( ( pKey = GetNextKey() ) == NULL ) || !pKey->getValue().isNull())
+ if ( ( ( pKey = GetNextKey() ) == nullptr ) || !pKey->getValue().isNull())
{
- pKey = NULL;
+ pKey = nullptr;
m_aCurLeaf.Clear();
}
return pKey ? pKey->GetRecord() : NODE_NOTFOUND;
@@ -251,7 +251,7 @@ sal_uIntPtr OIndexIterator::GetNotNull(bool bFirst)
nRec != NODE_NOTFOUND;
nRec = GetNull(false))
;
- pKey = m_aCurLeaf.Is() ? &(*m_aCurLeaf)[m_nCurNode].GetKey() : NULL;
+ pKey = m_aCurLeaf.Is() ? &(*m_aCurLeaf)[m_nCurNode].GetKey() : nullptr;
}
else
pKey = GetNextKey();
@@ -288,7 +288,7 @@ ONDXKey* OIndexIterator::GetNextKey()
m_aCurLeaf = pPage;
m_nCurNode = 0;
}
- return m_aCurLeaf.Is() ? &(*m_aCurLeaf)[m_nCurNode].GetKey() : NULL;
+ return m_aCurLeaf.Is() ? &(*m_aCurLeaf)[m_nCurNode].GetKey() : nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx
index b16b7de7bba0..f3fc19a83921 100644
--- a/connectivity/source/drivers/dbase/DResultSet.cxx
+++ b/connectivity/source/drivers/dbase/DResultSet.cxx
@@ -163,7 +163,7 @@ bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_xInde
dbase::ODbaseIndex* pIndex = reinterpret_cast< dbase::ODbaseIndex* >( xTunnel->getSomething(dbase::ODbaseIndex::getUnoTunnelImplementationId()) );
if(pIndex)
{
- dbase::OIndexIterator* pIter = pIndex->createIterator(NULL);
+ dbase::OIndexIterator* pIter = pIndex->createIterator(nullptr);
if (pIter)
{
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index fe0750ec36bf..1098ef233957 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -447,7 +447,7 @@ void ODbaseTable::fillColumns()
ODbaseTable::ODbaseTable(sdbcx::OCollection* _pTables, ODbaseConnection* _pConnection)
: ODbaseTable_BASE(_pTables,_pConnection)
- , m_pMemoStream(NULL)
+ , m_pMemoStream(nullptr)
, m_bWriteableMemo(false)
{
// initialize the header
@@ -467,7 +467,7 @@ ODbaseTable::ODbaseTable(sdbcx::OCollection* _pTables, ODbaseConnection* _pConne
_Description,
_SchemaName,
_CatalogName)
- , m_pMemoStream(NULL)
+ , m_pMemoStream(nullptr)
, m_bWriteableMemo(false)
{
memset(&m_aHeader, 0, sizeof(m_aHeader));
@@ -494,7 +494,7 @@ void ODbaseTable::construct()
// getEntry is expected to ensure the correct file name
m_pFileStream = createStream_simpleError( sFileName, STREAM_READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
- m_bWriteable = ( m_pFileStream != NULL );
+ m_bWriteable = ( m_pFileStream != nullptr );
if ( !m_pFileStream )
{
@@ -719,7 +719,7 @@ void SAL_CALL ODbaseTable::disposing()
{
OFileTable::disposing();
::osl::MutexGuard aGuard(m_aMutex);
- m_aColumns = NULL;
+ m_aColumns = nullptr;
}
Sequence< Type > SAL_CALL ODbaseTable::getTypes( ) throw(RuntimeException, std::exception)
@@ -756,7 +756,7 @@ Any SAL_CALL ODbaseTable::queryInterface( const Type & rType ) throw(RuntimeExce
Sequence< sal_Int8 > ODbaseTable::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
@@ -1018,7 +1018,7 @@ void ODbaseTable::FileClose()
m_pMemoStream->Flush();
delete m_pMemoStream;
- m_pMemoStream = NULL;
+ m_pMemoStream = nullptr;
ODbaseTable_BASE::FileClose();
}
@@ -1430,7 +1430,7 @@ bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
m_pMemoStream->Flush();
delete m_pMemoStream;
- m_pMemoStream = NULL;
+ m_pMemoStream = nullptr;
return true;
}
@@ -1514,7 +1514,7 @@ bool ODbaseTable::InsertRow(OValueRefVector& rRow, bool bFlush, const Reference<
sal_Size nTempPos = m_nFilePos;
m_nFilePos = (sal_Size)m_aHeader.db_anz + 1;
- bool bInsertRow = UpdateBuffer( rRow, NULL, _xCols, true );
+ bool bInsertRow = UpdateBuffer( rRow, nullptr, _xCols, true );
if ( bInsertRow )
{
sal_Size nFileSize = 0, nMemoFileSize = 0;
@@ -1927,7 +1927,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow, cons
// one, because const_cast GetFormatPrecision on SvNumberFormat is not constant,
// even though it really could and should be
- const OString aDefaultValue( ::rtl::math::doubleToString( n, rtl_math_StringFormat_F, nScale, '.', NULL, 0));
+ const OString aDefaultValue( ::rtl::math::doubleToString( n, rtl_math_StringFormat_F, nScale, '.', nullptr, 0));
const sal_Int32 nValueLen = aDefaultValue.getLength();
if ( nValueLen <= nLen )
{
@@ -1963,7 +1963,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow, cons
char cNext = pData[nLen]; // Mark's scratch and replaced by 0
pData[nLen] = '\0'; // This is because the buffer is always a sign of greater ...
- sal_Size nBlockNo = strtol(pData,NULL,10); // Block number read
+ sal_Size nBlockNo = strtol(pData,nullptr,10); // Block number read
// Next initial character restore again:
pData[nLen] = cNext;
@@ -2194,7 +2194,7 @@ void ODbaseTable::alterColumn(sal_Int32 index,
if(index < 0 || index >= m_pColumns->getCount())
throw IndexOutOfBoundsException(OUString::number(index),*this);
- ODbaseTable* pNewTable = NULL;
+ ODbaseTable* pNewTable = nullptr;
try
{
OSL_ENSURE(descriptor.is(),"ODbaseTable::alterColumn: descriptor can not be null!");
@@ -2281,12 +2281,12 @@ void ODbaseTable::alterColumn(sal_Int32 index,
::dbtools::throwGenericSQLException( sError, *this );
}
// release the temp file
- pNewTable = NULL;
+ pNewTable = nullptr;
::comphelper::disposeComponent(xHoldTable);
}
else
{
- pNewTable = NULL;
+ pNewTable = nullptr;
}
FileClose();
construct();
@@ -2763,17 +2763,17 @@ bool ODbaseTable::AllocBuffer()
if (m_nBufferSize != nSize)
{
delete m_pBuffer;
- m_pBuffer = NULL;
+ m_pBuffer = nullptr;
}
// if there is no buffer available: allocate:
- if (m_pBuffer == NULL && nSize > 0)
+ if (m_pBuffer == nullptr && nSize > 0)
{
m_nBufferSize = nSize;
m_pBuffer = new sal_uInt8[m_nBufferSize+1];
}
- return m_pBuffer != NULL;
+ return m_pBuffer != nullptr;
}
bool ODbaseTable::WriteBuffer()
diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx
index ae1361e5e294..1f94999c1903 100644
--- a/connectivity/source/drivers/dbase/DTables.cxx
+++ b/connectivity/source/drivers/dbase/DTables.cxx
@@ -104,7 +104,7 @@ void ODbaseTables::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
}
catch(const Exception&)
{
- if(ODbaseTable::Drop_Static(ODbaseTable::getEntry(static_cast<OFileCatalog&>(m_rParent).getConnection(),_sElementName),false,NULL))
+ if(ODbaseTable::Drop_Static(ODbaseTable::getEntry(static_cast<OFileCatalog&>(m_rParent).getConnection(),_sElementName),false,nullptr))
return;
}
@@ -120,7 +120,7 @@ void ODbaseTables::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
STR_TABLE_NOT_DROP,
"$tablename$", _sElementName
) );
- ::dbtools::throwGenericSQLException( sError, NULL );
+ ::dbtools::throwGenericSQLException( sError, nullptr );
}
}
diff --git a/connectivity/source/drivers/dbase/Dservices.cxx b/connectivity/source/drivers/dbase/Dservices.cxx
index 35ef6b3b6c07..ee729173d056 100644
--- a/connectivity/source/drivers/dbase/Dservices.cxx
+++ b/connectivity/source/drivers/dbase/Dservices.cxx
@@ -63,7 +63,7 @@ struct ProviderRequest
{
try
{
- xRet = creator( xServiceManager, sImplementationName,Factory, Services,0);
+ xRet = creator( xServiceManager, sImplementationName,Factory, Services,nullptr);
}
catch(...)
{
@@ -81,7 +81,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbase_component_getFactory(
void* pServiceManager,
void* /*pRegistryKey*/)
{
- void* pRet = 0;
+ void* pRet = nullptr;
if (pServiceManager)
{
ProviderRequest aReq(pServiceManager,pImplementationName);
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index da6703227d97..476b7c41f966 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -76,7 +76,7 @@ ONDXPage::ONDXPage(ODbaseIndex& rInd, sal_uInt32 nPos, ONDXPage* pParent)
,nCount(0)
,aParent(pParent)
,rIndex(rInd)
- ,ppNodes(NULL)
+ ,ppNodes(nullptr)
{
sal_uInt16 nT = rIndex.getHeader().db_maxkeys;
ppNodes = new ONDXNode[nT];
@@ -821,7 +821,7 @@ ONDXPagePtr::ONDXPagePtr(const ONDXPagePtr& rRef)
:mpPage(rRef.mpPage)
,nPagePos(rRef.nPagePos)
{
- if (mpPage != 0)
+ if (mpPage != nullptr)
mpPage->AddNextRef();
}
@@ -830,7 +830,7 @@ ONDXPagePtr::ONDXPagePtr(ONDXPage* pRefPage)
:mpPage(pRefPage)
,nPagePos(0)
{
- if (mpPage != 0)
+ if (mpPage != nullptr)
mpPage->AddFirstRef();
if (pRefPage)
nPagePos = pRefPage->GetPagePos();
@@ -838,12 +838,12 @@ ONDXPagePtr::ONDXPagePtr(ONDXPage* pRefPage)
ONDXPagePtr& ONDXPagePtr::operator=(ONDXPagePtr const & rOther)
{
- if (rOther.mpPage != 0) {
+ if (rOther.mpPage != nullptr) {
rOther.mpPage->AddNextRef();
}
ONDXPage * pOldObj = mpPage;
mpPage = rOther.mpPage;
- if (pOldObj != 0) {
+ if (pOldObj != nullptr) {
pOldObj->ReleaseRef();
}
return *this;
diff --git a/connectivity/source/drivers/evoab2/EApi.cxx b/connectivity/source/drivers/evoab2/EApi.cxx
index ac77d564a049..342d446e1b88 100644
--- a/connectivity/source/drivers/evoab2/EApi.cxx
+++ b/connectivity/source/drivers/evoab2/EApi.cxx
@@ -136,19 +136,19 @@ bool EApiInit()
( eBookLibNames[ j ] ).pData,
SAL_LOADMODULE_DEFAULT );
- if( aModule == NULL)
+ if( aModule == nullptr)
continue;
if (tryLink( aModule, eBookLibNames[ j ], aCommonApiMap))
{
- if (eds_check_version( 3, 6, 0 ) != NULL)
+ if (eds_check_version( 3, 6, 0 ) != nullptr)
{
if (tryLink( aModule, eBookLibNames[ j ], aOldApiMap))
return true;
}
else if (tryLink( aModule, eBookLibNames[ j ], aNewApiMap))
{
- if (eds_check_version( 3, 7, 6 ) != NULL)
+ if (eds_check_version( 3, 7, 6 ) != nullptr)
{
if (tryLink( aModule, eBookLibNames[ j ], aClientApiMap36))
return true;
@@ -171,7 +171,7 @@ ESourceRegistry *get_e_source_registry()
{
static ESourceRegistry *theInstance;
if (!theInstance)
- theInstance = e_source_registry_new_sync(NULL, NULL);
+ theInstance = e_source_registry_new_sync(nullptr, nullptr);
return theInstance;
}
diff --git a/connectivity/source/drivers/evoab2/NColumns.cxx b/connectivity/source/drivers/evoab2/NColumns.cxx
index 3aa25bd1ff2a..812911e4e40e 100644
--- a/connectivity/source/drivers/evoab2/NColumns.cxx
+++ b/connectivity/source/drivers/evoab2/NColumns.cxx
@@ -47,7 +47,7 @@ sdbcx::ObjectType OEvoabColumns::createObject(const OUString& _rName)
sTableName,
_rName);
- sdbcx::ObjectType xRet = NULL;
+ sdbcx::ObjectType xRet = nullptr;
if (xResult.is())
{
Reference< XRow > xRow(xResult,UNO_QUERY);
diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx
index c0a593a591aa..c6d0ba21f3d8 100644
--- a/connectivity/source/drivers/evoab2/NConnection.cxx
+++ b/connectivity/source/drivers/evoab2/NConnection.cxx
@@ -44,7 +44,7 @@ OEvoabConnection::OEvoabConnection(OEvoabDriver& _rDriver)
: OSubComponent<OEvoabConnection, OConnection_BASE>( static_cast<cppu::OWeakObject*>(&_rDriver), this )
, m_rDriver(_rDriver)
, m_eSDBCAddressType(SDBCAddress::EVO_LOCAL)
- , m_xCatalog(NULL)
+ , m_xCatalog(nullptr)
{
}
@@ -162,7 +162,7 @@ Reference< XPreparedStatement > SAL_CALL OEvoabConnection::prepareStatement( con
Reference< XPreparedStatement > SAL_CALL OEvoabConnection::prepareCall( const OUString& /*sql*/ ) throw( SQLException, RuntimeException, std::exception)
{
::dbtools::throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this );
- return NULL;
+ return nullptr;
}
sal_Bool SAL_CALL OEvoabConnection::isClosed( ) throw(SQLException, RuntimeException, std::exception)
{
@@ -246,7 +246,7 @@ sal_Int32 SAL_CALL OEvoabConnection::getTransactionIsolation( ) throw(SQLExcept
Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OEvoabConnection::getTypeMap( ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFeatureNotImplementedSQLException( "XConnection::getTypeMap", *this );
- return NULL;
+ return nullptr;
}
void SAL_CALL OEvoabConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException, std::exception)
{
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index d4bccf917b40..01822b14ea27 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -43,7 +43,7 @@ namespace
{
bool equal(const char *str1, const char *str2)
{
- return str1 == 0 || str2 == 0 ? str1 == str2 : strcmp(str1, str2) == 0;
+ return str1 == nullptr || str2 == nullptr ? str1 == str2 : strcmp(str1, str2) == 0;
}
}
@@ -56,7 +56,7 @@ namespace connectivity
static sal_Int32 const s_nNULLABLE = 1;
static sal_Int32 const s_nCHAR_OCTET_LENGTH = 65535;
- static ColumnProperty **pFields=NULL;
+ static ColumnProperty **pFields=nullptr;
static guint nFields = 0;
static const char *pBlackList[] =
@@ -87,7 +87,7 @@ namespace connectivity
{
pToBeFields[nFields] = g_new0(ColumnProperty,1);
pToBeFields[nFields]->bIsSplittedValue = true;
- pToBeFields[nFields]->pField = g_param_spec_ref(g_param_spec_string (evo_addr[i].pColumnName,evo_addr[i].pColumnName,"",NULL,G_PARAM_WRITABLE));
+ pToBeFields[nFields]->pField = g_param_spec_ref(g_param_spec_string (evo_addr[i].pColumnName,evo_addr[i].pColumnName,"",nullptr,G_PARAM_WRITABLE));
nFields++;
}
}
@@ -152,7 +152,7 @@ namespace connectivity
if( n < nFields )
return pFields[n];
else
- return NULL;
+ return nullptr;
}
GType
@@ -236,7 +236,7 @@ namespace connectivity
if(pFields)
{
g_free(pFields);
- pFields=NULL;
+ pFields=nullptr;
}
}
@@ -1127,7 +1127,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
ODatabaseMetaDataResultSet::ORows aRows;
- if (eds_check_version(3, 6, 0) == NULL)
+ if (eds_check_version(3, 6, 0) == nullptr)
{
GList *pSources = e_source_registry_list_sources(get_e_source_registry(), E_SOURCE_EXTENSION_ADDRESS_BOOK);
@@ -1170,14 +1170,14 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
aRows.push_back(aRow);
}
- g_list_foreach (pSources, reinterpret_cast<GFunc>(g_object_unref), NULL);
+ g_list_foreach (pSources, reinterpret_cast<GFunc>(g_object_unref), nullptr);
g_list_free (pSources);
}
else
{
ESourceList *pSourceList;
- if( !e_book_get_addressbooks (&pSourceList, NULL) )
- pSourceList = NULL;
+ if( !e_book_get_addressbooks (&pSourceList, nullptr) )
+ pSourceList = nullptr;
GSList *g;
for( g = e_source_list_peek_groups( pSourceList ); g; g = g->next)
@@ -1232,7 +1232,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFeatureNotImplementedSQLException( "XDatabaseMetaDaza::getUDTs", *this );
- return NULL;
+ return nullptr;
}
diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx
index b46eac9828ff..0761e41c1686 100644
--- a/connectivity/source/drivers/evoab2/NDriver.cxx
+++ b/connectivity/source/drivers/evoab2/NDriver.cxx
@@ -124,7 +124,7 @@ Reference< XConnection > SAL_CALL OEvoabDriver::connect( const OUString& url, co
throw DisposedException();
if ( ! acceptsURL(url) )
- return NULL;
+ return nullptr;
OEvoabConnection* pCon = new OEvoabConnection( *this );
pCon->construct(url,info);
diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
index 1eeb64e2120f..1d5bdaf823f1 100644
--- a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx
@@ -309,7 +309,7 @@ void SAL_CALL OEvoabPreparedStatement::clearParameters( ) throw(SQLException, R
Reference< XResultSet > SAL_CALL OEvoabPreparedStatement::getResultSet( ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
sal_Int32 SAL_CALL OEvoabPreparedStatement::getUpdateCount( ) throw(SQLException, RuntimeException, std::exception)
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 5cf653aebe76..5373c2fc6c64 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -179,7 +179,7 @@ getDefaultContactAddress( EContact *pContact,int *value )
static EContactAddress*
getContactAddress( EContact *pContact, int * address_enum )
{
- EContactAddress *ec = NULL;
+ EContactAddress *ec = nullptr;
switch (*address_enum) {
case DEFAULT_ADDR_LINE1:
@@ -200,7 +200,7 @@ handleSplitAddress( EContact *pContact,GValue *pStackValue, int value )
{
EContactAddress *ec = getContactAddress(pContact,&value) ;
- if (ec==NULL)
+ if (ec==nullptr)
return true;
switch (value) {
@@ -386,7 +386,7 @@ private:
GSList *m_pContacts;
public:
OEvoabVersion36Helper()
- : m_pContacts(NULL)
+ : m_pContacts(nullptr)
{
}
@@ -399,7 +399,7 @@ public:
{
//It would be better if here we had id to begin with, see
//NDatabaseMetaData.cxx
- const char *id = NULL;
+ const char *id = nullptr;
GList *pSources = e_source_registry_list_sources(get_e_source_registry(), E_SOURCE_EXTENSION_ADDRESS_BOOK);
for (GList* liter = pSources; liter; liter = liter->next)
{
@@ -411,17 +411,17 @@ public:
break;
}
}
- g_list_foreach (pSources, reinterpret_cast<GFunc>(g_object_unref), NULL);
+ g_list_foreach (pSources, reinterpret_cast<GFunc>(g_object_unref), nullptr);
g_list_free (pSources);
if (!id)
- return NULL;
+ return nullptr;
ESource *pSource = e_source_registry_ref_source(get_e_source_registry(), id);
- EBookClient *pBook = pSource ? createClient (pSource) : NULL;
- if (pBook && !e_client_open_sync (pBook, TRUE, NULL, NULL))
+ EBookClient *pBook = pSource ? createClient (pSource) : nullptr;
+ if (pBook && !e_client_open_sync (pBook, TRUE, nullptr, nullptr))
{
g_object_unref (G_OBJECT (pBook));
- pBook = NULL;
+ pBook = nullptr;
}
if (pSource)
g_object_unref (pSource);
@@ -441,14 +441,14 @@ public:
virtual void freeContacts() override
{
e_client_util_free_object_slist(m_pContacts);
- m_pContacts = NULL;
+ m_pContacts = nullptr;
}
virtual bool executeQuery (EBook* pBook, EBookQuery* pQuery, OString &/*rPassword*/) override
{
freeContacts();
char *sexp = e_book_query_to_string( pQuery );
- bool bSuccess = e_book_client_get_contacts_sync( pBook, sexp, &m_pContacts, NULL, NULL );
+ bool bSuccess = e_book_client_get_contacts_sync( pBook, sexp, &m_pContacts, nullptr, nullptr );
g_free (sexp);
return bSuccess;
}
@@ -456,7 +456,7 @@ public:
virtual EContact *getContact(sal_Int32 nIndex) override
{
gpointer pData = g_slist_nth_data (m_pContacts, nIndex);
- return pData ? E_CONTACT (pData) : NULL;
+ return pData ? E_CONTACT (pData) : nullptr;
}
virtual sal_Int32 getNumContacts() override
@@ -466,7 +466,7 @@ public:
virtual bool hasContacts() override
{
- return m_pContacts != NULL;
+ return m_pContacts != nullptr;
}
virtual void sortContacts( const ComparisonData& _rCompData ) override
@@ -481,7 +481,7 @@ public:
protected:
virtual EBookClient * createClient( ESource *pSource )
{
- return e_book_client_new (pSource, NULL);
+ return e_book_client_new (pSource, nullptr);
}
};
@@ -490,7 +490,7 @@ class OEvoabVersion38Helper : public OEvoabVersion36Helper
protected:
virtual EBookClient * createClient( ESource *pSource ) override
{
- return e_book_client_connect_direct_sync (get_e_source_registry (), pSource, NULL, NULL);
+ return e_book_client_connect_direct_sync (get_e_source_registry (), pSource, nullptr, nullptr);
}
};
@@ -498,12 +498,12 @@ namespace {
ESource * findSource( const char *id )
{
- ESourceList *pSourceList = NULL;
+ ESourceList *pSourceList = nullptr;
- g_return_val_if_fail (id != NULL, NULL);
+ g_return_val_if_fail (id != nullptr, NULL);
- if (!e_book_get_addressbooks (&pSourceList, NULL))
- pSourceList = NULL;
+ if (!e_book_get_addressbooks (&pSourceList, nullptr))
+ pSourceList = nullptr;
for ( GSList *g = e_source_list_peek_groups (pSourceList); g; g = g->next)
{
@@ -514,13 +514,13 @@ ESource * findSource( const char *id )
return pSource;
}
}
- return NULL;
+ return nullptr;
}
bool isAuthRequired( EBook *pBook )
{
return e_source_get_property( e_book_get_source( pBook ),
- "auth" ) != NULL;
+ "auth" ) != nullptr;
}
}
@@ -532,7 +532,7 @@ private:
public:
OEvoabVersion35Helper()
- : m_pContacts(NULL)
+ : m_pContacts(nullptr)
{
}
@@ -544,11 +544,11 @@ public:
virtual EBook* openBook(const char *abname) override
{
ESource *pSource = findSource (abname);
- EBook *pBook = pSource ? e_book_new (pSource, NULL) : NULL;
- if (pBook && !e_book_open (pBook, TRUE, NULL))
+ EBook *pBook = pSource ? e_book_new (pSource, nullptr) : nullptr;
+ if (pBook && !e_book_open (pBook, TRUE, nullptr))
{
g_object_unref (G_OBJECT (pBook));
- pBook = NULL;
+ pBook = nullptr;
}
return pBook;
}
@@ -567,7 +567,7 @@ public:
virtual void freeContacts() override
{
g_list_free(m_pContacts);
- m_pContacts = NULL;
+ m_pContacts = nullptr;
}
virtual bool executeQuery (EBook* pBook, EBookQuery* pQuery, OString &rPassword) override
@@ -582,11 +582,11 @@ public:
{
OString aUser( getUserName( pBook ) );
const char *pAuth = e_source_get_property( pSource, "auth" );
- bAuthSuccess = e_book_authenticate_user( pBook, aUser.getStr(), rPassword.getStr(), pAuth, NULL );
+ bAuthSuccess = e_book_authenticate_user( pBook, aUser.getStr(), rPassword.getStr(), pAuth, nullptr );
}
if (bAuthSuccess)
- bSuccess = e_book_get_contacts( pBook, pQuery, &m_pContacts, NULL );
+ bSuccess = e_book_get_contacts( pBook, pQuery, &m_pContacts, nullptr );
return bSuccess;
}
@@ -594,7 +594,7 @@ public:
virtual EContact *getContact(sal_Int32 nIndex) override
{
gpointer pData = g_list_nth_data (m_pContacts, nIndex);
- return pData ? E_CONTACT (pData) : NULL;
+ return pData ? E_CONTACT (pData) : nullptr;
}
virtual sal_Int32 getNumContacts() override
@@ -604,7 +604,7 @@ public:
virtual bool hasContacts() override
{
- return m_pContacts != NULL;
+ return m_pContacts != nullptr;
}
virtual void sortContacts( const ComparisonData& _rCompData ) override
@@ -630,9 +630,9 @@ OEvoabResultSet::OEvoabResultSet( OCommonStatement* pStmt, OEvoabConnection *pCo
,m_nIndex(-1)
,m_nLength(0)
{
- if (eds_check_version( 3, 7, 6 ) == NULL)
+ if (eds_check_version( 3, 7, 6 ) == nullptr)
m_pVersionHelper = new OEvoabVersion38Helper;
- else if (eds_check_version( 3, 6, 0 ) == NULL)
+ else if (eds_check_version( 3, 6, 0 ) == nullptr)
m_pVersionHelper = new OEvoabVersion36Helper;
else
m_pVersionHelper = new OEvoabVersion35Helper;
@@ -720,8 +720,8 @@ void OEvoabResultSet::disposing()
::osl::MutexGuard aGuard(m_aMutex);
delete m_pVersionHelper;
- m_pVersionHelper = NULL;
- m_pStatement = NULL;
+ m_pVersionHelper = nullptr;
+ m_pStatement = nullptr;
m_xMetaData.clear();
}
@@ -791,25 +791,25 @@ sal_Int64 SAL_CALL OEvoabResultSet::getLong( sal_Int32 /*nColumnNum*/ ) throw(SQ
Reference< XArray > SAL_CALL OEvoabResultSet::getArray( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getArray", *this );
- return NULL;
+ return nullptr;
}
Reference< XClob > SAL_CALL OEvoabResultSet::getClob( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getClob", *this );
- return NULL;
+ return nullptr;
}
Reference< XBlob > SAL_CALL OEvoabResultSet::getBlob( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBlob", *this );
- return NULL;
+ return nullptr;
}
Reference< XRef > SAL_CALL OEvoabResultSet::getRef( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getRef", *this );
- return NULL;
+ return nullptr;
}
Any SAL_CALL OEvoabResultSet::getObject( sal_Int32 /*nColumnNum*/, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException, std::exception)
@@ -839,13 +839,13 @@ util::DateTime SAL_CALL OEvoabResultSet::getTimestamp( sal_Int32 /*nColumnNum*/
Reference< XInputStream > SAL_CALL OEvoabResultSet::getBinaryStream( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBinaryStream", *this );
- return NULL;
+ return nullptr;
}
Reference< XInputStream > SAL_CALL OEvoabResultSet::getCharacterStream( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getCharacterStream", *this );
- return NULL;
+ return nullptr;
}
sal_Int8 SAL_CALL OEvoabResultSet::getByte( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException, std::exception)
diff --git a/connectivity/source/drivers/evoab2/NServices.cxx b/connectivity/source/drivers/evoab2/NServices.cxx
index 116a470cce70..79ccd2f73a6e 100644
--- a/connectivity/source/drivers/evoab2/NServices.cxx
+++ b/connectivity/source/drivers/evoab2/NServices.cxx
@@ -64,7 +64,7 @@ struct ProviderRequest
{
try
{
- xRet = creator( xServiceManager, sImplementationName,Factory, Services,0);
+ xRet = creator( xServiceManager, sImplementationName,Factory, Services,nullptr);
}
catch(const ::com::sun::star::uno::Exception&)
{
@@ -83,7 +83,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL evoab2_component_getFactory(
void* pServiceManager,
void* /*pRegistryKey*/)
{
- void* pRet = 0;
+ void* pRet = nullptr;
if (pServiceManager)
{
ProviderRequest aReq(pServiceManager,pImplementationName);
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 77569c77a193..56119d9ea456 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -72,11 +72,11 @@ OCommonStatement::OCommonStatement(OEvoabConnection* _pConnection)
: OCommonStatement_IBase(m_aMutex)
, ::comphelper::OPropertyContainer(OCommonStatement_IBase::rBHelper)
, OStatement_CBase( static_cast<cppu::OWeakObject*>(_pConnection), this )
- , m_xResultSet(NULL)
+ , m_xResultSet(nullptr)
, m_pConnection(_pConnection)
, m_aParser(_pConnection->getDriver().getComponentContext())
- , m_aSQLIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser, NULL )
- , m_pParseTree(NULL)
+ , m_aSQLIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser, nullptr )
+ , m_pParseTree(nullptr)
, m_nMaxFieldSize(0)
, m_nMaxRows(0)
, m_nQueryTimeOut(0)
@@ -129,7 +129,7 @@ void OCommonStatement::disposing()
if (m_pConnection)
m_pConnection->release();
- m_pConnection = NULL;
+ m_pConnection = nullptr;
dispose_ChildImpl();
OCommonStatement_IBase::disposing();
@@ -220,11 +220,11 @@ void OCommonStatement::orderByAnalysis( const OSQLParseNode* _pOrderByClause, So
const OSQLParseNode* pOrderBy = pOrderList->getChild(i);
if ( !pOrderBy || !SQL_ISRULE( pOrderBy, ordering_spec ) )
continue;
- const OSQLParseNode* pColumnRef = pOrderBy->count() == 2 ? pOrderBy->getChild(0) : NULL;
- const OSQLParseNode* pAscDesc = pOrderBy->count() == 2 ? pOrderBy->getChild(1) : NULL;
+ const OSQLParseNode* pColumnRef = pOrderBy->count() == 2 ? pOrderBy->getChild(0) : nullptr;
+ const OSQLParseNode* pAscDesc = pOrderBy->count() == 2 ? pOrderBy->getChild(1) : nullptr;
ENSURE_OR_THROW(
- ( pColumnRef != NULL )
- && ( pAscDesc != NULL )
+ ( pColumnRef != nullptr )
+ && ( pAscDesc != nullptr )
&& SQL_ISRULE( pAscDesc, opt_asc_desc )
&& ( pAscDesc->count() < 2 ),
"ordering_spec structure error" );
@@ -248,7 +248,7 @@ void OCommonStatement::orderByAnalysis( const OSQLParseNode* _pOrderByClause, So
EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
{
- EBookQuery *pResult = NULL;
+ EBookQuery *pResult = nullptr;
ENSURE_OR_THROW( parseTree, "invalid parse tree" );
@@ -320,7 +320,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
{
const sal_Int32 nLHS = pLHS->getTokenValue().toInt64();
const sal_Int32 nRHS = pRHS->getTokenValue().toInt64();
- return ( nLHS == nRHS ) ? createTrue() : NULL;
+ return ( nLHS == nRHS ) ? createTrue() : nullptr;
}
OUString aColumnName( impl_getColumnRefColumnName_throw( *pLHS ) );
@@ -421,7 +421,7 @@ OUString OCommonStatement::getTableName()
if( OSQLParseTreeIterator::isTableNode( pAllTableNames->getChild( 0 ) ) )
OSQLParseNode::getTableComponents( pAllTableNames->getChild( 0 ),
- aCatalog,aSchema, aTableName,NULL );
+ aCatalog,aSchema, aTableName,nullptr );
else if( SQL_ISRULE( pAllTableNames->getChild( 0 ), table_ref ) )
{
@@ -430,7 +430,7 @@ OUString OCommonStatement::getTableName()
{
aTableName = OSQLParseNode::getTableRange(pAllTableNames->getChild( 0 ));
if( !aTableName.getLength() )
- OSQLParseNode::getTableComponents( pNodeForTableName, aCatalog, aSchema, aTableName,NULL);
+ OSQLParseNode::getTableComponents( pNodeForTableName, aCatalog, aSchema, aTableName,nullptr);
}
else
OSL_FAIL( "odd table layout" );
diff --git a/connectivity/source/drivers/evoab2/NStatement.hxx b/connectivity/source/drivers/evoab2/NStatement.hxx
index d7ac0f77c37f..c791cf54dbdb 100644
--- a/connectivity/source/drivers/evoab2/NStatement.hxx
+++ b/connectivity/source/drivers/evoab2/NStatement.hxx
@@ -81,7 +81,7 @@ namespace connectivity
SortDescriptor aSortOrder;
QueryData()
- :pQuery( NULL )
+ :pQuery( nullptr )
,sTable()
,eFilterType( eFilterOther )
,xSelectColumns()
@@ -90,7 +90,7 @@ namespace connectivity
}
QueryData( const QueryData& _rhs )
- :pQuery( NULL )
+ :pQuery( nullptr )
,sTable()
,eFilterType( eFilterOther )
,xSelectColumns()
@@ -115,7 +115,7 @@ namespace connectivity
~QueryData()
{
- setQuery( NULL );
+ setQuery( nullptr );
}
EBookQuery* getQuery() const { return pQuery; }
diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx
index dd18ee81670a..db5579d05faf 100644
--- a/connectivity/source/drivers/evoab2/NTables.cxx
+++ b/connectivity/source/drivers/evoab2/NTables.cxx
@@ -54,7 +54,7 @@ ObjectType OEvoabTables::createObject(const OUString& aName)
Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),aSchema,aName,aTypes);
- ObjectType xRet = NULL;
+ ObjectType xRet = nullptr;
if(xResult.is())
{
Reference< XRow > xRow(xResult,UNO_QUERY);
diff --git a/connectivity/source/drivers/file/FColumns.cxx b/connectivity/source/drivers/file/FColumns.cxx
index ac1a93fa7841..761214e3c0fe 100644
--- a/connectivity/source/drivers/file/FColumns.cxx
+++ b/connectivity/source/drivers/file/FColumns.cxx
@@ -43,7 +43,7 @@ sdbcx::ObjectType OColumns::createObject(const OUString& _rName)
Reference< XResultSet > xResult = m_pTable->getConnection()->getMetaData()->getColumns(Any(),
sSchemaName, sTableName, _rName);
- sdbcx::ObjectType xRet = NULL;
+ sdbcx::ObjectType xRet = nullptr;
if(xResult.is())
{
Reference< XRow > xRow(xResult,UNO_QUERY);
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 370588aae874..4c60592ae90d 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -247,7 +247,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OU
Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUString& /*sql*/ ) throw(SQLException, RuntimeException, std::exception)
{
throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this );
- return NULL;
+ return nullptr;
}
OUString SAL_CALL OConnection::nativeSQL( const OUString& sql ) throw(SQLException, RuntimeException, std::exception)
@@ -342,7 +342,7 @@ sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException,
Reference< XNameAccess > SAL_CALL OConnection::getTypeMap( ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
void SAL_CALL OConnection::setTypeMap( const Reference< XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException, std::exception)
@@ -422,7 +422,7 @@ sal_Int64 SAL_CALL OConnection::getSomething( const Sequence< sal_Int8 >& rId )
Sequence< sal_Int8 > OConnection::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index ecc80c022ef1..12c9e1e6eb38 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -225,7 +225,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
aURL.SetSmartURL( sUrl );
sThisContentExtension = aURL.getExtension();
- ODatabaseMetaDataResultSet::ORow aRow { NULL, NULL, NULL };
+ ODatabaseMetaDataResultSet::ORow aRow { nullptr, nullptr, nullptr };
aRow.reserve(6);
bool bNewRow = false;
@@ -1058,7 +1058,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx
index 684bf1fe2e50..56299a018dcd 100644
--- a/connectivity/source/drivers/file/FDriver.cxx
+++ b/connectivity/source/drivers/file/FDriver.cxx
@@ -189,12 +189,12 @@ Reference< XTablesSupplier > SAL_CALL OFileDriver::getDataDefinitionByConnection
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(ODriver_BASE::rBHelper.bDisposed);
- Reference< XTablesSupplier > xTab = NULL;
+ Reference< XTablesSupplier > xTab = nullptr;
Reference< ::com::sun::star::lang::XUnoTunnel> xTunnel(connection,UNO_QUERY);
if(xTunnel.is())
{
OConnection* pSearchConnection = reinterpret_cast< OConnection* >( xTunnel->getSomething(OConnection::getUnoTunnelImplementationId()) );
- OConnection* pConnection = NULL;
+ OConnection* pConnection = nullptr;
for (OWeakRefArray::iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i)
{
if (static_cast<OConnection*>( Reference< XConnection >::query(i->get().get()).get() ) == pSearchConnection)
diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx
index b5b436e5f8eb..a93eee2f7398 100644
--- a/connectivity/source/drivers/file/FNoException.cxx
+++ b/connectivity/source/drivers/file/FNoException.cxx
@@ -69,7 +69,7 @@ void OSQLAnalyzer::bindParameterRow(OValueRefRow& _pRow)
void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes)
{
- DBG_ASSERT(pParseNode != NULL,"OResultSet: interner Fehler: ungueltiger ParseNode");
+ DBG_ASSERT(pParseNode != nullptr,"OResultSet: interner Fehler: ungueltiger ParseNode");
// found parameter Name-Rule?
if (SQL_ISRULE(pParseNode,parameter))
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index 4abd1eda5ff4..1706910472e7 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -66,12 +66,12 @@ void OPreparedStatement::disposing()
OStatement_BASE2::disposing();
- m_xParamColumns = NULL;
+ m_xParamColumns = nullptr;
m_xMetaData.clear();
if(m_aParameterRow.is())
{
m_aParameterRow->get().clear();
- m_aParameterRow = NULL;
+ m_aParameterRow = nullptr;
}
}
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 59fe1072e40c..c7223c77f573 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -76,20 +76,20 @@ IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.drivers.file.ResultSet","c
OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIterator) : OResultSet_BASE(m_aMutex)
,::comphelper::OPropertyContainer(OResultSet_BASE::rBHelper)
- ,m_aAssignValues(NULL)
+ ,m_aAssignValues(nullptr)
,m_aSkipDeletedSet(this)
- ,m_pFileSet(NULL)
- ,m_pSortIndex(NULL)
- ,m_pTable(NULL)
+ ,m_pFileSet(nullptr)
+ ,m_pSortIndex(nullptr)
+ ,m_pTable(nullptr)
,m_pParseTree(pStmt->getParseTree())
- ,m_pSQLAnalyzer(NULL)
+ ,m_pSQLAnalyzer(nullptr)
,m_aSQLIterator(_aSQLIterator)
,m_nFetchSize(0)
,m_nResultSetType(ResultSetType::SCROLL_INSENSITIVE)
,m_nFetchDirection(FetchDirection::FORWARD)
,m_nResultSetConcurrency(ResultSetConcurrency::UPDATABLE)
,m_xStatement(*pStmt)
- ,m_xMetaData(NULL)
+ ,m_xMetaData(nullptr)
,m_xDBMetaData(pStmt->getOwnConnection()->getMetaData())
,m_nTextEncoding(pStmt->getOwnConnection()->getTextEncoding())
,m_nRowPos(-1)
@@ -144,10 +144,10 @@ void OResultSet::disposing()
::osl::MutexGuard aGuard(m_aMutex);
m_xStatement.clear();
m_xMetaData.clear();
- m_pParseTree = NULL;
+ m_pParseTree = nullptr;
m_xColNames.clear();
- m_xColumns = NULL;
- m_xParamColumns = NULL;
+ m_xColumns = nullptr;
+ m_xParamColumns = nullptr;
m_xColsIdx.clear();
Reference<XComponent> xComp = m_pTable;
@@ -156,10 +156,10 @@ void OResultSet::disposing()
if(m_pTable)
{
m_pTable->release();
- m_pTable = NULL;
+ m_pTable = nullptr;
}
- m_pFileSet = NULL;
+ m_pFileSet = nullptr;
DELETEZ(m_pSortIndex);
if(m_aInsertRow.is())
@@ -229,12 +229,12 @@ void OResultSet::checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
@@ -310,25 +310,25 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLEx
Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
@@ -1174,7 +1174,7 @@ void OResultSet::sortRows()
}
// create sorted Keyset
- m_pFileSet = NULL;
+ m_pFileSet = nullptr;
m_pFileSet = m_pSortIndex->CreateKeySet();
DELETEZ(m_pSortIndex);
// now access to a sorted set is possible via Index
@@ -1217,7 +1217,7 @@ bool OResultSet::OpenImpl()
m_nResultSetConcurrency = (m_pTable->isReadOnly() || isCount()) ? ResultSetConcurrency::READ_ONLY : ResultSetConcurrency::UPDATABLE;
// create new Index:
- m_pFileSet = NULL;
+ m_pFileSet = nullptr;
// position at the beginning
m_nRowPos = -1;
@@ -1258,7 +1258,7 @@ bool OResultSet::OpenImpl()
else
{
bool bDistinct = false;
- assert(m_pParseTree != 0);
+ assert(m_pParseTree != nullptr);
OSQLParseNode *pDistinct = m_pParseTree->getChild(1);
assert(m_aOrderbyColumnNumber.size() ==
@@ -1416,7 +1416,7 @@ bool OResultSet::OpenImpl()
Sequence< sal_Int8 > OResultSet::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
@@ -1633,7 +1633,7 @@ void SAL_CALL OResultSet::disposing( const EventObject& Source ) throw (RuntimeE
if(m_pTable && Source.Source == xProp)
{
m_pTable->release();
- m_pTable = NULL;
+ m_pTable = nullptr;
}
}
diff --git a/connectivity/source/drivers/file/FResultSetMetaData.cxx b/connectivity/source/drivers/file/FResultSetMetaData.cxx
index 919e23e911b0..82c501045d23 100644
--- a/connectivity/source/drivers/file/FResultSetMetaData.cxx
+++ b/connectivity/source/drivers/file/FResultSetMetaData.cxx
@@ -46,7 +46,7 @@ OResultSetMetaData::OResultSetMetaData(const ::rtl::Reference<connectivity::OSQL
OResultSetMetaData::~OResultSetMetaData()
{
- m_xColumns = NULL;
+ m_xColumns = nullptr;
}
void OResultSetMetaData::checkColumnIndex(sal_Int32 column) throw(SQLException, RuntimeException)
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 90ef22fb0c77..1b868e64f122 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -56,11 +56,11 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection )
,::comphelper::OPropertyContainer(OStatement_BASE::rBHelper)
,m_xDBMetaData(_pConnection->getMetaData())
,m_aParser( _pConnection->getDriver()->getComponentContext() )
- ,m_aSQLIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser, NULL )
+ ,m_aSQLIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser, nullptr )
,m_pConnection(_pConnection)
- ,m_pParseTree(NULL)
- ,m_pSQLAnalyzer(NULL)
- ,m_pTable(NULL)
+ ,m_pParseTree(nullptr)
+ ,m_pSQLAnalyzer(nullptr)
+ ,m_pTable(nullptr)
,m_nMaxFieldSize(0)
,m_nMaxRows(0)
,m_nQueryTimeOut(0)
@@ -117,7 +117,7 @@ void OStatement_BASE2::disposing()
if(m_aRow.is())
{
m_aRow->get().clear();
- m_aRow = NULL;
+ m_aRow = nullptr;
}
m_aSQLIterator.dispose();
@@ -125,13 +125,13 @@ void OStatement_BASE2::disposing()
if(m_pTable)
{
m_pTable->release();
- m_pTable = NULL;
+ m_pTable = nullptr;
}
if (m_pConnection)
{
m_pConnection->release();
- m_pConnection = NULL;
+ m_pConnection = nullptr;
}
dispose_ChildImpl();
@@ -139,7 +139,7 @@ void OStatement_BASE2::disposing()
if ( m_pParseTree )
{
delete m_pParseTree;
- m_pParseTree = NULL;
+ m_pParseTree = nullptr;
}
OStatement_Base::disposing();
@@ -305,7 +305,7 @@ void SAL_CALL OStatement_Base::disposing()
if(m_aEvaluateRow.is())
{
m_aEvaluateRow->get().clear();
- m_aEvaluateRow = NULL;
+ m_aEvaluateRow = nullptr;
}
OStatement_BASE::disposing();
}
@@ -364,7 +364,7 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef,
aColumnName = pColumnRef->getChild(0)->getTokenValue();
else if (pColumnRef->count() == 3)
{
- pColumnRef->getChild(2)->parseNodeToStr( aColumnName, getOwnConnection(), NULL, false, false );
+ pColumnRef->getChild(2)->parseNodeToStr( aColumnName, getOwnConnection(), nullptr, false, false );
}
else
{
@@ -498,7 +498,7 @@ void OStatement_Base::initializeResultSet(OResultSet* _pResult)
void OStatement_Base::GetAssignValues()
{
- if (m_pParseTree == NULL)
+ if (m_pParseTree == nullptr)
{
::dbtools::throwFunctionSequenceException(*this);
return;
@@ -525,7 +525,7 @@ void OStatement_Base::GetAssignValues()
OSL_ENSURE(m_pParseTree->count() >= 4,"OResultSet: Fehler im Parse Tree");
OSQLParseNode * pOptColumnCommalist = m_pParseTree->getChild(3);
- OSL_ENSURE(pOptColumnCommalist != NULL,"OResultSet: Fehler im Parse Tree");
+ OSL_ENSURE(pOptColumnCommalist != nullptr,"OResultSet: Fehler im Parse Tree");
OSL_ENSURE(SQL_ISRULE(pOptColumnCommalist,opt_column_commalist),"OResultSet: Fehler im Parse Tree");
if (pOptColumnCommalist->count() == 0)
{
@@ -540,7 +540,7 @@ void OStatement_Base::GetAssignValues()
OSL_ENSURE(pOptColumnCommalist->count() == 3,"OResultSet: Fehler im Parse Tree");
OSQLParseNode * pColumnCommalist = pOptColumnCommalist->getChild(1);
- OSL_ENSURE(pColumnCommalist != NULL,"OResultSet: Fehler im Parse Tree");
+ OSL_ENSURE(pColumnCommalist != nullptr,"OResultSet: Fehler im Parse Tree");
OSL_ENSURE(SQL_ISRULE(pColumnCommalist,column_commalist),"OResultSet: Fehler im Parse Tree");
OSL_ENSURE(pColumnCommalist->count() > 0,"OResultSet: Fehler im Parse Tree");
@@ -548,7 +548,7 @@ void OStatement_Base::GetAssignValues()
for (size_t i = 0; i < pColumnCommalist->count(); i++)
{
OSQLParseNode * pCol = pColumnCommalist->getChild(i);
- OSL_ENSURE(pCol != NULL,"OResultSet: Fehler im Parse Tree");
+ OSL_ENSURE(pCol != nullptr,"OResultSet: Fehler im Parse Tree");
aColumnNameList.push_back(pCol->getTokenValue());
}
}
@@ -557,7 +557,7 @@ void OStatement_Base::GetAssignValues()
// Values ...
OSQLParseNode * pValuesOrQuerySpec = m_pParseTree->getChild(4);
- OSL_ENSURE(pValuesOrQuerySpec != NULL,"OResultSet: pValuesOrQuerySpec darf nicht NULL sein!");
+ OSL_ENSURE(pValuesOrQuerySpec != nullptr,"OResultSet: pValuesOrQuerySpec darf nicht NULL sein!");
OSL_ENSURE(SQL_ISRULE(pValuesOrQuerySpec,values_or_query_spec),"OResultSet: ! SQL_ISRULE(pValuesOrQuerySpec,values_or_query_spec)");
OSL_ENSURE(pValuesOrQuerySpec->count() > 0,"OResultSet: pValuesOrQuerySpec->count() <= 0");
@@ -569,14 +569,14 @@ void OStatement_Base::GetAssignValues()
// List of values
OSQLParseNode * pInsertAtomCommalist = pValuesOrQuerySpec->getChild(2);
- OSL_ENSURE(pInsertAtomCommalist != NULL,"OResultSet: pInsertAtomCommalist darf nicht NULL sein!");
+ OSL_ENSURE(pInsertAtomCommalist != nullptr,"OResultSet: pInsertAtomCommalist darf nicht NULL sein!");
OSL_ENSURE(pInsertAtomCommalist->count() > 0,"OResultSet: pInsertAtomCommalist <= 0");
sal_Int32 nIndex=0;
for (size_t i = 0; i < pInsertAtomCommalist->count(); i++)
{
OSQLParseNode * pRow_Value_Const = pInsertAtomCommalist->getChild(i); // row_value_constructor
- OSL_ENSURE(pRow_Value_Const != NULL,"OResultSet: pRow_Value_Const darf nicht NULL sein!");
+ OSL_ENSURE(pRow_Value_Const != nullptr,"OResultSet: pRow_Value_Const darf nicht NULL sein!");
if(SQL_ISRULE(pRow_Value_Const,parameter))
{
ParseAssignValues(aColumnNameList,pRow_Value_Const,nIndex++); // only one Columnname allowed per loop
@@ -609,7 +609,7 @@ void OStatement_Base::GetAssignValues()
OSL_ENSURE(m_pParseTree->count() >= 4,"OResultSet: Fehler im Parse Tree");
OSQLParseNode * pAssignmentCommalist = m_pParseTree->getChild(3);
- OSL_ENSURE(pAssignmentCommalist != NULL,"OResultSet: pAssignmentCommalist == NULL");
+ OSL_ENSURE(pAssignmentCommalist != nullptr,"OResultSet: pAssignmentCommalist == NULL");
OSL_ENSURE(SQL_ISRULE(pAssignmentCommalist,assignment_commalist),"OResultSet: Fehler im Parse Tree");
OSL_ENSURE(pAssignmentCommalist->count() > 0,"OResultSet: pAssignmentCommalist->count() <= 0");
@@ -618,15 +618,15 @@ void OStatement_Base::GetAssignValues()
for (size_t i = 0; i < pAssignmentCommalist->count(); i++)
{
OSQLParseNode * pAssignment = pAssignmentCommalist->getChild(i);
- OSL_ENSURE(pAssignment != NULL,"OResultSet: pAssignment == NULL");
+ OSL_ENSURE(pAssignment != nullptr,"OResultSet: pAssignment == NULL");
OSL_ENSURE(SQL_ISRULE(pAssignment,assignment),"OResultSet: Fehler im Parse Tree");
OSL_ENSURE(pAssignment->count() == 3,"OResultSet: pAssignment->count() != 3");
OSQLParseNode * pCol = pAssignment->getChild(0);
- OSL_ENSURE(pCol != NULL,"OResultSet: pCol == NULL");
+ OSL_ENSURE(pCol != nullptr,"OResultSet: pCol == NULL");
OSQLParseNode * pComp = pAssignment->getChild(1);
- OSL_ENSURE(pComp != NULL,"OResultSet: pComp == NULL");
+ OSL_ENSURE(pComp != nullptr,"OResultSet: pComp == NULL");
OSL_ENSURE(pComp->getNodeType() == SQL_NODE_EQUAL,"OResultSet: pComp->getNodeType() != SQL_NODE_COMPARISON");
if (pComp->getTokenValue().toChar() != '=')
{
@@ -634,7 +634,7 @@ void OStatement_Base::GetAssignValues()
}
OSQLParseNode * pVal = pAssignment->getChild(2);
- OSL_ENSURE(pVal != NULL,"OResultSet: pVal == NULL");
+ OSL_ENSURE(pVal != nullptr,"OResultSet: pVal == NULL");
aList[0] = pCol->getTokenValue();
ParseAssignValues(aList,pVal,0);
}
@@ -647,7 +647,7 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< OUString>& aColumnN
OSL_ENSURE(size_t(nIndex) <= aColumnNameList.size(),"SdbFileCursor::ParseAssignValues: nIndex > aColumnNameList.GetTokenCount()");
OUString aColumnName(aColumnNameList[nIndex]);
OSL_ENSURE(aColumnName.getLength() > 0,"OResultSet: Column-Name nicht gefunden");
- OSL_ENSURE(pRow_Value_Constructor_Elem != NULL,"OResultSet: pRow_Value_Constructor_Elem darf nicht NULL sein!");
+ OSL_ENSURE(pRow_Value_Constructor_Elem != nullptr,"OResultSet: pRow_Value_Constructor_Elem darf nicht NULL sein!");
if (pRow_Value_Constructor_Elem->getNodeType() == SQL_NODE_STRING ||
pRow_Value_Constructor_Elem->getNodeType() == SQL_NODE_INTNUM ||
diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx
index 666e902f934d..dbaa9355d48a 100644
--- a/connectivity/source/drivers/file/FTable.cxx
+++ b/connectivity/source/drivers/file/FTable.cxx
@@ -38,9 +38,9 @@ using namespace ::com::sun::star::container;
OFileTable::OFileTable(sdbcx::OCollection* _pTables,OConnection* _pConnection)
: OTable_TYPEDEF(_pTables,_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())
,m_pConnection(_pConnection)
- ,m_pFileStream(NULL)
+ ,m_pFileStream(nullptr)
,m_nFilePos(0)
- ,m_pBuffer(NULL)
+ ,m_pBuffer(nullptr)
,m_nBufferSize(0)
,m_bWriteable(false)
{
@@ -61,9 +61,9 @@ OFileTable::OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection,
_SchemaName,
_CatalogName)
, m_pConnection(_pConnection)
- , m_pFileStream(NULL)
+ , m_pFileStream(nullptr)
, m_nFilePos(0)
- , m_pBuffer(NULL)
+ , m_pBuffer(nullptr)
, m_nBufferSize(0)
, m_bWriteable(false)
{
@@ -126,7 +126,7 @@ void SAL_CALL OFileTable::disposing()
Sequence< sal_Int8 > OFileTable::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
@@ -156,12 +156,12 @@ void OFileTable::FileClose()
m_pFileStream->Flush();
delete m_pFileStream;
- m_pFileStream = NULL;
+ m_pFileStream = nullptr;
if (m_pBuffer)
{
delete[] m_pBuffer;
- m_pBuffer = NULL;
+ m_pBuffer = nullptr;
}
}
@@ -207,7 +207,7 @@ SvStream* OFileTable::createStream_simpleError( const OUString& _rFileName, Stre
if (pReturn && (ERRCODE_NONE != pReturn->GetErrorCode()))
{
delete pReturn;
- pReturn = NULL;
+ pReturn = nullptr;
}
return pReturn;
}
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index 3c598526a63c..fe134b1803ec 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -86,7 +86,7 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode)
}
else if ( ( SQL_ISRULE(pColumnRef,general_set_fct) && pColumnRef->count() != 4 ) )
{
- m_pConnection->throwGenericSQLException(STR_QUERY_COMPLEX_COUNT,NULL);
+ m_pConnection->throwGenericSQLException(STR_QUERY_COMPLEX_COUNT,nullptr);
}
else
{
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 51cd1963530c..45037390e30e 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -60,7 +60,7 @@ OPredicateCompiler::~OPredicateCompiler()
void OPredicateCompiler::dispose()
{
Clean();
- m_orgColumns = NULL;
+ m_orgColumns = nullptr;
m_xIndexes.clear();
}
@@ -72,15 +72,15 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode)
m_nParamCounter = 0;
// analyse Parse Tree (depending on Statement-type)
// and set pointer on WHERE-clause:
- OSQLParseNode * pWhereClause = NULL;
+ OSQLParseNode * pWhereClause = nullptr;
if (SQL_ISRULE(pSQLParseNode,select_statement))
{
- OSQLParseNode * pOrderbyClause = NULL;
+ OSQLParseNode * pOrderbyClause = nullptr;
DBG_ASSERT(pSQLParseNode->count() >= 4,"OFILECursor: Fehler im Parse Tree");
OSQLParseNode * pTableExp = pSQLParseNode->getChild(3);
- DBG_ASSERT(pTableExp != NULL,"Fehler im Parse Tree");
+ DBG_ASSERT(pTableExp != nullptr,"Fehler im Parse Tree");
DBG_ASSERT(SQL_ISRULE(pTableExp,table_exp)," Fehler im Parse Tree");
DBG_ASSERT(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"Fehler im Parse Tree");
@@ -93,7 +93,7 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode)
OSQLParseNode *pColumnRef = pSelection->getChild(i)->getChild(0);
if ( SQL_ISRULE(pColumnRef,general_set_fct) && pColumnRef->count() != 4 )
{
- m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_COMPLEX_COUNT,NULL);
+ m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_COMPLEX_COUNT,nullptr);
}
}
}
@@ -123,7 +123,7 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode)
DBG_ASSERT(pWhereClause->count() == 2,"OFILECursor: Fehler im Parse Tree");
OSQLParseNode * pComparisonPredicate = pWhereClause->getChild(1);
- DBG_ASSERT(pComparisonPredicate != NULL,"OFILECursor: Fehler im Parse Tree");
+ DBG_ASSERT(pComparisonPredicate != nullptr,"OFILECursor: Fehler im Parse Tree");
execute( pComparisonPredicate );
}
@@ -137,7 +137,7 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode)
OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode)
{
- OOperand* pOperand = NULL;
+ OOperand* pOperand = nullptr;
if (pPredicateNode->count() == 3 && // Expression is bracketed
SQL_ISPUNCTUATION(pPredicateNode->getChild(0),"(") &&
SQL_ISPUNCTUATION(pPredicateNode->getChild(2),")"))
@@ -239,8 +239,8 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th
// upper, lower etc.
SQL_ISRULE(pPredicateNode->getChild(2),fold)) )
{
- m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,NULL);
- return NULL;
+ m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,nullptr);
+ return nullptr;
}
sal_Int32 ePredicateType( SQLFilterOperator::EQUAL );
@@ -265,7 +265,7 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th
execute(pPredicateNode->getChild(2));
m_aCodeList.push_back( new OOp_COMPARE(ePredicateType) );
- return NULL;
+ return nullptr;
}
@@ -289,20 +289,20 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw(
// upper, lower etc.
SQL_ISRULE(pAtom,fold)) )
{
- m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,NULL);
- return NULL;
+ m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,nullptr);
+ return nullptr;
}
if (pOptEscape->count() != 0)
{
if (pOptEscape->count() != 2)
{
- m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_LIKE_STRING,NULL);
+ m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_LIKE_STRING,nullptr);
}
OSQLParseNode *pEscNode = pOptEscape->getChild(1);
if (pEscNode->getNodeType() != SQL_NODE_STRING)
{
- m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_LIKE_STRING,NULL);
+ m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_LIKE_STRING,nullptr);
}
else
cEscape = pEscNode->getTokenValue().toChar();
@@ -316,7 +316,7 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw(
: new OOp_LIKE(cEscape);
m_aCodeList.push_back(pOperator);
- return NULL;
+ return nullptr;
}
OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException)
@@ -333,7 +333,7 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr
&& !(p2ndtValue->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(p2ndtValue,parameter))
)
{
- m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_BETWEEN,NULL);
+ m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_BETWEEN,nullptr);
}
bool bNot = SQL_ISTOKEN(pPart2->getChild(0),NOT);
@@ -389,14 +389,14 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr
- OBoolOperator* pBoolOp = NULL;
+ OBoolOperator* pBoolOp = nullptr;
if ( bNot )
pBoolOp = new OOp_OR();
else
pBoolOp = new OOp_AND();
m_aCodeList.push_back(pBoolOp);
- return NULL;
+ return nullptr;
}
OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException)
@@ -416,12 +416,12 @@ OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) thro
new OOp_ISNULL() : new OOp_ISNOTNULL();
m_aCodeList.push_back(pOperator);
- return NULL;
+ return nullptr;
}
OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException)
{
- OOperand* pOperand = NULL;
+ OOperand* pOperand = nullptr;
if (SQL_ISRULE(pPredicateNode,column_ref))
{
@@ -444,7 +444,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr
STR_INVALID_COLUMNNAME,
"$columnname$", aColumnName
) );
- ::dbtools::throwGenericSQLException( sError, NULL );
+ ::dbtools::throwGenericSQLException( sError, nullptr );
}
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCol;
try
@@ -459,7 +459,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr
STR_INVALID_COLUMNNAME,
"$columnname$", aColumnName
) );
- ::dbtools::throwGenericSQLException( sError, NULL );
+ ::dbtools::throwGenericSQLException( sError, nullptr );
}
}
catch(Exception &)
@@ -516,7 +516,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr
}
}
else
- m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,NULL);
+ m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,nullptr);
}
else if( SQL_ISRULE(pPredicateNode,fold) )
@@ -536,7 +536,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr
}
else
{
- m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,NULL);
+ m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,nullptr);
}
if (pOperand)
m_aCodeList.push_back(pOperand);
@@ -606,19 +606,19 @@ OOperand* OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) thro
bool bUpper = SQL_ISTOKEN(pPredicateNode->getChild(0),UPPER);
execute(pPredicateNode->getChild(2));
- OOperator* pOperator = NULL;
+ OOperator* pOperator = nullptr;
if ( bUpper )
pOperator = new OOp_Upper();
else
pOperator = new OOp_Lower();
m_aCodeList.push_back(pOperator);
- return NULL;
+ return nullptr;
}
OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException)
{
- OOperator* pOperator = NULL;
+ OOperator* pOperator = nullptr;
OSL_ENSURE(pPredicateNode->getChild(0)->isToken(),"The first one must be the name of the function!");
sal_Int32 nTokenId = pPredicateNode->getChild(0)->getTokenID();
@@ -897,11 +897,11 @@ OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode)
pOperator = new OOp_Locate();
break;
default:
- m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_FUNCTION_NOT_SUPPORTED,NULL);
+ m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_FUNCTION_NOT_SUPPORTED,nullptr);
}
m_aCodeList.push_back(pOperator);
- return NULL;
+ return nullptr;
}
diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx
index 6e5a8e3ebdff..922887dab1c0 100644
--- a/connectivity/source/drivers/firebird/Blob.cxx
+++ b/connectivity/source/drivers/firebird/Blob.cxx
@@ -55,7 +55,7 @@ void Blob::ensureBlobIsOpened()
&m_blobHandle,
&m_blobID,
0,
- NULL);
+ nullptr);
if (aErr)
evaluateStatusVector(m_statusVector, "isc_open_blob2", *this);
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index 06df0d6f19fe..c0e93f126295 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -84,7 +84,7 @@ Connection::Connection(FirebirdDriver* _pDriver)
, m_sConnectionURL()
, m_sFirebirdURL()
, m_bIsEmbedded(false)
- , m_xEmbeddedStorage(0)
+ , m_xEmbeddedStorage(nullptr)
, m_bIsFile(false)
, m_sUser()
, m_bIsAutoCommit(false)
@@ -92,8 +92,8 @@ Connection::Connection(FirebirdDriver* _pDriver)
, m_aTransactionIsolation(TransactionIsolation::REPEATABLE_READ)
, m_aDBHandle(0)
, m_aTransactionHandle(0)
- , m_xCatalog(0)
- , m_xMetaData(0)
+ , m_xCatalog(nullptr)
+ , m_xMetaData(nullptr)
, m_aStatements()
{
}
@@ -166,7 +166,7 @@ void Connection::construct(const ::rtl::OUString& url, const Sequence< PropertyV
bIsNewDatabase = !m_xEmbeddedStorage->hasElements();
- m_pExtractedFDBFile.reset(new ::utl::TempFile(NULL, true));
+ m_pExtractedFDBFile.reset(new ::utl::TempFile(nullptr, true));
m_sFirebirdURL = m_pExtractedFDBFile->GetFileName() + "/firebird.fdb";
SAL_INFO("connectivity.firebird", "Temporary .fdb location: " << m_sFirebirdURL);
@@ -427,7 +427,7 @@ Reference< XPreparedStatement > SAL_CALL Connection::prepareCall(
// OUString sSqlStatement (transformPreparedStatement( _sSql ));
// not implemented yet :-) a task to do
- return NULL;
+ return nullptr;
}
OUString SAL_CALL Connection::nativeSQL( const OUString& _sSql )
@@ -635,7 +635,7 @@ sal_Int32 SAL_CALL Connection::getTransactionIsolation( ) throw(SQLException, R
Reference< XNameAccess > SAL_CALL Connection::getTypeMap() throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFeatureNotImplementedSQLException( "XConnection::getTypeMap", *this );
- return 0;
+ return nullptr;
}
void SAL_CALL Connection::setTypeMap(const Reference< XNameAccess >& typeMap)
@@ -879,7 +879,7 @@ void Connection::rebuildIndexes() throw (SQLException, RuntimeException, std::ex
0, // Length: 0 for null terminated
sAlterIndex.getStr(),
FIREBIRD_SQL_DIALECT,
- NULL);
+ nullptr);
if (aErr)
evaluateStatusVector(aStatusVector,
"rebuildIndexes:isc_dsql_execute_immediate",
diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx
index 8e38cbb42eba..24054ab4e9fe 100644
--- a/connectivity/source/drivers/firebird/Driver.cxx
+++ b/connectivity/source/drivers/firebird/Driver.cxx
@@ -65,8 +65,8 @@ const OUString FirebirdDriver::our_sFirebirdMsgVar("FIREBIRD_MSG");
FirebirdDriver::FirebirdDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext)
: ODriver_BASE(m_aMutex)
, m_aContext(_rxContext)
- , m_firebirdTMPDirectory(NULL, true)
- , m_firebirdLockDirectory(NULL, true)
+ , m_firebirdTMPDirectory(nullptr, true)
+ , m_firebirdLockDirectory(nullptr, true)
{
// Note: TempFile caches the URL on first access; call this here so that
// ~FirebirdDriver is not the first access, because that is called
@@ -170,7 +170,7 @@ Reference< XConnection > SAL_CALL FirebirdDriver::connect(
throw DisposedException();
if ( ! acceptsURL(url) )
- return NULL;
+ return nullptr;
Connection* pCon = new Connection(this);
Reference< XConnection > xCon = pCon;
@@ -253,7 +253,7 @@ namespace connectivity
{
MutexGuard aGuard( rBHelper.rMutex );
xParent = _xInterface;
- _xInterface = NULL;
+ _xInterface = nullptr;
}
// First dispose
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index f5cfdeeca9c3..fbc2faea8719 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -56,8 +56,8 @@ OPreparedStatement::OPreparedStatement( Connection* _pConnection,
:OStatementCommonBase(_pConnection)
,m_aTypeInfo(_TypeInfo)
,m_sSqlStatement(sql)
- ,m_pOutSqlda(0)
- ,m_pInSqlda(0)
+ ,m_pOutSqlda(nullptr)
+ ,m_pInSqlda(nullptr)
{
SAL_INFO("connectivity.firebird", "OPreparedStatement(). "
"sql: " << sql);
@@ -167,13 +167,13 @@ void SAL_CALL OPreparedStatement::close() throw(SQLException, RuntimeException,
{
freeSQLVAR(m_pInSqlda);
free(m_pInSqlda);
- m_pInSqlda = 0;
+ m_pInSqlda = nullptr;
}
if (m_pOutSqlda)
{
freeSQLVAR(m_pOutSqlda);
free(m_pOutSqlda);
- m_pOutSqlda = 0;
+ m_pOutSqlda = nullptr;
}
}
@@ -444,7 +444,7 @@ void OPreparedStatement::openBlobForWriting(isc_blob_handle& rBlobHandle, ISC_QU
&rBlobHandle,
&rBlobId,
0, // Blob parameter buffer length
- 0); // Blob parameter buffer handle
+ nullptr); // Blob parameter buffer handle
if (aErr)
{
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index 4b1477440007..89145f47d361 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -68,7 +68,7 @@ OResultSet::OResultSet(Connection* pConnection,
, m_pConnection(pConnection)
, m_rMutex(rMutex)
, m_xStatement(xStatement)
- , m_xMetaData(0)
+ , m_xMetaData(nullptr)
, m_pSqlda(pSqlda)
, m_statementHandle(aStatementHandle)
, m_bWasNull(false)
@@ -348,7 +348,7 @@ uno::Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 c
MutexGuard aGuard(m_rMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return NULL;
+ return nullptr;
}
uno::Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
@@ -357,7 +357,7 @@ uno::Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int3
MutexGuard aGuard(m_rMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return NULL;
+ return nullptr;
}
// ---- Internal Utilities ---------------------------------------------------
@@ -646,7 +646,7 @@ uno::Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 columnIndex )
MutexGuard aGuard(m_rMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return NULL;
+ return nullptr;
}
@@ -657,7 +657,7 @@ uno::Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 columnIndex ) th
MutexGuard aGuard(m_rMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return NULL;
+ return nullptr;
}
uno::Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 columnIndex)
@@ -670,7 +670,7 @@ uno::Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 columnIndex)
// cleverness around this.
ISC_QUAD* pBlobID = safelyRetrieveValue< ISC_QUAD* >(columnIndex, SQL_BLOB);
if (!pBlobID)
- return 0;
+ return nullptr;
return m_pConnection->createBlob(pBlobID);
}
@@ -681,7 +681,7 @@ uno::Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 columnIndex ) thro
MutexGuard aGuard(m_rMutex);
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return NULL;
+ return nullptr;
}
diff --git a/connectivity/source/drivers/firebird/Services.cxx b/connectivity/source/drivers/firebird/Services.cxx
index ccee9ca7950c..83ebcbe0e56e 100644
--- a/connectivity/source/drivers/firebird/Services.cxx
+++ b/connectivity/source/drivers/firebird/Services.cxx
@@ -67,7 +67,7 @@ struct ProviderRequest
{
try
{
- xRet = creator( xServiceManager, sImplementationName,Factory, Services,0);
+ xRet = creator( xServiceManager, sImplementationName,Factory, Services,nullptr);
}
catch(...)
{
@@ -86,7 +86,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL firebird_sdbc_component_getFactor
void* pRegistryKey)
{
(void) pRegistryKey;
- void* pRet = 0;
+ void* pRet = nullptr;
if (pServiceManager)
{
ProviderRequest aReq(pServiceManager,pImplementationName);
diff --git a/connectivity/source/drivers/firebird/Statement.cxx b/connectivity/source/drivers/firebird/Statement.cxx
index f30616e2ccc5..4144ab3bc039 100644
--- a/connectivity/source/drivers/firebird/Statement.cxx
+++ b/connectivity/source/drivers/firebird/Statement.cxx
@@ -89,7 +89,7 @@ void OStatement::disposeResultSet()
{
freeSQLVAR(m_pSqlda);
free(m_pSqlda);
- m_pSqlda = 0;
+ m_pSqlda = nullptr;
}
}
@@ -121,7 +121,7 @@ uno::Reference< XResultSet > SAL_CALL OStatement::executeQuery(const OUString& s
&m_pConnection->getTransaction(),
&m_aStatementHandle,
1,
- NULL);
+ nullptr);
if (aErr)
SAL_WARN("connectivity.firebird", "isc_dsql_execute failed");
diff --git a/connectivity/source/drivers/firebird/Statement.hxx b/connectivity/source/drivers/firebird/Statement.hxx
index 08b56886f3d1..e2c5b3116472 100644
--- a/connectivity/source/drivers/firebird/Statement.hxx
+++ b/connectivity/source/drivers/firebird/Statement.hxx
@@ -46,7 +46,7 @@ namespace connectivity
// a constructor, which is required for returning objects:
explicit OStatement( Connection* _pConnection)
: OStatementCommonBase( _pConnection),
- m_pSqlda(0)
+ m_pSqlda(nullptr)
{}
virtual void disposeResultSet() override;
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
index 55b488906f46..069402ac1558 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
@@ -215,7 +215,7 @@ void OStatementCommonBase::prepareAndDescribeStatement(const OUString& sql,
if(aErr)
{
free(pOutSqlda);
- pOutSqlda = NULL;
+ pOutSqlda = nullptr;
}
}
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.hxx b/connectivity/source/drivers/firebird/StatementCommonBase.hxx
index bae8c10c3c8e..e849b341ba91 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.hxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.hxx
@@ -91,7 +91,7 @@ namespace connectivity
void prepareAndDescribeStatement(const OUString& sqlIn,
XSQLDA*& pOutSqlda,
- XSQLDA* pInSqlda=0)
+ XSQLDA* pInSqlda=nullptr)
throw (::com::sun::star::sdbc::SQLException);
short getSqlInfoItem(char aInfoItem)
diff --git a/connectivity/source/drivers/firebird/SubComponent.hxx b/connectivity/source/drivers/firebird/SubComponent.hxx
index 01b4d5b5236d..7e461132af7a 100644
--- a/connectivity/source/drivers/firebird/SubComponent.hxx
+++ b/connectivity/source/drivers/firebird/SubComponent.hxx
@@ -76,7 +76,7 @@ namespace connectivity
if (!--s_nRefCount)
{
delete s_pProps;
- s_pProps = NULL;
+ s_pProps = nullptr;
}
}
@@ -102,7 +102,7 @@ namespace connectivity
sal_Int32 OPropertyArrayUsageHelper< TYPE >::s_nRefCount = 0;
template<class TYPE>
- ::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper< TYPE >::s_pProps = NULL;
+ ::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper< TYPE >::s_pProps = nullptr;
template<class TYPE>
::osl::Mutex OPropertyArrayUsageHelper< TYPE >::s_aMutex;
diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx
index bf77aa3f3034..ddb9d022c3e9 100644
--- a/connectivity/source/drivers/firebird/Util.cxx
+++ b/connectivity/source/drivers/firebird/Util.cxx
@@ -284,7 +284,7 @@ void firebird::freeSQLVAR(XSQLDA* pSqlda)
if(pVar->sqldata)
{
free(pVar->sqldata);
- pVar->sqldata = NULL;
+ pVar->sqldata = nullptr;
}
break;
case SQL_ARRAY:
@@ -307,7 +307,7 @@ void firebird::freeSQLVAR(XSQLDA* pSqlda)
if(pVar->sqlind)
{
free(pVar->sqlind);
- pVar->sqlind = NULL;
+ pVar->sqlind = nullptr;
}
}
}
diff --git a/connectivity/source/drivers/flat/EConnection.cxx b/connectivity/source/drivers/flat/EConnection.cxx
index e3518e7dfe96..9c04ae0241e6 100644
--- a/connectivity/source/drivers/flat/EConnection.cxx
+++ b/connectivity/source/drivers/flat/EConnection.cxx
@@ -166,7 +166,7 @@ Reference< XPreparedStatement > SAL_CALL OFlatConnection::prepareCall( const OUS
checkDisposed(OConnection_B::rBHelper.bDisposed);
::dbtools::throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this );
- return NULL;
+ return nullptr;
}
diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx
index 793d111e278f..d697fdc98134 100644
--- a/connectivity/source/drivers/flat/EDriver.cxx
+++ b/connectivity/source/drivers/flat/EDriver.cxx
@@ -62,7 +62,7 @@ Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const S
throw DisposedException();
if ( ! acceptsURL(url) )
- return NULL;
+ return nullptr;
OFlatConnection* pCon = new OFlatConnection(this);
pCon->construct(url,info);
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 7db929c164fe..08ae96d87982 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -514,7 +514,7 @@ void SAL_CALL OFlatTable::disposing()
{
OFileTable::disposing();
::osl::MutexGuard aGuard(m_aMutex);
- m_aColumns = NULL;
+ m_aColumns = nullptr;
}
Sequence< Type > SAL_CALL OFlatTable::getTypes( ) throw(RuntimeException, std::exception)
@@ -555,7 +555,7 @@ Any SAL_CALL OFlatTable::queryInterface( const Type & rType ) throw(RuntimeExcep
Sequence< sal_Int8 > OFlatTable::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
diff --git a/connectivity/source/drivers/flat/Eservices.cxx b/connectivity/source/drivers/flat/Eservices.cxx
index 762bcc805945..bb5db84064fd 100644
--- a/connectivity/source/drivers/flat/Eservices.cxx
+++ b/connectivity/source/drivers/flat/Eservices.cxx
@@ -63,7 +63,7 @@ struct ProviderRequest
{
try
{
- xRet = creator( xServiceManager, sImplementationName,Factory, Services,0);
+ xRet = creator( xServiceManager, sImplementationName,Factory, Services,nullptr);
}
catch(...)
{
@@ -81,7 +81,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL flat_component_getFactory(
void* pServiceManager,
void* /*pRegistryKey*/)
{
- void* pRet = 0;
+ void* pRet = nullptr;
if (pServiceManager)
{
ProviderRequest aReq(pServiceManager,pImplementationName);
diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx
index 2a3c68a06467..1b4ff1d35f9a 100644
--- a/connectivity/source/drivers/hsqldb/HConnection.cxx
+++ b/connectivity/source/drivers/hsqldb/HConnection.cxx
@@ -194,7 +194,7 @@ namespace connectivity { namespace hsqldb
impl_checkExistingTable_throw( _TableName );
if ( !impl_isTextTable_nothrow( _TableName ) )
- return NULL;
+ return nullptr;
return impl_getTextTableIcon_nothrow();
}
@@ -206,7 +206,7 @@ namespace connectivity { namespace hsqldb
impl_checkExistingTable_throw( _TableName );
if ( !impl_isTextTable_nothrow( _TableName ) )
- return NULL;
+ return nullptr;
if ( !_DocumentUI.is() )
{
@@ -222,7 +222,7 @@ namespace connectivity { namespace hsqldb
// Reference< XExecutableDialog > xEditor = impl_createLinkedTableEditor_throw( _DocumentUI, _TableName );
// return xEditor.get();
- return NULL;
+ return nullptr;
// editor not yet implemented in this CWS
}
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 1ddded1006f3..0276998745b2 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -334,7 +334,7 @@ namespace connectivity
}
catch(const Exception& e)
{
- StorageContainer::revokeStorage(sKey,NULL);
+ StorageContainer::revokeStorage(sKey,nullptr);
(void)e;
throw;
}
@@ -552,7 +552,7 @@ namespace connectivity
{
// Reference<XTransactionListener> xListener(*this,UNO_QUERY);
// a shutdown should commit all changes to the db files
- StorageContainer::revokeStorage(_aIter->second.first,NULL);
+ StorageContainer::revokeStorage(_aIter->second.first,nullptr);
}
if ( !m_bInShutDownConnections )
m_aConnections.erase(_aIter);
@@ -783,7 +783,7 @@ namespace connectivity
"yo-NG", "Yoruba",
"zh-CN", "Chinese",
"zu-ZA", "Zulu",
- NULL, NULL
+ nullptr, nullptr
};
OUString sLocaleString( _rLocaleString );
@@ -865,7 +865,7 @@ namespace connectivity
}
if ( sLocaleString.isEmpty() )
{
- rtl_Locale* pProcessLocale = NULL;
+ rtl_Locale* pProcessLocale = nullptr;
osl_getProcessLocale( &pProcessLocale );
sLocaleString = LanguageTag( *pProcessLocale).getBcp47();
}
diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
index 54e9654a2df5..38d8e79af05c 100644
--- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
@@ -427,7 +427,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst
{
if ( xOut.is() )
{
- jbyte *buf = env->GetByteArrayElements(buffer,NULL);
+ jbyte *buf = env->GetByteArrayElements(buffer,nullptr);
if (env->ExceptionCheck())
{
env->ExceptionClear();
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx
index 79b263d0362c..dd63b91725fb 100644
--- a/connectivity/source/drivers/hsqldb/HTable.cxx
+++ b/connectivity/source/drivers/hsqldb/HTable.cxx
@@ -128,7 +128,7 @@ sdbcx::OCollection* OHSQLTable::createIndexes(const TStringVector& _rNames)
Sequence< sal_Int8 > OHSQLTable::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx
index 227b18edb91e..0a7c703509be 100644
--- a/connectivity/source/drivers/hsqldb/HTables.cxx
+++ b/connectivity/source/drivers/hsqldb/HTables.cxx
@@ -65,7 +65,7 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
aCatalog <<= sCatalog;
Reference< XResultSet > xResult = m_xMetaData->getTables(aCatalog,sSchema,sTable,sTableTypes);
- sdbcx::ObjectType xRet = NULL;
+ sdbcx::ObjectType xRet = nullptr;
if ( xResult.is() )
{
Reference< XRow > xRow(xResult,UNO_QUERY);
@@ -171,7 +171,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor )
void OTables::appendNew(const OUString& _rsNewTable)
{
- insertElement(_rsNewTable,NULL);
+ insertElement(_rsNewTable,nullptr);
// notify our container listeners
ContainerEvent aEvent(static_cast<XContainer*>(this), makeAny(_rsNewTable), Any(), Any());
diff --git a/connectivity/source/drivers/hsqldb/HTerminateListener.hxx b/connectivity/source/drivers/hsqldb/HTerminateListener.hxx
index 98e1792db429..0aa6ebae815c 100644
--- a/connectivity/source/drivers/hsqldb/HTerminateListener.hxx
+++ b/connectivity/source/drivers/hsqldb/HTerminateListener.hxx
@@ -35,7 +35,7 @@ namespace connectivity
{
ODriverDelegator* m_pDriver;
protected:
- virtual ~OConnectionController() {m_pDriver = NULL;}
+ virtual ~OConnectionController() {m_pDriver = nullptr;}
public:
explicit OConnectionController(ODriverDelegator* _pDriver) : m_pDriver(_pDriver){}
diff --git a/connectivity/source/drivers/hsqldb/Hservices.cxx b/connectivity/source/drivers/hsqldb/Hservices.cxx
index c9cf2e4259fb..82545c75d47e 100644
--- a/connectivity/source/drivers/hsqldb/Hservices.cxx
+++ b/connectivity/source/drivers/hsqldb/Hservices.cxx
@@ -64,7 +64,7 @@ struct ProviderRequest
{
try
{
- xRet = creator( xServiceManager, sImplementationName,Factory, Services,0);
+ xRet = creator( xServiceManager, sImplementationName,Factory, Services,nullptr);
}
catch(...)
{
@@ -82,7 +82,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL hsqldb_component_getFactory(
void* pServiceManager,
void* /*pRegistryKey*/)
{
- void* pRet = 0;
+ void* pRet = nullptr;
if (pServiceManager)
{
ProviderRequest aReq(pServiceManager,pImplementationName);
diff --git a/connectivity/source/drivers/jdbc/Array.cxx b/connectivity/source/drivers/jdbc/Array.cxx
index 6a75a0bb9c7e..07c9668c0a36 100644
--- a/connectivity/source/drivers/jdbc/Array.cxx
+++ b/connectivity/source/drivers/jdbc/Array.cxx
@@ -26,7 +26,7 @@ using namespace connectivity;
//************ Class: java.sql.Array
-jclass java_sql_Array::theClass = 0;
+jclass java_sql_Array::theClass = nullptr;
java_sql_Array::~java_sql_Array()
{}
@@ -42,13 +42,13 @@ jclass java_sql_Array::getMyClass() const
OUString SAL_CALL java_sql_Array::getBaseTypeName( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethod("getBaseTypeName",mID);
}
sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethod_ThrowSQL("getBaseType", mID);
}
@@ -59,7 +59,7 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc:
jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
static const char * cSignature = "(Ljava/util/Map;)[Ljava/lang/Object;";
static const char * cMethodName = "getArray";
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
// submit Java-Call
t.pEnv->CallObjectMethod( object, mID, obj);
@@ -78,7 +78,7 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc:
static const char * cSignature = "(IILjava/util/Map;)[Ljava/lang/Object;";
static const char * cMethodName = "getArray";
// submit Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
t.pEnv->CallObjectMethod( object, mID, index,count,obj);
ThrowSQLException(t.pEnv,*this);
@@ -98,14 +98,14 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc:
static const char * cSignature = "(Ljava/util/Map;)Ljava/sql/ResultSet;";
static const char * cMethodName = "getResultSet";
// submit Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
t.pEnv->CallObjectMethod( object, mID, obj);
ThrowSQLException(t.pEnv,*this);
// and cleanup
t.pEnv->DeleteLocalRef(obj);
}
- return NULL;
+ return nullptr;
}
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_Array::getResultSetAtIndex( sal_Int32 index, sal_Int32 count, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
@@ -118,14 +118,14 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc:
static const char * cSignature = "(Ljava/util/Map;)Ljava/sql/ResultSet;";
static const char * cMethodName = "getResultSetAtIndex";
// submit Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
t.pEnv->CallObjectMethod( object, mID, index,count,obj);
ThrowSQLException(t.pEnv,*this);
// and cleanup
t.pEnv->DeleteLocalRef(obj);
}
- return NULL;
+ return nullptr;
}
diff --git a/connectivity/source/drivers/jdbc/Blob.cxx b/connectivity/source/drivers/jdbc/Blob.cxx
index 43db9c1f3eb1..a22092553e20 100644
--- a/connectivity/source/drivers/jdbc/Blob.cxx
+++ b/connectivity/source/drivers/jdbc/Blob.cxx
@@ -29,7 +29,7 @@ using namespace connectivity;
//************ Class: java.sql.Blob
-jclass java_sql_Blob::theClass = 0;
+jclass java_sql_Blob::theClass = nullptr;
java_sql_Blob::java_sql_Blob( JNIEnv * pEnv, jobject myObj )
: java_lang_Object( pEnv, myObj )
{
@@ -58,7 +58,7 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx
static const char * cSignature = "()J";
static const char * cMethodName = "length";
// submit Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallLongMethod( object, mID );
ThrowSQLException(t.pEnv,*this);
@@ -75,7 +75,7 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx
static const char * cSignature = "(JI)[B";
static const char * cMethodName = "getBytes";
// submit Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
jbyteArray out = static_cast<jbyteArray>(t.pEnv->CallObjectMethod( object, mID,pos,count));
ThrowSQLException(t.pEnv,*this);
@@ -94,10 +94,10 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_Blob::getBinaryStream( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethod(t.pEnv,"getBinaryStream","()Ljava/io/InputStream;", mID);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_io_InputStream( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_io_InputStream( t.pEnv, out );
}
sal_Int64 SAL_CALL java_sql_Blob::position( const ::com::sun::star::uno::Sequence< sal_Int8 >& pattern, sal_Int64 start ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
@@ -110,7 +110,7 @@ sal_Int64 SAL_CALL java_sql_Blob::position( const ::com::sun::star::uno::Sequenc
static const char * cSignature = "([BI)J";
static const char * cMethodName = "position";
// submit Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
// convert Parameter
jbyteArray pByteArray = t.pEnv->NewByteArray(pattern.getLength());
diff --git a/connectivity/source/drivers/jdbc/Boolean.cxx b/connectivity/source/drivers/jdbc/Boolean.cxx
index ef82e3416616..38b6342bd7fd 100644
--- a/connectivity/source/drivers/jdbc/Boolean.cxx
+++ b/connectivity/source/drivers/jdbc/Boolean.cxx
@@ -23,7 +23,7 @@ using namespace connectivity;
//************ Class: java.lang.Boolean
-jclass java_lang_Boolean::theClass = 0;
+jclass java_lang_Boolean::theClass = nullptr;
java_lang_Boolean::~java_lang_Boolean()
{}
diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx
index 2a086ab003ea..ce872fc5dfd1 100644
--- a/connectivity/source/drivers/jdbc/CallableStatement.cxx
+++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx
@@ -72,7 +72,7 @@ sal_Bool SAL_CALL java_sql_CallableStatement::wasNull( ) throw(css::sdbc::SQLEx
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "wasNull", mID );
}
@@ -80,14 +80,14 @@ sal_Bool SAL_CALL java_sql_CallableStatement::getBoolean( sal_Int32 columnIndex
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "getBoolean", mID,columnIndex );
}
sal_Int8 SAL_CALL java_sql_CallableStatement::getByte( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jbyte (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallByteMethod;
return callMethodWithIntArg<jbyte>(pCallMethod,"getByte","(I)B",mID,columnIndex);
}
@@ -99,7 +99,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_CallableStatement::getBytes( sal_Int32 co
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jbyteArray out = static_cast<jbyteArray>(callObjectMethodWithIntArg(t.pEnv,"getBytes","(I)[B", mID, columnIndex));
if (out)
{
@@ -114,7 +114,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_CallableStatement::getBytes( sal_Int32 co
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getDate","(I)Ljava/sql/Date;", mID, columnIndex);
return out ? static_cast <com::sun::star::util::Date>(java_sql_Date( t.pEnv, out )) : ::com::sun::star::util::Date();
}
@@ -122,7 +122,7 @@ double SAL_CALL java_sql_CallableStatement::getDouble( sal_Int32 columnIndex ) t
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
double (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallDoubleMethod;
return callMethodWithIntArg<double>(pCallMethod,"getDouble","(I)D",mID,columnIndex);
}
@@ -131,7 +131,7 @@ float SAL_CALL java_sql_CallableStatement::getFloat( sal_Int32 columnIndex ) thr
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jfloat (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallFloatMethod;
return callMethodWithIntArg<jfloat>(pCallMethod,"getFloat","(I)F",mID,columnIndex);
}
@@ -140,7 +140,7 @@ sal_Int32 SAL_CALL java_sql_CallableStatement::getInt( sal_Int32 columnIndex ) t
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethodWithIntArg_ThrowSQL("getInt",mID,columnIndex);
}
@@ -148,7 +148,7 @@ sal_Int64 SAL_CALL java_sql_CallableStatement::getLong( sal_Int32 columnIndex )
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jlong (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallLongMethod;
return callMethodWithIntArg<jlong>(pCallMethod,"getLong","(I)J",mID,columnIndex);
}
@@ -157,7 +157,7 @@ Any SAL_CALL java_sql_CallableStatement::getObject( sal_Int32 columnIndex, const
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callObjectMethodWithIntArg(t.pEnv,"getObject","(I)Ljava/lang/Object;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
return Any();
@@ -167,7 +167,7 @@ sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex )
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jshort (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallShortMethod;
return callMethodWithIntArg<jshort>(pCallMethod,"getShort","(I)S",mID,columnIndex);
}
@@ -178,7 +178,7 @@ OUString SAL_CALL java_sql_CallableStatement::getString( sal_Int32 columnIndex )
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethodWithIntArg("getString",mID,columnIndex);
}
@@ -186,7 +186,7 @@ OUString SAL_CALL java_sql_CallableStatement::getString( sal_Int32 columnIndex )
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTime","(I)Ljava/sql/Time;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time();
@@ -196,7 +196,7 @@ OUString SAL_CALL java_sql_CallableStatement::getString( sal_Int32 columnIndex )
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTimestamp","(I)Ljava/sql/Timestamp;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime();
@@ -215,7 +215,7 @@ void SAL_CALL java_sql_CallableStatement::registerOutParameter( sal_Int32 parame
static const char * cSignature = "(IILjava/lang/String;)V";
static const char * cMethodName = "registerOutParameter";
// execute Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
// Convert Parameter
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,typeName));
@@ -235,14 +235,14 @@ void SAL_CALL java_sql_CallableStatement::registerNumericOutParameter( sal_Int32
static const char * cSignature = "(III)V";
static const char * cMethodName = "registerOutParameter";
// execute Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
t.pEnv->CallVoidMethod( object, mID, parameterIndex,sqlType,scale);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
}
-jclass java_sql_CallableStatement::theClass = 0;
+jclass java_sql_CallableStatement::theClass = nullptr;
jclass java_sql_CallableStatement::getMyClass() const
{
@@ -267,39 +267,39 @@ Reference< css::sdbc::XArray > SAL_CALL java_sql_CallableStatement::getArray( sa
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getArray","(I)Ljava/sql/Array;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_sql_Array( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_sql_Array( t.pEnv, out );
}
Reference< css::sdbc::XClob > SAL_CALL java_sql_CallableStatement::getClob( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getClob","(I)Ljava/sql/Clob;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_sql_Clob( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_sql_Clob( t.pEnv, out );
}
Reference< css::sdbc::XBlob > SAL_CALL java_sql_CallableStatement::getBlob( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getBlob","(I)Ljava/sql/Blob;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_sql_Blob( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_sql_Blob( t.pEnv, out );
}
Reference< css::sdbc::XRef > SAL_CALL java_sql_CallableStatement::getRef( sal_Int32 columnIndex ) throw(css::sdbc::SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getRef","(I)Ljava/sql/Ref;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_sql_Ref( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_sql_Ref( t.pEnv, out );
}
void SAL_CALL java_sql_CallableStatement::acquire() throw()
@@ -323,11 +323,11 @@ void java_sql_CallableStatement::createStatement(JNIEnv* /*_pEnv*/)
// initialize temporary variable
static const char * cMethodName = "prepareCall";
// execute Java-Call
- jobject out = NULL;
+ jobject out = nullptr;
// convert Parameter
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,m_sSqlStatement));
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(Ljava/lang/String;II)Ljava/sql/CallableStatement;";
diff --git a/connectivity/source/drivers/jdbc/Class.cxx b/connectivity/source/drivers/jdbc/Class.cxx
index 0a2753b36a7f..27daf652115c 100644
--- a/connectivity/source/drivers/jdbc/Class.cxx
+++ b/connectivity/source/drivers/jdbc/Class.cxx
@@ -26,7 +26,7 @@ using namespace connectivity;
//************ Class: java.lang.Class
-jclass java_lang_Class::theClass = 0;
+jclass java_lang_Class::theClass = nullptr;
java_lang_Class::~java_lang_Class()
{}
@@ -41,23 +41,23 @@ jclass java_lang_Class::getMyClass() const
java_lang_Class * java_lang_Class::forName( const OUString& _par0 )
{
- jobject out(NULL);
+ jobject out(nullptr);
SDBThreadAttach t;
{
OString sClassName = OUStringToOString(_par0, RTL_TEXTENCODING_JAVA_UTF8);
sClassName = sClassName.replace('.','/');
out = t.pEnv->FindClass(sClassName.getStr());
- ThrowSQLException(t.pEnv,0);
+ ThrowSQLException(t.pEnv,nullptr);
} //t.pEnv
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? NULL : new java_lang_Class( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_lang_Class( t.pEnv, out );
}
jobject java_lang_Class::newInstanceObject()
{
SDBThreadAttach t;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callObjectMethod(t.pEnv,"newInstance","()Ljava/lang/Object;", mID);
}
diff --git a/connectivity/source/drivers/jdbc/Clob.cxx b/connectivity/source/drivers/jdbc/Clob.cxx
index cba4cf68cfe3..afa79124ce2b 100644
--- a/connectivity/source/drivers/jdbc/Clob.cxx
+++ b/connectivity/source/drivers/jdbc/Clob.cxx
@@ -27,7 +27,7 @@ using namespace connectivity;
//************ Class: java.sql.Clob
-jclass java_sql_Clob::theClass = 0;
+jclass java_sql_Clob::theClass = nullptr;
java_sql_Clob::java_sql_Clob( JNIEnv * pEnv, jobject myObj )
: java_lang_Object( pEnv, myObj )
@@ -57,7 +57,7 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx
static const char * cSignature = "()J";
static const char * cMethodName = "length";
// execute Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallLongMethod( object, mID );
ThrowSQLException(t.pEnv,*this);
@@ -74,7 +74,7 @@ OUString SAL_CALL java_sql_Clob::getSubString( sal_Int64 pos, sal_Int32 subStrin
static const char * cSignature = "(JI)Ljava/lang/String;";
static const char * cMethodName = "getSubString";
// execute Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
jstring out = static_cast<jstring>(t.pEnv->CallObjectMethod( object, mID,pos,subStringLength));
ThrowSQLException(t.pEnv,*this);
@@ -87,11 +87,11 @@ OUString SAL_CALL java_sql_Clob::getSubString( sal_Int64 pos, sal_Int32 subStrin
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_Clob::getCharacterStream( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
SDBThreadAttach t;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethod(t.pEnv,"getCharacterStream","()Ljava/io/Reader;", mID);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_io_Reader( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_io_Reader( t.pEnv, out );
}
sal_Int64 SAL_CALL java_sql_Clob::position( const OUString& searchstr, sal_Int32 start ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
@@ -107,7 +107,7 @@ sal_Int64 SAL_CALL java_sql_Clob::position( const OUString& searchstr, sal_Int32
static const char * cSignature = "(Ljava/lang/String;I)J";
static const char * cMethodName = "position";
// execute Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallLongMethod( object, mID, args[0].l,start );
ThrowSQLException(t.pEnv,*this);
diff --git a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx
index 240d78e0a2ab..39cdafc2d328 100644
--- a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx
+++ b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx
@@ -35,7 +35,7 @@ namespace connectivity { namespace jdbc
:m_environment( environment )
,m_currentThread( environment )
,m_oldContextClassLoader( environment )
- ,m_setContextClassLoaderMethod( NULL )
+ ,m_setContextClassLoaderMethod( nullptr )
{
if ( !newClassLoader.is() )
return;
@@ -50,7 +50,7 @@ namespace connectivity { namespace jdbc
jmethodID currentThreadMethod( m_environment.GetStaticMethodID(
threadClass.get(), "currentThread", "()Ljava/lang/Thread;" ) );
- if ( currentThreadMethod == NULL )
+ if ( currentThreadMethod == nullptr )
break;
m_currentThread.set( m_environment.CallStaticObjectMethod( threadClass.get(), currentThreadMethod ) );
@@ -59,7 +59,7 @@ namespace connectivity { namespace jdbc
jmethodID getContextClassLoaderMethod( m_environment.GetMethodID(
threadClass.get(), "getContextClassLoader", "()Ljava/lang/ClassLoader;" ) );
- if ( getContextClassLoaderMethod == NULL )
+ if ( getContextClassLoaderMethod == nullptr )
break;
m_oldContextClassLoader.set( m_environment.CallObjectMethod( m_currentThread.get(), getContextClassLoaderMethod ) );
LocalRef< jthrowable > throwable( m_environment, m_environment.ExceptionOccurred() );
@@ -68,7 +68,7 @@ namespace connectivity { namespace jdbc
m_setContextClassLoaderMethod = m_environment.GetMethodID(
threadClass.get(), "setContextClassLoader", "(Ljava/lang/ClassLoader;)V" );
- if ( m_setContextClassLoaderMethod == NULL )
+ if ( m_setContextClassLoaderMethod == nullptr )
break;
}
@@ -86,7 +86,7 @@ namespace connectivity { namespace jdbc
if ( throwable.is() )
{
m_currentThread.reset();
- m_setContextClassLoaderMethod = NULL;
+ m_setContextClassLoaderMethod = nullptr;
java_lang_Object::ThrowLoggedSQLException( _rLoggerForErrors, &environment, _rxErrorContext );
}
}
@@ -98,7 +98,7 @@ namespace connectivity { namespace jdbc
{
LocalRef< jobject > currentThread( m_currentThread.env(), m_currentThread.release() );
jmethodID setContextClassLoaderMethod( m_setContextClassLoaderMethod );
- m_setContextClassLoaderMethod = NULL;
+ m_setContextClassLoaderMethod = nullptr;
m_environment.CallObjectMethod( currentThread.get(), setContextClassLoaderMethod, m_oldContextClassLoader.get() );
if ( clearExceptions )
diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
index e24a18acfe11..f010ab9179e8 100644
--- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
@@ -38,7 +38,7 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
-jclass java_sql_DatabaseMetaData::theClass = 0;
+jclass java_sql_DatabaseMetaData::theClass = nullptr;
java_sql_DatabaseMetaData::~java_sql_DatabaseMetaData()
{
@@ -65,39 +65,39 @@ java_sql_DatabaseMetaData::java_sql_DatabaseMetaData( JNIEnv * pEnv, jobject myO
Reference< XResultSet > java_sql_DatabaseMetaData::impl_getTypeInfo_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethod( "getTypeInfo", mID );
}
Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCatalogs( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethod( "getCatalogs", mID );
}
OUString java_sql_DatabaseMetaData::impl_getCatalogSeparator_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getCatalogSeparator", mID );
}
Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getSchemas( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethod( "getSchemas", mID );
}
Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getColumnPrivileges(
const Any& catalog, const OUString& schema, const OUString& table, const OUString& columnNamePattern ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethodWithStrings( "getColumnPrivileges", mID, catalog, schema, table, &columnNamePattern );
}
Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getColumns(
const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethodWithStrings( "getColumns", mID, catalog, schemaPattern, tableNamePattern, &columnNamePattern );
}
@@ -109,22 +109,22 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, cMethodName );
- jobject out(0);
+ jobject out(nullptr);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)Ljava/sql/ResultSet;";
// execute Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
OSL_VERIFY( !isExceptionOccurred(t.pEnv, true) );
jvalue args[4];
- args[3].l = 0;
+ args[3].l = nullptr;
sal_Int32 typeFilterCount = _types.getLength();
if ( typeFilterCount )
{
- jobjectArray pObjArray = static_cast< jobjectArray >( t.pEnv->NewObjectArray( (jsize)typeFilterCount, java_lang_String::st_getMyClass(), 0 ) );
+ jobjectArray pObjArray = static_cast< jobjectArray >( t.pEnv->NewObjectArray( (jsize)typeFilterCount, java_lang_String::st_getMyClass(), nullptr ) );
OSL_VERIFY( !isExceptionOccurred( t.pEnv, true ) );
const OUString* typeFilter = _types.getConstArray();
bool bIncludeAllTypes = false;
@@ -163,8 +163,8 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
else
aSchemaFilter <<= schemaPattern;
- args[0].l = aCatalogFilter.hasValue() ? convertwchar_tToJavaString( t.pEnv, ::comphelper::getString( aCatalogFilter ) ) : NULL;
- args[1].l = aSchemaFilter.hasValue() ? convertwchar_tToJavaString( t.pEnv, ::comphelper::getString( aSchemaFilter ) ) : NULL;
+ args[0].l = aCatalogFilter.hasValue() ? convertwchar_tToJavaString( t.pEnv, ::comphelper::getString( aCatalogFilter ) ) : nullptr;
+ args[1].l = aSchemaFilter.hasValue() ? convertwchar_tToJavaString( t.pEnv, ::comphelper::getString( aSchemaFilter ) ) : nullptr;
args[2].l = convertwchar_tToJavaString(t.pEnv,tableNamePattern);
out = t.pEnv->CallObjectMethod( object, mID, args[0].l, args[1].l,args[2].l,args[3].l);
jthrowable jThrow = t.pEnv->ExceptionOccurred();
@@ -210,7 +210,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
}
if ( !out )
- return NULL;
+ return nullptr;
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, cMethodName );
return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection);
@@ -219,114 +219,114 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getProcedureColumns(
const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethodWithStrings( "getProcedureColumns", mID, catalog, schemaPattern, procedureNamePattern, &columnNamePattern );
}
Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getProcedures( const Any&
catalog, const OUString& schemaPattern, const OUString& procedureNamePattern ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethodWithStrings( "getProcedures", mID, catalog, schemaPattern, procedureNamePattern );
}
Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getVersionColumns(
const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethodWithStrings( "getVersionColumns", mID, catalog, schema, table );
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxBinaryLiteralLength", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxRowSize", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxCatalogNameLength", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxCharLiteralLength", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxColumnNameLength", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxColumnsInIndex", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxCursorNameLength", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxConnections", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxColumnsInTable", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxStatementLength", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxTableNameLength", mID);
}
sal_Int32 java_sql_DatabaseMetaData::impl_getMaxTablesInSelect_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxTablesInSelect", mID);
}
Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getExportedKeys(
const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethodWithStrings( "getExportedKeys", mID, catalog, schema, table );
}
Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getImportedKeys(
const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethodWithStrings( "getImportedKeys", mID, catalog, schema, table );
}
Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getPrimaryKeys(
const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethodWithStrings( "getPrimaryKeys", mID, catalog, schema, table );
}
@@ -338,18 +338,18 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo(
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, cMethodName );
- jobject out(0);
+ jobject out(nullptr);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ)Ljava/sql/ResultSet;";
// execute Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
jvalue args[5];
// convert Parameter
- args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0;
- args[1].l = schema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schema);
+ args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : nullptr;
+ args[1].l = schema.toChar() == '%' ? nullptr : convertwchar_tToJavaString(t.pEnv,schema);
args[2].l = convertwchar_tToJavaString(t.pEnv,table);
args[3].z = unique;
args[4].z = approximate;
@@ -365,7 +365,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo(
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
if ( !out )
- return NULL;
+ return nullptr;
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, cMethodName );
return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection);
@@ -379,18 +379,18 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getBestRowIdentifier
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, cMethodName );
- jobject out(0);
+ jobject out(nullptr);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZ)Ljava/sql/ResultSet;";
// execute Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
jvalue args[3];
// convert Parameter
- args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0;
- args[1].l = schema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schema);
+ args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : nullptr;
+ args[1].l = schema.toChar() == '%' ? nullptr : convertwchar_tToJavaString(t.pEnv,schema);
args[2].l = convertwchar_tToJavaString(t.pEnv,table);
out = t.pEnv->CallObjectMethod( object, mID, args[0].l,args[1].l,args[2].l,scope,nullable);
@@ -405,7 +405,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getBestRowIdentifier
}
if ( !out )
- return NULL;
+ return nullptr;
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, cMethodName );
return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection);
@@ -417,7 +417,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTablePrivileges(
if ( m_pConnection->isIgnoreDriverPrivilegesEnabled() )
return new OResultSetPrivileges(this,catalog,schemaPattern,tableNamePattern);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
Reference< XResultSet > xReturn( impl_callResultSetMethodWithStrings( "getTablePrivileges", mID, catalog, schemaPattern, tableNamePattern ) );
if ( xReturn.is() )
@@ -495,20 +495,20 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference(
static const char * cMethodName = "getCrossReference";
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, cMethodName );
- jobject out(0);
+ jobject out(nullptr);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;";
// execute Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
jvalue args[6];
// convert Parameter
- args[0].l = primaryCatalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(primaryCatalog)) : 0;
- args[1].l = primarySchema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,primarySchema);
+ args[0].l = primaryCatalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(primaryCatalog)) : nullptr;
+ args[1].l = primarySchema.toChar() == '%' ? nullptr : convertwchar_tToJavaString(t.pEnv,primarySchema);
args[2].l = convertwchar_tToJavaString(t.pEnv,primaryTable);
- args[3].l = foreignCatalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(foreignCatalog)) : 0;
- args[4].l = foreignSchema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,foreignSchema);
+ args[3].l = foreignCatalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(foreignCatalog)) : nullptr;
+ args[4].l = foreignSchema.toChar() == '%' ? nullptr : convertwchar_tToJavaString(t.pEnv,foreignSchema);
args[5].l = convertwchar_tToJavaString(t.pEnv,foreignTable);
out = t.pEnv->CallObjectMethod( object, mID, args[0].l,args[2].l,args[2].l,args[3].l,args[4].l,args[5].l );
@@ -529,7 +529,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference(
}
if ( !out )
- return NULL;
+ return nullptr;
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, cMethodName );
return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection);
@@ -619,7 +619,7 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD_ARG3, _pMethodName, sCatalogLog, sSchemaLog, _rLeastPattern );
}
- jobject out(0);
+ jobject out(nullptr);
SDBThreadAttach t;
OSL_ENSURE( t.pEnv, "java_sql_DatabaseMetaData::impl_callResultSetMethodWithStrings: no Java environment anymore!" );
@@ -636,10 +636,10 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS
{
jvalue args[4];
// convert parameters
- args[0].l = bCatalog ? convertwchar_tToJavaString( t.pEnv, sCatalog ) : NULL;
- args[1].l = bSchema ? convertwchar_tToJavaString( t.pEnv, _rSchemaPattern ) : NULL;
+ args[0].l = bCatalog ? convertwchar_tToJavaString( t.pEnv, sCatalog ) : nullptr;
+ args[1].l = bSchema ? convertwchar_tToJavaString( t.pEnv, _rSchemaPattern ) : nullptr;
args[2].l = convertwchar_tToJavaString( t.pEnv, _rLeastPattern );
- args[3].l = _pOptionalAdditionalString ? convertwchar_tToJavaString( t.pEnv, *_pOptionalAdditionalString ) : NULL;
+ args[3].l = _pOptionalAdditionalString ? convertwchar_tToJavaString( t.pEnv, *_pOptionalAdditionalString ) : nullptr;
// actually do the call
if ( _pOptionalAdditionalString )
@@ -662,7 +662,7 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS
}
if ( !out )
- return NULL;
+ return nullptr;
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, _pMethodName );
return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection);
@@ -671,320 +671,320 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS
sal_Bool SAL_CALL java_sql_DatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "doesMaxRowSizeIncludeBlobs", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "storesLowerCaseQuotedIdentifiers", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "storesLowerCaseIdentifiers", mID );
}
bool java_sql_DatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "storesMixedCaseQuotedIdentifiers", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "storesMixedCaseIdentifiers", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "storesUpperCaseQuotedIdentifiers", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "storesUpperCaseIdentifiers", mID );
}
bool java_sql_DatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsAlterTableWithAddColumn", mID );
}
bool java_sql_DatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsAlterTableWithDropColumn", mID );
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxIndexLength", mID);
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsNonNullableColumns", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getCatalogTerm", mID );
}
OUString java_sql_DatabaseMetaData::impl_getIdentifierQuoteString_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getIdentifierQuoteString", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getExtraNameCharacters", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsDifferentTableCorrelationNames", mID );
}
bool java_sql_DatabaseMetaData::impl_isCatalogAtStart_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "isCatalogAtStart", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "dataDefinitionIgnoredInTransactions", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "dataDefinitionCausesTransactionCommit", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsDataManipulationTransactionsOnly", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsDataDefinitionAndDataManipulationTransactions", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsPositionedDelete", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsPositionedUpdate", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsOpenStatementsAcrossRollback", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsOpenStatementsAcrossCommit", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsOpenCursorsAcrossCommit", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsOpenCursorsAcrossRollback", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethodWithIntArg( "supportsTransactionIsolationLevel", mID, level );
}
bool java_sql_DatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsSchemasInDataManipulation", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsANSI92FullSQL", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsANSI92EntryLevelSQL", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsIntegrityEnhancementFacility", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsSchemasInIndexDefinitions", mID );
}
bool java_sql_DatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsSchemasInTableDefinitions", mID );
}
bool java_sql_DatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsCatalogsInTableDefinitions", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsCatalogsInIndexDefinitions", mID );
}
bool java_sql_DatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsCatalogsInDataManipulation", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsOuterJoins", mID );
}
Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callResultSetMethod( "getTableTypes", mID );
}
sal_Int32 java_sql_DatabaseMetaData::impl_getMaxStatements_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxStatements", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxProcedureNameLength", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxSchemaNameLength", mID);
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsTransactions", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "allProceduresAreCallable", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsStoredProcedures", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsSelectForUpdate", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "allTablesAreSelectable", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "isReadOnly", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "usesLocalFiles", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "usesLocalFilePerTable", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsTypeConversion", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "nullPlusNonNullIsNull", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsColumnAliasing", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsTableCorrelationNames", mID );
}
@@ -997,7 +997,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsConvert( sal_Int32 fromType
SDBThreadAttach t;
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, pMethodName,"(II)Z", mID);
out = t.pEnv->CallBooleanMethod( object, mID, fromType, toType );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -1009,157 +1009,157 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsConvert( sal_Int32 fromType
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsExpressionsInOrderBy", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsGroupBy", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsGroupByBeyondSelect", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsGroupByUnrelated", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsMultipleTransactions", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsMultipleResultSets", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsLikeEscapeClause", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsOrderByUnrelated", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsUnion", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsUnionAll", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsMixedCaseIdentifiers", mID );
}
bool java_sql_DatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsMixedCaseQuotedIdentifiers", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "nullsAreSortedAtEnd", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "nullsAreSortedAtStart", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "nullsAreSortedHigh", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "nullsAreSortedLow", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsSchemasInProcedureCalls", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsSchemasInPrivilegeDefinitions", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsCatalogsInProcedureCalls", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsCatalogsInPrivilegeDefinitions", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsCorrelatedSubqueries", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsSubqueriesInComparisons", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsSubqueriesInExists", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsSubqueriesInIns", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsSubqueriesInQuantifieds", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsANSI92IntermediateSQL", mID );
}
@@ -1168,7 +1168,7 @@ OUString SAL_CALL java_sql_DatabaseMetaData::getURL( ) throw(SQLException, Runt
OUString sURL = m_pConnection->getURL();
if ( sURL.isEmpty() )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
sURL = impl_callStringMethod( "getURL", mID );
}
return sURL;
@@ -1176,157 +1176,157 @@ OUString SAL_CALL java_sql_DatabaseMetaData::getURL( ) throw(SQLException, Runt
OUString SAL_CALL java_sql_DatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getUserName", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getDriverName", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getDriverVersion( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getDriverVersion", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getDatabaseProductVersion", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getDatabaseProductName", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getProcedureTerm", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getSchemaTerm", mID );
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowRuntime("getDriverMajorVersion", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getDefaultTransactionIsolation", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowRuntime("getDriverMinorVersion", mID);
}
OUString SAL_CALL java_sql_DatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getSQLKeywords", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getSearchStringEscape", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getStringFunctions", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getTimeDateFunctions", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getSystemFunctions", mID );
}
OUString SAL_CALL java_sql_DatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callStringMethod( "getNumericFunctions", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsExtendedSQLGrammar", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsCoreSQLGrammar", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsMinimumSQLGrammar", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsFullOuterJoins", mID );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsLimitedOuterJoins", mID );
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxColumnsInGroupBy", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxColumnsInOrderBy", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxColumnsInSelect", mID);
}
sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callIntMethod_ThrowSQL("getMaxUserNameLength", mID);
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethodWithIntArg( "supportsResultSetType", mID, setType );
}
@@ -1339,7 +1339,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetConcurrency( sal_I
SDBThreadAttach t;
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, pMethodName,"(II)Z", mID);
out = t.pEnv->CallBooleanMethod( object, mID, setType, concurrency);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -1351,61 +1351,61 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetConcurrency( sal_I
sal_Bool SAL_CALL java_sql_DatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethodWithIntArg( "ownUpdatesAreVisible", mID, setType );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethodWithIntArg( "ownDeletesAreVisible", mID, setType );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethodWithIntArg( "ownInsertsAreVisible", mID, setType );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethodWithIntArg( "othersUpdatesAreVisible", mID, setType );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethodWithIntArg( "othersDeletesAreVisible", mID, setType );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethodWithIntArg( "othersInsertsAreVisible", mID, setType );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::updatesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethodWithIntArg( "updatesAreDetected", mID, setType );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::deletesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethodWithIntArg( "deletesAreDetected", mID, setType );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::insertsAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethodWithIntArg( "insertsAreDetected", mID, setType );
}
sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_callBooleanMethod( "supportsBatchUpdates", mID );
}
@@ -1413,7 +1413,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs(
const Any& catalog, const OUString& schemaPattern, const OUString& typeNamePattern,
const Sequence< sal_Int32 >& types ) throw(SQLException, RuntimeException, std::exception)
{
- jobject out(0);
+ jobject out(nullptr);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
@@ -1421,13 +1421,13 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs(
static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[I)Ljava/sql/ResultSet;";
static const char * cMethodName = "getUDTs";
// dismiss Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
{
jvalue args[4];
// initialize temporary Variable
- args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0;
- args[1].l = schemaPattern.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schemaPattern);
+ args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : nullptr;
+ args[1].l = schemaPattern.toChar() == '%' ? nullptr : convertwchar_tToJavaString(t.pEnv,schemaPattern);
args[2].l = convertwchar_tToJavaString(t.pEnv,typeNamePattern);
jintArray pArray = t.pEnv->NewIntArray(types.getLength());
jint * typesData = reinterpret_cast<jint *>(
@@ -1455,7 +1455,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs(
}
}
- return out ? new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection ) : 0;
+ return out ? new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection ) : nullptr;
}
diff --git a/connectivity/source/drivers/jdbc/Date.cxx b/connectivity/source/drivers/jdbc/Date.cxx
index c07b01e38d59..f2f19db3cd3b 100644
--- a/connectivity/source/drivers/jdbc/Date.cxx
+++ b/connectivity/source/drivers/jdbc/Date.cxx
@@ -25,7 +25,7 @@ using namespace connectivity;
//************ Class: java.util.Date
-jclass java_util_Date::theClass = 0;
+jclass java_util_Date::theClass = nullptr;
java_util_Date::~java_util_Date()
{}
diff --git a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
index 07b49af2af75..16d46f5efcc4 100644
--- a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
+++ b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
@@ -34,7 +34,7 @@ using namespace ::com::sun::star::lang;
//************ Class: java.sql.Driver
-jclass java_sql_DriverPropertyInfo::theClass = 0;
+jclass java_sql_DriverPropertyInfo::theClass = nullptr;
java_sql_DriverPropertyInfo::~java_sql_DriverPropertyInfo()
{}
@@ -120,8 +120,8 @@ Sequence< OUString> java_sql_DriverPropertyInfo::choices()
jfieldID id = t.pEnv->GetFieldID(getMyClass(),"choices","[Ljava/lang/String;");
if(id)
{
- const java_lang_String * pEmpty = NULL;
- const OUString * pEmpty2 = NULL;
+ const java_lang_String * pEmpty = nullptr;
+ const OUString * pEmpty2 = nullptr;
return copyArrayAndDelete(t.pEnv, static_cast<jobjectArray>(t.pEnv->GetObjectField( object, id)), pEmpty2, pEmpty);
}
} //t.pEnv
diff --git a/connectivity/source/drivers/jdbc/Exception.cxx b/connectivity/source/drivers/jdbc/Exception.cxx
index 15999a1a45cd..9789beb8783d 100644
--- a/connectivity/source/drivers/jdbc/Exception.cxx
+++ b/connectivity/source/drivers/jdbc/Exception.cxx
@@ -23,7 +23,7 @@ using namespace connectivity;
//************ Class: java.lang.Exception
-jclass java_lang_Exception::theClass = 0;
+jclass java_lang_Exception::theClass = nullptr;
java_lang_Exception::~java_lang_Exception()
{}
diff --git a/connectivity/source/drivers/jdbc/InputStream.cxx b/connectivity/source/drivers/jdbc/InputStream.cxx
index 0443bcd67477..2ca356cc8d78 100644
--- a/connectivity/source/drivers/jdbc/InputStream.cxx
+++ b/connectivity/source/drivers/jdbc/InputStream.cxx
@@ -34,7 +34,7 @@ using namespace connectivity;
//************ Class: java.io.InputStream
-jclass java_io_InputStream::theClass = 0;
+jclass java_io_InputStream::theClass = nullptr;
java_io_InputStream::java_io_InputStream( JNIEnv * pEnv, jobject myObj )
: java_lang_Object( pEnv, myObj )
{
@@ -61,19 +61,19 @@ sal_Int32 SAL_CALL java_io_InputStream::readSomeBytes( ::com::sun::star::uno::Se
void SAL_CALL java_io_InputStream::skipBytes( sal_Int32 nBytesToSkip ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callIntMethodWithIntArg_ThrowRuntime("skip",mID,nBytesToSkip);
}
sal_Int32 SAL_CALL java_io_InputStream::available( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethod_ThrowRuntime("available", mID);
}
void SAL_CALL java_io_InputStream::closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowRuntime("close",mID);
}
@@ -90,7 +90,7 @@ sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequen
static const char * cSignature = "([BII)I";
static const char * cMethodName = "read";
// execute Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwRuntime(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallIntMethod( object, mID, pByteArray, 0, nBytesToRead );
if ( !out )
diff --git a/connectivity/source/drivers/jdbc/JBigDecimal.cxx b/connectivity/source/drivers/jdbc/JBigDecimal.cxx
index 58fd79335f8c..24abdb8789db 100644
--- a/connectivity/source/drivers/jdbc/JBigDecimal.cxx
+++ b/connectivity/source/drivers/jdbc/JBigDecimal.cxx
@@ -25,7 +25,7 @@ using namespace connectivity;
//************ Class: java.lang.Boolean
-jclass java_math_BigDecimal::theClass = 0;
+jclass java_math_BigDecimal::theClass = nullptr;
java_math_BigDecimal::~java_math_BigDecimal()
{}
@@ -38,7 +38,7 @@ jclass java_math_BigDecimal::getMyClass() const
return theClass;
}
-java_math_BigDecimal::java_math_BigDecimal( const OUString& _par0 ): java_lang_Object( NULL, nullptr )
+java_math_BigDecimal::java_math_BigDecimal( const OUString& _par0 ): java_lang_Object( nullptr, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
@@ -47,7 +47,7 @@ java_math_BigDecimal::java_math_BigDecimal( const OUString& _par0 ): java_lang_O
// initialize temporary Variable
static const char * cSignature = "(Ljava/lang/String;)V";
jobject tempObj;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, "<init>",cSignature, mID);
jstring str = convertwchar_tToJavaString(t.pEnv,_par0.replace(',','.'));
@@ -55,11 +55,11 @@ java_math_BigDecimal::java_math_BigDecimal( const OUString& _par0 ): java_lang_O
t.pEnv->DeleteLocalRef(str);
saveRef( t.pEnv, tempObj );
t.pEnv->DeleteLocalRef( tempObj );
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
// and cleanup
}
-java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Object( NULL, nullptr )
+java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Object( nullptr, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
@@ -68,12 +68,12 @@ java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Obj
// initialize temporary Variable
static const char * cSignature = "(D)V";
jobject tempObj;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, "<init>",cSignature, mID);
tempObj = t.pEnv->NewObject( getMyClass(), mID, _par0 );
saveRef( t.pEnv, tempObj );
t.pEnv->DeleteLocalRef( tempObj );
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
// and cleanup
}
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index 59da159314c1..5d86c605d952 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -61,8 +61,8 @@ namespace {
struct ClassMapEntry {
ClassMapEntry(
OUString const & theClassPath, OUString const & theClassName):
- classPath(theClassPath), className(theClassName), classLoader(NULL),
- classObject(NULL) {}
+ classPath(theClassPath), className(theClassName), classLoader(nullptr),
+ classObject(nullptr) {}
OUString classPath;
OUString className;
@@ -96,10 +96,10 @@ bool getLocalFromWeakRef( jweak& _weak, LocalRef< T >& _inout_local )
{
return false;
}
- else if ( _weak != NULL )
+ else if ( _weak != nullptr )
{
_inout_local.env().DeleteWeakGlobalRef( _weak );
- _weak = NULL;
+ _weak = nullptr;
}
}
return true;
@@ -129,7 +129,7 @@ bool loadClass(
OUString const & classPath, OUString const & name,
LocalRef< jobject > * classLoaderPtr, LocalRef< jclass > * classPtr)
{
- OSL_ASSERT(classLoaderPtr != NULL);
+ OSL_ASSERT(classLoaderPtr != nullptr);
// For any jweak entries still present in the map upon destruction,
// DeleteWeakGlobalRef is not called (which is a leak):
ClassMapData * d =
@@ -186,11 +186,11 @@ bool loadClass(
if ( !clClass.is() )
return false;
- jweak wcloader = NULL;
+ jweak wcloader = nullptr;
if (!cloader.is())
{
jmethodID ctorLoader( environment.GetMethodID( clClass.get(), "<init>", "([Ljava/net/URL;)V" ) );
- if (ctorLoader == NULL)
+ if (ctorLoader == nullptr)
return false;
LocalRef< jobjectArray > arr( environment );
@@ -205,15 +205,15 @@ bool loadClass(
return false;
wcloader = environment.NewWeakGlobalRef( cloader.get() );
- if ( wcloader == NULL )
+ if ( wcloader == nullptr )
return false;
}
- jweak wcl = NULL;
+ jweak wcl = nullptr;
if ( !cl.is() )
{
jmethodID methLoadClass( environment.GetMethodID( clClass.get(), "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;" ) );
- if ( methLoadClass == NULL )
+ if ( methLoadClass == nullptr )
return false;
LocalRef< jstring > str( environment );
@@ -228,15 +228,15 @@ bool loadClass(
return false;
wcl = environment.NewWeakGlobalRef( cl.get() );
- if ( wcl == NULL )
+ if ( wcl == nullptr )
return false;
}
- if ( wcloader != NULL)
+ if ( wcloader != nullptr)
{
i->classLoader = wcloader;
}
- if ( wcl != NULL )
+ if ( wcl != nullptr )
{
i->classObject = wcl;
}
@@ -255,16 +255,16 @@ IMPLEMENT_SERVICE_INFO(java_sql_Connection,"com.sun.star.sdbcx.JConnection","com
//************ Class: java.sql.Connection
-jclass java_sql_Connection::theClass = 0;
+jclass java_sql_Connection::theClass = nullptr;
java_sql_Connection::java_sql_Connection( const java_sql_Driver& _rDriver )
:java_lang_Object()
,OSubComponent<java_sql_Connection, java_sql_Connection_BASE>(static_cast<cppu::OWeakObject*>(const_cast<java_sql_Driver *>(&_rDriver)), this)
,m_xContext( _rDriver.getContext() )
,m_pDriver( &_rDriver )
- ,m_pDriverobject(NULL)
+ ,m_pDriverobject(nullptr)
,m_pDriverClassLoader()
- ,m_Driver_theClass(NULL)
+ ,m_Driver_theClass(nullptr)
,m_aLogger( _rDriver.getLogger() )
,m_bParameterSubstitution(false)
,m_bIgnoreDriverPrivileges(true)
@@ -283,10 +283,10 @@ java_sql_Connection::~java_sql_Connection()
{
if ( m_pDriverobject )
t.pEnv->DeleteGlobalRef( m_pDriverobject );
- m_pDriverobject = NULL;
+ m_pDriverobject = nullptr;
if ( m_Driver_theClass )
t.pEnv->DeleteGlobalRef( m_Driver_theClass );
- m_Driver_theClass = NULL;
+ m_Driver_theClass = nullptr;
}
SDBThreadAttach::releaseRef();
}
@@ -308,7 +308,7 @@ void java_sql_Connection::disposing()
if ( object )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("close", mID);
}
}
@@ -327,7 +327,7 @@ OUString SAL_CALL java_sql_Connection::getCatalog( ) throw(SQLException, Runtim
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethod("getCatalog",mID);
}
@@ -341,7 +341,7 @@ Reference< XDatabaseMetaData > SAL_CALL java_sql_Connection::getMetaData( ) thr
if(!xMetaData.is())
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethod(t.pEnv,"getMetaData","()Ljava/sql/DatabaseMetaData;", mID);
if(out)
{
@@ -360,7 +360,7 @@ void SAL_CALL java_sql_Connection::close( ) throw(SQLException, RuntimeExceptio
void SAL_CALL java_sql_Connection::commit( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("commit", mID);
}
@@ -368,7 +368,7 @@ sal_Bool SAL_CALL java_sql_Connection::isClosed( ) throw(SQLException, RuntimeE
{
::osl::MutexGuard aGuard( m_aMutex );
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "isClosed", mID ) && java_sql_Connection_BASE::rBHelper.bDisposed;
}
@@ -376,37 +376,37 @@ sal_Bool SAL_CALL java_sql_Connection::isReadOnly( ) throw(SQLException, Runtim
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "isReadOnly", mID );
}
void SAL_CALL java_sql_Connection::setCatalog( const OUString& catalog ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithStringArg("setCatalog",mID,catalog);
}
void SAL_CALL java_sql_Connection::rollback( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("rollback", mID);
}
sal_Bool SAL_CALL java_sql_Connection::getAutoCommit( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "getAutoCommit", mID );
}
void SAL_CALL java_sql_Connection::setReadOnly( sal_Bool readOnly ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithBoolArg_ThrowSQL("setReadOnly", mID, readOnly);
}
void SAL_CALL java_sql_Connection::setAutoCommit( sal_Bool autoCommit ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithBoolArg_ThrowSQL("setAutoCommit", mID, autoCommit);
}
@@ -416,10 +416,10 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL java_sql_Connecti
checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callObjectMethod(t.pEnv,"getTypeMap","()Ljava/util/Map;", mID);
// WARNING: the caller becomes the owner of the returned pointer
- return 0;
+ return nullptr;
}
void SAL_CALL java_sql_Connection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException, std::exception)
@@ -436,7 +436,7 @@ sal_Int32 SAL_CALL java_sql_Connection::getTransactionIsolation( ) throw(SQLExc
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethod_ThrowSQL("getTransactionIsolation", mID);
}
@@ -445,7 +445,7 @@ void SAL_CALL java_sql_Connection::setTransactionIsolation( sal_Int32 level ) th
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithIntArg_ThrowSQL("setTransactionIsolation", mID, level);
}
@@ -539,7 +539,7 @@ OUString SAL_CALL java_sql_Connection::nativeSQL( const OUString& sql ) throw(SQ
static const char * cSignature = "(Ljava/lang/String;)Ljava/lang/String;";
static const char * cMethodName = "nativeSQL";
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
// Convert Parameter
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,sql));
@@ -556,7 +556,7 @@ OUString SAL_CALL java_sql_Connection::nativeSQL( const OUString& sql ) throw(SQ
void SAL_CALL java_sql_Connection::clearWarnings( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("clearWarnings", mID);
}
@@ -566,7 +566,7 @@ Any SAL_CALL java_sql_Connection::getWarnings( ) throw(SQLException, RuntimeExc
checkDisposed(java_sql_Connection_BASE::rBHelper.bDisposed);
SDBThreadAttach t;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID);
// WARNING: the caller becomes the owner of the returned pointer
if( out )
@@ -620,7 +620,7 @@ namespace
return true;
LocalRef< jclass > systemClass( _rEnv );
- jmethodID nSetPropertyMethodID = 0;
+ jmethodID nSetPropertyMethodID = nullptr;
// retrieve the java.lang.System class
systemClass.set( _rEnv.FindClass( "java/lang/System" ) );
if ( systemClass.is() )
@@ -629,7 +629,7 @@ namespace
systemClass.get(), "setProperty", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" );
}
- if ( nSetPropertyMethodID == 0 )
+ if ( nSetPropertyMethodID == nullptr )
return false;
for ( const NamedValue* pSystemProp = _rSystemProperties.getConstArray();
@@ -810,7 +810,7 @@ bool java_sql_Connection::construct(const OUString& url,
if ( t.pEnv && m_Driver_theClass && m_pDriverobject )
{
// Java-Call
- jmethodID mID = NULL;
+ jmethodID mID = nullptr;
if ( !mID )
{
// initialize temporary Variable
@@ -828,7 +828,7 @@ bool java_sql_Connection::construct(const OUString& url,
LocalRef< jobject > ensureDelete( t.env(), args[0].l );
- jobject out = NULL;
+ jobject out = nullptr;
// In some cases (e.g.,
// connectivity/source/drivers/hsqldb/HDriver.cxx:1.24
// l. 249) the JavaDriverClassPath contains multiple jars,
@@ -845,7 +845,7 @@ bool java_sql_Connection::construct(const OUString& url,
{
ContextClassLoaderScope ccl( t.env(), getDriverClassLoader(), getLogger(), *this );
out = t.pEnv->CallObjectMethod( m_pDriverobject, mID, args[0].l,args[1].l );
- delete pProps, pProps = NULL;
+ delete pProps, pProps = nullptr;
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
@@ -861,7 +861,7 @@ bool java_sql_Connection::construct(const OUString& url,
m_aConnectionInfo = info;
} //mID
} //t.pEnv
- return object != NULL;
+ return object != nullptr;
}
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx
index 568a62404f66..c767011ddd0c 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -56,12 +56,12 @@ using namespace ::com::sun::star::lang;
//************ Class: java.sql.Statement
-jclass java_sql_Statement_Base::theClass = 0;
+jclass java_sql_Statement_Base::theClass = nullptr;
java_sql_Statement_Base::java_sql_Statement_Base( JNIEnv * pEnv, java_sql_Connection& _rCon )
:java_sql_Statement_BASE(m_aMutex)
- ,java_lang_Object( pEnv, NULL )
+ ,java_lang_Object( pEnv, nullptr )
,OPropertySetHelper(java_sql_Statement_BASE::rBHelper)
,m_pConnection( &_rCon )
,m_aLogger( _rCon.getLogger(), java::sql::ConnectionLog::STATEMENT )
@@ -85,14 +85,14 @@ void SAL_CALL OStatement_BASE2::disposing()
if ( object )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("close", mID);
}
::comphelper::disposeComponent(m_xGeneratedStatement);
if (m_pConnection)
m_pConnection->release();
- m_pConnection = NULL;
+ m_pConnection = nullptr;
dispose_ChildImpl();
java_sql_Statement_Base::disposing();
@@ -151,13 +151,13 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::getGeneratedValues( )
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
- jobject out(0);
+ jobject out(nullptr);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
// initialize temporary Variable
try
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
out = callResultSetMethod(t.env(),"getGeneratedKeys",mID);
}
catch(const SQLException&)
@@ -192,7 +192,7 @@ void SAL_CALL java_sql_Statement_Base::cancel( ) throw(RuntimeException, std::e
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowRuntime("cancel",mID);
}
@@ -214,7 +214,7 @@ void SAL_CALL java_sql_Statement::clearBatch( ) throw(::com::sun::star::sdbc::S
{
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("clearBatch", mID);
} //t.pEnv
}
@@ -235,7 +235,7 @@ sal_Bool SAL_CALL java_sql_Statement_Base::execute( const OUString& sql ) throw(
static const char * cSignature = "(Ljava/lang/String;)Z";
static const char * cMethodName = "execute";
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
// convert Parameter
jdbc::LocalRef< jstring > str( t.env(), convertwchar_tToJavaString( t.pEnv, sql ) );
@@ -260,7 +260,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const OU
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
m_aLogger.log( LogLevel::FINE, STR_LOG_EXECUTE_QUERY, sql );
- jobject out(0);
+ jobject out(nullptr);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
@@ -270,7 +270,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const OU
static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/ResultSet;";
static const char * cMethodName = "executeQuery";
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
// convert Parameter
jdbc::LocalRef< jstring > str( t.env(), convertwchar_tToJavaString( t.pEnv, sql ) );
@@ -286,7 +286,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const OU
}
} //t.pEnv
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this );
+ return out==nullptr ? nullptr : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this );
}
Reference< XConnection > SAL_CALL java_sql_Statement_Base::getConnection( ) throw(SQLException, RuntimeException, std::exception)
@@ -311,7 +311,7 @@ void SAL_CALL java_sql_Statement::addBatch( const OUString& sql ) throw(::com::s
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithStringArg("addBatch",mID,sql);
} //t.pEnv
}
@@ -324,7 +324,7 @@ Sequence< sal_Int32 > SAL_CALL java_sql_Statement::executeBatch( ) throw(::com:
Sequence< sal_Int32 > aSeq;
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jintArray out = static_cast<jintArray>(callObjectMethod(t.pEnv,"executeBatch","()[I", mID));
if (out)
{
@@ -347,7 +347,7 @@ sal_Int32 SAL_CALL java_sql_Statement_Base::executeUpdate( const OUString& sql )
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
m_sSqlStatement = sql;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethodWithStringArg("executeUpdate",mID,sql);
}
@@ -356,11 +356,11 @@ Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_Statement_Base
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callResultSetMethod(t.env(),"getResultSet",mID);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this );
+ return out==nullptr ? nullptr : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this );
}
@@ -368,7 +368,7 @@ sal_Int32 SAL_CALL java_sql_Statement_Base::getUpdateCount( ) throw(::com::sun:
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
sal_Int32 out = callIntMethod_ThrowSQL("getUpdateCount", mID);
m_aLogger.log( LogLevel::FINER, STR_LOG_UPDATE_COUNT, (sal_Int32)out );
return out;
@@ -377,7 +377,7 @@ sal_Int32 SAL_CALL java_sql_Statement_Base::getUpdateCount( ) throw(::com::sun:
sal_Bool SAL_CALL java_sql_Statement_Base::getMoreResults( ) throw(::com::sun::star::sdbc::SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "getMoreResults", mID );
}
@@ -387,7 +387,7 @@ Any SAL_CALL java_sql_Statement_Base::getWarnings( ) throw(::com::sun::star::sd
{
SDBThreadAttach t;
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID);
// WARNING: the caller becomes the owner of the returned pointer
if( out )
@@ -409,33 +409,33 @@ void SAL_CALL java_sql_Statement_Base::clearWarnings( ) throw(::com::sun::star:
{
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("clearWarnings", mID);
}
}
sal_Int32 java_sql_Statement_Base::getQueryTimeOut() throw(SQLException, RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_getProperty("getQueryTimeOut",mID);
}
sal_Int32 java_sql_Statement_Base::getMaxRows() throw(SQLException, RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_getProperty("getMaxRows",mID);
}
sal_Int32 java_sql_Statement_Base::getResultSetConcurrency() throw(SQLException, RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_getProperty("getResultSetConcurrency",mID,m_nResultSetConcurrency);
}
sal_Int32 java_sql_Statement_Base::getResultSetType() throw(SQLException, RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_getProperty("getResultSetType",mID,m_nResultSetType);
}
@@ -456,19 +456,19 @@ sal_Int32 java_sql_Statement_Base::impl_getProperty(const char* _pMethodName, jm
sal_Int32 java_sql_Statement_Base::getFetchDirection() throw(SQLException, RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_getProperty("getFetchDirection",mID);
}
sal_Int32 java_sql_Statement_Base::getFetchSize() throw(SQLException, RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_getProperty("getFetchSize",mID);
}
sal_Int32 java_sql_Statement_Base::getMaxFieldSize() throw(SQLException, RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return impl_getProperty("getMaxFieldSize",mID);
}
@@ -478,7 +478,7 @@ OUString java_sql_Statement_Base::getCursorName() throw(SQLException, RuntimeExc
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
try
{
return callStringMethod("getCursorName",mID);
@@ -495,7 +495,7 @@ void java_sql_Statement_Base::setQueryTimeOut(sal_Int32 _par0) throw(SQLExceptio
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithIntArg_ThrowRuntime("setQueryTimeOut", mID, _par0);
}
@@ -509,7 +509,7 @@ void java_sql_Statement_Base::setEscapeProcessing(bool _par0) throw(SQLException
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
m_bEscapeProcessing = _par0;
createStatement( t.pEnv );
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithBoolArg_ThrowRuntime("setEscapeProcessing", mID, _par0);
}
@@ -519,7 +519,7 @@ void java_sql_Statement_Base::setMaxRows(sal_Int32 _par0) throw(SQLException, Ru
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithIntArg_ThrowRuntime("setMaxRows", mID, _par0);
}
@@ -550,7 +550,7 @@ void java_sql_Statement_Base::setFetchDirection(sal_Int32 _par0) throw(SQLExcept
m_aLogger.log( LogLevel::FINER, STR_LOG_FETCH_DIRECTION, (sal_Int32)_par0 );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithIntArg_ThrowRuntime("setFetchDirection", mID, _par0);
}
@@ -562,7 +562,7 @@ void java_sql_Statement_Base::setFetchSize(sal_Int32 _par0) throw(SQLException,
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithIntArg_ThrowRuntime("setFetchSize", mID, _par0);
}
@@ -572,7 +572,7 @@ void java_sql_Statement_Base::setMaxFieldSize(sal_Int32 _par0) throw(SQLExceptio
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithIntArg_ThrowRuntime("setMaxFieldSize", mID, _par0);
}
@@ -583,7 +583,7 @@ void java_sql_Statement_Base::setCursorName(const OUString &_par0) throw(SQLExce
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithStringArg("setCursorName",mID,_par0);
} //t.pEnv
}
@@ -760,7 +760,7 @@ void java_sql_Statement_Base::getFastPropertyValue(
}
}
-jclass java_sql_Statement::theClass = 0;
+jclass java_sql_Statement::theClass = nullptr;
java_sql_Statement::~java_sql_Statement()
{}
@@ -783,8 +783,8 @@ void java_sql_Statement::createStatement(JNIEnv* _pEnv)
// initialize temporary variable
static const char * cMethodName = "createStatement";
// Java-Call
- jobject out = NULL;
- static jmethodID mID(NULL);
+ jobject out = nullptr;
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(II)Ljava/sql/Statement;";
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index 6838634f90c7..588cca1c095c 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -62,7 +62,7 @@ using namespace ::com::sun::star::lang;
SDBThreadAttach::SDBThreadAttach()
: m_aGuard(java_lang_Object::getVM())
- , pEnv(NULL)
+ , pEnv(nullptr)
{
pEnv = m_aGuard.getEnvironment();
OSL_ENSURE(pEnv,"Environment is nULL!");
@@ -93,7 +93,7 @@ void SDBThreadAttach::releaseRef()
}
// static variables of the class
-jclass java_lang_Object::theClass = 0;
+jclass java_lang_Object::theClass = nullptr;
jclass java_lang_Object::getMyClass() const
{
@@ -103,14 +103,14 @@ jclass java_lang_Object::getMyClass() const
}
// the actual constructor
java_lang_Object::java_lang_Object()
- : object( 0 )
+ : object( nullptr )
{
SDBThreadAttach::addRef();
}
// the protected-constructor for the derived classes
java_lang_Object::java_lang_Object( JNIEnv * pXEnv, jobject myObj )
- : object( NULL )
+ : object( nullptr )
{
SDBThreadAttach::addRef();
if( pXEnv && myObj )
@@ -131,7 +131,7 @@ void java_lang_Object::clearObject(JNIEnv& rEnv)
if( object )
{
rEnv.DeleteGlobalRef( object );
- object = NULL;
+ object = nullptr;
}
}
@@ -154,7 +154,7 @@ void java_lang_Object::saveRef( JNIEnv * pXEnv, jobject myObj )
OUString java_lang_Object::toString() const
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethod("toString",mID);
}
@@ -164,7 +164,7 @@ namespace
bool lcl_translateJNIExceptionToUNOException(
JNIEnv* _pEnvironment, const Reference< XInterface >& _rxContext, SQLException& _out_rException )
{
- jthrowable jThrow = _pEnvironment ? _pEnvironment->ExceptionOccurred() : NULL;
+ jthrowable jThrow = _pEnvironment ? _pEnvironment->ExceptionOccurred() : nullptr;
if ( !jThrow )
return false;
@@ -261,7 +261,7 @@ bool java_lang_Object::callBooleanMethod( const char* _pMethodName, jmethodID& _
obtainMethodId_throwSQL(t.pEnv, _pMethodName,"()Z", _inout_MethodID);
// call method
out = t.pEnv->CallBooleanMethod( object, _inout_MethodID );
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
return out;
}
@@ -274,7 +274,7 @@ bool java_lang_Object::callBooleanMethodWithIntArg( const char* _pMethodName, jm
obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(I)Z", _inout_MethodID);
// call method
out = t.pEnv->CallBooleanMethod( object, _inout_MethodID, _nArgument );
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
return out;
}
@@ -293,7 +293,7 @@ sal_Int32 java_lang_Object::callIntMethod_ThrowSQL(const char* _pMethodName, jme
obtainMethodId_throwSQL(t.pEnv, _pMethodName,"()I", _inout_MethodID);
// call method
jint out( t.pEnv->CallIntMethod( object, _inout_MethodID ) );
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
return (sal_Int32)out;
}
@@ -304,7 +304,7 @@ sal_Int32 java_lang_Object::callIntMethod_ThrowRuntime(const char* _pMethodName,
obtainMethodId_throwRuntime(t.pEnv, _pMethodName,"()I", _inout_MethodID);
// call method
jint out( t.pEnv->CallIntMethod( object, _inout_MethodID ) );
- ThrowRuntimeException(t.pEnv, NULL);
+ ThrowRuntimeException(t.pEnv, nullptr);
return (sal_Int32)out;
}
@@ -315,7 +315,7 @@ sal_Int32 java_lang_Object::callIntMethodWithIntArg_ThrowSQL( const char* _pMeth
obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(I)I", _inout_MethodID);
// call method
jint out( t.pEnv->CallIntMethod( object, _inout_MethodID , _nArgument) );
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
return (sal_Int32)out;
}
@@ -326,7 +326,7 @@ sal_Int32 java_lang_Object::callIntMethodWithIntArg_ThrowRuntime( const char* _p
obtainMethodId_throwRuntime(t.pEnv, _pMethodName,"(I)I", _inout_MethodID);
// call method
jint out( t.pEnv->CallIntMethod( object, _inout_MethodID , _nArgument) );
- ThrowRuntimeException(t.pEnv, NULL);
+ ThrowRuntimeException(t.pEnv, nullptr);
return (sal_Int32)out;
}
@@ -338,7 +338,7 @@ void java_lang_Object::callVoidMethod_ThrowSQL( const char* _pMethodName, jmetho
// call method
t.pEnv->CallVoidMethod( object, _inout_MethodID );
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
}
void java_lang_Object::callVoidMethod_ThrowRuntime( const char* _pMethodName, jmethodID& _inout_MethodID) const
@@ -349,7 +349,7 @@ void java_lang_Object::callVoidMethod_ThrowRuntime( const char* _pMethodName, jm
// call method
t.pEnv->CallVoidMethod( object, _inout_MethodID );
- ThrowRuntimeException(t.pEnv, NULL);
+ ThrowRuntimeException(t.pEnv, nullptr);
}
void java_lang_Object::callVoidMethodWithIntArg_ThrowSQL( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const
@@ -360,7 +360,7 @@ void java_lang_Object::callVoidMethodWithIntArg_ThrowSQL( const char* _pMethodNa
// call method
t.pEnv->CallVoidMethod( object, _inout_MethodID,_nArgument );
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
}
void java_lang_Object::callVoidMethodWithIntArg_ThrowRuntime( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const
@@ -371,7 +371,7 @@ void java_lang_Object::callVoidMethodWithIntArg_ThrowRuntime( const char* _pMeth
// call method
t.pEnv->CallVoidMethod( object, _inout_MethodID,_nArgument );
- ThrowRuntimeException(t.pEnv, NULL);
+ ThrowRuntimeException(t.pEnv, nullptr);
}
void java_lang_Object::callVoidMethodWithBoolArg_ThrowSQL( const char* _pMethodName, jmethodID& _inout_MethodID, bool _nArgument ) const
@@ -381,7 +381,7 @@ void java_lang_Object::callVoidMethodWithBoolArg_ThrowSQL( const char* _pMethodN
obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(Z)V", _inout_MethodID);
// call method
t.pEnv->CallVoidMethod( object, _inout_MethodID,int(_nArgument) );
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
}
void java_lang_Object::callVoidMethodWithBoolArg_ThrowRuntime( const char* _pMethodName, jmethodID& _inout_MethodID, bool _nArgument ) const
@@ -391,7 +391,7 @@ void java_lang_Object::callVoidMethodWithBoolArg_ThrowRuntime( const char* _pMet
obtainMethodId_throwRuntime(t.pEnv, _pMethodName,"(Z)V", _inout_MethodID);
// call method
t.pEnv->CallVoidMethod( object, _inout_MethodID,int(_nArgument) );
- ThrowRuntimeException(t.pEnv, NULL);
+ ThrowRuntimeException(t.pEnv, nullptr);
}
OUString java_lang_Object::callStringMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) const
@@ -410,7 +410,7 @@ jobject java_lang_Object::callObjectMethod( JNIEnv * _pEnv,const char* _pMethodN
obtainMethodId_throwSQL(_pEnv, _pMethodName,_pSignature, _inout_MethodID);
// call method
jobject out = _pEnv->CallObjectMethod( object, _inout_MethodID);
- ThrowSQLException( _pEnv, NULL );
+ ThrowSQLException( _pEnv, nullptr );
return out;
}
@@ -420,7 +420,7 @@ jobject java_lang_Object::callObjectMethodWithIntArg( JNIEnv * _pEnv,const char*
obtainMethodId_throwSQL(_pEnv, _pMethodName,_pSignature, _inout_MethodID);
// call method
jobject out = _pEnv->CallObjectMethod( object, _inout_MethodID,_nArgument );
- ThrowSQLException( _pEnv, NULL );
+ ThrowSQLException( _pEnv, nullptr );
return out;
}
@@ -441,7 +441,7 @@ void java_lang_Object::callVoidMethodWithStringArg( const char* _pMethodName, jm
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,_nArgument));
// call method
t.pEnv->CallVoidMethod( object, _inout_MethodID , str.get());
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
}
sal_Int32 java_lang_Object::callIntMethodWithStringArg( const char* _pMethodName, jmethodID& _inout_MethodID,const OUString& _nArgument ) const
@@ -462,7 +462,7 @@ sal_Int32 java_lang_Object::callIntMethodWithStringArg( const char* _pMethodName
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,_nArgument));
// call method
jint out = t.pEnv->CallIntMethod( object, _inout_MethodID , str.get());
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
return (sal_Int32)out;
}
diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
index 534219ef5a24..9aa42c8bc030 100644
--- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
+++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
@@ -55,7 +55,7 @@ java_sql_PreparedStatement::java_sql_PreparedStatement( JNIEnv * pEnv, java_sql_
m_sSqlStatement = sql;
}
-jclass java_sql_PreparedStatement::theClass = 0;
+jclass java_sql_PreparedStatement::theClass = nullptr;
java_sql_PreparedStatement::~java_sql_PreparedStatement()
{
@@ -100,7 +100,7 @@ sal_Bool SAL_CALL java_sql_PreparedStatement::execute( ) throw(::com::sun::star
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "execute", mID );
}
@@ -113,7 +113,7 @@ sal_Int32 SAL_CALL java_sql_PreparedStatement::executeUpdate( ) throw(::com::su
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethod_ThrowSQL("executeUpdate", mID);
}
@@ -130,7 +130,7 @@ void SAL_CALL java_sql_PreparedStatement::setString( sal_Int32 parameterIndex, c
static const char * cSignature = "(ILjava/lang/String;)V";
static const char * cMethodName = "setString";
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,x));
t.pEnv->CallVoidMethod( object, mID, parameterIndex,str.get());
@@ -154,10 +154,10 @@ void SAL_CALL java_sql_PreparedStatement::setString( sal_Int32 parameterIndex, c
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callResultSetMethod(t.env(),"executeQuery",mID);
- return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this);
+ return out==nullptr ? nullptr : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this);
}
@@ -169,7 +169,7 @@ void SAL_CALL java_sql_PreparedStatement::setBoolean( sal_Int32 parameterIndex,
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("setBoolean", "(IZ)V", mID, parameterIndex, x);
}
@@ -182,7 +182,7 @@ void SAL_CALL java_sql_PreparedStatement::setByte( sal_Int32 parameterIndex, sal
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("setByte", "(IB)V", mID, parameterIndex, x);
}
@@ -196,7 +196,7 @@ void SAL_CALL java_sql_PreparedStatement::setDate( sal_Int32 parameterIndex, con
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
java_sql_Date aT(x);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("setDate", "(ILjava/sql/Date;)V", mID, parameterIndex, aT.getJavaObject());
}
@@ -211,7 +211,7 @@ void SAL_CALL java_sql_PreparedStatement::setTime( sal_Int32 parameterIndex, con
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
java_sql_Time aT(x);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("setTime", "(ILjava/sql/Time;)V", mID, parameterIndex, aT.getJavaObject());
}
@@ -224,7 +224,7 @@ void SAL_CALL java_sql_PreparedStatement::setTimestamp( sal_Int32 parameterIndex
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
java_sql_Timestamp aD(x);
callVoidMethod_ThrowSQL("setTimestamp", "(ILjava/sql/Timestamp;)V", mID, parameterIndex, aD.getJavaObject());
}
@@ -237,7 +237,7 @@ void SAL_CALL java_sql_PreparedStatement::setDouble( sal_Int32 parameterIndex, d
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("setDouble", "(ID)V", mID, parameterIndex, x);
}
@@ -250,7 +250,7 @@ void SAL_CALL java_sql_PreparedStatement::setFloat( sal_Int32 parameterIndex, fl
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("setFloat", "(IF)V", mID, parameterIndex, x);
}
@@ -263,7 +263,7 @@ void SAL_CALL java_sql_PreparedStatement::setInt( sal_Int32 parameterIndex, sal_
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("setInt", "(II)V", mID, parameterIndex, x);
}
@@ -276,7 +276,7 @@ void SAL_CALL java_sql_PreparedStatement::setLong( sal_Int32 parameterIndex, sal
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("setLong", "(IJ)V", mID, parameterIndex, x);
}
@@ -289,7 +289,7 @@ void SAL_CALL java_sql_PreparedStatement::setNull( sal_Int32 parameterIndex, sal
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("setNull", "(II)V", mID, parameterIndex, sqlType);
}
@@ -332,10 +332,10 @@ void SAL_CALL java_sql_PreparedStatement::setObjectWithInfo( sal_Int32 parameter
static const char * cSignature = "(ILjava/lang/Object;II)V";
static const char * cMethodName = "setObject";
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
{
- jobject obj = NULL;
+ jobject obj = nullptr;
switch(targetSqlType)
{
case DataType::DECIMAL:
@@ -386,8 +386,8 @@ void SAL_CALL java_sql_PreparedStatement::setObjectNull( sal_Int32 parameterInde
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
- callVoidMethod_ThrowSQL<jobject>("setObject", "(ILjava/lang/Object;)V", mID, parameterIndex, NULL);
+ static jmethodID mID(nullptr);
+ callVoidMethod_ThrowSQL<jobject>("setObject", "(ILjava/lang/Object;)V", mID, parameterIndex, nullptr);
}
@@ -412,7 +412,7 @@ void SAL_CALL java_sql_PreparedStatement::setShort( sal_Int32 parameterIndex, sa
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("setShort", "(IS)V", mID, parameterIndex, x);
}
@@ -431,7 +431,7 @@ void SAL_CALL java_sql_PreparedStatement::setBytes( sal_Int32 parameterIndex, co
static const char * cSignature = "(I[B)V";
static const char * cMethodName = "setBytes";
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
jbyteArray pByteArray = t.pEnv->NewByteArray(x.getLength());
jbyte * xData = reinterpret_cast<jbyte *>(
@@ -465,7 +465,7 @@ void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 paramete
static const char * cSignature = "(ILjava/io/InputStream;I)V";
static const char * cMethodName = "setCharacterStream";
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
Sequence< sal_Int8 > aSeq;
if ( x.is() )
@@ -488,14 +488,14 @@ void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 paramete
args2[2].i = actualLength;
// Java-Call
jclass aClass = t.pEnv->FindClass("java/io/CharArrayInputStream");
- static jmethodID mID2 = NULL;
+ static jmethodID mID2 = nullptr;
if ( !mID2 )
{
// initialize temporary variable
const char * cSignatureStream = "([BII)V";
mID2 = t.pEnv->GetMethodID( aClass, "<init>", cSignatureStream );
}
- jobject tempObj = NULL;
+ jobject tempObj = nullptr;
if(mID2)
tempObj = t.pEnv->NewObjectA( aClass, mID2, args2 );
@@ -522,7 +522,7 @@ void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIn
static const char * cSignature = "(ILjava/io/InputStream;I)V";
static const char * cMethodName = "setBinaryStream";
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
{
Sequence< sal_Int8 > aSeq;
@@ -547,14 +547,14 @@ void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIn
// Java-Call
jclass aClass = t.pEnv->FindClass("java/io/ByteArrayInputStream");
- static jmethodID mID2 = NULL;
+ static jmethodID mID2 = nullptr;
if ( !mID2 )
{
// initialize temporary variable
const char * cSignatureStream = "([BII)V";
mID2 = t.pEnv->GetMethodID( aClass, "<init>", cSignatureStream );
}
- jobject tempObj = NULL;
+ jobject tempObj = nullptr;
if(mID2)
tempObj = t.pEnv->NewObjectA( aClass, mID2, args2 );
t.pEnv->CallVoidMethod( object, mID, parameterIndex,tempObj,(sal_Int32)actualLength);
@@ -578,7 +578,7 @@ void SAL_CALL java_sql_PreparedStatement::clearParameters( ) throw(::com::sun::
{
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("clearParameters",mID);
} //t.pEnv
}
@@ -590,7 +590,7 @@ void SAL_CALL java_sql_PreparedStatement::clearBatch( ) throw(::com::sun::star:
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("clearBatch",mID);
} //t.pEnv
}
@@ -603,7 +603,7 @@ void SAL_CALL java_sql_PreparedStatement::addBatch( ) throw(::com::sun::star::sd
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("addBatch", mID);
} //t.pEnv
}
@@ -616,7 +616,7 @@ void SAL_CALL java_sql_PreparedStatement::addBatch( ) throw(::com::sun::star::sd
::com::sun::star::uno::Sequence< sal_Int32 > aSeq;
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jintArray out = static_cast<jintArray>(callObjectMethod(t.pEnv,"executeBatch","()[I", mID));
if(out)
{
@@ -634,10 +634,10 @@ void SAL_CALL java_sql_PreparedStatement::addBatch( ) throw(::com::sun::star::sd
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethod(t.pEnv,"getMetaData","()Ljava/sql/ResultSetMetaData;", mID);
- return out==0 ? 0 : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection );
+ return out==nullptr ? nullptr : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection );
}
void SAL_CALL java_sql_PreparedStatement::acquire() throw()
@@ -663,8 +663,8 @@ void java_sql_PreparedStatement::createStatement(JNIEnv* _pEnv)
// convert Parameter
args[0].l = convertwchar_tToJavaString(_pEnv,m_sSqlStatement);
// Java-Call
- jobject out = NULL;
- static jmethodID mID(NULL);
+ jobject out = nullptr;
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(Ljava/lang/String;II)Ljava/sql/PreparedStatement;";
@@ -676,7 +676,7 @@ void java_sql_PreparedStatement::createStatement(JNIEnv* _pEnv)
}
else
{
- static jmethodID mID2 = NULL;
+ static jmethodID mID2 = nullptr;
if ( !mID2 )
{
static const char * cSignature2 = "(Ljava/lang/String;)Ljava/sql/PreparedStatement;";
diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx
index be913ddab16a..4e96bfad3baa 100644
--- a/connectivity/source/drivers/jdbc/Reader.cxx
+++ b/connectivity/source/drivers/jdbc/Reader.cxx
@@ -26,7 +26,7 @@ using ::com::sun::star::uno::Sequence;
//************ Class: java.io.Reader
-jclass java_io_Reader::theClass = 0;
+jclass java_io_Reader::theClass = nullptr;
java_io_Reader::java_io_Reader( JNIEnv * pEnv, jobject myObj )
: java_lang_Object( pEnv, myObj )
{
@@ -52,7 +52,7 @@ sal_Int32 SAL_CALL java_io_Reader::readSomeBytes( ::com::sun::star::uno::Sequenc
void SAL_CALL java_io_Reader::skipBytes( sal_Int32 nBytesToSkip ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if(nBytesToSkip <= 0)
return;
@@ -85,7 +85,7 @@ sal_Int32 SAL_CALL java_io_Reader::available( ) throw(::com::sun::star::io::Not
static const char * cSignature = "()Z";
static const char * cMethodName = "ready";
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwRuntime(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowRuntimeException(t.pEnv,*this);
@@ -95,7 +95,7 @@ sal_Int32 SAL_CALL java_io_Reader::available( ) throw(::com::sun::star::io::Not
void SAL_CALL java_io_Reader::closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowRuntime("close", mID);
}
@@ -136,7 +136,7 @@ sal_Int32 SAL_CALL java_io_Reader::readBytes( ::com::sun::star::uno::Sequence< s
static const char * cSignature = "([CII)I";
static const char * cMethodName = "read";
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwRuntime(t.pEnv, cMethodName,cSignature, mID);
outChars = t.pEnv->CallIntMethod( object, mID, pCharArray, 0, nCharsToRead );
if ( !outChars )
diff --git a/connectivity/source/drivers/jdbc/Ref.cxx b/connectivity/source/drivers/jdbc/Ref.cxx
index b6cad44e1b18..d2ef7854ceed 100644
--- a/connectivity/source/drivers/jdbc/Ref.cxx
+++ b/connectivity/source/drivers/jdbc/Ref.cxx
@@ -24,7 +24,7 @@ using namespace connectivity;
//************ Class: java.sql.Ref
-jclass java_sql_Ref::theClass = 0;
+jclass java_sql_Ref::theClass = nullptr;
java_sql_Ref::java_sql_Ref( JNIEnv * pEnv, jobject myObj )
: java_lang_Object( pEnv, myObj )
{
@@ -45,7 +45,7 @@ jclass java_sql_Ref::getMyClass() const
OUString SAL_CALL java_sql_Ref::getBaseTypeName( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethod("getBaseTypeName",mID);
}
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 8694b9dace4b..88fbf7d72d6c 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -62,7 +62,7 @@ IMPLEMENT_SERVICE_INFO(java_sql_ResultSet,"com.sun.star.sdbcx.JResultSet","com.s
//************ Class: java.sql.ResultSet
-jclass java_sql_ResultSet::theClass = 0;
+jclass java_sql_ResultSet::theClass = nullptr;
java_sql_ResultSet::java_sql_ResultSet( JNIEnv * pEnv, jobject myObj, const java::sql::ConnectionLog& _rParentLogger,java_sql_Connection& _rConnection, java_sql_Statement_Base* pStmt)
:java_sql_ResultSet_BASE(m_aMutex)
,java_lang_Object( pEnv, myObj )
@@ -105,7 +105,7 @@ m_xMetaData.clear();
if( object )
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("close", mID);
clearObject(*t.pEnv);
}
@@ -131,41 +131,41 @@ m_xMetaData.clear();
sal_Int32 SAL_CALL java_sql_ResultSet::findColumn( const OUString& columnName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethodWithStringArg("findColumn",mID,columnName);
}
Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getBinaryStream","(I)Ljava/io/InputStream;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_io_InputStream( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_io_InputStream( t.pEnv, out );
}
Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getCharacterStream","(I)Ljava/io/Reader;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_io_Reader( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_io_Reader( t.pEnv, out );
}
sal_Bool SAL_CALL java_sql_ResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "getBoolean", mID,columnIndex );
}
sal_Int8 SAL_CALL java_sql_ResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jbyte (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallByteMethod;
return callMethodWithIntArg<jbyte>(pCallMethod,"getByte","(I)B",mID,columnIndex);
}
@@ -175,7 +175,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde
{
Sequence< sal_Int8 > aSeq;
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jbyteArray out = static_cast<jbyteArray>(callObjectMethodWithIntArg(t.pEnv,"getBytes","(I)[B", mID, columnIndex));
if (out)
{
@@ -191,7 +191,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde
::com::sun::star::util::Date SAL_CALL java_sql_ResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getDate","(I)Ljava/sql/Date;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::Date> (java_sql_Date( t.pEnv, out )) : ::com::sun::star::util::Date();
@@ -200,7 +200,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde
double SAL_CALL java_sql_ResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jdouble (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallDoubleMethod;
return callMethodWithIntArg<double>(pCallMethod,"getDouble","(I)D",mID,columnIndex);
}
@@ -208,7 +208,7 @@ double SAL_CALL java_sql_ResultSet::getDouble( sal_Int32 columnIndex ) throw(SQL
float SAL_CALL java_sql_ResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jfloat (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallFloatMethod;
return callMethodWithIntArg<jfloat>(pCallMethod,"getFloat","(I)F",mID,columnIndex);
}
@@ -216,21 +216,21 @@ float SAL_CALL java_sql_ResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLEx
sal_Int32 SAL_CALL java_sql_ResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethodWithIntArg_ThrowSQL("getInt",mID,columnIndex);
}
sal_Int32 SAL_CALL java_sql_ResultSet::getRow( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethod_ThrowSQL("getRow", mID);
}
sal_Int64 SAL_CALL java_sql_ResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jlong (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallLongMethod;
return callMethodWithIntArg<jlong>(pCallMethod,"getLong","(I)J",mID,columnIndex);
}
@@ -239,56 +239,56 @@ sal_Int64 SAL_CALL java_sql_ResultSet::getLong( sal_Int32 columnIndex ) throw(SQ
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL java_sql_ResultSet::getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethod(t.pEnv,"getMetaData","()Ljava/sql/ResultSetMetaData;", mID);
- return out==0 ? 0 : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection );
+ return out==nullptr ? nullptr : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection );
}
Reference< XArray > SAL_CALL java_sql_ResultSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getArray","(I)Ljava/sql/Array;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_sql_Array( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_sql_Array( t.pEnv, out );
}
Reference< XClob > SAL_CALL java_sql_ResultSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getClob","(I)Ljava/sql/Clob;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_sql_Clob( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_sql_Clob( t.pEnv, out );
}
Reference< XBlob > SAL_CALL java_sql_ResultSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getBlob","(I)Ljava/sql/Blob;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_sql_Blob( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_sql_Blob( t.pEnv, out );
}
Reference< XRef > SAL_CALL java_sql_ResultSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getRef","(I)Ljava/sql/Ref;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
- return out==0 ? 0 : new java_sql_Ref( t.pEnv, out );
+ return out==nullptr ? nullptr : new java_sql_Ref( t.pEnv, out );
}
Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException, std::exception)
{
- jobject out(0);
+ jobject out(nullptr);
Any aRet;
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
@@ -298,7 +298,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
args[1].l = convertTypeMapToJavaMap(t.pEnv,typeMap);
// initialize temporary Variable
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(I)Ljava/lang/Object;";
@@ -321,7 +321,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
else if ( t.pEnv->IsInstanceOf(out,java_lang_Boolean::st_getMyClass()) )
{
java_lang_Boolean aVal(t.pEnv,out);
- static jmethodID methodID = NULL;
+ static jmethodID methodID = nullptr;
aRet <<= aVal.callBooleanMethod("booleanValue",methodID);
}
else if ( t.pEnv->IsInstanceOf(out,java_sql_Date::st_getMyClass()) )
@@ -349,7 +349,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jshort (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallShortMethod;
return callMethodWithIntArg<jshort>(pCallMethod,"getShort","(I)S",mID,columnIndex);
}
@@ -358,7 +358,7 @@ sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(S
OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethodWithIntArg("getString",mID,columnIndex);
}
@@ -367,7 +367,7 @@ OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(S
::com::sun::star::util::Time SAL_CALL java_sql_ResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTime","(I)Ljava/sql/Time;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time();
@@ -378,7 +378,7 @@ OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(S
::com::sun::star::util::DateTime SAL_CALL java_sql_ResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException, std::exception)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTimestamp","(I)Ljava/sql/Timestamp;", mID, columnIndex);
// WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime();
@@ -387,31 +387,31 @@ OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(S
sal_Bool SAL_CALL java_sql_ResultSet::isAfterLast( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "isAfterLast", mID );
}
sal_Bool SAL_CALL java_sql_ResultSet::isFirst( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "isFirst", mID );
}
sal_Bool SAL_CALL java_sql_ResultSet::isLast( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "isLast", mID );
}
void SAL_CALL java_sql_ResultSet::beforeFirst( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("beforeFirst", mID);
}
void SAL_CALL java_sql_ResultSet::afterLast( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("afterLast", mID);
}
@@ -424,32 +424,32 @@ void SAL_CALL java_sql_ResultSet::close( ) throw(::com::sun::star::sdbc::SQLExc
sal_Bool SAL_CALL java_sql_ResultSet::first( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "first", mID );
}
sal_Bool SAL_CALL java_sql_ResultSet::last( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "last", mID );
}
sal_Bool SAL_CALL java_sql_ResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "absolute", mID,row );
}
sal_Bool SAL_CALL java_sql_ResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "relative", mID,row );
}
sal_Bool SAL_CALL java_sql_ResultSet::previous( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "previous", mID );
}
@@ -461,58 +461,58 @@ Reference< XInterface > SAL_CALL java_sql_ResultSet::getStatement( ) throw(SQLE
sal_Bool SAL_CALL java_sql_ResultSet::rowDeleted( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "rowDeleted", mID );
}
sal_Bool SAL_CALL java_sql_ResultSet::rowInserted( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "rowInserted", mID );
}
sal_Bool SAL_CALL java_sql_ResultSet::rowUpdated( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "rowUpdated", mID );
}
sal_Bool SAL_CALL java_sql_ResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "isBeforeFirst", mID );
}
sal_Bool SAL_CALL java_sql_ResultSet::next( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "next", mID );
}
sal_Bool SAL_CALL java_sql_ResultSet::wasNull( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethod( "wasNull", mID );
}
void SAL_CALL java_sql_ResultSet::cancel( ) throw(::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowRuntime("cancel", mID);
}
void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("clearWarnings", mID);
}
::com::sun::star::uno::Any SAL_CALL java_sql_ResultSet::getWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
SDBThreadAttach t;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID);
// WARNING: the caller becomes the owner of the returned pointer
if( out )
@@ -529,79 +529,79 @@ void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc
void SAL_CALL java_sql_ResultSet::insertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("insertRow", mID);
}
void SAL_CALL java_sql_ResultSet::updateRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("updateRow", mID);
}
void SAL_CALL java_sql_ResultSet::deleteRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("deleteRow", mID);
}
void SAL_CALL java_sql_ResultSet::cancelRowUpdates( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("cancelRowUpdates", mID);
}
void SAL_CALL java_sql_ResultSet::moveToInsertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("moveToInsertRow", mID);
}
void SAL_CALL java_sql_ResultSet::moveToCurrentRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("moveToCurrentRow", mID);
}
void SAL_CALL java_sql_ResultSet::updateNull( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithIntArg_ThrowSQL("updateNull", mID, columnIndex);
}
void SAL_CALL java_sql_ResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("updateBoolean", "(IZ)V", mID, columnIndex, x);
}
void SAL_CALL java_sql_ResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("updateByte", "(IB)V", mID, columnIndex, x);
}
void SAL_CALL java_sql_ResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("updateShort", "(IS)V", mID, columnIndex, x);
}
void SAL_CALL java_sql_ResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("updateInt", "(II)V", mID, columnIndex, x);
}
void SAL_CALL java_sql_ResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("updateLong", "(IJ)V", mID, columnIndex, x);
}
@@ -609,14 +609,14 @@ void SAL_CALL java_sql_ResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x
void SAL_CALL java_sql_ResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("updateFloat", "(IF)V", mID, columnIndex, x);
}
void SAL_CALL java_sql_ResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("updateDouble", "(ID)V", mID, columnIndex, x);
}
@@ -628,7 +628,7 @@ void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const OUS
{
// initialize temporary variable
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(ILjava/lang/String;)V";
@@ -654,7 +654,7 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co
{
// initialize temporary variable
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(I[B)V";
@@ -686,7 +686,7 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co
void SAL_CALL java_sql_ResultSet::updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
java_sql_Date aD(x);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("updateDate", "(ILjava/sql/Date;)V", mID, columnIndex, aD.getJavaObject());
}
@@ -694,7 +694,7 @@ void SAL_CALL java_sql_ResultSet::updateDate( sal_Int32 columnIndex, const ::com
void SAL_CALL java_sql_ResultSet::updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
java_sql_Time aD(x);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("updateTime", "(ILjava/sql/Time;)V", mID, columnIndex, aD.getJavaObject());
}
@@ -702,7 +702,7 @@ void SAL_CALL java_sql_ResultSet::updateTime( sal_Int32 columnIndex, const ::com
void SAL_CALL java_sql_ResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
java_sql_Timestamp aD(x);
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("updateTimestamp", "(ILjava/sql/Timestamp;)V", mID, columnIndex, aD.getJavaObject());
}
@@ -716,7 +716,7 @@ void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, con
// initialize temporary variable
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(ILjava/io/InputStream;I)V";
@@ -747,7 +747,7 @@ void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex,
// initialize temporary variable
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(ILjava/io/Reader;I)V";
@@ -794,7 +794,7 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co
// initialize temporary variable
// Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(ILjava/lang/Object;I)V";
@@ -827,50 +827,50 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co
sal_Int32 java_sql_ResultSet::getResultSetConcurrency() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethod_ThrowRuntime("getConcurrency", mID);
}
sal_Int32 java_sql_ResultSet::getResultSetType() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethod_ThrowRuntime("getType",mID);
}
sal_Int32 java_sql_ResultSet::getFetchDirection() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethod_ThrowRuntime("getFetchDirection", mID);
}
sal_Int32 java_sql_ResultSet::getFetchSize() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethod_ThrowRuntime("getFetchSize", mID);
}
OUString java_sql_ResultSet::getCursorName() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethod("getCursorName",mID);
}
void java_sql_ResultSet::setFetchDirection(sal_Int32 _par0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithIntArg_ThrowRuntime("setFetchDirection", mID, _par0);
}
void SAL_CALL java_sql_ResultSet::refreshRow( ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethod_ThrowSQL("refreshRow",mID);
}
void java_sql_ResultSet::setFetchSize(sal_Int32 _par0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
callVoidMethodWithIntArg_ThrowRuntime("setFetchSize", mID, _par0);
}
diff --git a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
index 508d76950163..fa72a45eb23f 100644
--- a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
@@ -32,7 +32,7 @@ using namespace ::com::sun::star::lang;
//************ Class: java.sql.ResultSetMetaData
-jclass java_sql_ResultSetMetaData::theClass = 0;
+jclass java_sql_ResultSetMetaData::theClass = nullptr;
java_sql_ResultSetMetaData::java_sql_ResultSetMetaData( JNIEnv * pEnv, jobject myObj, const java::sql::ConnectionLog& _rResultSetLogger, java_sql_Connection& _rCon )
:java_lang_Object( pEnv, myObj )
,m_aLogger( _rResultSetLogger )
@@ -57,14 +57,14 @@ jclass java_sql_ResultSetMetaData::getMyClass() const
sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethodWithIntArg_ThrowSQL("getColumnDisplaySize",mID,column);
}
sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethodWithIntArg_ThrowSQL("getColumnType",mID,column);
}
@@ -73,7 +73,7 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnCount( ) throw(SQLExcep
{
if ( m_nColumnCount == -1 )
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
m_nColumnCount = callIntMethod_ThrowSQL("getColumnCount", mID);
} // if ( m_nColumnCount == -1 )
return m_nColumnCount;
@@ -83,50 +83,50 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnCount( ) throw(SQLExcep
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "isCaseSensitive", mID,column );
}
OUString SAL_CALL java_sql_ResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethodWithIntArg("getSchemaName",mID,column);
}
OUString SAL_CALL java_sql_ResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethodWithIntArg("getColumnName",mID,column);
}
OUString SAL_CALL java_sql_ResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethodWithIntArg("getTableName",mID,column);
}
OUString SAL_CALL java_sql_ResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethodWithIntArg("getCatalogName",mID,column);
}
OUString SAL_CALL java_sql_ResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethodWithIntArg("getColumnTypeName",mID,column);
}
OUString SAL_CALL java_sql_ResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethodWithIntArg("getColumnLabel",mID,column);
}
OUString SAL_CALL java_sql_ResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethodWithIntArg("getColumnClassName",mID,column);
}
@@ -135,14 +135,14 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCurrency( sal_Int32 column ) thr
{
if ( m_pConnection->isIgnoreCurrencyEnabled() )
return sal_False;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "isCurrency", mID,column );
}
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "isAutoIncrement", mID,column );
}
@@ -150,52 +150,52 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isAutoIncrement( sal_Int32 column
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "isSigned", mID,column );
}
sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethodWithIntArg_ThrowSQL("getPrecision",mID,column);
}
sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethodWithIntArg_ThrowSQL("getScale",mID,column);
}
sal_Int32 SAL_CALL java_sql_ResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethodWithIntArg_ThrowSQL("isNullable",mID,column);
}
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "isSearchable", mID,column );
}
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "isReadOnly", mID,column );
}
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "isDefinitelyWritable", mID,column );
}
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception)
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callBooleanMethodWithIntArg( "isWritable", mID,column );
}
diff --git a/connectivity/source/drivers/jdbc/SQLException.cxx b/connectivity/source/drivers/jdbc/SQLException.cxx
index c05650e66beb..882d6cb6da33 100644
--- a/connectivity/source/drivers/jdbc/SQLException.cxx
+++ b/connectivity/source/drivers/jdbc/SQLException.cxx
@@ -43,7 +43,7 @@ java_sql_SQLException_BASE::java_sql_SQLException_BASE( JNIEnv * pEnv, jobject m
{
}
-jclass java_sql_SQLException_BASE::theClass = 0;
+jclass java_sql_SQLException_BASE::theClass = nullptr;
java_sql_SQLException_BASE::~java_sql_SQLException_BASE()
{}
@@ -64,13 +64,13 @@ jclass java_sql_SQLException_BASE::st_getMyClass()
css::sdbc::SQLException java_sql_SQLException_BASE::getNextException() const
{
SDBThreadAttach t;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
jobject out = callObjectMethod(t.pEnv,"getNextException","()Ljava/sql/SQLException;", mID);
// WARNING: the caller will become the owner of the returned pointers !!!
if( out )
{
java_sql_SQLException_BASE warn_base(t.pEnv,out);
- return css::sdbc::SQLException(java_sql_SQLException(warn_base,0));
+ return css::sdbc::SQLException(java_sql_SQLException(warn_base,nullptr));
}
return css::sdbc::SQLException();
@@ -78,12 +78,12 @@ css::sdbc::SQLException java_sql_SQLException_BASE::getNextException() const
OUString java_sql_SQLException_BASE::getSQLState() const
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethod("getSQLState",mID);
}
sal_Int32 java_sql_SQLException_BASE::getErrorCode() const
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callIntMethod_ThrowSQL("getErrorCode", mID);
}
diff --git a/connectivity/source/drivers/jdbc/SQLWarning.cxx b/connectivity/source/drivers/jdbc/SQLWarning.cxx
index 68cb63a39924..b23526770717 100644
--- a/connectivity/source/drivers/jdbc/SQLWarning.cxx
+++ b/connectivity/source/drivers/jdbc/SQLWarning.cxx
@@ -23,7 +23,7 @@ using namespace connectivity;
//************ Class: java.sql.SQLWarning
-jclass java_sql_SQLWarning_BASE::theClass = 0;
+jclass java_sql_SQLWarning_BASE::theClass = nullptr;
java_sql_SQLWarning_BASE::~java_sql_SQLWarning_BASE()
{}
diff --git a/connectivity/source/drivers/jdbc/String.cxx b/connectivity/source/drivers/jdbc/String.cxx
index db873c1bdcb6..db3553586338 100644
--- a/connectivity/source/drivers/jdbc/String.cxx
+++ b/connectivity/source/drivers/jdbc/String.cxx
@@ -24,7 +24,7 @@ using namespace connectivity;
//************ Class: java.lang.String
-jclass java_lang_String::theClass = 0;
+jclass java_lang_String::theClass = nullptr;
java_lang_String::~java_lang_String()
{}
diff --git a/connectivity/source/drivers/jdbc/Throwable.cxx b/connectivity/source/drivers/jdbc/Throwable.cxx
index d4172bd93300..f278224459c4 100644
--- a/connectivity/source/drivers/jdbc/Throwable.cxx
+++ b/connectivity/source/drivers/jdbc/Throwable.cxx
@@ -24,7 +24,7 @@ using namespace connectivity;
//************ Class: java.lang.Throwable
-jclass java_lang_Throwable::theClass = 0;
+jclass java_lang_Throwable::theClass = nullptr;
java_lang_Throwable::~java_lang_Throwable()
{}
@@ -44,21 +44,21 @@ jclass java_lang_Throwable::st_getMyClass()
OUString java_lang_Throwable::getMessage() const
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethod("getMessage",mID);
}
OUString java_lang_Throwable::getLocalizedMessage() const
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callStringMethod("getLocalizedMessage",mID);
}
#if OSL_DEBUG_LEVEL > 0
void java_lang_Throwable::printStackTrace() const
{
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
return callVoidMethod_ThrowSQL("printStackTrace",mID);
}
#endif
diff --git a/connectivity/source/drivers/jdbc/Timestamp.cxx b/connectivity/source/drivers/jdbc/Timestamp.cxx
index 492539ef9eba..791b86fc4ed2 100644
--- a/connectivity/source/drivers/jdbc/Timestamp.cxx
+++ b/connectivity/source/drivers/jdbc/Timestamp.cxx
@@ -28,8 +28,8 @@ using namespace connectivity;
//************ Class: java.sql.Date
-jclass java_sql_Date::theClass = 0;
-java_sql_Date::java_sql_Date( const ::com::sun::star::util::Date& _rOut ) : java_util_Date( NULL, nullptr )
+jclass java_sql_Date::theClass = nullptr;
+java_sql_Date::java_sql_Date( const ::com::sun::star::util::Date& _rOut ) : java_util_Date( nullptr, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
@@ -43,7 +43,7 @@ java_sql_Date::java_sql_Date( const ::com::sun::star::util::Date& _rOut ) : java
// Turn of Java-Call for the constructor
// initialise temporary variables
jobject tempObj;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/Date;";
@@ -81,7 +81,7 @@ java_sql_Date::operator ::com::sun::star::util::Date()
//************ Class: java.sql.Time
-jclass java_sql_Time::theClass = 0;
+jclass java_sql_Time::theClass = nullptr;
java_sql_Time::~java_sql_Time()
{}
@@ -97,7 +97,7 @@ jclass java_sql_Time::st_getMyClass()
theClass = findMyClass("java/sql/Time");
return theClass;
}
-java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_util_Date( NULL, nullptr )
+java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_util_Date( nullptr, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
@@ -112,7 +112,7 @@ java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_
// Turn off Java-Call for the constructor
// intialise temporary variables
jobject tempObj;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/Time;";
@@ -134,7 +134,7 @@ java_sql_Time::operator ::com::sun::star::util::Time()
//************ Class: java.sql.Timestamp
-jclass java_sql_Timestamp::theClass = 0;
+jclass java_sql_Timestamp::theClass = nullptr;
java_sql_Timestamp::~java_sql_Timestamp()
{}
@@ -153,7 +153,7 @@ jclass java_sql_Timestamp::st_getMyClass()
}
java_sql_Timestamp::java_sql_Timestamp(const ::com::sun::star::util::DateTime& _rOut)
- :java_util_Date( NULL, nullptr )
+ :java_util_Date( nullptr, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
@@ -168,7 +168,7 @@ java_sql_Timestamp::java_sql_Timestamp(const ::com::sun::star::util::DateTime& _
// Turn off Java-Call for the constructor
// initialise temporary variables
jobject tempObj;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/Timestamp;";
diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx
index 753a6a81d9fc..3ef8a7fa37e8 100644
--- a/connectivity/source/drivers/jdbc/jservices.cxx
+++ b/connectivity/source/drivers/jdbc/jservices.cxx
@@ -63,7 +63,7 @@ struct ProviderRequest
{
try
{
- xRet = creator( xServiceManager, sImplementationName,Factory, Services,0);
+ xRet = creator( xServiceManager, sImplementationName,Factory, Services,nullptr);
}
catch(...)
{
@@ -80,7 +80,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL jdbc_component_getFactory(
void* pServiceManager,
void* /*pRegistryKey*/)
{
- void* pRet = 0;
+ void* pRet = nullptr;
if (pServiceManager)
{
ProviderRequest aReq(pServiceManager,pImplementationName);
diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx
index a528e1128b7d..a2e0a29062b3 100644
--- a/connectivity/source/drivers/jdbc/tools.cxx
+++ b/connectivity/source/drivers/jdbc/tools.cxx
@@ -38,7 +38,7 @@ using namespace ::com::sun::star::lang;
void java_util_Properties::setProperty(const OUString& key, const OUString& value)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- jobject out(0);
+ jobject out(nullptr);
{
jvalue args[2];
@@ -49,19 +49,19 @@ void java_util_Properties::setProperty(const OUString& key, const OUString& valu
static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;";
static const char * cMethodName = "setProperty";
// Turn off Java-Call
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallObjectMethod(object, mID, args[0].l,args[1].l);
- ThrowSQLException(t.pEnv,NULL);
+ ThrowSQLException(t.pEnv,nullptr);
t.pEnv->DeleteLocalRef(static_cast<jstring>(args[1].l));
t.pEnv->DeleteLocalRef(static_cast<jstring>(args[0].l));
- ThrowSQLException(t.pEnv,0);
+ ThrowSQLException(t.pEnv,nullptr);
if(out)
t.pEnv->DeleteLocalRef(out);
} //t.pEnv
// WARNING: The caller will be owner of the returned pointers!!!
}
-jclass java_util_Properties::theClass = 0;
+jclass java_util_Properties::theClass = nullptr;
java_util_Properties::~java_util_Properties()
{}
@@ -75,7 +75,7 @@ jclass java_util_Properties::getMyClass() const
}
-java_util_Properties::java_util_Properties( ): java_lang_Object( NULL, nullptr )
+java_util_Properties::java_util_Properties( ): java_lang_Object( nullptr, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
@@ -84,7 +84,7 @@ java_util_Properties::java_util_Properties( ): java_lang_Object( NULL, nullptr )
// Initialize temperary Variables
static const char * cSignature = "()V";
jobject tempObj;
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
obtainMethodId_throwSQL(t.pEnv, "<init>",cSignature, mID);
tempObj = t.pEnv->NewObject( getMyClass(), mID);
saveRef( t.pEnv, tempObj );
@@ -178,9 +178,9 @@ jobject connectivity::convertTypeMapToJavaMap(JNIEnv* /*pEnv*/,const Reference<
{
::com::sun::star::uno::Sequence< OUString > aNames = _rMap->getElementNames();
if ( aNames.getLength() > 0 )
- ::dbtools::throwFeatureNotImplementedSQLException( "Type maps", NULL );
+ ::dbtools::throwFeatureNotImplementedSQLException( "Type maps", nullptr );
}
- return 0;
+ return nullptr;
}
bool connectivity::isExceptionOccurred(JNIEnv *pEnv,bool _bClear)
@@ -189,7 +189,7 @@ bool connectivity::isExceptionOccurred(JNIEnv *pEnv,bool _bClear)
return false;
jthrowable pThrowable = pEnv->ExceptionOccurred();
- bool bRet = pThrowable != NULL;
+ bool bRet = pThrowable != nullptr;
if ( pThrowable )
{
if ( _bClear )
@@ -204,11 +204,11 @@ jobject connectivity::createByteInputStream(const ::com::sun::star::uno::Referen
{
SDBThreadAttach t;
if( !t.pEnv || !x.is() )
- return NULL;
+ return nullptr;
// Turn off Java-Call for the constructor
// Initialize temperary variables
jclass clazz = java_lang_Object::findMyClass("java/io/ByteArrayInputStream");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "([B)V";
@@ -231,11 +231,11 @@ jobject connectivity::createCharArrayReader(const ::com::sun::star::uno::Referen
{
SDBThreadAttach t;
if( !t.pEnv || !x.is() )
- return NULL;
+ return nullptr;
// Turn off Java-Call for the constructor
// Initialize temperary Variables
jclass clazz = java_lang_Object::findMyClass("java/io/CharArrayReader");
- static jmethodID mID(NULL);
+ static jmethodID mID(nullptr);
if ( !mID )
{
static const char * cSignature = "([C)V";
diff --git a/connectivity/source/drivers/mork/MColumns.cxx b/connectivity/source/drivers/mork/MColumns.cxx
index 156709f03a72..eeb36a3d068a 100644
--- a/connectivity/source/drivers/mork/MColumns.cxx
+++ b/connectivity/source/drivers/mork/MColumns.cxx
@@ -49,7 +49,7 @@ sdbcx::ObjectType OColumns::createObject(const OUString& _rName)
Reference< XResultSet > xResult = m_pTable->getConnection()->getMetaData()->getColumns(
aCatalog, sSchemaName, sTableName, _rName);
- sdbcx::ObjectType xRet = NULL;
+ sdbcx::ObjectType xRet = nullptr;
if(xResult.is())
{
Reference< XRow > xRow(xResult,UNO_QUERY);
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index 76159128b406..e836938ca6c1 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -61,7 +61,7 @@ OConnection::~OConnection()
if(!isClosed())
close();
m_pDriver->release();
- m_pDriver = NULL;
+ m_pDriver = nullptr;
delete m_pProfileAccess;
delete m_pBook;
delete m_pHistory;
@@ -229,7 +229,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUStrin
SAL_INFO("connectivity.mork", "sql: " << _sSql);
::dbtools::throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this );
SAL_INFO("connectivity.mork", "OConnection::prepareCall( " << _sSql << " )");
- return NULL;
+ return nullptr;
}
OUString SAL_CALL OConnection::nativeSQL( const OUString& _sSql ) throw(SQLException, RuntimeException, std::exception)
@@ -329,7 +329,7 @@ sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException,
Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getTypeMap( ) throw(SQLException, RuntimeException, std::exception)
{
// if your driver has special database types you can return it here
- return NULL;
+ return nullptr;
}
void SAL_CALL OConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException, std::exception)
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
index 39eb87d34597..0d9076421ba3 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
@@ -1016,7 +1016,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
index 9d6c4e937c25..6c6efb57a7c7 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
@@ -106,7 +106,7 @@ bool MDatabaseMetaDataHelper::getTables( OConnection* _pCon,
return false;
for ( size_t i = 0; i < tables.size(); i++ ) {
- ODatabaseMetaDataResultSet::ORow aRow { NULL, NULL, NULL };
+ ODatabaseMetaDataResultSet::ORow aRow { nullptr, nullptr, nullptr };
OUString aTableName = tables[i];
SAL_INFO("connectivity.mork", "TableName: " << aTableName );
diff --git a/connectivity/source/drivers/mork/MNSFolders.cxx b/connectivity/source/drivers/mork/MNSFolders.cxx
index 1ea558ca12e4..1dad6e4c91b5 100644
--- a/connectivity/source/drivers/mork/MNSFolders.cxx
+++ b/connectivity/source/drivers/mork/MNSFolders.cxx
@@ -78,8 +78,8 @@ namespace
{ "Firefox/", NULL, NULL, NULL },
{ "../Thunderbird/", NULL, NULL, NULL }
#else
- { ".mozilla/seamonkey/", NULL, NULL, NULL },
- { ".mozilla/firefox/", NULL, NULL, NULL },
+ { ".mozilla/seamonkey/", nullptr, nullptr, nullptr },
+ { ".mozilla/firefox/", nullptr, nullptr, nullptr },
{ ".thunderbird/", ".mozilla-thunderbird/", ".mozilla/thunderbird/", ".icedove/" }
#endif
};
@@ -117,7 +117,7 @@ namespace
// check all possible candidates
for ( size_t i=0; i<NB_CANDIDATES; ++i )
{
- if ( NULL == DefaultProductDir[ productIndex ][ i ] )
+ if ( nullptr == DefaultProductDir[ productIndex ][ i ] )
break;
sProductDirCandidate = lcl_getUserDataDirectory() +
diff --git a/connectivity/source/drivers/mork/MNSINIParser.cxx b/connectivity/source/drivers/mork/MNSINIParser.cxx
index 154099fd5e6d..585b58497b52 100644
--- a/connectivity/source/drivers/mork/MNSINIParser.cxx
+++ b/connectivity/source/drivers/mork/MNSINIParser.cxx
@@ -35,7 +35,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce
}
SAL_INFO("connectivity.mork", "IniParser: " << iniUrl);
- oslFileHandle handle=NULL;
+ oslFileHandle handle=nullptr;
fileError = osl_openFile(iniUrl.pData, &handle, osl_File_OpenFlag_Read);
if (osl_File_E_None == fileError)
diff --git a/connectivity/source/drivers/mork/MPreparedStatement.cxx b/connectivity/source/drivers/mork/MPreparedStatement.cxx
index f78197fa50f9..df22af3b012b 100644
--- a/connectivity/source/drivers/mork/MPreparedStatement.cxx
+++ b/connectivity/source/drivers/mork/MPreparedStatement.cxx
@@ -70,9 +70,9 @@ void SAL_CALL OPreparedStatement::disposing()
if(m_aParameterRow.is())
{
m_aParameterRow->get().clear();
- m_aParameterRow = NULL;
+ m_aParameterRow = nullptr;
}
- m_xParamColumns = NULL;
+ m_xParamColumns = nullptr;
}
@@ -113,7 +113,7 @@ void OPreparedStatement::clearCachedResultSet()
void OPreparedStatement::cacheResultSet( const ::rtl::Reference< OResultSet >& _pResult )
{
OCommonStatement::cacheResultSet( _pResult );
- OSL_PRECOND( m_pResultSet == NULL, "OPreparedStatement::parseSql: you should call clearCachedResultSet before!" );
+ OSL_PRECOND( m_pResultSet == nullptr, "OPreparedStatement::parseSql: you should call clearCachedResultSet before!" );
m_pResultSet = _pResult;
}
@@ -480,7 +480,7 @@ aParseNodes.begin();
void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes)
{
- OSL_ENSURE(pParseNode != NULL,"OResultSet: internal error: invalid ParseNode");
+ OSL_ENSURE(pParseNode != nullptr,"OResultSet: internal error: invalid ParseNode");
// Parameter Name-Row found?
if (SQL_ISRULE(pParseNode,parameter))
@@ -500,7 +500,7 @@ void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector<
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL OPreparedStatement::getResultSet( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
sal_Int32 SAL_CALL OPreparedStatement::getUpdateCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception)
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index 94da5b8df579..2b42921df0c1 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -99,7 +99,7 @@ void MQueryHelper::setAddressbook(OUString &ab)
void MQueryHelper::append(MQueryHelperResultEntry* resEnt)
{
- if ( resEnt != NULL ) {
+ if ( resEnt != nullptr ) {
m_aResults.push_back( resEnt );
m_bAtEnd = false;
}
@@ -130,7 +130,7 @@ MQueryHelper::getByIndex(sal_uInt32 nRow)
// Row numbers are from 1 to N, need to ensure this, and then
// subtract 1
if ( nRow < 1 ) {
- return NULL;
+ return nullptr;
}
return m_aResults[nRow -1];
}
@@ -163,8 +163,8 @@ bool MQueryHelper::getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUS
{
MQueryHelperResultEntry* xResEntry = getByIndex( nDBRow );
- OSL_ENSURE( xResEntry != NULL, "xResEntry == NULL");
- if (xResEntry == NULL )
+ OSL_ENSURE( xResEntry != nullptr, "xResEntry == NULL");
+ if (xResEntry == nullptr )
{
rValue.setNull();
return false;
@@ -216,7 +216,7 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
MorkTableMap *Tables = xMork->getTables( 0x80 );
if (!Tables)
return -1;
- MorkRowMap *Rows = 0;
+ MorkRowMap *Rows = nullptr;
MorkRowMap::Map::iterator rowIter;
// Iterate all tables
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 4a6561caf997..b0e2f3e2713e 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -90,7 +90,7 @@ OResultSet::OResultSet(OCommonStatement* pStmt, const std::shared_ptr< connectiv
,OPropertySetHelper(OResultSet_BASE::rBHelper)
,m_pStatement(pStmt)
,m_xStatement(*pStmt)
- ,m_xMetaData(NULL)
+ ,m_xMetaData(nullptr)
,m_nRowPos(0)
,m_nOldRowPos(0)
,m_bWasNull(false)
@@ -101,11 +101,11 @@ OResultSet::OResultSet(OCommonStatement* pStmt, const std::shared_ptr< connectiv
,m_pSQLIterator( _pSQLIterator )
,m_pParseTree( _pSQLIterator->getParseTree() )
,m_aQueryHelper(pStmt->getOwnConnection()->getColumnAlias())
- ,m_pTable(NULL)
+ ,m_pTable(nullptr)
,m_CurrentRowCount(0)
,m_nParamIndex(0)
,m_bIsAlwaysFalseQuery(false)
- ,m_pKeySet(NULL)
+ ,m_pKeySet(nullptr)
,m_nNewRow(0)
,m_nUpdatedRow(0)
,m_RowStates(0)
@@ -127,14 +127,14 @@ void OResultSet::disposing()
m_xStatement.clear();
m_xMetaData.clear();
- m_pParseTree = NULL;
- m_xColumns = NULL;
- m_xParamColumns = NULL;
- m_pKeySet = NULL;
+ m_pParseTree = nullptr;
+ m_xColumns = nullptr;
+ m_xParamColumns = nullptr;
+ m_pKeySet = nullptr;
if(m_pTable)
{
m_pTable->release();
- m_pTable = NULL;
+ m_pTable = nullptr;
}
}
@@ -188,12 +188,12 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQ
Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
@@ -275,25 +275,25 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLEx
Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
@@ -750,10 +750,10 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
MQueryOp::cond_type op( MQueryOp::Is );
OUString matchString;
- if ( parseTree == NULL )
+ if ( parseTree == nullptr )
return;
- if ( m_pSQLIterator->getParseTree() != NULL ) {
+ if ( m_pSQLIterator->getParseTree() != nullptr ) {
::rtl::Reference<OSQLColumns> xColumns = m_pSQLIterator->getParameters();
if(xColumns.is())
{
@@ -1059,7 +1059,7 @@ void OResultSet::fillRowData()
const OSQLParseNode* pParseTree = m_pSQLIterator->getWhereTree();
m_bIsAlwaysFalseQuery = false;
- if ( pParseTree != NULL )
+ if ( pParseTree != nullptr )
{
// Extract required info
diff --git a/connectivity/source/drivers/mork/MResultSetMetaData.cxx b/connectivity/source/drivers/mork/MResultSetMetaData.cxx
index b32db2fc90b9..52b63a3db086 100644
--- a/connectivity/source/drivers/mork/MResultSetMetaData.cxx
+++ b/connectivity/source/drivers/mork/MResultSetMetaData.cxx
@@ -37,7 +37,7 @@ using namespace ::comphelper;
OResultSetMetaData::~OResultSetMetaData()
{
- m_xColumns = NULL;
+ m_xColumns = nullptr;
}
diff --git a/connectivity/source/drivers/mork/MServices.cxx b/connectivity/source/drivers/mork/MServices.cxx
index ae8b4568d368..63e80a153e2c 100644
--- a/connectivity/source/drivers/mork/MServices.cxx
+++ b/connectivity/source/drivers/mork/MServices.cxx
@@ -21,8 +21,8 @@ static cppu::ImplementationEntry const services[] = {
{ &connectivity::mork::create,
&connectivity::mork::MorkDriver::getImplementationName_Static,
&connectivity::mork::MorkDriver::getSupportedServiceNames_Static,
- &cppu::createSingleComponentFactory, 0, 0 },
- { 0, 0, 0, 0, 0, 0 }
+ &cppu::createSingleComponentFactory, nullptr, 0 },
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
}
diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx
index 0d6883faf07d..5cfa0dc2425c 100644
--- a/connectivity/source/drivers/mork/MStatement.cxx
+++ b/connectivity/source/drivers/mork/MStatement.cxx
@@ -77,14 +77,14 @@ OCommonStatement::OCommonStatement(OConnection* _pConnection )
:OCommonStatement_IBASE(m_aMutex)
,OPropertySetHelper(OCommonStatement_IBASE::rBHelper)
,OCommonStatement_SBASE(static_cast<cppu::OWeakObject*>(_pConnection), this)
- ,m_pTable(NULL)
+ ,m_pTable(nullptr)
,m_pConnection(_pConnection)
,m_aParser( comphelper::getComponentContext(_pConnection->getDriver()->getFactory()) )
- ,m_pSQLIterator( new OSQLParseTreeIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser, NULL ) )
+ ,m_pSQLIterator( new OSQLParseTreeIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser, nullptr ) )
,rBHelper(OCommonStatement_IBASE::rBHelper)
{
m_xDBMetaData = _pConnection->getMetaData();
- m_pParseTree = NULL;
+ m_pParseTree = nullptr;
m_pConnection->acquire();
}
@@ -103,7 +103,7 @@ void OCommonStatement::disposing()
if (m_pConnection)
m_pConnection->release();
- m_pConnection = NULL;
+ m_pConnection = nullptr;
m_pSQLIterator->dispose();
delete m_pParseTree;
@@ -281,7 +281,7 @@ Reference< XResultSet > SAL_CALL OCommonStatement::executeQuery( const OUString&
// parse the statement
StatementType eStatementType = parseSql( sql );
if ( eStatementType != eSelect )
- return NULL;
+ return nullptr;
return impl_executeCurrentQuery();
}
@@ -500,7 +500,7 @@ void OCommonStatement::setOrderbyColumn( OSQLParseNode* pColumnRef,
aColumnName = pColumnRef->getChild(0)->getTokenValue();
else if (pColumnRef->count() == 3)
{
- pColumnRef->getChild(2)->parseNodeToStr( aColumnName, getOwnConnection(), NULL, false, false );
+ pColumnRef->getChild(2)->parseNodeToStr( aColumnName, getOwnConnection(), nullptr, false, false );
}
else
{
diff --git a/connectivity/source/drivers/mork/MTables.cxx b/connectivity/source/drivers/mork/MTables.cxx
index 4885d1406e04..36150d305d85 100644
--- a/connectivity/source/drivers/mork/MTables.cxx
+++ b/connectivity/source/drivers/mork/MTables.cxx
@@ -55,7 +55,7 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),aSchema,aName,aTypes);
- sdbcx::ObjectType xRet = NULL;
+ sdbcx::ObjectType xRet = nullptr;
if(xResult.is())
{
Reference< XRow > xRow(xResult,UNO_QUERY);
diff --git a/connectivity/source/drivers/mork/MorkParser.cxx b/connectivity/source/drivers/mork/MorkParser.cxx
index d976a8d5b15f..5c6c33e32437 100644
--- a/connectivity/source/drivers/mork/MorkParser.cxx
+++ b/connectivity/source/drivers/mork/MorkParser.cxx
@@ -55,7 +55,7 @@ MorkParser::MorkParser( int DefaultScope ) :
columns_(),
values_(),
mork_(),
- currentCells_(0),
+ currentCells_(nullptr),
error_(NoError),
morkData_(),
morkPos_(0),
@@ -93,7 +93,7 @@ void MorkParser::initVars()
error_ = NoError;
morkPos_ = 0;
nowParsing_ = NPValues;
- currentCells_ = 0;
+ currentCells_ = nullptr;
nextAddValueId_ = 0x7fffffff;
}
@@ -303,7 +303,7 @@ bool MorkParser::parseCell()
std::string HexChar;
HexChar += nextChar();
HexChar += nextChar();
- Text += (char)strtoul(HexChar.c_str(), 0, 16);
+ Text += (char)strtoul(HexChar.c_str(), nullptr, 16);
}
break;
default:
@@ -323,7 +323,7 @@ bool MorkParser::parseCell()
}
// Apply column and text
- int ColumnId = strtoul(Column.c_str(), 0, 16);
+ int ColumnId = strtoul(Column.c_str(), nullptr, 16);
if ( NPRows != nowParsing_ )
{
@@ -346,7 +346,7 @@ bool MorkParser::parseCell()
{
// Rows
//int ValueId = string( Text.c_str() ).toInt( 0, 16 );
- int ValueId = strtoul(Text.c_str(), 0, 16);
+ int ValueId = strtoul(Text.c_str(), nullptr, 16);
if ( bValueOid )
{
@@ -445,13 +445,13 @@ void MorkParser::parseScopeId( const std::string &TextId, int *Id, int *Scope )
tSc.erase( 0, 1 );
}
- *Id = strtoul(tId.c_str(), 0, 16);
+ *Id = strtoul(tId.c_str(), nullptr, 16);
- *Scope = strtoul(tSc.c_str(), 0, 16);
+ *Scope = strtoul(tSc.c_str(), nullptr, 16);
}
else
{
- *Id = strtoul(TextId.c_str(), 0, 16);
+ *Id = strtoul(TextId.c_str(), nullptr, 16);
}
}
@@ -556,7 +556,7 @@ MorkTableMap *MorkParser::getTables( int TableScope )
if ( iter == mork_.map.end() )
{
- return 0;
+ return nullptr;
}
return &iter->second;
@@ -569,7 +569,7 @@ MorkRowMap *MorkParser::getRows( int RowScope, RowScopeMap *table )
if ( iter == table->map.end() )
{
- return 0;
+ return nullptr;
}
return &iter->second;
@@ -679,7 +679,7 @@ void MorkParser::getRecordKeysForListTable(std::string& listName, std::set<int>&
if (cellsIter->first >= 0xC7)
{
std::string value = getValue(cellsIter->second);
- int id = strtoul(value.c_str(), 0, 16);
+ int id = strtoul(value.c_str(), nullptr, 16);
records.insert(id);
}
}
diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
index f5b3c185888f..cefe066ffde6 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
@@ -34,7 +34,7 @@ using ::com::sun::star::uno::Sequence;
using ::com::sun::star::lang::XSingleServiceFactory;
using ::com::sun::star::lang::XMultiServiceFactory;
-static MozillaBootstrap *pMozillaBootstrap=NULL;
+static MozillaBootstrap *pMozillaBootstrap=nullptr;
static Reference<XMozillaBootstrap> xMozillaBootstrap;
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL OMozillaBootstrap_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
{
@@ -50,7 +50,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL OMozillaBootstrap_CreateInstance
MozillaBootstrap::MozillaBootstrap(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
: OMozillaBootstrap_BASE(m_aMutex), m_xMSFactory( _rxFactory ),
- m_ProfileAccess(NULL), m_ProfileManager(NULL)
+ m_ProfileAccess(nullptr), m_ProfileManager(nullptr)
{
}
@@ -179,7 +179,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mozbootstrap_component_getFactory
void* pServiceManager,
void* /*pRegistryKey*/)
{
- void* pRet = 0;
+ void* pRet = nullptr;
if (pServiceManager)
{
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
index d9aae76d7fc4..7667447ab064 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
@@ -76,8 +76,8 @@ namespace
{ "Firefox/", NULL, NULL, NULL },
{ "../Thunderbird/", NULL, NULL, NULL }
#else
- { ".mozilla/seamonkey/", NULL, NULL, NULL },
- { ".mozilla/firefox/", NULL, NULL, NULL },
+ { ".mozilla/seamonkey/", nullptr, nullptr, nullptr },
+ { ".mozilla/firefox/", nullptr, nullptr, nullptr },
{ ".thunderbird/", ".mozilla-thunderbird/", ".mozilla/thunderbird/", ".icedove/" }
#endif
};
@@ -115,7 +115,7 @@ namespace
// check all possible candidates
for ( size_t i=0; i<NB_CANDIDATES; ++i )
{
- if ( NULL == DefaultProductDir[ productIndex ][ i ] )
+ if ( nullptr == DefaultProductDir[ productIndex ][ i ] )
break;
sProductDirCandidate = lcl_getUserDataDirectory() +
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
index ca3d76d0dc13..9ae1685703cf 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
@@ -32,7 +32,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce
OString sFile = OUStringToOString(iniUrl, RTL_TEXTENCODING_ASCII_US);
OSL_TRACE(__FILE__" -- parser() - %s\n", sFile.getStr());
#endif
- oslFileHandle handle=NULL;
+ oslFileHandle handle=nullptr;
oslFileError fileError = osl_File_E_INVAL;
try{
if (!iniUrl.isEmpty())
diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx
index 60662f347fcf..28d5a9d6e510 100644
--- a/connectivity/source/drivers/mysql/YDriver.cxx
+++ b/connectivity/source/drivers/mysql/YDriver.cxx
@@ -293,7 +293,7 @@ namespace connectivity
xConnection = xDriver->connect( sCuttedUrl, aConvertedProperties );
if ( xConnection.is() )
{
- OMetaConnection* pMetaConnection = NULL;
+ OMetaConnection* pMetaConnection = nullptr;
// now we have to set the URL to get the correct answer for metadata()->getURL()
Reference< XUnoTunnel> xTunnel(xConnection,UNO_QUERY);
if ( xTunnel.is() )
diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx
index cab4565112a8..7cd111b0cc15 100644
--- a/connectivity/source/drivers/mysql/YTable.cxx
+++ b/connectivity/source/drivers/mysql/YTable.cxx
@@ -147,7 +147,7 @@ sdbcx::OCollection* OMySQLTable::createIndexes(const TStringVector& _rNames)
Sequence< sal_Int8 > OMySQLTable::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx
index a631f6ce6188..b8c3237e1211 100644
--- a/connectivity/source/drivers/mysql/YTables.cxx
+++ b/connectivity/source/drivers/mysql/YTables.cxx
@@ -65,7 +65,7 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
aCatalog <<= sCatalog;
Reference< XResultSet > xResult = m_xMetaData->getTables(aCatalog,sSchema,sTable,sTableTypes);
- sdbcx::ObjectType xRet = NULL;
+ sdbcx::ObjectType xRet = nullptr;
if ( xResult.is() )
{
Reference< XRow > xRow(xResult,UNO_QUERY);
@@ -192,7 +192,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor )
void OTables::appendNew(const OUString& _rsNewTable)
{
- insertElement(_rsNewTable,NULL);
+ insertElement(_rsNewTable,nullptr);
// notify our container listeners
ContainerEvent aEvent(static_cast<XContainer*>(this), makeAny(_rsNewTable), Any(), Any());
diff --git a/connectivity/source/drivers/mysql/Yservices.cxx b/connectivity/source/drivers/mysql/Yservices.cxx
index b4692fded8af..e23d1b68f8a4 100644
--- a/connectivity/source/drivers/mysql/Yservices.cxx
+++ b/connectivity/source/drivers/mysql/Yservices.cxx
@@ -42,7 +42,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mysql_component_getFactory(
{
if (!pServiceManager)
{
- return 0;
+ return nullptr;
}
Reference< XSingleServiceFactory > xRet;
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx
index c2c2c7999338..50d60f8ce299 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -47,7 +47,7 @@ using namespace com::sun::star::sdbc;
OConnection::OConnection(const SQLHANDLE _pDriverHandle,ODBCDriver* _pDriver)
: OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this)
,m_pDriver(_pDriver)
- ,m_aConnectionHandle(NULL)
+ ,m_aConnectionHandle(nullptr)
,m_pDriverHandleCopy(_pDriverHandle)
,m_nStatementCount(0)
,m_bClosed(true)
@@ -81,7 +81,7 @@ OConnection::~OConnection()
}
m_pDriver->release();
- m_pDriver = NULL;
+ m_pDriver = nullptr;
}
void SAL_CALL OConnection::release() throw()
@@ -120,7 +120,7 @@ SQLRETURN OConnection::OpenConnection(const OUString& aConnectStr, sal_Int32 nTi
#ifdef LINUX
(void) bSilent;
nSQLRETURN = N3SQLDriverConnect(m_aConnectionHandle,
- NULL,
+ nullptr,
szConnStrIn,
(SQLSMALLINT) ::std::min((sal_Int32)2048,aConStr.getLength()),
szConnStrOut,
@@ -304,7 +304,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OU
Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUString& /*sql*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this );
- return NULL;
+ return nullptr;
}
OUString SAL_CALL OConnection::nativeSQL( const OUString& sql ) throw(SQLException, RuntimeException, std::exception)
@@ -338,7 +338,7 @@ sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeExce
sal_uInt32 nOption = 0;
OTools::ThrowException(this,N3SQLGetConnectAttr(m_aConnectionHandle,
- SQL_ATTR_AUTOCOMMIT, &nOption,0,0),m_aConnectionHandle,SQL_HANDLE_DBC,*this);
+ SQL_ATTR_AUTOCOMMIT, &nOption,0,nullptr),m_aConnectionHandle,SQL_HANDLE_DBC,*this);
return nOption == SQL_AUTOCOMMIT_ON ;
}
@@ -458,7 +458,7 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getT
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
- return NULL;
+ return nullptr;
}
void SAL_CALL OConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException, std::exception)
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
index 9b05604d0b56..54cfcefefe10 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
@@ -441,8 +441,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference(
{
ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection);
xRef = pResult;
- pResult->openForeignKeys(m_bUseCatalog ? primaryCatalog : Any(),primarySchema.toChar() == '%' ? &primarySchema : NULL,&primaryTable,
- m_bUseCatalog ? foreignCatalog : Any(), foreignSchema.toChar() == '%' ? &foreignSchema : NULL,&foreignTable);
+ pResult->openForeignKeys(m_bUseCatalog ? primaryCatalog : Any(),primarySchema.toChar() == '%' ? &primarySchema : nullptr,&primaryTable,
+ m_bUseCatalog ? foreignCatalog : Any(), foreignSchema.toChar() == '%' ? &foreignSchema : nullptr,&foreignTable);
}
catch(SQLException&)
{
@@ -1714,7 +1714,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index 0672d7e9081a..39ca423c7412 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -52,9 +52,9 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(OConnection* _pConnection
,OPropertySetHelper(ODatabaseMetaDataResultSet_BASE::rBHelper)
,m_aStatementHandle(_pConnection->createStatementHandle())
- ,m_aStatement(NULL)
- ,m_xMetaData(NULL)
- ,m_pRowStatusArray(NULL)
+ ,m_aStatement(nullptr)
+ ,m_xMetaData(nullptr)
+ ,m_pRowStatusArray(nullptr)
,m_pConnection(_pConnection)
,m_nTextEncoding(_pConnection->getTextEncoding())
,m_nRowPos(-1)
@@ -94,7 +94,7 @@ void ODatabaseMetaDataResultSet::disposing()
m_pConnection->freeStatementHandle(m_aStatementHandle);
- m_aStatement = NULL;
+ m_aStatement = nullptr;
m_xMetaData.clear();
m_pConnection->release();
}
@@ -193,13 +193,13 @@ template < typename T, SQLSMALLINT sqlTypeId > T ODatabaseMetaDataResultSet::get
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBinaryStream", *this );
- return NULL;
+ return nullptr;
}
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getCharacterStream", *this );
- return NULL;
+ return nullptr;
}
@@ -351,26 +351,26 @@ Reference< XResultSetMetaData > SAL_CALL ODatabaseMetaDataResultSet::getMetaData
Reference< XArray > SAL_CALL ODatabaseMetaDataResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getArray", *this );
- return NULL;
+ return nullptr;
}
Reference< XClob > SAL_CALL ODatabaseMetaDataResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getClob", *this );
- return NULL;
+ return nullptr;
}
Reference< XBlob > SAL_CALL ODatabaseMetaDataResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBlob", *this );
- return NULL;
+ return nullptr;
}
Reference< XRef > SAL_CALL ODatabaseMetaDataResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getRef", *this );
- return NULL;
+ return nullptr;
}
@@ -593,7 +593,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, R
Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet::getStatement( ) throw(SQLException, RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
@@ -839,24 +839,24 @@ void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const OUString&
const Sequence< OUString >& types ) throw(SQLException, RuntimeException)
{
OString aPKQ,aPKO,aPKN,aCOL;
- const OUString *pSchemaPat = NULL;
+ const OUString *pSchemaPat = nullptr;
if(schemaPattern != "%")
pSchemaPat = &schemaPattern;
else
- pSchemaPat = NULL;
+ pSchemaPat = nullptr;
if ( catalog.hasValue() )
aPKQ = OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = OUStringToOString(schemaPattern,m_nTextEncoding);
aPKN = OUStringToOString(tableNamePattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : nullptr,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : nullptr,
*pPKN = aPKN.getStr();
- const char *pCOL = NULL;
+ const char *pCOL = nullptr;
const char* pComma = ",";
const OUString* pBegin = types.getConstArray();
const OUString* pEnd = pBegin + types.getLength();
@@ -886,9 +886,9 @@ void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const OUString&
void ODatabaseMetaDataResultSet::openTablesTypes( ) throw(SQLException, RuntimeException)
{
SQLRETURN nRetcode = N3SQLTables(m_aStatementHandle,
- 0,0,
- 0,0,
- 0,0,
+ nullptr,0,
+ nullptr,0,
+ nullptr,0,
reinterpret_cast<SDB_ODBC_CHAR *>(const_cast<char *>(SQL_ALL_TABLE_TYPES)),SQL_NTS);
OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this);
@@ -936,12 +936,12 @@ void ODatabaseMetaDataResultSet::openColumnPrivileges( const Any& catalog, cons
const OUString& table, const OUString& columnNamePattern )
throw(SQLException, RuntimeException)
{
- const OUString *pSchemaPat = NULL;
+ const OUString *pSchemaPat = nullptr;
if(schema != "%")
pSchemaPat = &schema;
else
- pSchemaPat = NULL;
+ pSchemaPat = nullptr;
OString aPKQ,aPKO,aPKN,aCOL;
@@ -951,8 +951,8 @@ void ODatabaseMetaDataResultSet::openColumnPrivileges( const Any& catalog, cons
aPKN = OUStringToOString(table,m_nTextEncoding);
aCOL = OUStringToOString(columnNamePattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : nullptr,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : nullptr,
*pPKN = aPKN.getStr(),
*pCOL = aCOL.getStr();
@@ -971,12 +971,12 @@ void ODatabaseMetaDataResultSet::openColumns( const Any& catalog,
const OUString& tableNamePattern, const OUString& columnNamePattern )
throw(SQLException, RuntimeException)
{
- const OUString *pSchemaPat = NULL;
+ const OUString *pSchemaPat = nullptr;
if(schemaPattern != "%")
pSchemaPat = &schemaPattern;
else
- pSchemaPat = NULL;
+ pSchemaPat = nullptr;
OString aPKQ,aPKO,aPKN,aCOL;
if ( catalog.hasValue() )
@@ -985,8 +985,8 @@ void ODatabaseMetaDataResultSet::openColumns( const Any& catalog,
aPKN = OUStringToOString(tableNamePattern,m_nTextEncoding);
aCOL = OUStringToOString(columnNamePattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : nullptr,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : nullptr,
*pPKN = aPKN.getStr(),
*pCOL = aCOL.getStr();
@@ -1039,12 +1039,12 @@ void ODatabaseMetaDataResultSet::openProcedureColumns( const Any& catalog,
const OUString& procedureNamePattern,const OUString& columnNamePattern )
throw(SQLException, RuntimeException)
{
- const OUString *pSchemaPat = NULL;
+ const OUString *pSchemaPat = nullptr;
if(schemaPattern != "%")
pSchemaPat = &schemaPattern;
else
- pSchemaPat = NULL;
+ pSchemaPat = nullptr;
OString aPKQ,aPKO,aPKN,aCOL;
if ( catalog.hasValue() )
@@ -1053,8 +1053,8 @@ void ODatabaseMetaDataResultSet::openProcedureColumns( const Any& catalog,
aPKN = OUStringToOString(procedureNamePattern,m_nTextEncoding);
aCOL = OUStringToOString(columnNamePattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : nullptr,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : nullptr,
*pPKN = aPKN.getStr(),
*pCOL = aCOL.getStr();
@@ -1073,12 +1073,12 @@ void ODatabaseMetaDataResultSet::openProcedures(const Any& catalog, const OUStri
const OUString& procedureNamePattern)
throw(SQLException, RuntimeException)
{
- const OUString *pSchemaPat = NULL;
+ const OUString *pSchemaPat = nullptr;
if(schemaPattern != "%")
pSchemaPat = &schemaPattern;
else
- pSchemaPat = NULL;
+ pSchemaPat = nullptr;
OString aPKQ,aPKO,aPKN;
@@ -1087,8 +1087,8 @@ void ODatabaseMetaDataResultSet::openProcedures(const Any& catalog, const OUStri
aPKO = OUStringToOString(schemaPattern,m_nTextEncoding);
aPKN = OUStringToOString(procedureNamePattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : nullptr,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : nullptr,
*pPKN = aPKN.getStr();
@@ -1117,12 +1117,12 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(bool _bRowVer,const Any& cat
Any() );
}
- const OUString *pSchemaPat = NULL;
+ const OUString *pSchemaPat = nullptr;
if(schema != "%")
pSchemaPat = &schema;
else
- pSchemaPat = NULL;
+ pSchemaPat = nullptr;
OString aPKQ,aPKO,aPKN;
if ( catalog.hasValue() )
@@ -1130,8 +1130,8 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(bool _bRowVer,const Any& cat
aPKO = OUStringToOString(schema,m_nTextEncoding);
aPKN = OUStringToOString(table,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : nullptr,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : nullptr,
*pPKN = aPKN.getStr();
@@ -1168,12 +1168,12 @@ void ODatabaseMetaDataResultSet::openForeignKeys( const Any& catalog, const OUSt
if ( catalog2.hasValue() )
aFKQ = OUStringToOString(comphelper::getString(catalog2),m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
- *pPKO = schema && !schema->isEmpty() ? (aPKO = OUStringToOString(*schema,m_nTextEncoding)).getStr() : NULL,
- *pPKN = table ? (aPKN = OUStringToOString(*table,m_nTextEncoding)).getStr(): NULL,
- *pFKQ = catalog2.hasValue() && !aFKQ.isEmpty() ? aFKQ.getStr() : NULL,
- *pFKO = schema2 && !schema2->isEmpty() ? (aFKO = OUStringToOString(*schema2,m_nTextEncoding)).getStr() : NULL,
- *pFKN = table2 ? (aFKN = OUStringToOString(*table2,m_nTextEncoding)).getStr() : NULL;
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : nullptr,
+ *pPKO = schema && !schema->isEmpty() ? (aPKO = OUStringToOString(*schema,m_nTextEncoding)).getStr() : nullptr,
+ *pPKN = table ? (aPKN = OUStringToOString(*table,m_nTextEncoding)).getStr(): nullptr,
+ *pFKQ = catalog2.hasValue() && !aFKQ.isEmpty() ? aFKQ.getStr() : nullptr,
+ *pFKO = schema2 && !schema2->isEmpty() ? (aFKO = OUStringToOString(*schema2,m_nTextEncoding)).getStr() : nullptr,
+ *pFKN = table2 ? (aFKN = OUStringToOString(*table2,m_nTextEncoding)).getStr() : nullptr;
SQLRETURN nRetcode = N3SQLForeignKeys(m_aStatementHandle,
@@ -1192,24 +1192,24 @@ void ODatabaseMetaDataResultSet::openImportedKeys(const Any& catalog, const OUSt
const OUString& table) throw(SQLException, RuntimeException)
{
- openForeignKeys(Any(),NULL,NULL,catalog, schema == "%" ? &schema : NULL, &table);
+ openForeignKeys(Any(),nullptr,nullptr,catalog, schema == "%" ? &schema : nullptr, &table);
}
void ODatabaseMetaDataResultSet::openExportedKeys(const Any& catalog, const OUString& schema,
const OUString& table) throw(SQLException, RuntimeException)
{
- openForeignKeys(catalog, schema == "%" ? &schema : NULL, &table,Any(),NULL,NULL);
+ openForeignKeys(catalog, schema == "%" ? &schema : nullptr, &table,Any(),nullptr,nullptr);
}
void ODatabaseMetaDataResultSet::openPrimaryKeys(const Any& catalog, const OUString& schema,
const OUString& table) throw(SQLException, RuntimeException)
{
- const OUString *pSchemaPat = NULL;
+ const OUString *pSchemaPat = nullptr;
if(schema != "%")
pSchemaPat = &schema;
else
- pSchemaPat = NULL;
+ pSchemaPat = nullptr;
OString aPKQ,aPKO,aPKN;
@@ -1217,8 +1217,8 @@ void ODatabaseMetaDataResultSet::openPrimaryKeys(const Any& catalog, const OUStr
aPKQ = OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = OUStringToOString(schema,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : nullptr,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : nullptr,
*pPKN = (aPKN = OUStringToOString(table,m_nTextEncoding)).getStr();
@@ -1233,12 +1233,12 @@ void ODatabaseMetaDataResultSet::openPrimaryKeys(const Any& catalog, const OUStr
void ODatabaseMetaDataResultSet::openTablePrivileges(const Any& catalog, const OUString& schemaPattern,
const OUString& tableNamePattern) throw(SQLException, RuntimeException)
{
- const OUString *pSchemaPat = NULL;
+ const OUString *pSchemaPat = nullptr;
if(schemaPattern != "%")
pSchemaPat = &schemaPattern;
else
- pSchemaPat = NULL;
+ pSchemaPat = nullptr;
OString aPKQ,aPKO,aPKN;
@@ -1246,8 +1246,8 @@ void ODatabaseMetaDataResultSet::openTablePrivileges(const Any& catalog, const O
aPKQ = OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = OUStringToOString(schemaPattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : nullptr,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : nullptr,
*pPKN = (aPKN = OUStringToOString(tableNamePattern,m_nTextEncoding)).getStr();
@@ -1263,12 +1263,12 @@ void ODatabaseMetaDataResultSet::openIndexInfo( const Any& catalog, const OUStri
const OUString& table, bool unique, bool approximate )
throw(SQLException, RuntimeException)
{
- const OUString *pSchemaPat = NULL;
+ const OUString *pSchemaPat = nullptr;
if(schema != "%")
pSchemaPat = &schema;
else
- pSchemaPat = NULL;
+ pSchemaPat = nullptr;
OString aPKQ,aPKO,aPKN;
@@ -1276,8 +1276,8 @@ void ODatabaseMetaDataResultSet::openIndexInfo( const Any& catalog, const OUStri
aPKQ = OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = OUStringToOString(schema,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : nullptr,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !aPKO.isEmpty() ? aPKO.getStr() : nullptr,
*pPKN = (aPKN = OUStringToOString(table,m_nTextEncoding)).getStr();
diff --git a/connectivity/source/drivers/odbc/ODriver.cxx b/connectivity/source/drivers/odbc/ODriver.cxx
index 3d064f0caacb..94987f8785fc 100644
--- a/connectivity/source/drivers/odbc/ODriver.cxx
+++ b/connectivity/source/drivers/odbc/ODriver.cxx
@@ -93,7 +93,7 @@ Sequence< OUString > SAL_CALL ODBCDriver::getSupportedServiceNames( ) throw(Run
Reference< XConnection > SAL_CALL ODBCDriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException, std::exception)
{
if ( ! acceptsURL(url) )
- return NULL;
+ return nullptr;
if(!m_pDriverHandle)
{
diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx
index f332e9e4ea79..a8e9fee5bb4f 100644
--- a/connectivity/source/drivers/odbc/OFunctions.cxx
+++ b/connectivity/source/drivers/odbc/OFunctions.cxx
@@ -86,7 +86,7 @@ bool LoadFunctions(oslModule pODBCso);
bool LoadLibrary_ODBC3(OUString &_rPath)
{
static bool bLoaded = false;
- static oslModule pODBCso = NULL;
+ static oslModule pODBCso = nullptr;
if (bLoaded)
return true;
@@ -116,113 +116,113 @@ bool LoadLibrary_ODBC3(OUString &_rPath)
bool LoadFunctions(oslModule pODBCso)
{
- if( ( pODBC3SQLAllocHandle = reinterpret_cast<T3SQLAllocHandle>(osl_getFunctionSymbol(pODBCso, OUString("SQLAllocHandle").pData ))) == NULL )
+ if( ( pODBC3SQLAllocHandle = reinterpret_cast<T3SQLAllocHandle>(osl_getFunctionSymbol(pODBCso, OUString("SQLAllocHandle").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLConnect = reinterpret_cast<T3SQLConnect>(osl_getFunctionSymbol(pODBCso, OUString("SQLConnect").pData ))) == NULL )
+ if( ( pODBC3SQLConnect = reinterpret_cast<T3SQLConnect>(osl_getFunctionSymbol(pODBCso, OUString("SQLConnect").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLDriverConnect = reinterpret_cast<T3SQLDriverConnect>(osl_getFunctionSymbol(pODBCso, OUString("SQLDriverConnect").pData ))) == NULL )
+ if( ( pODBC3SQLDriverConnect = reinterpret_cast<T3SQLDriverConnect>(osl_getFunctionSymbol(pODBCso, OUString("SQLDriverConnect").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLBrowseConnect = reinterpret_cast<T3SQLBrowseConnect>(osl_getFunctionSymbol(pODBCso, OUString("SQLBrowseConnect").pData ))) == NULL )
+ if( ( pODBC3SQLBrowseConnect = reinterpret_cast<T3SQLBrowseConnect>(osl_getFunctionSymbol(pODBCso, OUString("SQLBrowseConnect").pData ))) == nullptr )
return false;
- if(( pODBC3SQLDataSources = reinterpret_cast<T3SQLDataSources>(osl_getFunctionSymbol(pODBCso, OUString("SQLDataSources").pData ))) == NULL )
+ if(( pODBC3SQLDataSources = reinterpret_cast<T3SQLDataSources>(osl_getFunctionSymbol(pODBCso, OUString("SQLDataSources").pData ))) == nullptr )
return false;
- if(( pODBC3SQLDrivers = reinterpret_cast<T3SQLDrivers>(osl_getFunctionSymbol(pODBCso, OUString("SQLDrivers").pData ))) == NULL )
+ if(( pODBC3SQLDrivers = reinterpret_cast<T3SQLDrivers>(osl_getFunctionSymbol(pODBCso, OUString("SQLDrivers").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLGetInfo = reinterpret_cast<T3SQLGetInfo>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetInfo").pData ))) == NULL )
+ if( ( pODBC3SQLGetInfo = reinterpret_cast<T3SQLGetInfo>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetInfo").pData ))) == nullptr )
return false;
- if(( pODBC3SQLGetFunctions = reinterpret_cast<T3SQLGetFunctions>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetFunctions").pData ))) == NULL )
+ if(( pODBC3SQLGetFunctions = reinterpret_cast<T3SQLGetFunctions>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetFunctions").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLGetTypeInfo = reinterpret_cast<T3SQLGetTypeInfo>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetTypeInfo").pData ))) == NULL )
+ if( ( pODBC3SQLGetTypeInfo = reinterpret_cast<T3SQLGetTypeInfo>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetTypeInfo").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLSetConnectAttr = reinterpret_cast<T3SQLSetConnectAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLSetConnectAttr").pData ))) == NULL )
+ if( ( pODBC3SQLSetConnectAttr = reinterpret_cast<T3SQLSetConnectAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLSetConnectAttr").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLGetConnectAttr = reinterpret_cast<T3SQLGetConnectAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetConnectAttr").pData ))) == NULL )
+ if( ( pODBC3SQLGetConnectAttr = reinterpret_cast<T3SQLGetConnectAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetConnectAttr").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLSetEnvAttr = reinterpret_cast<T3SQLSetEnvAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLSetEnvAttr").pData ))) == NULL )
+ if( ( pODBC3SQLSetEnvAttr = reinterpret_cast<T3SQLSetEnvAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLSetEnvAttr").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLGetEnvAttr = reinterpret_cast<T3SQLGetEnvAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetEnvAttr").pData ))) == NULL )
+ if( ( pODBC3SQLGetEnvAttr = reinterpret_cast<T3SQLGetEnvAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetEnvAttr").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLSetStmtAttr = reinterpret_cast<T3SQLSetStmtAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLSetStmtAttr").pData ))) == NULL )
+ if( ( pODBC3SQLSetStmtAttr = reinterpret_cast<T3SQLSetStmtAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLSetStmtAttr").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLGetStmtAttr = reinterpret_cast<T3SQLGetStmtAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetStmtAttr").pData ))) == NULL )
+ if( ( pODBC3SQLGetStmtAttr = reinterpret_cast<T3SQLGetStmtAttr>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetStmtAttr").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLPrepare = reinterpret_cast<T3SQLPrepare>(osl_getFunctionSymbol(pODBCso, OUString("SQLPrepare").pData ))) == NULL )
+ if( ( pODBC3SQLPrepare = reinterpret_cast<T3SQLPrepare>(osl_getFunctionSymbol(pODBCso, OUString("SQLPrepare").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLBindParameter = reinterpret_cast<T3SQLBindParameter>(osl_getFunctionSymbol(pODBCso, OUString("SQLBindParameter").pData ))) == NULL )
+ if( ( pODBC3SQLBindParameter = reinterpret_cast<T3SQLBindParameter>(osl_getFunctionSymbol(pODBCso, OUString("SQLBindParameter").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLSetCursorName = reinterpret_cast<T3SQLSetCursorName>(osl_getFunctionSymbol(pODBCso, OUString("SQLSetCursorName").pData ))) == NULL )
+ if( ( pODBC3SQLSetCursorName = reinterpret_cast<T3SQLSetCursorName>(osl_getFunctionSymbol(pODBCso, OUString("SQLSetCursorName").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLExecute = reinterpret_cast<T3SQLExecute>(osl_getFunctionSymbol(pODBCso, OUString("SQLExecute").pData ))) == NULL )
+ if( ( pODBC3SQLExecute = reinterpret_cast<T3SQLExecute>(osl_getFunctionSymbol(pODBCso, OUString("SQLExecute").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLExecDirect = reinterpret_cast<T3SQLExecDirect>(osl_getFunctionSymbol(pODBCso, OUString("SQLExecDirect").pData ))) == NULL )
+ if( ( pODBC3SQLExecDirect = reinterpret_cast<T3SQLExecDirect>(osl_getFunctionSymbol(pODBCso, OUString("SQLExecDirect").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLDescribeParam = reinterpret_cast<T3SQLDescribeParam>(osl_getFunctionSymbol(pODBCso, OUString("SQLDescribeParam").pData ))) == NULL )
+ if( ( pODBC3SQLDescribeParam = reinterpret_cast<T3SQLDescribeParam>(osl_getFunctionSymbol(pODBCso, OUString("SQLDescribeParam").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLNumParams = reinterpret_cast<T3SQLNumParams>(osl_getFunctionSymbol(pODBCso, OUString("SQLNumParams").pData ))) == NULL )
+ if( ( pODBC3SQLNumParams = reinterpret_cast<T3SQLNumParams>(osl_getFunctionSymbol(pODBCso, OUString("SQLNumParams").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLParamData = reinterpret_cast<T3SQLParamData>(osl_getFunctionSymbol(pODBCso, OUString("SQLParamData").pData ))) == NULL )
+ if( ( pODBC3SQLParamData = reinterpret_cast<T3SQLParamData>(osl_getFunctionSymbol(pODBCso, OUString("SQLParamData").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLPutData = reinterpret_cast<T3SQLPutData>(osl_getFunctionSymbol(pODBCso, OUString("SQLPutData").pData ))) == NULL )
+ if( ( pODBC3SQLPutData = reinterpret_cast<T3SQLPutData>(osl_getFunctionSymbol(pODBCso, OUString("SQLPutData").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLRowCount = reinterpret_cast<T3SQLRowCount>(osl_getFunctionSymbol(pODBCso, OUString("SQLRowCount").pData ))) == NULL )
+ if( ( pODBC3SQLRowCount = reinterpret_cast<T3SQLRowCount>(osl_getFunctionSymbol(pODBCso, OUString("SQLRowCount").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLNumResultCols = reinterpret_cast<T3SQLNumResultCols>(osl_getFunctionSymbol(pODBCso, OUString("SQLNumResultCols").pData ))) == NULL )
+ if( ( pODBC3SQLNumResultCols = reinterpret_cast<T3SQLNumResultCols>(osl_getFunctionSymbol(pODBCso, OUString("SQLNumResultCols").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLDescribeCol = reinterpret_cast<T3SQLDescribeCol>(osl_getFunctionSymbol(pODBCso, OUString("SQLDescribeCol").pData ))) == NULL )
+ if( ( pODBC3SQLDescribeCol = reinterpret_cast<T3SQLDescribeCol>(osl_getFunctionSymbol(pODBCso, OUString("SQLDescribeCol").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLColAttribute = reinterpret_cast<T3SQLColAttribute>(osl_getFunctionSymbol(pODBCso, OUString("SQLColAttribute").pData ))) == NULL )
+ if( ( pODBC3SQLColAttribute = reinterpret_cast<T3SQLColAttribute>(osl_getFunctionSymbol(pODBCso, OUString("SQLColAttribute").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLBindCol = reinterpret_cast<T3SQLBindCol>(osl_getFunctionSymbol(pODBCso, OUString("SQLBindCol").pData ))) == NULL )
+ if( ( pODBC3SQLBindCol = reinterpret_cast<T3SQLBindCol>(osl_getFunctionSymbol(pODBCso, OUString("SQLBindCol").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLFetch = reinterpret_cast<T3SQLFetch>(osl_getFunctionSymbol(pODBCso, OUString("SQLFetch").pData ))) == NULL )
+ if( ( pODBC3SQLFetch = reinterpret_cast<T3SQLFetch>(osl_getFunctionSymbol(pODBCso, OUString("SQLFetch").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLFetchScroll = reinterpret_cast<T3SQLFetchScroll>(osl_getFunctionSymbol(pODBCso, OUString("SQLFetchScroll").pData ))) == NULL )
+ if( ( pODBC3SQLFetchScroll = reinterpret_cast<T3SQLFetchScroll>(osl_getFunctionSymbol(pODBCso, OUString("SQLFetchScroll").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLGetData = reinterpret_cast<T3SQLGetData>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetData").pData ))) == NULL )
+ if( ( pODBC3SQLGetData = reinterpret_cast<T3SQLGetData>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetData").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLSetPos = reinterpret_cast<T3SQLSetPos>(osl_getFunctionSymbol(pODBCso, OUString("SQLSetPos").pData ))) == NULL )
+ if( ( pODBC3SQLSetPos = reinterpret_cast<T3SQLSetPos>(osl_getFunctionSymbol(pODBCso, OUString("SQLSetPos").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLBulkOperations = reinterpret_cast<T3SQLBulkOperations>(osl_getFunctionSymbol(pODBCso, OUString("SQLBulkOperations").pData ))) == NULL )
+ if( ( pODBC3SQLBulkOperations = reinterpret_cast<T3SQLBulkOperations>(osl_getFunctionSymbol(pODBCso, OUString("SQLBulkOperations").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLMoreResults = reinterpret_cast<T3SQLMoreResults>(osl_getFunctionSymbol(pODBCso, OUString("SQLMoreResults").pData ))) == NULL )
+ if( ( pODBC3SQLMoreResults = reinterpret_cast<T3SQLMoreResults>(osl_getFunctionSymbol(pODBCso, OUString("SQLMoreResults").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLGetDiagRec = reinterpret_cast<T3SQLGetDiagRec>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetDiagRec").pData ))) == NULL )
+ if( ( pODBC3SQLGetDiagRec = reinterpret_cast<T3SQLGetDiagRec>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetDiagRec").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLColumnPrivileges = reinterpret_cast<T3SQLColumnPrivileges>(osl_getFunctionSymbol(pODBCso, OUString("SQLColumnPrivileges").pData ))) == NULL )
+ if( ( pODBC3SQLColumnPrivileges = reinterpret_cast<T3SQLColumnPrivileges>(osl_getFunctionSymbol(pODBCso, OUString("SQLColumnPrivileges").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLColumns = reinterpret_cast<T3SQLColumns>(osl_getFunctionSymbol(pODBCso, OUString("SQLColumns").pData ))) == NULL )
+ if( ( pODBC3SQLColumns = reinterpret_cast<T3SQLColumns>(osl_getFunctionSymbol(pODBCso, OUString("SQLColumns").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLForeignKeys = reinterpret_cast<T3SQLForeignKeys>(osl_getFunctionSymbol(pODBCso, OUString("SQLForeignKeys").pData ))) == NULL )
+ if( ( pODBC3SQLForeignKeys = reinterpret_cast<T3SQLForeignKeys>(osl_getFunctionSymbol(pODBCso, OUString("SQLForeignKeys").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLPrimaryKeys = reinterpret_cast<T3SQLPrimaryKeys>(osl_getFunctionSymbol(pODBCso, OUString("SQLPrimaryKeys").pData ))) == NULL )
+ if( ( pODBC3SQLPrimaryKeys = reinterpret_cast<T3SQLPrimaryKeys>(osl_getFunctionSymbol(pODBCso, OUString("SQLPrimaryKeys").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLProcedureColumns = reinterpret_cast<T3SQLProcedureColumns>(osl_getFunctionSymbol(pODBCso, OUString("SQLProcedureColumns").pData ))) == NULL )
+ if( ( pODBC3SQLProcedureColumns = reinterpret_cast<T3SQLProcedureColumns>(osl_getFunctionSymbol(pODBCso, OUString("SQLProcedureColumns").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLProcedures = reinterpret_cast<T3SQLProcedures>(osl_getFunctionSymbol(pODBCso, OUString("SQLProcedures").pData ))) == NULL )
+ if( ( pODBC3SQLProcedures = reinterpret_cast<T3SQLProcedures>(osl_getFunctionSymbol(pODBCso, OUString("SQLProcedures").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLSpecialColumns = reinterpret_cast<T3SQLSpecialColumns>(osl_getFunctionSymbol(pODBCso, OUString("SQLSpecialColumns").pData ))) == NULL )
+ if( ( pODBC3SQLSpecialColumns = reinterpret_cast<T3SQLSpecialColumns>(osl_getFunctionSymbol(pODBCso, OUString("SQLSpecialColumns").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLStatistics = reinterpret_cast<T3SQLStatistics>(osl_getFunctionSymbol(pODBCso, OUString("SQLStatistics").pData ))) == NULL )
+ if( ( pODBC3SQLStatistics = reinterpret_cast<T3SQLStatistics>(osl_getFunctionSymbol(pODBCso, OUString("SQLStatistics").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLTablePrivileges = reinterpret_cast<T3SQLTablePrivileges>(osl_getFunctionSymbol(pODBCso, OUString("SQLTablePrivileges").pData ))) == NULL )
+ if( ( pODBC3SQLTablePrivileges = reinterpret_cast<T3SQLTablePrivileges>(osl_getFunctionSymbol(pODBCso, OUString("SQLTablePrivileges").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLTables = reinterpret_cast<T3SQLTables>(osl_getFunctionSymbol(pODBCso, OUString("SQLTables").pData ))) == NULL )
+ if( ( pODBC3SQLTables = reinterpret_cast<T3SQLTables>(osl_getFunctionSymbol(pODBCso, OUString("SQLTables").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLFreeStmt = reinterpret_cast<T3SQLFreeStmt>(osl_getFunctionSymbol(pODBCso, OUString("SQLFreeStmt").pData ))) == NULL )
+ if( ( pODBC3SQLFreeStmt = reinterpret_cast<T3SQLFreeStmt>(osl_getFunctionSymbol(pODBCso, OUString("SQLFreeStmt").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLCloseCursor = reinterpret_cast<T3SQLCloseCursor>(osl_getFunctionSymbol(pODBCso, OUString("SQLCloseCursor").pData ))) == NULL )
+ if( ( pODBC3SQLCloseCursor = reinterpret_cast<T3SQLCloseCursor>(osl_getFunctionSymbol(pODBCso, OUString("SQLCloseCursor").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLCancel = reinterpret_cast<T3SQLCancel>(osl_getFunctionSymbol(pODBCso, OUString("SQLCancel").pData ))) == NULL )
+ if( ( pODBC3SQLCancel = reinterpret_cast<T3SQLCancel>(osl_getFunctionSymbol(pODBCso, OUString("SQLCancel").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLEndTran = reinterpret_cast<T3SQLEndTran>(osl_getFunctionSymbol(pODBCso, OUString("SQLEndTran").pData ))) == NULL )
+ if( ( pODBC3SQLEndTran = reinterpret_cast<T3SQLEndTran>(osl_getFunctionSymbol(pODBCso, OUString("SQLEndTran").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLDisconnect = reinterpret_cast<T3SQLDisconnect>(osl_getFunctionSymbol(pODBCso, OUString("SQLDisconnect").pData ))) == NULL )
+ if( ( pODBC3SQLDisconnect = reinterpret_cast<T3SQLDisconnect>(osl_getFunctionSymbol(pODBCso, OUString("SQLDisconnect").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLFreeHandle = reinterpret_cast<T3SQLFreeHandle>(osl_getFunctionSymbol(pODBCso, OUString("SQLFreeHandle").pData ))) == NULL )
+ if( ( pODBC3SQLFreeHandle = reinterpret_cast<T3SQLFreeHandle>(osl_getFunctionSymbol(pODBCso, OUString("SQLFreeHandle").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLGetCursorName = reinterpret_cast<T3SQLGetCursorName>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetCursorName").pData ))) == NULL )
+ if( ( pODBC3SQLGetCursorName = reinterpret_cast<T3SQLGetCursorName>(osl_getFunctionSymbol(pODBCso, OUString("SQLGetCursorName").pData ))) == nullptr )
return false;
- if( ( pODBC3SQLNativeSql = reinterpret_cast<T3SQLNativeSql>(osl_getFunctionSymbol(pODBCso, OUString("SQLNativeSql").pData ))) == NULL )
+ if( ( pODBC3SQLNativeSql = reinterpret_cast<T3SQLNativeSql>(osl_getFunctionSymbol(pODBCso, OUString("SQLNativeSql").pData ))) == nullptr )
return false;
return true;
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index 7a0a3ed5deb5..2e8f6be05c39 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -65,7 +65,7 @@ namespace
OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OUString& sql)
:OStatement_BASE2(_pConnection)
,numParams(0)
- ,boundParams(NULL)
+ ,boundParams(nullptr)
,m_bPrepared(false)
{
m_sSqlStatement = sql;
@@ -183,7 +183,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc
// Get the parameter number that requires data
- sal_Int32* paramIndex = 0;
+ sal_Int32* paramIndex = nullptr;
N3SQLParamData(m_aStatementHandle, reinterpret_cast<SQLPOINTER*>(&paramIndex));
// If the parameter index is -1, there is no
@@ -257,7 +257,7 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
- Reference< XResultSet > rs = NULL;
+ Reference< XResultSet > rs = nullptr;
prepareStatement();
@@ -375,7 +375,7 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_
// don't copy the sequence, just point the ODBC directly at the sequence's storage array
// Why BINARY/Sequence is treated differently than strings (which are copied), I'm not sure
- OSL_VERIFY(allocBindBuf(parameterIndex, 0) == NULL);
+ OSL_VERIFY(allocBindBuf(parameterIndex, 0) == nullptr);
boundParams[parameterIndex-1].setSequence(x); // this ensures that the sequence stays alive
setParameter( parameterIndex, _nType, x.getLength(), invalid_scale, x.getConstArray(), x.getLength(), x.getLength() );
@@ -517,7 +517,7 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, const sal_I
::osl::MutexGuard aGuard( m_aMutex );
setParameterPre(parameterIndex);
- OSL_VERIFY(allocBindBuf(parameterIndex, 0) == NULL);
+ OSL_VERIFY(allocBindBuf(parameterIndex, 0) == nullptr);
SQLLEN * const lenBuf = getLengthBuf (parameterIndex);
*lenBuf = SQL_NULL_DATA;
@@ -538,7 +538,7 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, const sal_I
fSqlType,
0,
0,
- NULL,
+ nullptr,
0,
lenBuf
);
@@ -722,7 +722,7 @@ void OPreparedStatement::initBoundParam () throw(SQLException)
void* OPreparedStatement::allocBindBuf( sal_Int32 index,sal_Int32 bufLen)
{
- void* b = NULL;
+ void* b = nullptr;
// Sanity check the parameter number
@@ -742,7 +742,7 @@ void* OPreparedStatement::allocBindBuf( sal_Int32 index,sal_Int32 bufLen)
SQLLEN* OPreparedStatement::getLengthBuf (sal_Int32 index)
{
- SQLLEN* b = NULL;
+ SQLLEN* b = nullptr;
// Sanity check the parameter number
@@ -879,7 +879,7 @@ void OPreparedStatement::FreeParams()
{
numParams = 0;
delete [] boundParams;
- boundParams = NULL;
+ boundParams = nullptr;
}
void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception, std::exception)
diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx
index f97b6e06affa..3a8ad96c11b5 100644
--- a/connectivity/source/drivers/odbc/ORealDriver.cxx
+++ b/connectivity/source/drivers/odbc/ORealDriver.cxx
@@ -102,7 +102,7 @@ namespace connectivity
oslGenericFunction ORealObdcDriver::getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
{
- oslGenericFunction pFunction = NULL;
+ oslGenericFunction pFunction = nullptr;
switch(_nIndex)
{
case ODBC3SQLFunctionId::AllocHandle:
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index e30c56d11a90..42d081866ca8 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -87,10 +87,10 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) :
,m_aStatementHandle(_pStatementHandle)
,m_aConnectionHandle(pStmt->getConnectionHandle())
,m_pStatement(pStmt)
- ,m_pSkipDeletedSet(NULL)
+ ,m_pSkipDeletedSet(nullptr)
,m_xStatement(*pStmt)
- ,m_xMetaData(NULL)
- ,m_pRowStatusArray( NULL )
+ ,m_xMetaData(nullptr)
+ ,m_pRowStatusArray( nullptr )
,m_nTextEncoding(pStmt->getOwnConnection()->getTextEncoding())
,m_nRowPos(0)
,m_nUseBookmarks(ODBC_SQL_NOT_DEFINED)
@@ -138,7 +138,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) :
// If !SQL_GD_ANY_ORDER, cache the whole row so that callers can access columns in any order.
// In other words, isolate them from ODBC restrictions.
// TODO: we assume SQL_GD_BLOCK, unless fetchSize is 1
- OTools::GetInfo(m_pStatement->getOwnConnection(),m_aConnectionHandle,SQL_GETDATA_EXTENSIONS,nValueLen,NULL);
+ OTools::GetInfo(m_pStatement->getOwnConnection(),m_aConnectionHandle,SQL_GETDATA_EXTENSIONS,nValueLen,nullptr);
m_bFetchDataInOrder = !((SQL_GD_ANY_ORDER & nValueLen) == SQL_GD_ANY_ORDER);
}
catch(const Exception&)
@@ -424,7 +424,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 /*colu
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBinaryStream", *this );
- return NULL;
+ return nullptr;
}
Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
@@ -434,7 +434,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*c
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBinaryStream", *this );
- return NULL;
+ return nullptr;
}
template < typename T > T OResultSet::impl_getValue( const sal_Int32 _nColumnIndex, SQLSMALLINT nType )
@@ -589,7 +589,7 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLEx
Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getArray", *this );
- return NULL;
+ return nullptr;
}
@@ -597,20 +597,20 @@ Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ ) t
Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getClob", *this );
- return NULL;
+ return nullptr;
}
Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBlob", *this );
- return NULL;
+ return nullptr;
}
Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception)
{
::dbtools::throwFunctionNotSupportedSQLException( "XRow::getRef", *this );
- return NULL;
+ return nullptr;
}
@@ -843,7 +843,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException, st
&nRealLen
);
- bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLFunctionId::BulkOperations ) );
+ bool bPositionByBookmark = ( nullptr != getOdbcFunction( ODBC3SQLFunctionId::BulkOperations ) );
if ( bPositionByBookmark )
{
nRet = N3SQLBulkOperations( m_aStatementHandle, SQL_ADD );
@@ -910,7 +910,7 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException, st
try
{
- bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLFunctionId::BulkOperations ) );
+ bool bPositionByBookmark = ( nullptr != getOdbcFunction( ODBC3SQLFunctionId::BulkOperations ) );
if ( bPositionByBookmark )
{
getBookmark();
@@ -1008,7 +1008,7 @@ void OResultSet::updateValue(sal_Int32 columnIndex,SQLSMALLINT _nType,void* _pVa
m_aBindVector.push_back(allocBindColumn(OTools::MapOdbcType2Jdbc(_nType),columnIndex));
void* pData = reinterpret_cast<void*>(m_aBindVector.rbegin()->first);
- OSL_ENSURE(pData != NULL,"Data for update is NULL!");
+ OSL_ENSURE(pData != nullptr,"Data for update is NULL!");
OTools::bindValue( m_pStatement->getOwnConnection(),
m_aStatementHandle,
columnIndex,
@@ -1352,13 +1352,13 @@ bool OResultSet::isBookmarkable() const
case SQL_CURSOR_FORWARD_ONLY:
return false;
case SQL_CURSOR_STATIC:
- OTools::GetInfo(m_pStatement->getOwnConnection(),m_aConnectionHandle,SQL_STATIC_CURSOR_ATTRIBUTES1,nAttr,NULL);
+ OTools::GetInfo(m_pStatement->getOwnConnection(),m_aConnectionHandle,SQL_STATIC_CURSOR_ATTRIBUTES1,nAttr,nullptr);
break;
case SQL_CURSOR_KEYSET_DRIVEN:
- OTools::GetInfo(m_pStatement->getOwnConnection(),m_aConnectionHandle,SQL_KEYSET_CURSOR_ATTRIBUTES1,nAttr,NULL);
+ OTools::GetInfo(m_pStatement->getOwnConnection(),m_aConnectionHandle,SQL_KEYSET_CURSOR_ATTRIBUTES1,nAttr,nullptr);
break;
case SQL_CURSOR_DYNAMIC:
- OTools::GetInfo(m_pStatement->getOwnConnection(),m_aConnectionHandle,SQL_DYNAMIC_CURSOR_ATTRIBUTES1,nAttr,NULL);
+ OTools::GetInfo(m_pStatement->getOwnConnection(),m_aConnectionHandle,SQL_DYNAMIC_CURSOR_ATTRIBUTES1,nAttr,nullptr);
break;
}
}
@@ -1769,7 +1769,7 @@ bool OResultSet::moveImpl(IResultSetHelper::Movement _eCursorPosition, sal_Int32
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return (m_pSkipDeletedSet != NULL)
+ return (m_pSkipDeletedSet != nullptr)
? m_pSkipDeletedSet->skipDeleted(_eCursorPosition,_nOffset,_bRetrieveData)
: move(_eCursorPosition,_nOffset,_bRetrieveData);
}
@@ -1779,7 +1779,7 @@ void OResultSet::fillNeededData(SQLRETURN _nRet)
SQLRETURN nRet = _nRet;
if( nRet == SQL_NEED_DATA)
{
- void* pColumnIndex = 0;
+ void* pColumnIndex = nullptr;
nRet = N3SQLParamData(m_aStatementHandle,&pColumnIndex);
do
diff --git a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
index 85c62006962a..8b197eba9a26 100644
--- a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
+++ b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
@@ -45,7 +45,7 @@ OUString OResultSetMetaData::getCharColAttrib(sal_Int32 _column,sal_Int32 ident)
static_cast<SQLPOINTER>(pName),
BUFFER_LEN,
&nRealLen,
- NULL
+ nullptr
);
OUString sValue;
if ( nRet == SQL_SUCCESS )
@@ -65,7 +65,7 @@ OUString OResultSetMetaData::getCharColAttrib(sal_Int32 _column,sal_Int32 ident)
static_cast<SQLPOINTER>(pName),
nRealLen,
&nRealLen,
- NULL
+ nullptr
);
if ( nRet == SQL_SUCCESS && nRealLen > 0)
sValue = OUString(pName,nRealLen,m_pConnection->getTextEncoding());
@@ -86,9 +86,9 @@ SQLLEN OResultSetMetaData::getNumColAttrib(OConnection* _pConnection
OTools::ThrowException(_pConnection,(*reinterpret_cast<T3SQLColAttribute>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::ColAttribute)))(_aStatementHandle,
(SQLUSMALLINT)_column,
(SQLUSMALLINT)_ident,
- NULL,
+ nullptr,
0,
- NULL,
+ nullptr,
&nValue),_aStatementHandle,SQL_HANDLE_STMT,_xInterface);
return nValue;
}
diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx
index ddf954d5f492..104a98f4b625 100644
--- a/connectivity/source/drivers/odbc/OStatement.cxx
+++ b/connectivity/source/drivers/odbc/OStatement.cxx
@@ -61,7 +61,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection )
,OPropertySetHelper(OStatement_BASE::rBHelper)
,m_pConnection(_pConnection)
,m_aStatementHandle(SQL_NULL_HANDLE)
- ,m_pRowStatusArray(0)
+ ,m_pRowStatusArray(nullptr)
,rBHelper(OStatement_BASE::rBHelper)
{
osl_atomic_increment( &m_refCount );
@@ -107,7 +107,7 @@ void SAL_CALL OStatement_Base::disposing()
{
m_pConnection->freeStatementHandle(m_aStatementHandle);
m_pConnection->release();
- m_pConnection = NULL;
+ m_pConnection = nullptr;
}
OSL_ENSURE(!m_aStatementHandle,"Sohould ne null here!");
@@ -390,7 +390,7 @@ Reference< XResultSet > OStatement_Base::getResultSet(bool checkCount)
::dbtools::throwFunctionSequenceException(*this,Any());
}
- OResultSet* pRs = NULL;
+ OResultSet* pRs = nullptr;
sal_Int32 numCols = 1;
// If we already know we have result columns, checkCount
@@ -443,7 +443,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const OUString&
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
- Reference< XResultSet > xRS = NULL;
+ Reference< XResultSet > xRS = nullptr;
// Execute the statement. If execute returns true, a result
// set exists.
@@ -1111,7 +1111,7 @@ SQLUINTEGER OStatement_Base::getCursorProperties(SQLINTEGER _nCursorType, bool b
nAskFor = bFirst ? SQL_DYNAMIC_CURSOR_ATTRIBUTES1 : SQL_DYNAMIC_CURSOR_ATTRIBUTES2;
- OTools::GetInfo(getOwnConnection(),getConnectionHandle(),nAskFor,nValueLen,NULL);
+ OTools::GetInfo(getOwnConnection(),getConnectionHandle(),nAskFor,nValueLen,nullptr);
}
catch(const Exception&)
{ // we don't want our result destroy here
diff --git a/connectivity/source/drivers/odbc/oservices.cxx b/connectivity/source/drivers/odbc/oservices.cxx
index 959175161138..dcf4f97e594b 100644
--- a/connectivity/source/drivers/odbc/oservices.cxx
+++ b/connectivity/source/drivers/odbc/oservices.cxx
@@ -64,7 +64,7 @@ struct ProviderRequest
{
try
{
- xRet = creator( xServiceManager, sImplementationName,Factory, Services,0);
+ xRet = creator( xServiceManager, sImplementationName,Factory, Services,nullptr);
}
catch(...)
{
@@ -82,7 +82,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL odbc_component_getFactory(
void* pServiceManager,
void* /*pRegistryKey*/)
{
- void* pRet = 0;
+ void* pRet = nullptr;
if (pServiceManager)
{
ProviderRequest aReq(pServiceManager,pImplementationName);
diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
index db11fc9d7126..dc4e13371dff 100644
--- a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
@@ -554,13 +554,13 @@ Sequence< sal_Int8 > BaseResultSet::getBytes( sal_Int32 columnIndex )
Reference< ::com::sun::star::io::XInputStream > BaseResultSet::getBinaryStream( sal_Int32 /* columnIndex */ )
throw (SQLException, RuntimeException, std::exception)
{
- return 0;
+ return nullptr;
}
Reference< ::com::sun::star::io::XInputStream > BaseResultSet::getCharacterStream( sal_Int32 /* columnIndex */ )
throw (SQLException, RuntimeException, std::exception)
{
- return 0;
+ return nullptr;
}
Any BaseResultSet::getObject(
diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx
index 9df93ea8c05f..8f59ea8a32fe 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.cxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.cxx
@@ -126,7 +126,7 @@ public:
{
m_conn->removeFromWeakMap(m_id);
m_conn->release();
- m_conn = 0;
+ m_conn = nullptr;
}
}
};
@@ -187,7 +187,7 @@ Connection::Connection(
m_settings.logFile = fopen( "sdbc-pqsql.log", "a" );
if( m_settings.logFile )
{
- setvbuf( m_settings.logFile, 0, _IONBF, 0 );
+ setvbuf( m_settings.logFile, nullptr, _IONBF, 0 );
log( &m_settings, m_settings.loglevel , "set this loglevel" );
}
else
@@ -203,12 +203,12 @@ Connection::~Connection()
if( m_settings.pConnection )
{
PQfinish( m_settings.pConnection );
- m_settings.pConnection = 0;
+ m_settings.pConnection = nullptr;
}
if( m_settings.logFile )
{
fclose( m_settings.logFile );
- m_settings.logFile = 0;
+ m_settings.logFile = nullptr;
}
}
typedef ::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XCloseable > > CloseableList;
@@ -226,7 +226,7 @@ void Connection::close() throw ( SQLException, RuntimeException, std::exception
{
log( &m_settings, LogLevel::INFO, "closing connection" );
PQfinish( m_settings.pConnection );
- m_settings.pConnection = 0;
+ m_settings.pConnection = nullptr;
}
lstDispose.push_back( Reference< XComponent > ( m_settings.users, UNO_QUERY ) );
@@ -277,7 +277,7 @@ Reference< XStatement > Connection::createStatement() throw (SQLException, Runti
Statement *stmt = new Statement( m_refMutex, this , &m_settings );
Reference< XStatement > ret( stmt );
::rtl::ByteSequence id( 16 );
- rtl_createUuid( reinterpret_cast<sal_uInt8*>(id.getArray()), 0, sal_False );
+ rtl_createUuid( reinterpret_cast<sal_uInt8*>(id.getArray()), nullptr, sal_False );
m_myStatements[ id ] = Reference< XCloseable > ( stmt );
stmt->queryAdapter()->addReference( new ClosableReference( id, this ) );
return ret;
@@ -294,7 +294,7 @@ Reference< XPreparedStatement > Connection::prepareStatement( const OUString& sq
Reference< XPreparedStatement > ret = stmt;
::rtl::ByteSequence id( 16 );
- rtl_createUuid( reinterpret_cast<sal_uInt8*>(id.getArray()), 0, sal_False );
+ rtl_createUuid( reinterpret_cast<sal_uInt8*>(id.getArray()), nullptr, sal_False );
m_myStatements[ id ] = Reference< XCloseable > ( stmt );
stmt->queryAdapter()->addReference( new ClosableReference( id, this ) );
return ret;
@@ -338,7 +338,7 @@ void Connection::rollback() throw (SQLException, RuntimeException, std::exceptio
sal_Bool Connection::isClosed() throw (SQLException, RuntimeException, std::exception)
{
- return m_settings.pConnection == 0;
+ return m_settings.pConnection == nullptr;
}
Reference< XDatabaseMetaData > Connection::getMetaData()
@@ -372,7 +372,7 @@ void Connection::setCatalog( const OUString& )
OUString Connection::getCatalog() throw (SQLException, RuntimeException, std::exception)
{
MutexGuard guard( m_refMutex->mutex );
- if( m_settings.pConnection == 0 )
+ if( m_settings.pConnection == nullptr )
{
throw SQLException( "pq_connection: connection is closed", *this,
OUString(), 1, Any() );
@@ -547,10 +547,10 @@ void Connection::initialize( const Sequence< Any >& aArguments )
{
char *err;
std::shared_ptr<PQconninfoOption> oOpts(PQconninfoParse(o.getStr(), &err), PQconninfoFree);
- if ( oOpts.get() == NULL )
+ if ( oOpts.get() == nullptr )
{
OUString errorMessage;
- if ( err != NULL)
+ if ( err != nullptr)
{
errorMessage = OUString( err, strlen(err), m_settings.encoding );
free(err);
@@ -567,9 +567,9 @@ void Connection::initialize( const Sequence< Any >& aArguments )
throw SQLException( buf.makeStringAndClear(), *this, OUString("HY092"), 5, Any() );
}
- for ( PQconninfoOption * opt = oOpts.get(); opt->keyword != NULL; ++opt)
+ for ( PQconninfoOption * opt = oOpts.get(); opt->keyword != nullptr; ++opt)
{
- if ( opt->val != NULL )
+ if ( opt->val != nullptr )
{
keywords.push_back(strdup(opt->keyword));
values.push_back(strdup(opt->val));
@@ -577,8 +577,8 @@ void Connection::initialize( const Sequence< Any >& aArguments )
}
}
properties2arrays( args , tc, m_settings.encoding, keywords, values );
- keywords.push_back(NULL, SAL_NO_ACQUIRE);
- values.push_back(NULL, SAL_NO_ACQUIRE);
+ keywords.push_back(nullptr, SAL_NO_ACQUIRE);
+ values.push_back(nullptr, SAL_NO_ACQUIRE);
m_settings.pConnection = PQconnectdbParams( keywords.c_array(), values.c_array(), 0 );
}
@@ -595,7 +595,7 @@ void Connection::initialize( const Sequence< Any >& aArguments )
buf.append( "'\n" );
buf.append( errorMessage );
PQfinish( m_settings.pConnection );
- m_settings.pConnection = 0;
+ m_settings.pConnection = nullptr;
throw SQLException( buf.makeStringAndClear(), *this, errorMessage, CONNECTION_BAD, Any() );
}
PQsetClientEncoding( m_settings.pConnection, "UNICODE" );
@@ -700,7 +700,7 @@ void log( ConnectionSettings *settings, sal_Int32 level, const char *str )
{
static const char *strLevel[] = { "NONE", "ERROR", "SQL", "INFO", "DATA" };
- time_t t = ::time( 0 );
+ time_t t = ::time( nullptr );
char *pString;
#ifdef SAL_W32
pString = asctime( localtime( &t ) );
@@ -734,9 +734,9 @@ static const struct cppu::ImplementationEntry g_entries[] =
{
pq_sdbc_driver::ConnectionCreateInstance, pq_sdbc_driver::ConnectionGetImplementationName,
pq_sdbc_driver::ConnectionGetSupportedServiceNames, cppu::createSingleComponentFactory,
- 0 , 0
+ nullptr , 0
},
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
diff --git a/connectivity/source/drivers/postgresql/pq_connection.hxx b/connectivity/source/drivers/postgresql/pq_connection.hxx
index e4d7d2c0c294..ef1c7e24966f 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.hxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.hxx
@@ -102,13 +102,13 @@ struct ConnectionSettings
{
ConnectionSettings() :
encoding( RTL_TEXTENCODING_UTF8),
- pConnection(0),
+ pConnection(nullptr),
maxNameLen(0),
maxIndexKeys(0),
- pTablesImpl(0),
- pViewsImpl(0),
+ pTablesImpl(nullptr),
+ pViewsImpl(nullptr),
showSystemColumns( false ),
- logFile( 0 ),
+ logFile( nullptr ),
loglevel( LogLevel::INFO )
{}
rtl_TextEncoding encoding;
diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx
index d67d14a1777b..801c2f132e0c 100644
--- a/connectivity/source/drivers/postgresql/pq_driver.cxx
+++ b/connectivity/source/drivers/postgresql/pq_driver.cxx
@@ -285,10 +285,10 @@ static const struct cppu::ImplementationEntry g_entries[] =
{
{
pq_sdbc_driver::DriverCreateInstance, pq_sdbc_driver::DriverGetImplementationName,
- pq_sdbc_driver::DriverGetSupportedServiceNames, 0,
- 0 , 0
+ pq_sdbc_driver::DriverGetSupportedServiceNames, nullptr,
+ nullptr , 0
},
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
extern "C"
@@ -300,7 +300,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL postgresql_sdbc_component_getFactory(
// need to extract the defaultcontext, because the way, sdbc
// bypasses the servicemanager, does not allow to use the
// XSingleComponentFactory interface ...
- void * pRet = 0;
+ void * pRet = nullptr;
Reference< XSingleComponentFactory > xFactory;
Reference< com::sun::star::lang::XMultiServiceFactory > xSmgr(
static_cast< XInterface * >(pServiceManager),
diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
index 6e624ac1316f..27fe0bd1a392 100644
--- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
@@ -297,7 +297,7 @@ void PreparedStatement::close( ) throw (SQLException, RuntimeException, std::ex
Reference< XCloseable > resultSet;
{
MutexGuard guard( m_refMutex->mutex );
- m_pSettings = 0;
+ m_pSettings = nullptr;
r = m_connection;
m_connection.clear();
@@ -725,7 +725,7 @@ void PreparedStatement::setArray(
const Reference< XArray >& x )
throw (SQLException, RuntimeException, std::exception)
{
- setString( parameterIndex, array2String( x->getArray( 0 ) ) );
+ setString( parameterIndex, array2String( x->getArray( nullptr ) ) );
}
void PreparedStatement::clearParameters( )
diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx
index 769215fa4e33..749e63591e5c 100644
--- a/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx
+++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx
@@ -250,7 +250,7 @@ public: // OComponentHelper
private:
void checkColumnIndex( sal_Int32 parameterIndex );
void checkClosed() throw (com::sun::star::sdbc::SQLException, com::sun::star::uno::RuntimeException);
- void raiseSQLException( const char * errorMsg, const char *errorType = 0 )
+ void raiseSQLException( const char * errorMsg, const char *errorType = nullptr )
throw ( com::sun::star::sdbc::SQLException );
// PGresult *pgExecute( OString *pQuery );
};
diff --git a/connectivity/source/drivers/postgresql/pq_resultset.cxx b/connectivity/source/drivers/postgresql/pq_resultset.cxx
index f17cef835516..d282cb44fab3 100644
--- a/connectivity/source/drivers/postgresql/pq_resultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_resultset.cxx
@@ -139,7 +139,7 @@ void ResultSet::close( ) throw (SQLException, RuntimeException, std::exception)
if( m_result )
{
PQclear(m_result );
- m_result = 0;
+ m_result = nullptr;
m_row = -1;
}
owner = m_owner;
diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx b/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx
index d15680063cc8..564471baf78b 100644
--- a/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx
+++ b/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx
@@ -76,7 +76,7 @@ public:
const com::sun::star::uno::Sequence< OUString > &colNames,
const com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::uno::Any > > &data,
const com::sun::star::uno::Reference< com::sun::star::script::XTypeConverter > &tc,
- const ColumnMetaDataVector *pVec = 0);
+ const ColumnMetaDataVector *pVec = nullptr);
virtual ~SequenceResultSet();
public: // XCloseable
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 1347e2a3761b..57d26df07f97 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -226,7 +226,7 @@ void Statement::close( ) throw (SQLException, RuntimeException, std::exception)
Reference< XCloseable > resultSet;
{
MutexGuard guard( m_refMutex->mutex );
- m_pSettings = 0;
+ m_pSettings = nullptr;
r = m_connection;
m_connection.clear();
@@ -293,7 +293,7 @@ static void raiseSQLException(
const Reference< XInterface> & owner,
const OString & sql,
const char * errorMsg,
- const char *errorType = 0 )
+ const char *errorType = nullptr )
throw( SQLException )
{
OUStringBuffer buf(128);
diff --git a/connectivity/source/drivers/postgresql/pq_statement.hxx b/connectivity/source/drivers/postgresql/pq_statement.hxx
index 9453caf16ca6..0ab2e4b5a843 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.hxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.hxx
@@ -176,7 +176,7 @@ public: // XResultSetMetaDataSupplier (is required by framework (see
private:
void checkClosed() throw (com::sun::star::sdbc::SQLException, com::sun::star::uno::RuntimeException);
- void raiseSQLException( const OUString & sql, const char * errorMsg, const char *errorType = 0 )
+ void raiseSQLException( const OUString & sql, const char * errorMsg, const char *errorType = nullptr )
throw ( com::sun::star::sdbc::SQLException );
};
diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx b/connectivity/source/drivers/postgresql/pq_statics.cxx
index 2d5b9de064c2..98bf332c5997 100644
--- a/connectivity/source/drivers/postgresql/pq_statics.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statics.cxx
@@ -541,7 +541,7 @@ Statics & getStatics()
static const char *tablePrivilegesNames[] =
{
"TABLE_CAT", "TABLE_SCHEM", "TABLE_NAME", "GRANTOR", "GRANTEE", "PRIVILEGE",
- "IS_GRANTABLE" , 0
+ "IS_GRANTABLE" , nullptr
};
statics.tablePrivilegesNames =
createStringSequence( tablePrivilegesNames );
@@ -552,7 +552,7 @@ Statics & getStatics()
"DATA_TYPE", "TYPE_NAME", "COLUMN_SIZE", "BUFFER_LENGTH",
"DECIMAL_DIGITS", "NUM_PREC_RADIX", "NULLABLE", "REMARKS",
"COLUMN_DEF", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH",
- "ORDINAL_POSITION", "IS_NULLABLE", 0
+ "ORDINAL_POSITION", "IS_NULLABLE", nullptr
};
statics.columnRowNames =
createStringSequence( columnNames );
@@ -564,7 +564,7 @@ Statics & getStatics()
"SEARCHABLE", "UNSIGNED_ATTRIBUTE", "FIXED_PREC_SCALE",
"AUTO_INCREMENT", "LOCAL_TYPE_NAME", "MINIMUM_SCALE",
"MAXIMUM_SCALE", "SQL_DATA_TYPE", "SQL_DATETIME_SUB",
- "NUM_PREC_RADIX", 0
+ "NUM_PREC_RADIX", nullptr
};
statics.typeinfoColumnNames = createStringSequence( typeinfoColumnNames );
@@ -573,7 +573,7 @@ Statics & getStatics()
"TABLE_CAT", "TABLE_SCHEM", "TABLE_NAME",
"NON_UNIQUE", "INDEX_QUALIFIER", "INDEX_NAME",
"TYPE", "ORDINAL_POSITION", "COLUMN_NAME",
- "ASC_OR_DESC", "CARDINALITY", "PAGES", "FILTER_CONDITION",0
+ "ASC_OR_DESC", "CARDINALITY", "PAGES", "FILTER_CONDITION",nullptr
};
statics.indexinfoColumnNames = createStringSequence( indexinfoColumnNames );
@@ -593,12 +593,12 @@ Statics & getStatics()
"FK_NAME" ,
"PK_NAME" ,
"DEFERRABILITY" ,
- 0
+ nullptr
};
statics.importedKeysColumnNames =
createStringSequence( importedKeysColumnNames );
- static const char * resultSetArrayColumnNames[] = { "INDEX" , "VALUE", 0 };
+ static const char * resultSetArrayColumnNames[] = { "INDEX" , "VALUE", nullptr };
statics.resultSetArrayColumnNames =
createStringSequence( resultSetArrayColumnNames );
@@ -666,7 +666,7 @@ Statics & getStatics()
// { "_date", com::sun::star::sdbc::DataType::ARRAY }, // switch to date later
// { "_time", com::sun::star::sdbc::DataType::ARRAY }, // switch to time later
- { 0, 0 }
+ { nullptr, 0 }
};
int i;
for( i = 0 ; baseTypeDefs[i].typeName ; i ++ )
@@ -699,7 +699,7 @@ Statics & getStatics()
{ "SQL_DATA_TYPE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,false,false,false,false, true }, // 15
{ "SQL_DATETIME_SUB", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,false,false,false,false , true}, // 16
{ "NUM_PREC_RADIX", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,false,false,false,false, true }, // 17
- {0,0,0,0,0,0,0,false,false,false,false, false}
+ {nullptr,nullptr,nullptr,nullptr,0,0,0,false,false,false,false, false}
};
for( i = 0 ; defTypeInfoMetaData[i].columnName ; i++ )
diff --git a/connectivity/source/drivers/postgresql/pq_statics.hxx b/connectivity/source/drivers/postgresql/pq_statics.hxx
index 300f3574dff3..505eceafd8f2 100644
--- a/connectivity/source/drivers/postgresql/pq_statics.hxx
+++ b/connectivity/source/drivers/postgresql/pq_statics.hxx
@@ -114,7 +114,7 @@ typedef std::unordered_map
struct ImplementationStatics
{
ImplementationStatics() :
- pProps(0)
+ pProps(nullptr)
{}
OUString implName;
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 450a9be6bb5b..071fbd7b84fc 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -117,7 +117,7 @@ void bufferEscapeConstant( OUStringBuffer & buf, const OUString & value, Connect
// 22018 is for "Invalid character value" and seems to be the best match.
// We have no good XInterface Reference to pass here, so just give NULL
throw SQLException(OUString(errstr, strlen(errstr), settings->encoding),
- NULL,
+ nullptr,
OUString("22018"),
-1,
Any());
@@ -158,12 +158,12 @@ static inline void ibufferQuoteIdentifier( OUStringBuffer & buf, const OUString
OString y = iOUStringToOString( toQuote, settings );
char *cstr = PQescapeIdentifier(settings->pConnection, y.getStr(), y.getLength());
- if ( cstr == NULL )
+ if ( cstr == nullptr )
{
char *errstr = PQerrorMessage(settings->pConnection);
// Implementation-defined SQLACCESS error
throw SQLException(OUString(errstr, strlen(errstr), settings->encoding),
- NULL,
+ nullptr,
OUString("22018"),
-1,
Any());
@@ -825,7 +825,7 @@ OString extractSingleTableFromSelect( const OStringVector &vec )
else
{
static const char * forbiddenKeywords[] =
- { "join", "natural", "outer", "inner", "left", "right", "full" , 0 };
+ { "join", "natural", "outer", "inner", "left", "right", "full" , nullptr };
for( int i = 0 ; forbiddenKeywords[i] ; i ++ )
{
size_t nKeywordLen = strlen(forbiddenKeywords[i]);
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
index 0c8721cd4f8f..33a192469bae 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
@@ -126,7 +126,7 @@ com::sun::star::uno::Reference< com::sun::star::sdbc::XCloseable > UpdateableRes
Reference <XCloseable > ret = pRS; // give it an refcount
- pRS->m_meta = new ResultSetMetaData( mutex, pRS,0, ppSettings, result, schema, table );
+ pRS->m_meta = new ResultSetMetaData( mutex, pRS,nullptr, ppSettings, result, schema, table );
PQclear( result ); // we don't need it anymore
diff --git a/connectivity/source/drivers/postgresql/pq_xtable.cxx b/connectivity/source/drivers/postgresql/pq_xtable.cxx
index f907597c12c4..39165fec26df 100644
--- a/connectivity/source/drivers/postgresql/pq_xtable.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xtable.cxx
@@ -99,7 +99,7 @@ Table::Table( const ::rtl::Reference< RefCountedMutex > & refMutex,
connection,
pSettings,
* getStatics().refl.table.pProps ),
- m_pColumns( 0 )
+ m_pColumns( nullptr )
{}
Reference< XPropertySet > Table::createDataDescriptor( ) throw (RuntimeException, std::exception)
diff --git a/connectivity/source/inc/dbase/DIndex.hxx b/connectivity/source/inc/dbase/DIndex.hxx
index 28fd11afbcd0..2340761d12ad 100644
--- a/connectivity/source/inc/dbase/DIndex.hxx
+++ b/connectivity/source/inc/dbase/DIndex.hxx
@@ -106,7 +106,7 @@ namespace connectivity
const ODbaseTable* getTable() const { return m_pTable; }
const NDXHeader& getHeader() const { return m_aHeader; }
OIndexIterator* createIterator(OBoolOperator_BASE* pOp,
- const OOperand_BASE* pOperand = NULL);
+ const OOperand_BASE* pOperand = nullptr);
void SetRootPos(sal_uInt32 nPos) {m_nRootPage = nPos;}
void SetPageCount(sal_uInt32 nCount) {m_nPageCount = nCount;}
@@ -127,7 +127,7 @@ namespace connectivity
DECLARE_SERVICE_INFO();
protected:
- ONDXPage* CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent = NULL, bool bLoad = false);
+ ONDXPage* CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent = nullptr, bool bLoad = false);
void Collect(ONDXPage*);
ONDXPagePtr getRoot();
diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx
index 17e713eed117..18b143ac8dd0 100644
--- a/connectivity/source/inc/dbase/dindexnode.hxx
+++ b/connectivity/source/inc/dbase/dindexnode.hxx
@@ -94,7 +94,7 @@ namespace connectivity
sal_uInt32 nPagePos; // Position in the index file
public:
- ONDXPagePtr(sal_uInt32 nPos = 0) : mpPage(0), nPagePos(nPos) {}
+ ONDXPagePtr(sal_uInt32 nPos = 0) : mpPage(nullptr), nPagePos(nPos) {}
ONDXPagePtr(const ONDXPagePtr& rRef);
ONDXPagePtr(ONDXPage* pRefPage);
inline ~ONDXPagePtr();
@@ -103,8 +103,8 @@ namespace connectivity
bool HasPage() const {return nPagePos != 0;}
operator ONDXPage *() const { return mpPage; }
- ONDXPage * operator ->() const { assert(mpPage != 0); return mpPage; }
- bool Is() const { return mpPage != 0; }
+ ONDXPage * operator ->() const { assert(mpPage != nullptr); return mpPage; }
+ bool Is() const { return mpPage != nullptr; }
inline void Clear();
ONDXPagePtr& operator=(const ONDXPagePtr& rRef);
};
@@ -159,7 +159,7 @@ namespace connectivity
bool IsFull() const;
sal_uInt32 GetPagePos() const {return nPagePos;}
- ONDXPagePtr& GetChild(ODbaseIndex* pIndex = 0);
+ ONDXPagePtr& GetChild(ODbaseIndex* pIndex = nullptr);
// Parent does not need to be reloaded
ONDXPagePtr GetParent();
@@ -175,7 +175,7 @@ namespace connectivity
void SearchAndReplace(const ONDXKey& rSearch, ONDXKey& rReplace);
protected:
- ONDXPage(ODbaseIndex& rIndex, sal_uInt32 nPos, ONDXPage* = NULL);
+ ONDXPage(ODbaseIndex& rIndex, sal_uInt32 nPos, ONDXPage* = nullptr);
~ONDXPage();
void ReleaseRef();
@@ -204,12 +204,12 @@ namespace connectivity
#endif
};
- inline ONDXPagePtr::~ONDXPagePtr() { if (mpPage != 0) mpPage->ReleaseRef(); }
+ inline ONDXPagePtr::~ONDXPagePtr() { if (mpPage != nullptr) mpPage->ReleaseRef(); }
inline void ONDXPagePtr::Clear()
{
- if (mpPage != 0) {
+ if (mpPage != nullptr) {
ONDXPage * pRefObj = mpPage;
- mpPage = 0;
+ mpPage = nullptr;
pRefObj->ReleaseRef();
}
}
@@ -258,13 +258,13 @@ namespace connectivity
// Does the node point to a page?
bool HasChild() const {return aChild.HasPage();}
// If an index is provided, we may be able to retrieve the page
- ONDXPagePtr& GetChild(ODbaseIndex* pIndex = NULL, ONDXPage* = NULL);
+ ONDXPagePtr& GetChild(ODbaseIndex* pIndex = nullptr, ONDXPage* = nullptr);
const ONDXKey& GetKey() const { return aKey;}
ONDXKey& GetKey() { return aKey;}
// Setting the child, via reference to retain the PagePos
- void SetChild(ONDXPagePtr aCh = ONDXPagePtr(), ONDXPage* = NULL);
+ void SetChild(ONDXPagePtr aCh = ONDXPagePtr(), ONDXPage* = nullptr);
void Write(SvStream &rStream, const ONDXPage& rPage) const;
void Read(SvStream &rStream, ODbaseIndex&);
diff --git a/connectivity/source/inc/file/fanalyzer.hxx b/connectivity/source/inc/file/fanalyzer.hxx
index f03c67ca8e00..5895981ef2fc 100644
--- a/connectivity/source/inc/file/fanalyzer.hxx
+++ b/connectivity/source/inc/file/fanalyzer.hxx
@@ -78,7 +78,7 @@ namespace connectivity
void setOrigColumns(const css::uno::Reference< css::container::XNameAccess>& rCols);
static OOperandAttr* createOperandAttr(sal_Int32 _nPos,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xCol,
- const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xIndexes=NULL);
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xIndexes=nullptr);
};
}
}
diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx
index 913c01a309d6..8541d4e3c004 100644
--- a/connectivity/source/inc/file/fcode.hxx
+++ b/connectivity/source/inc/file/fcode.hxx
@@ -218,7 +218,7 @@ namespace connectivity
protected:
virtual void Exec(OCodeStack&) override;
- virtual bool operate(const OOperand*, const OOperand* = NULL) const override;
+ virtual bool operate(const OOperand*, const OOperand* = nullptr) const override;
};
class OOp_AND : public OBoolOperator
@@ -244,14 +244,14 @@ namespace connectivity
TYPEINFO_OVERRIDE();
public:
virtual void Exec(OCodeStack&) override;
- virtual bool operate(const OOperand*, const OOperand* = NULL) const override;
+ virtual bool operate(const OOperand*, const OOperand* = nullptr) const override;
};
class OOO_DLLPUBLIC_FILE OOp_ISNOTNULL : public OOp_ISNULL
{
public:
TYPEINFO_OVERRIDE();
- virtual bool operate(const OOperand*, const OOperand* = NULL) const override;
+ virtual bool operate(const OOperand*, const OOperand* = nullptr) const override;
};
class OOO_DLLPUBLIC_FILE OOp_LIKE : public OBoolOperator
diff --git a/connectivity/source/inc/flat/ETable.hxx b/connectivity/source/inc/flat/ETable.hxx
index d2a2bcd8b5b2..7769a2b9c68f 100644
--- a/connectivity/source/inc/flat/ETable.hxx
+++ b/connectivity/source/inc/flat/ETable.hxx
@@ -57,7 +57,7 @@ namespace connectivity
bool m_bNeedToReadLine;
private:
void fillColumns(const ::com::sun::star::lang::Locale& _aLocale);
- bool readLine(sal_Int32 *pEndPos = NULL, sal_Int32 *pStartPos = NULL, bool nonEmpty = false);
+ bool readLine(sal_Int32 *pEndPos = nullptr, sal_Int32 *pStartPos = nullptr, bool nonEmpty = false);
void setRowPos(::std::vector<TRowPositionInFile>::size_type rowNum, const TRowPositionInFile &rowPos);
void impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, sal_Int32& nStartPosFirstLine, sal_Int32& nStartPosFirstLine2,
sal_Int32& io_nType, sal_Int32& io_nPrecisions, sal_Int32& io_nScales, OUString& o_sTypeName,
diff --git a/connectivity/source/inc/hsqldb/HStorageAccess.hxx b/connectivity/source/inc/hsqldb/HStorageAccess.hxx
index 0133691cfd1c..00e53a7c1ba4 100644
--- a/connectivity/source/inc/hsqldb/HStorageAccess.hxx
+++ b/connectivity/source/inc/hsqldb/HStorageAccess.hxx
@@ -29,10 +29,10 @@ namespace connectivity { namespace hsqldb
class DataLogFile;
} }
-jint read_from_storage_stream( JNIEnv * env, jobject obj_this, jstring name, jstring key, ::connectivity::hsqldb::DataLogFile* logger = 0 );
-jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject obj_this,jstring name, jstring key, jbyteArray buffer, jint off, jint len, ::connectivity::hsqldb::DataLogFile* logger = 0 );
-void write_to_storage_stream_from_buffer( JNIEnv* env, jobject obj_this, jstring name, jstring key, jbyteArray buffer, jint off, jint len, ::connectivity::hsqldb::DataLogFile* logger = 0 );
-void write_to_storage_stream( JNIEnv* env, jobject obj_this, jstring name, jstring key, jint v, ::connectivity::hsqldb::DataLogFile* logger = 0 );
+jint read_from_storage_stream( JNIEnv * env, jobject obj_this, jstring name, jstring key, ::connectivity::hsqldb::DataLogFile* logger = nullptr );
+jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject obj_this,jstring name, jstring key, jbyteArray buffer, jint off, jint len, ::connectivity::hsqldb::DataLogFile* logger = nullptr );
+void write_to_storage_stream_from_buffer( JNIEnv* env, jobject obj_this, jstring name, jstring key, jbyteArray buffer, jint off, jint len, ::connectivity::hsqldb::DataLogFile* logger = nullptr );
+void write_to_storage_stream( JNIEnv* env, jobject obj_this, jstring name, jstring key, jint v, ::connectivity::hsqldb::DataLogFile* logger = nullptr );
#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_HSQLDB_HSTORAGEACCESS_HXX
diff --git a/connectivity/source/inc/java/ContextClassLoader.hxx b/connectivity/source/inc/java/ContextClassLoader.hxx
index e426e6ca8ce2..85576b9c837e 100644
--- a/connectivity/source/inc/java/ContextClassLoader.hxx
+++ b/connectivity/source/inc/java/ContextClassLoader.hxx
@@ -60,7 +60,7 @@ namespace connectivity { namespace jdbc
bool isActive() const
{
return ( m_currentThread.is() )
- && ( m_setContextClassLoaderMethod != NULL );
+ && ( m_setContextClassLoaderMethod != nullptr );
}
private:
diff --git a/connectivity/source/inc/java/lang/Object.hxx b/connectivity/source/inc/java/lang/Object.hxx
index f3b169e23950..39c0cf985789 100644
--- a/connectivity/source/inc/java/lang/Object.hxx
+++ b/connectivity/source/inc/java/lang/Object.hxx
@@ -103,7 +103,7 @@ namespace connectivity
);
static void ThrowRuntimeException(JNIEnv * pEnv,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> & _rContext);
- static ::rtl::Reference< jvmaccess::VirtualMachine > getVM(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext=NULL);
+ static ::rtl::Reference< jvmaccess::VirtualMachine > getVM(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext=nullptr);
static jclass findMyClass(const char* _pClassName);
void obtainMethodId_throwSQL(JNIEnv* _pEnv, const char* _pMethodName, const char* _pSignature, jmethodID& _inout_MethodID) const;
@@ -135,7 +135,7 @@ namespace connectivity
SDBThreadAttach t;
obtainMethodId_throwSQL(t.pEnv, _pMethodName,_pSignature, _inout_MethodID);
T out = (t.pEnv->*pCallMethod)( object, _inout_MethodID,_nArgument);
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
return out;
}
@@ -145,7 +145,7 @@ namespace connectivity
SDBThreadAttach t;
obtainMethodId_throwSQL(t.pEnv, _pMethodName,_pSignature, _inout_MethodID);
t.pEnv->CallVoidMethod( object, _inout_MethodID,_nArgument,_aValue);
- ThrowSQLException( t.pEnv, NULL );
+ ThrowSQLException( t.pEnv, nullptr );
}
diff --git a/connectivity/source/inc/java/sql/DatabaseMetaData.hxx b/connectivity/source/inc/java/sql/DatabaseMetaData.hxx
index 832a20cfbabf..2439aa64b05d 100644
--- a/connectivity/source/inc/java/sql/DatabaseMetaData.hxx
+++ b/connectivity/source/inc/java/sql/DatabaseMetaData.hxx
@@ -210,7 +210,7 @@ namespace connectivity
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >
impl_callResultSetMethodWithStrings( const char* _pMethodName, jmethodID& _inout_MethodID, const ::com::sun::star::uno::Any& _rCatalog,
const OUString& _rSchemaPattern, const OUString& _rLeastPattern,
- const OUString* _pOptionalAdditionalString = NULL);
+ const OUString* _pOptionalAdditionalString = nullptr);
};
}
#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_DATABASEMETADATA_HXX
diff --git a/connectivity/source/inc/java/sql/ResultSet.hxx b/connectivity/source/inc/java/sql/ResultSet.hxx
index 3b3eb5ed3041..e4ca37385498 100644
--- a/connectivity/source/inc/java/sql/ResultSet.hxx
+++ b/connectivity/source/inc/java/sql/ResultSet.hxx
@@ -103,7 +103,7 @@ namespace connectivity
virtual jclass getMyClass() const override;
// A ctor that is needed for returning the object
java_sql_ResultSet( JNIEnv * pEnv, jobject myObj, const java::sql::ConnectionLog& _rParentLogger,java_sql_Connection& _rConnection,
- java_sql_Statement_Base* pStmt = NULL );
+ java_sql_Statement_Base* pStmt = nullptr );
// ::cppu::OComponentHelper
virtual void SAL_CALL disposing() override;
diff --git a/connectivity/source/inc/java/tools.hxx b/connectivity/source/inc/java/tools.hxx
index ec69c29cb428..bd600501cfc3 100644
--- a/connectivity/source/inc/java/tools.hxx
+++ b/connectivity/source/inc/java/tools.hxx
@@ -53,7 +53,7 @@ namespace connectivity
for(jsize i=0;i<nLen;++i)
{
JT xInfo(pEnv,pEnv->GetObjectArrayElement(_Array,i));
- java_lang_Object::ThrowSQLException(pEnv,NULL);
+ java_lang_Object::ThrowSQLException(pEnv,nullptr);
xOut.getArray()[i] = xInfo;
}
pEnv->DeleteLocalRef(_Array);
diff --git a/connectivity/source/inc/odbc/OBoundParam.hxx b/connectivity/source/inc/odbc/OBoundParam.hxx
index e07baf5ba000..36b06618de87 100644
--- a/connectivity/source/inc/odbc/OBoundParam.hxx
+++ b/connectivity/source/inc/odbc/OBoundParam.hxx
@@ -32,7 +32,7 @@ namespace connectivity
public:
OBoundParam()
- : binaryData(NULL)
+ : binaryData(nullptr)
, paramLength(0)
, paramInputStreamLen(0)
, sqlType(::com::sun::star::sdbc::DataType::SQLNULL)
@@ -51,11 +51,11 @@ namespace connectivity
void* allocBindDataBuffer (sal_Int32 bufLen)
{
// Reset the input stream and sequence, we are doing a new bind
- setInputStream (NULL, 0);
+ setInputStream (nullptr, 0);
aSequence.realloc(0);
free(binaryData);
- binaryData = (bufLen > 0) ? malloc(bufLen) : NULL;
+ binaryData = (bufLen > 0) ? malloc(bufLen) : nullptr;
return binaryData;
}
diff --git a/connectivity/source/manager/mregistration.cxx b/connectivity/source/manager/mregistration.cxx
index 09ec0f0985d3..11bc4f73eb8d 100644
--- a/connectivity/source/manager/mregistration.cxx
+++ b/connectivity/source/manager/mregistration.cxx
@@ -31,7 +31,7 @@ extern "C"
SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdbc2_component_getFactory(const sal_Char* _pImplName, void * _pServiceManager, void* /*_pRegistryKey*/)
{
- void* pRet = NULL;
+ void* pRet = nullptr;
if (::drivermanager::OSDBCDriverManager::getImplementationName_static().equalsAscii(_pImplName))
{
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 7dd6919baa72..2aeb49f19ece 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -173,13 +173,13 @@ bool OSQLParseTreeIterator::isCaseSensitive() const
void OSQLParseTreeIterator::dispose()
{
- m_aSelectColumns = NULL;
- m_aGroupColumns = NULL;
- m_aOrderColumns = NULL;
- m_aParameters = NULL;
- m_pImpl->m_xTableContainer = NULL;
- m_pImpl->m_xDatabaseMetaData = NULL;
- m_aCreateColumns = NULL;
+ m_aSelectColumns = nullptr;
+ m_aGroupColumns = nullptr;
+ m_aOrderColumns = nullptr;
+ m_aParameters = nullptr;
+ m_pImpl->m_xTableContainer = nullptr;
+ m_pImpl->m_xDatabaseMetaData = nullptr;
+ m_aCreateColumns = nullptr;
m_pImpl->m_pTables->clear();
m_pImpl->m_pSubTables->clear();
}
@@ -395,8 +395,8 @@ OSQLTable OSQLParseTreeIterator::impl_locateRecordSource( const OUString& _rComp
{
if ( !m_pImpl->isQueryAllowed( sComposedName ) )
{
- impl_appendError( m_rParser.getErrorHelper().getSQLException( sdb::ErrorCondition::PARSER_CYCLIC_SUB_QUERIES, NULL ) );
- return NULL;
+ impl_appendError( m_rParser.getErrorHelper().getSQLException( sdb::ErrorCondition::PARSER_CYCLIC_SUB_QUERIES, nullptr ) );
+ return nullptr;
}
m_pImpl->m_xQueryContainer->getByName( sComposedName ) >>= aReturn;
@@ -433,7 +433,7 @@ void OSQLParseTreeIterator::traverseOneTableName( OSQLTables& _rTables,const OSQ
// tables should not be included in the traversal
return;
- OSL_ENSURE(pTableName != NULL,"OSQLParseTreeIterator::traverseOneTableName: pTableName == NULL");
+ OSL_ENSURE(pTableName != nullptr,"OSQLParseTreeIterator::traverseOneTableName: pTableName == NULL");
Any aCatalog;
OUString aSchema,aTableName,aComposedName;
@@ -544,7 +544,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getTableNode( OSQLTables& _rTables,
|| SQL_ISRULE( pTableRef, qualified_join ) || SQL_ISRULE( pTableRef, cross_union ),
"OSQLParseTreeIterator::getTableNode: only to be called for table_ref nodes!" );
- const OSQLParseNode* pTableNameNode = NULL;
+ const OSQLParseNode* pTableNameNode = nullptr;
if ( SQL_ISRULE( pTableRef, joined_table ) )
{
@@ -612,10 +612,10 @@ void OSQLParseTreeIterator::getSelect_statement(OSQLTables& _rTables,const OSQLP
}
OSQLParseNode * pTableRefCommalist = pSelect->getChild(3)->getChild(0)->getChild(1);
- OSL_ENSURE(pTableRefCommalist != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableRefCommalist != nullptr,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableRefCommalist,table_ref_commalist),"OSQLParseTreeIterator: error in parse tree!");
- const OSQLParseNode* pTableName = NULL;
+ const OSQLParseNode* pTableName = nullptr;
OUString aTableRange;
for (size_t i = 0; i < pTableRefCommalist->count(); i++)
{ // Process FROM clause
@@ -659,10 +659,10 @@ void OSQLParseTreeIterator::getSelect_statement(OSQLTables& _rTables,const OSQLP
bool OSQLParseTreeIterator::traverseTableNames(OSQLTables& _rTables)
{
- if ( m_pParseTree == NULL )
+ if ( m_pParseTree == nullptr )
return false;
- OSQLParseNode* pTableName = NULL;
+ OSQLParseNode* pTableName = nullptr;
switch ( m_eStatementType )
{
@@ -718,7 +718,7 @@ namespace
if( _pColumnRef->count() > 1 )
{
for ( sal_Int32 i=0; i<((sal_Int32)_pColumnRef->count())-2; ++i )
- _pColumnRef->getChild(i)->parseNodeToStr( _out_rTableRange, _rxConnection, NULL, false, false );
+ _pColumnRef->getChild(i)->parseNodeToStr( _out_rTableRange, _rxConnection, nullptr, false, false );
_out_rColumnName = _pColumnRef->getChild( _pColumnRef->count()-1 )->getChild(0)->getTokenValue();
}
else
@@ -766,7 +766,7 @@ void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef,
OUString& _rTableRange) const
{
OUString sDummy;
- lcl_getColumnRange( _pColumnRef, m_pImpl->m_xConnection, _rColumnName, _rTableRange, NULL, sDummy );
+ lcl_getColumnRange( _pColumnRef, m_pImpl->m_xConnection, _rColumnName, _rTableRange, nullptr, sDummy );
}
@@ -783,7 +783,7 @@ void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef,
const Reference< XConnection >& _rxConnection, OUString& _out_rColumnName, OUString& _out_rTableRange )
{
OUString sDummy;
- lcl_getColumnRange( _pColumnRef, _rxConnection, _out_rColumnName, _out_rTableRange, NULL, sDummy );
+ lcl_getColumnRange( _pColumnRef, _rxConnection, _out_rColumnName, _out_rTableRange, nullptr, sDummy );
}
@@ -955,7 +955,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele
{
// All the table's columns
OUString aTableRange;
- pColumnRef->getChild(0)->parseNodeToStr( aTableRange, m_pImpl->m_xConnection, NULL, false, false );
+ pColumnRef->getChild(0)->parseNodeToStr( aTableRange, m_pImpl->m_xConnection, nullptr, false, false );
setSelectColumnName(m_aSelectColumns,"*", aEmptyString,aTableRange);
continue;
}
@@ -1028,7 +1028,7 @@ void OSQLParseTreeIterator::traverseByColumnNames(const OSQLParseNode* pSelectNo
{
// aIteratorStatus.Clear();
- if (pSelectNode == NULL)
+ if (pSelectNode == nullptr)
{
//aIteratorStatus.setInvalidStatement();
return;
@@ -1049,21 +1049,21 @@ void OSQLParseTreeIterator::traverseByColumnNames(const OSQLParseNode* pSelectNo
OSL_ENSURE(pSelectNode->count() >= 4,"OSQLParseTreeIterator: error in parse tree!");
OSQLParseNode * pTableExp = pSelectNode->getChild(3);
- OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp != nullptr,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator:table_exp error in parse tree!");
OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
sal_uInt32 nPos = ( _bOrder ? ORDER_BY_CHILD_POS : 2 );
OSQLParseNode * pOptByClause = pTableExp->getChild(nPos);
- OSL_ENSURE(pOptByClause != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pOptByClause != nullptr,"OSQLParseTreeIterator: error in parse tree!");
if ( pOptByClause->count() == 0 )
return;
OSL_ENSURE(pOptByClause->count() == 3,"OSQLParseTreeIterator: error in parse tree!");
OSQLParseNode * pOrderingSpecCommalist = pOptByClause->getChild(2);
- OSL_ENSURE(pOrderingSpecCommalist != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pOrderingSpecCommalist != nullptr,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(!_bOrder || SQL_ISRULE(pOrderingSpecCommalist,ordering_spec_commalist),"OSQLParseTreeIterator:ordering_spec_commalist error in parse tree!");
OSL_ENSURE(pOrderingSpecCommalist->count() > 0,"OSQLParseTreeIterator: error in parse tree!");
@@ -1073,7 +1073,7 @@ void OSQLParseTreeIterator::traverseByColumnNames(const OSQLParseNode* pSelectNo
for (sal_uInt32 i = 0; i < nCount; ++i)
{
OSQLParseNode* pColumnRef = pOrderingSpecCommalist->getChild(i);
- OSL_ENSURE(pColumnRef != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pColumnRef != nullptr,"OSQLParseTreeIterator: error in parse tree!");
if ( _bOrder )
{
OSL_ENSURE(SQL_ISRULE(pColumnRef,ordering_spec),"OSQLParseTreeIterator:ordering_spec error in parse tree!");
@@ -1081,7 +1081,7 @@ void OSQLParseTreeIterator::traverseByColumnNames(const OSQLParseNode* pSelectNo
pColumnRef = pColumnRef->getChild(0);
}
- OSL_ENSURE(pColumnRef != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pColumnRef != nullptr,"OSQLParseTreeIterator: error in parse tree!");
aTableRange.clear();
sColumnName.clear();
if ( SQL_ISRULE(pColumnRef,column_ref) )
@@ -1091,14 +1091,14 @@ void OSQLParseTreeIterator::traverseByColumnNames(const OSQLParseNode* pSelectNo
}
else
{ // here I found a predicate
- pColumnRef->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, false, false );
+ pColumnRef->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, nullptr, false, false );
}
OSL_ENSURE(!sColumnName.isEmpty(),"sColumnName must not be empty!");
if ( _bOrder )
{
// Ascending/Descending
OSQLParseNode * pOptAscDesc = pColumnRef->getParent()->getChild(1);
- OSL_ENSURE(pOptAscDesc != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pOptAscDesc != nullptr,"OSQLParseTreeIterator: error in parse tree!");
bool bAscending = ! (pOptAscDesc && SQL_ISTOKEN(pOptAscDesc,DESC));
setOrderByColumnName(sColumnName, aTableRange,bAscending);
@@ -1136,12 +1136,12 @@ namespace
void OSQLParseTreeIterator::traverseParameters(const OSQLParseNode* _pNode)
{
- if ( _pNode == NULL )
+ if ( _pNode == nullptr )
return;
OUString sColumnName, sTableRange, aColumnAlias;
const OSQLParseNode* pParent = _pNode->getParent();
- if ( pParent != NULL )
+ if ( pParent != nullptr )
{
if ( SQL_ISRULE(pParent,comparison_predicate) ) // x = X
{
@@ -1152,7 +1152,7 @@ void OSQLParseTreeIterator::traverseParameters(const OSQLParseNode* _pNode)
if ( SQL_ISRULE( pOther, column_ref ) )
getColumnRange( pOther, sColumnName, sTableRange, aColumnAlias);
else
- pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, false, false );
+ pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, nullptr, false, false );
} // if ( SQL_ISRULE(pParent,comparison_predicate) ) // x = X
else if ( SQL_ISRULE(pParent,other_like_predicate_part_2) )
{
@@ -1160,7 +1160,7 @@ void OSQLParseTreeIterator::traverseParameters(const OSQLParseNode* _pNode)
if ( SQL_ISRULE( pOther, column_ref ) )
getColumnRange( pOther, sColumnName, sTableRange, aColumnAlias);
else
- pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, false, false );
+ pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, nullptr, false, false );
}
else if ( SQL_ISRULE(pParent,between_predicate_part_2) )
{
@@ -1169,7 +1169,7 @@ void OSQLParseTreeIterator::traverseParameters(const OSQLParseNode* _pNode)
getColumnRange( pOther, sColumnName, sTableRange, aColumnAlias);
else
{
- pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, false, false );
+ pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, nullptr, false, false );
lcl_generateParameterName( *pParent, *_pNode );
}
}
@@ -1189,13 +1189,13 @@ void OSQLParseTreeIterator::traverseParameters(const OSQLParseNode* _pNode)
bool OSQLParseTreeIterator::traverseSelectionCriteria(const OSQLParseNode* pSelectNode)
{
- if ( pSelectNode == NULL )
+ if ( pSelectNode == nullptr )
return false;
// Analyse parse tree (depending on statement type)
// and set pointer to WHERE clause:
- OSQLParseNode * pWhereClause = NULL;
+ OSQLParseNode * pWhereClause = nullptr;
if (m_eStatementType == SQL_STATEMENT_SELECT)
{
@@ -1207,7 +1207,7 @@ bool OSQLParseTreeIterator::traverseSelectionCriteria(const OSQLParseNode* pSele
OSL_ENSURE(pSelectNode->count() >= 4,"OSQLParseTreeIterator: error in parse tree!");
OSQLParseNode * pTableExp = pSelectNode->getChild(3);
- OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp != nullptr,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
@@ -1237,7 +1237,7 @@ bool OSQLParseTreeIterator::traverseSelectionCriteria(const OSQLParseNode* pSele
OSL_ENSURE(pWhereClause->count() == 2,"OSQLParseTreeIterator: error in parse tree!");
OSQLParseNode * pComparisonPredicate = pWhereClause->getChild(1);
- OSL_ENSURE(pComparisonPredicate != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pComparisonPredicate != nullptr,"OSQLParseTreeIterator: error in parse tree!");
// Process the comparison criteria now
@@ -1289,7 +1289,7 @@ void OSQLParseTreeIterator::traverseSearchCondition(OSQLParseNode * pSearchCondi
else if (SQL_ISRULE(pSearchCondition,comparison_predicate) )
{
OUString aValue;
- pSearchCondition->getChild(2)->parseNodeToStr( aValue, m_pImpl->m_xConnection, NULL, false, false );
+ pSearchCondition->getChild(2)->parseNodeToStr( aValue, m_pImpl->m_xConnection, nullptr, false, false );
traverseOnePredicate(pSearchCondition->getChild(0),aValue,pSearchCondition->getChild(2));
impl_fillJoinConditions(pSearchCondition);
// if (! aIteratorStatus.IsSuccessful())
@@ -1305,8 +1305,8 @@ void OSQLParseTreeIterator::traverseSearchCondition(OSQLParseNode * pSearchCondi
OSQLParseNode * pNum_value_exp = pPart2->getChild(nCurentPos);
OSQLParseNode * pOptEscape = pPart2->getChild(nCurentPos+1);
- OSL_ENSURE(pNum_value_exp != NULL,"OSQLParseTreeIterator: error in parse tree!");
- OSL_ENSURE(pOptEscape != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pNum_value_exp != nullptr,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pOptEscape != nullptr,"OSQLParseTreeIterator: error in parse tree!");
if (pOptEscape->count() != 0)
{
@@ -1315,7 +1315,7 @@ void OSQLParseTreeIterator::traverseSearchCondition(OSQLParseNode * pSearchCondi
}
OUString aValue;
- OSQLParseNode * pParam = NULL;
+ OSQLParseNode * pParam = nullptr;
if (SQL_ISRULE(pNum_value_exp,parameter))
pParam = pNum_value_exp;
else if(pNum_value_exp->isToken())
@@ -1323,7 +1323,7 @@ void OSQLParseTreeIterator::traverseSearchCondition(OSQLParseNode * pSearchCondi
aValue = pNum_value_exp->getTokenValue();
else
{
- pNum_value_exp->parseNodeToStr( aValue, m_pImpl->m_xConnection, NULL, false, false );
+ pNum_value_exp->parseNodeToStr( aValue, m_pImpl->m_xConnection, nullptr, false, false );
pParam = pNum_value_exp;
}
@@ -1363,7 +1363,7 @@ void OSQLParseTreeIterator::traverseSearchCondition(OSQLParseNode * pSearchCondi
OSL_ENSURE(SQL_ISTOKEN(pPart2->getChild(0),IS),"OSQLParseTreeIterator: error in parse tree!");
OUString aString;
- traverseOnePredicate(pSearchCondition->getChild(0),aString,NULL);
+ traverseOnePredicate(pSearchCondition->getChild(0),aString,nullptr);
// if (! aIteratorStatus.IsSuccessful()) return;
}
else if (SQL_ISRULE(pSearchCondition,num_value_exp) || SQL_ISRULE(pSearchCondition,term))
@@ -1417,7 +1417,7 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
if ( _pParentNode && (SQL_ISRULE(_pParentNode,general_set_fct) || SQL_ISRULE(_pParentNode,set_fct_spec)) )
{// found a function as column_ref
OUString sFunctionName;
- _pParentNode->getChild(0)->parseNodeToStr( sFunctionName, m_pImpl->m_xConnection, NULL, false, false );
+ _pParentNode->getChild(0)->parseNodeToStr( sFunctionName, m_pImpl->m_xConnection, nullptr, false, false );
const sal_uInt32 nCount = _pParentNode->count();
sal_uInt32 i = 0;
for(; i < nCount;++i)
@@ -1479,7 +1479,7 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
if ( bNotFound )
{
sal_Int32 nType = DataType::VARCHAR;
- OSQLParseNode* pParent = _pParentNode ? _pParentNode->getParent() : NULL;
+ OSQLParseNode* pParent = _pParentNode ? _pParentNode->getParent() : nullptr;
if ( pParent && (SQL_ISRULE(pParent,general_set_fct) || SQL_ISRULE(pParent,set_fct_spec)) )
{
const sal_uInt32 nCount = _pParentNode->count();
@@ -1602,7 +1602,7 @@ OSQLTable OSQLParseTreeIterator::impl_createTableObject( const OUString& rTableN
// container of the connection (m_xTablesContainer)
OSQLTable aReturnTable = new OTable(
- NULL,
+ nullptr,
false,
rTableName,
OUString("Table"),
@@ -1885,16 +1885,16 @@ void OSQLParseTreeIterator::setGroupByColumnName(const OUString & rColumnName, O
const OSQLParseNode* OSQLParseTreeIterator::getWhereTree() const
{
if (!m_pParseTree)
- return NULL;
+ return nullptr;
// Analyse parse tree (depending on statement type)
// and set pointer to WHERE clause:
- OSQLParseNode * pWhereClause = NULL;
+ OSQLParseNode * pWhereClause = nullptr;
if(getStatementType() == SQL_STATEMENT_SELECT)
{
OSL_ENSURE(m_pParseTree->count() >= 4,"ParseTreeIterator: error in parse tree!");
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
- OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp != nullptr,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
@@ -1906,7 +1906,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getWhereTree() const
pWhereClause = m_pParseTree->getChild(m_pParseTree->count()-1);
}
if(pWhereClause && pWhereClause->count() != 2)
- pWhereClause = NULL;
+ pWhereClause = nullptr;
return pWhereClause;
}
@@ -1914,63 +1914,63 @@ const OSQLParseNode* OSQLParseTreeIterator::getWhereTree() const
const OSQLParseNode* OSQLParseTreeIterator::getOrderTree() const
{
if (!m_pParseTree || getStatementType() != SQL_STATEMENT_SELECT)
- return NULL;
+ return nullptr;
// Analyse parse tree (depending on statement type)
// and set pointer to ORDER clause:
- OSQLParseNode * pOrderClause = NULL;
+ OSQLParseNode * pOrderClause = nullptr;
OSL_ENSURE(m_pParseTree->count() >= 4,"ParseTreeIterator: error in parse tree!");
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
- OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp != nullptr,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
pOrderClause = pTableExp->getChild(ORDER_BY_CHILD_POS);
// If it is a order_by, it must not be empty
if(pOrderClause->count() != 3)
- pOrderClause = NULL;
+ pOrderClause = nullptr;
return pOrderClause;
}
const OSQLParseNode* OSQLParseTreeIterator::getGroupByTree() const
{
if (!m_pParseTree || getStatementType() != SQL_STATEMENT_SELECT)
- return NULL;
+ return nullptr;
// Analyse parse tree (depending on statement type)
// and set pointer to ORDER clause:
- OSQLParseNode * pGroupClause = NULL;
+ OSQLParseNode * pGroupClause = nullptr;
OSL_ENSURE(m_pParseTree->count() >= 4,"ParseTreeIterator: error in parse tree!");
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
- OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp != nullptr,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
pGroupClause = pTableExp->getChild(2);
// If it is an order_by, it must not be empty
if(pGroupClause->count() != 3)
- pGroupClause = NULL;
+ pGroupClause = nullptr;
return pGroupClause;
}
const OSQLParseNode* OSQLParseTreeIterator::getHavingTree() const
{
if (!m_pParseTree || getStatementType() != SQL_STATEMENT_SELECT)
- return NULL;
+ return nullptr;
// Analyse parse tree (depending on statement type)
// and set pointer to ORDER clause:
- OSQLParseNode * pHavingClause = NULL;
+ OSQLParseNode * pHavingClause = nullptr;
OSL_ENSURE(m_pParseTree->count() >= 4,"ParseTreeIterator: error in parse tree!");
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
- OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
+ OSL_ENSURE(pTableExp != nullptr,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
pHavingClause = pTableExp->getChild(3);
// If it is an order_by, then it must not be empty
if(pHavingClause->count() < 1)
- pHavingClause = NULL;
+ pHavingClause = nullptr;
return pHavingClause;
}
@@ -1984,25 +1984,25 @@ bool OSQLParseTreeIterator::isTableNode(const OSQLParseNode* _pTableNode)
const OSQLParseNode* OSQLParseTreeIterator::getSimpleWhereTree() const
{
const OSQLParseNode* pNode = getWhereTree();
- return pNode ? pNode->getChild(1) : NULL;
+ return pNode ? pNode->getChild(1) : nullptr;
}
const OSQLParseNode* OSQLParseTreeIterator::getSimpleOrderTree() const
{
const OSQLParseNode* pNode = getOrderTree();
- return pNode ? pNode->getChild(2) : NULL;
+ return pNode ? pNode->getChild(2) : nullptr;
}
const OSQLParseNode* OSQLParseTreeIterator::getSimpleGroupByTree() const
{
const OSQLParseNode* pNode = getGroupByTree();
- return pNode ? pNode->getChild(2) : NULL;
+ return pNode ? pNode->getChild(2) : nullptr;
}
const OSQLParseNode* OSQLParseTreeIterator::getSimpleHavingTree() const
{
const OSQLParseNode* pNode = getHavingTree();
- return pNode ? pNode->getChild(1) : NULL;
+ return pNode ? pNode->getChild(1) : nullptr;
}
@@ -2025,7 +2025,7 @@ Reference< XPropertySet > OSQLParseTreeIterator::findSelectColumn( const OUStrin
DBG_UNHANDLED_EXCEPTION();
}
}
- return NULL;
+ return nullptr;
}
@@ -2079,7 +2079,7 @@ void OSQLParseTreeIterator::impl_appendError( IParseContext::ErrorCode _eError,
OUString sErrorMessage = m_rParser.getContext().getErrorMessage( _eError );
if ( _pReplaceToken1 )
{
- bool bTwoTokens = ( _pReplaceToken2 != NULL );
+ bool bTwoTokens = ( _pReplaceToken2 != nullptr );
const sal_Char* pPlaceHolder1 = bTwoTokens ? "#1" : "#";
const OUString sPlaceHolder1 = OUString::createFromAscii( pPlaceHolder1 );
@@ -2089,7 +2089,7 @@ void OSQLParseTreeIterator::impl_appendError( IParseContext::ErrorCode _eError,
}
impl_appendError( SQLException(
- sErrorMessage, NULL, getStandardSQLState( SQL_GENERAL_ERROR ), 1000, Any() ) );
+ sErrorMessage, nullptr, getStandardSQLState( SQL_GENERAL_ERROR ), 1000, Any() ) );
}
@@ -2112,7 +2112,7 @@ sal_Int32 OSQLParseTreeIterator::getFunctionReturnType(const OSQLParseNode* _pNo
OUString sFunctionName;
if ( SQL_ISRULE(_pNode,length_exp) )
{
- _pNode->getChild(0)->getChild(0)->parseNodeToStr(sFunctionName, m_pImpl->m_xConnection, NULL, false, false );
+ _pNode->getChild(0)->getChild(0)->parseNodeToStr(sFunctionName, m_pImpl->m_xConnection, nullptr, false, false );
nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, &m_rParser.getContext() );
}
else if ( SQL_ISRULE(_pNode,num_value_exp) || SQL_ISRULE(_pNode,term) || SQL_ISRULE(_pNode,factor) )
@@ -2121,7 +2121,7 @@ sal_Int32 OSQLParseTreeIterator::getFunctionReturnType(const OSQLParseNode* _pNo
}
else
{
- _pNode->getChild(0)->parseNodeToStr(sFunctionName, m_pImpl->m_xConnection, NULL, false, false );
+ _pNode->getChild(0)->parseNodeToStr(sFunctionName, m_pImpl->m_xConnection, nullptr, false, false );
// MIN and MAX have another return type, we have to check the expression itself.
// @see http://qa.openoffice.org/issues/show_bug.cgi?id=99566
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index ac4f62bcdd1f..811175088ab9 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -157,7 +157,7 @@ namespace
assert(pCol->count() == 1);
pCol = pCol->getChild(0);
}
- const OSQLParseNode* pTable(NULL);
+ const OSQLParseNode* pTable(nullptr);
switch (pSubTree->count())
{
case 1:
@@ -198,7 +198,7 @@ SQLParseNodeParameter::SQLParseNodeParameter( const Reference< XConnection >& _r
bool _bIntl, bool _bQuote, sal_Char _cDecSep, bool _bPredicate, bool _bParseToSDBC )
:rLocale(_rLocale)
,aMetaData( _rxConnection )
- ,pParser( NULL )
+ ,pParser( nullptr )
,pSubQueryHistory( new QueryNameSet )
,xFormatter(_xFormatter)
,xField(_xField)
@@ -261,7 +261,7 @@ void OSQLParseNode::parseNodeToStr(OUString& rString,
bool _bQuote) const
{
parseNodeToStr(
- rString, _rxConnection, NULL, NULL, OUString(),
+ rString, _rxConnection, nullptr, nullptr, OUString(),
pContext ? pContext->getPreferredLocale() : OParseContext::getDefaultLocale(),
pContext, _bIntl, _bQuote, '.', false, false );
}
@@ -277,7 +277,7 @@ void OSQLParseNode::parseNodeToPredicateStr(OUString& rString,
OSL_ENSURE(xFormatter.is(), "OSQLParseNode::parseNodeToPredicateStr:: no formatter!");
if (xFormatter.is())
- parseNodeToStr(rString, _rxConnection, xFormatter, NULL, OUString(), rIntl, pContext, true, true, _cDec, true, false);
+ parseNodeToStr(rString, _rxConnection, xFormatter, nullptr, OUString(), rIntl, pContext, true, true, _cDec, true, false);
}
@@ -340,7 +340,7 @@ bool OSQLParseNode::parseNodeToExecutableStatement( OUString& _out_rString, cons
{
OSL_PRECOND( _rxConnection.is(), "OSQLParseNode::parseNodeToExecutableStatement: invalid connection!" );
SQLParseNodeParameter aParseParam( _rxConnection,
- NULL, NULL, OUString(), OParseContext::getDefaultLocale(), NULL, false, true, '.', false, true );
+ nullptr, nullptr, OUString(), OParseContext::getDefaultLocale(), nullptr, false, true, '.', false, true );
if ( aParseParam.aMetaData.supportsSubqueriesInFrom() )
{
@@ -521,7 +521,7 @@ void OSQLParseNode::impl_parseNodeToString_throw(OUStringBuffer& rString, const
// don't replace the field for subqueries
if (rParam.xField.is() && SQL_ISRULE(pSubTree,subquery))
- aNewParam.xField = NULL;
+ aNewParam.xField = nullptr;
// When we are building a criterion inside a query view,
// simplify criterion display by removing:
@@ -722,8 +722,8 @@ void OSQLParseNode::impl_parseLikeNodeToString_throw( OUStringBuffer& rString, c
assert(SQL_ISRULE(this,like_predicate));
OSL_ENSURE(count() == 2,"count != 2: Prepare for GPF");
- const OSQLParseNode* pEscNode = NULL;
- const OSQLParseNode* pParaNode = NULL;
+ const OSQLParseNode* pEscNode = nullptr;
+ const OSQLParseNode* pParaNode = nullptr;
SQLParseNodeParameter aNewParam(rParam);
//aNewParam.bQuote = sal_True; // why setting this to true? @see http://www.openoffice.org/issues/show_bug.cgi?id=75557
@@ -814,7 +814,7 @@ void OSQLParser::killThousandSeparator(OSQLParseNode* pLiteral)
OSQLParseNode* OSQLParser::convertNode(sal_Int32 nType, OSQLParseNode* pLiteral)
{
if ( !pLiteral )
- return NULL;
+ return nullptr;
OSQLParseNode* pReturn = pLiteral;
@@ -827,7 +827,7 @@ OSQLParseNode* OSQLParser::convertNode(sal_Int32 nType, OSQLParseNode* pLiteral)
case DataType::LONGVARCHAR:
case DataType::CLOB:
if ( !SQL_ISRULE(pReturn,char_value_exp) && !buildStringNodes(pReturn) )
- pReturn = NULL;
+ pReturn = nullptr;
default:
break;
}
@@ -1084,7 +1084,7 @@ OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType)
OSQLParseNode* OSQLParser::buildNode_STR_NUM(OSQLParseNode*& _pLiteral)
{
- OSQLParseNode* pReturn = NULL;
+ OSQLParseNode* pReturn = nullptr;
if ( _pLiteral )
{
if (m_nFormatKey)
@@ -1105,7 +1105,7 @@ OSQLParseNode* OSQLParser::buildNode_STR_NUM(OSQLParseNode*& _pLiteral)
pReturn = new OSQLInternalNode(_pLiteral->getTokenValue(),SQL_NODE_STRING);
delete _pLiteral;
- _pLiteral = NULL;
+ _pLiteral = nullptr;
}
return pReturn;
}
@@ -1256,9 +1256,9 @@ OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString
s_pScanner->prepareScan(rStatement, m_pContext, true);
- SQLyylval.pParseNode = NULL;
+ SQLyylval.pParseNode = nullptr;
// SQLyypvt = NULL;
- m_pParseTree = NULL;
+ m_pParseTree = nullptr;
m_sErrorMessage.clear();
// Start the parser
@@ -1279,7 +1279,7 @@ OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString
// clear the garbage collector
(*s_pGarbageCollector)->clearAndDelete();
- return NULL;
+ return nullptr;
}
else
{
@@ -1294,7 +1294,7 @@ OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString
// Return the result (the root parse node):
// Instead, the parse method sets the member pParseTree and simply returns that
- OSL_ENSURE(m_pParseTree != NULL,"OSQLParser: Parser did not return a ParseTree!");
+ OSL_ENSURE(m_pParseTree != nullptr,"OSQLParser: Parser did not return a ParseTree!");
return m_pParseTree;
}
}
@@ -1303,7 +1303,7 @@ OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString
OSQLParser::OSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const IParseContext* _pContext)
:m_pContext(_pContext)
- ,m_pParseTree(NULL)
+ ,m_pParseTree(nullptr)
,m_pData( new OSQLParser_Data( rxContext ) )
,m_nFormatKey(0)
,m_nDateFormatKey(0)
@@ -1459,7 +1459,7 @@ OSQLParser::OSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star:
}
++s_nRefCount;
- if (m_pContext == NULL)
+ if (m_pContext == nullptr)
// take the default context
m_pContext = &s_aDefaultContext;
@@ -1476,17 +1476,17 @@ OSQLParser::~OSQLParser()
{
s_pScanner->setScanner(true);
delete s_pScanner;
- s_pScanner = NULL;
+ s_pScanner = nullptr;
delete s_pGarbageCollector;
- s_pGarbageCollector = NULL;
+ s_pGarbageCollector = nullptr;
// Is only set the first time, so we should delete it only when there are no more instances
- s_xLocaleData = NULL;
+ s_xLocaleData = nullptr;
RuleIDMap aEmpty;
s_aReverseRuleIDLookup.swap( aEmpty );
}
- m_pParseTree = NULL;
+ m_pParseTree = nullptr;
}
}
@@ -1563,13 +1563,13 @@ OSQLParseNode* OSQLParser::buildDate(sal_Int32 _nType,OSQLParseNode*& pLiteral)
{
// try converting the string into a date, according to our format key
double fValue = 0.0;
- OSQLParseNode* pFCTNode = NULL;
+ OSQLParseNode* pFCTNode = nullptr;
if ( extractDate(pLiteral,fValue) )
pFCTNode = buildNode_Date( fValue, _nType);
delete pLiteral;
- pLiteral = NULL;
+ pLiteral = nullptr;
if ( !pFCTNode )
m_sErrorMessage = m_pContext->getErrorMessage(IParseContext::ERROR_INVALID_DATE_COMPARE);
@@ -1581,7 +1581,7 @@ OSQLParseNode* OSQLParser::buildDate(sal_Int32 _nType,OSQLParseNode*& pLiteral)
OSQLParseNode::OSQLParseNode(const sal_Char * pNewValue,
SQLNodeType eNewNodeType,
sal_uInt32 nNewNodeID)
- :m_pParent(NULL)
+ :m_pParent(nullptr)
,m_aNodeValue(pNewValue,strlen(pNewValue),RTL_TEXTENCODING_UTF8)
,m_eNodeType(eNewNodeType)
,m_nNodeID(nNewNodeID)
@@ -1592,7 +1592,7 @@ OSQLParseNode::OSQLParseNode(const sal_Char * pNewValue,
OSQLParseNode::OSQLParseNode(const OString &_rNewValue,
SQLNodeType eNewNodeType,
sal_uInt32 nNewNodeID)
- :m_pParent(NULL)
+ :m_pParent(nullptr)
,m_aNodeValue(OStringToOUString(_rNewValue,RTL_TEXTENCODING_UTF8))
,m_eNodeType(eNewNodeType)
,m_nNodeID(nNewNodeID)
@@ -1603,7 +1603,7 @@ OSQLParseNode::OSQLParseNode(const OString &_rNewValue,
OSQLParseNode::OSQLParseNode(const OUString &_rNewValue,
SQLNodeType eNewNodeType,
sal_uInt32 nNewNodeID)
- :m_pParent(NULL)
+ :m_pParent(nullptr)
,m_aNodeValue(_rNewValue)
,m_eNodeType(eNewNodeType)
,m_nNodeID(nNewNodeID)
@@ -1614,7 +1614,7 @@ OSQLParseNode::OSQLParseNode(const OUString &_rNewValue,
OSQLParseNode::OSQLParseNode(const OSQLParseNode& rParseNode)
{
// Set the getParent to NULL
- m_pParent = NULL;
+ m_pParent = nullptr;
// Copy the members
m_aNodeValue = rParseNode.m_aNodeValue;
@@ -1687,8 +1687,8 @@ OSQLParseNode::~OSQLParseNode()
void OSQLParseNode::append(OSQLParseNode* pNewNode)
{
- OSL_ENSURE(pNewNode != NULL, "OSQLParseNode: invalid NewSubTree");
- OSL_ENSURE(pNewNode->getParent() == NULL, "OSQLParseNode: Node is not an orphan");
+ OSL_ENSURE(pNewNode != nullptr, "OSQLParseNode: invalid NewSubTree");
+ OSL_ENSURE(pNewNode->getParent() == nullptr, "OSQLParseNode: Node is not an orphan");
OSL_ENSURE(::std::find(m_aChildren.begin(), m_aChildren.end(), pNewNode) == m_aChildren.end(),
"OSQLParseNode::append() Node already element of parent");
@@ -1769,7 +1769,7 @@ void OSQLParseNode::replaceNodeValue(const OUString& rTableAlias, const OUString
OSQLParseNode* OSQLParseNode::getByRule(OSQLParseNode::Rule eRule) const
{
- OSQLParseNode* pRetNode = 0;
+ OSQLParseNode* pRetNode = nullptr;
if (isRule() && OSQLParser::RuleID(eRule) == getRuleID())
pRetNode = const_cast<OSQLParseNode*>(this);
else
@@ -1829,14 +1829,14 @@ void OSQLParseNode::disjunctiveNormalForm(OSQLParseNode*& pSearchCondition)
OSQLParseNode* pRight = pSearchCondition->getChild(2);
disjunctiveNormalForm(pRight);
- OSQLParseNode* pNewNode = NULL;
+ OSQLParseNode* pNewNode = nullptr;
// '(' search_condition ')' on left side
if(pLeft->count() == 3 && SQL_ISRULE(pLeft,boolean_primary) && SQL_ISRULE(pLeft->getChild(1),search_condition))
{
// and-or tree on left side
OSQLParseNode* pOr = pLeft->getChild(1);
- OSQLParseNode* pNewLeft = NULL;
- OSQLParseNode* pNewRight = NULL;
+ OSQLParseNode* pNewLeft = nullptr;
+ OSQLParseNode* pNewRight = nullptr;
// cut right from parent
pSearchCondition->removeAt(2);
@@ -1854,8 +1854,8 @@ void OSQLParseNode::disjunctiveNormalForm(OSQLParseNode*& pSearchCondition)
// and-or tree on right side
// a and (b or c)
OSQLParseNode* pOr = pRight->getChild(1);
- OSQLParseNode* pNewLeft = NULL;
- OSQLParseNode* pNewRight = NULL;
+ OSQLParseNode* pNewLeft = nullptr;
+ OSQLParseNode* pNewRight = nullptr;
// cut left from parent
pSearchCondition->removeAt((sal_uInt32)0);
@@ -1950,7 +1950,7 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition, bool
assert(SQL_ISTOKEN(pComparison->getChild(0), IS));
OSQLParseNode* pNot = pComparison->getChild(1);
- OSQLParseNode* pNotNot = NULL;
+ OSQLParseNode* pNotNot = nullptr;
if(pNot->isRule()) // no NOT token (empty rule)
pNotNot = new OSQLParseNode(OUString("NOT"),SQL_NODE_KEYWORD,SQL_TOKEN_NOT);
else
@@ -2003,7 +2003,7 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition, bool
nNotPos = 1;
OSQLParseNode* pNot = pPart2->getChild(nNotPos);
- OSQLParseNode* pNotNot = NULL;
+ OSQLParseNode* pNotNot = nullptr;
if(pNot->isRule()) // no NOT token (empty rule)
pNotNot = new OSQLParseNode(OUString("NOT"),SQL_NODE_KEYWORD,SQL_TOKEN_NOT);
else
@@ -2017,7 +2017,7 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition, bool
else if(bNegate && (SQL_ISRULE(pSearchCondition,like_predicate)))
{
OSQLParseNode* pNot = pSearchCondition->getChild( 1 )->getChild( 0 );
- OSQLParseNode* pNotNot = NULL;
+ OSQLParseNode* pNotNot = nullptr;
if(pNot->isRule())
pNotNot = new OSQLParseNode(OUString("NOT"),SQL_NODE_KEYWORD,SQL_TOKEN_NOT);
else
@@ -2062,7 +2062,7 @@ void OSQLParseNode::absorptions(OSQLParseNode*& pSearchCondition)
sal_uInt32 nPos = 0;
// a and a || a or a
- OSQLParseNode* pNewNode = NULL;
+ OSQLParseNode* pNewNode = nullptr;
if(( SQL_ISRULE(pSearchCondition,boolean_term) || SQL_ISRULE(pSearchCondition,search_condition))
&& *pSearchCondition->getChild(0) == *pSearchCondition->getChild(2))
{
@@ -2380,8 +2380,8 @@ void OSQLParseNode::showParseTree( OUStringBuffer& _inout_rBuffer, sal_uInt32 nL
void OSQLParseNode::insert(sal_uInt32 nPos, OSQLParseNode* pNewSubTree)
{
- OSL_ENSURE(pNewSubTree != NULL, "OSQLParseNode: invalid NewSubTree");
- OSL_ENSURE(pNewSubTree->getParent() == NULL, "OSQLParseNode: Node is not an orphan");
+ OSL_ENSURE(pNewSubTree != nullptr, "OSQLParseNode: invalid NewSubTree");
+ OSL_ENSURE(pNewSubTree->getParent() == nullptr, "OSQLParseNode: Node is not an orphan");
// Create connection to getParent
pNewSubTree->setParent( this );
@@ -2397,7 +2397,7 @@ OSQLParseNode* OSQLParseNode::removeAt(sal_uInt32 nPos)
OSQLParseNode* pNode = *aPos;
// Set the getParent of the removed node to NULL
- pNode->setParent( NULL );
+ pNode->setParent( nullptr );
m_aChildren.erase(aPos);
return pNode;
@@ -2407,14 +2407,14 @@ OSQLParseNode* OSQLParseNode::removeAt(sal_uInt32 nPos)
OSQLParseNode* OSQLParseNode::replace (OSQLParseNode* pOldSubNode, OSQLParseNode* pNewSubNode )
{
- OSL_ENSURE(pOldSubNode != NULL && pNewSubNode != NULL, "OSQLParseNode: invalid nodes");
- OSL_ENSURE(pNewSubNode->getParent() == NULL, "OSQLParseNode: node already has getParent");
+ OSL_ENSURE(pOldSubNode != nullptr && pNewSubNode != nullptr, "OSQLParseNode: invalid nodes");
+ OSL_ENSURE(pNewSubNode->getParent() == nullptr, "OSQLParseNode: node already has getParent");
OSL_ENSURE(::std::find(m_aChildren.begin(), m_aChildren.end(), pOldSubNode) != m_aChildren.end(),
"OSQLParseNode::Replace() Node not element of parent");
OSL_ENSURE(::std::find(m_aChildren.begin(), m_aChildren.end(), pNewSubNode) == m_aChildren.end(),
"OSQLParseNode::Replace() Node already element of parent");
- pOldSubNode->setParent( NULL );
+ pOldSubNode->setParent( nullptr );
pNewSubNode->setParent( this );
::std::replace(m_aChildren.begin(), m_aChildren.end(), pOldSubNode, pNewSubNode);
return pOldSubNode;
@@ -2431,7 +2431,7 @@ void OSQLParseNode::parseLeaf(OUStringBuffer& rString, const SQLParseNodeParamet
if (!rString.isEmpty())
rString.append(" ");
- const OString sT = OSQLParser::TokenIDToStr(m_nNodeID, rParam.bInternational ? &rParam.m_rContext : NULL);
+ const OString sT = OSQLParser::TokenIDToStr(m_nNodeID, rParam.bInternational ? &rParam.m_rContext : nullptr);
rString.append(OStringToOUString(sT,RTL_TEXTENCODING_UTF8));
} break;
case SQL_NODE_STRING:
diff --git a/connectivity/source/resource/sharedresources.cxx b/connectivity/source/resource/sharedresources.cxx
index e69cfa669cf2..f92d87a085a7 100644
--- a/connectivity/source/resource/sharedresources.cxx
+++ b/connectivity/source/resource/sharedresources.cxx
@@ -66,7 +66,7 @@ namespace connectivity
};
- SharedResources_Impl* SharedResources_Impl::s_pInstance( NULL );
+ SharedResources_Impl* SharedResources_Impl::s_pInstance( nullptr );
oslInterlockedCount SharedResources_Impl::s_nClients( 0 );
@@ -87,7 +87,7 @@ namespace connectivity
OUString SharedResources_Impl::getResourceString( ResourceId _nId )
{
- if ( m_pResourceBundle.get() == NULL )
+ if ( m_pResourceBundle.get() == nullptr )
// this should never happen, but we gracefully ignore it. It has been reported
// in the constructor in non-product builds.
return OUString();
@@ -108,7 +108,7 @@ namespace connectivity
if ( 0 == osl_atomic_decrement( &s_nClients ) )
{
delete s_pInstance;
- s_pInstance = NULL;
+ s_pInstance = nullptr;
}
}
diff --git a/connectivity/source/sdbcx/VCatalog.cxx b/connectivity/source/sdbcx/VCatalog.cxx
index ef3880f632ce..6c4924062a50 100644
--- a/connectivity/source/sdbcx/VCatalog.cxx
+++ b/connectivity/source/sdbcx/VCatalog.cxx
@@ -38,10 +38,10 @@ IMPLEMENT_SERVICE_INFO(OCatalog,"com.sun.star.comp.connectivity.OCatalog","com.s
OCatalog::OCatalog(const Reference< XConnection> &_xConnection) : OCatalog_BASE(m_aMutex)
,connectivity::OSubComponent<OCatalog, OCatalog_BASE>(_xConnection, this)
- ,m_pTables(NULL)
- ,m_pViews(NULL)
- ,m_pGroups(NULL)
- ,m_pUsers(NULL)
+ ,m_pTables(nullptr)
+ ,m_pViews(nullptr)
+ ,m_pGroups(nullptr)
+ ,m_pUsers(nullptr)
{
try
{
diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx
index 8a1ff43cdfc7..7874bfecfab4 100644
--- a/connectivity/source/sdbcx/VDescriptor.cxx
+++ b/connectivity/source/sdbcx/VDescriptor.cxx
@@ -58,7 +58,7 @@ namespace connectivity
Reference< XUnoTunnel > xTunnel( _rxSomeComp, UNO_QUERY );
if ( xTunnel.is() )
return reinterpret_cast< ODescriptor* >( xTunnel->getSomething( getUnoTunnelImplementationId() ) );
- return NULL;
+ return nullptr;
}
@@ -104,7 +104,7 @@ namespace connectivity
Sequence< sal_Int8 > ODescriptor::getUnoTunnelImplementationId()
{
- static ::cppu::OImplementationId * pId = 0;
+ static ::cppu::OImplementationId * pId = nullptr;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
diff --git a/connectivity/source/sdbcx/VGroup.cxx b/connectivity/source/sdbcx/VGroup.cxx
index 196cbc358c99..15953687c993 100644
--- a/connectivity/source/sdbcx/VGroup.cxx
+++ b/connectivity/source/sdbcx/VGroup.cxx
@@ -39,13 +39,13 @@ IMPLEMENT_SERVICE_INFO(OGroup,"com.sun.star.sdbcx.VGroup","com.sun.star.sdbcx.Gr
OGroup::OGroup(bool _bCase) : OGroup_BASE(m_aMutex)
, ODescriptor(OGroup_BASE::rBHelper,_bCase)
- , m_pUsers(NULL)
+ , m_pUsers(nullptr)
{
}
OGroup::OGroup(const OUString& _Name, bool _bCase) : OGroup_BASE(m_aMutex)
,ODescriptor(OGroup_BASE::rBHelper,_bCase)
- ,m_pUsers(NULL)
+ ,m_pUsers(nullptr)
{
m_Name = _Name;
}
diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx
index cebffa3f5121..67e05499f9ed 100644
--- a/connectivity/source/sdbcx/VIndex.cxx
+++ b/connectivity/source/sdbcx/VIndex.cxx
@@ -66,7 +66,7 @@ OIndex::OIndex(bool _bCase) : ODescriptor_BASE(m_aMutex)
,m_IsUnique(false)
,m_IsPrimaryKeyIndex(false)
,m_IsClustered(false)
- ,m_pColumns(NULL)
+ ,m_pColumns(nullptr)
{
}
@@ -81,7 +81,7 @@ OIndex::OIndex( const OUString& _Name,
,m_IsUnique(_isUnique)
,m_IsPrimaryKeyIndex(_isPrimaryKeyIndex)
,m_IsClustered(_isClustered)
- ,m_pColumns(NULL)
+ ,m_pColumns(nullptr)
{
m_Name = _Name;
}
diff --git a/connectivity/source/sdbcx/VKey.cxx b/connectivity/source/sdbcx/VKey.cxx
index 537d4c2c8893..d6cf5a616a17 100644
--- a/connectivity/source/sdbcx/VKey.cxx
+++ b/connectivity/source/sdbcx/VKey.cxx
@@ -62,7 +62,7 @@ sal_Bool SAL_CALL OKey::supportsService( const OUString& _rServiceName ) throw(:
OKey::OKey(bool _bCase) : ODescriptor_BASE(m_aMutex)
, ODescriptor(ODescriptor_BASE::rBHelper, _bCase, true)
, m_aProps(new KeyProperties())
- , m_pColumns(NULL)
+ , m_pColumns(nullptr)
{
}
@@ -70,7 +70,7 @@ OKey::OKey(const OUString& _Name,const TKeyProperties& _rProps, bool _bCase)
: ODescriptor_BASE(m_aMutex)
,ODescriptor(ODescriptor_BASE::rBHelper,_bCase)
,m_aProps(_rProps)
- ,m_pColumns(NULL)
+ ,m_pColumns(nullptr)
{
m_Name = _Name;
}
diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx
index 7a4d453febb3..012cd109b5cd 100644
--- a/connectivity/source/sdbcx/VTable.cxx
+++ b/connectivity/source/sdbcx/VTable.cxx
@@ -68,9 +68,9 @@ OTable::OTable(OCollection* _pTables,
bool _bCase)
: OTableDescriptor_BASE(m_aMutex)
,ODescriptor(OTableDescriptor_BASE::rBHelper,_bCase,true)
- ,m_pKeys(NULL)
- ,m_pColumns(NULL)
- ,m_pIndexes(NULL)
+ ,m_pKeys(nullptr)
+ ,m_pColumns(nullptr)
+ ,m_pIndexes(nullptr)
,m_pTables(_pTables)
{
}
@@ -85,9 +85,9 @@ OTable::OTable( OCollection* _pTables,
,m_SchemaName(_SchemaName)
,m_Description(_Description)
,m_Type(_Type)
- ,m_pKeys(NULL)
- ,m_pColumns(NULL)
- ,m_pIndexes(NULL)
+ ,m_pKeys(nullptr)
+ ,m_pColumns(nullptr)
+ ,m_pIndexes(nullptr)
,m_pTables(_pTables)
{
m_Name = _Name;
@@ -158,7 +158,7 @@ void SAL_CALL OTable::disposing()
if(m_pIndexes)
m_pIndexes->disposing();
- m_pTables = NULL;
+ m_pTables = nullptr;
}
// XColumnsSupplier
@@ -275,7 +275,7 @@ void SAL_CALL OTable::rename( const OUString& newName ) throw(SQLException, Elem
Reference< XDatabaseMetaData> OTable::getMetaData() const
{
- return NULL;
+ return nullptr;
}
// XAlterTable
diff --git a/connectivity/source/sdbcx/VUser.cxx b/connectivity/source/sdbcx/VUser.cxx
index c80934d1da25..376f55889309 100644
--- a/connectivity/source/sdbcx/VUser.cxx
+++ b/connectivity/source/sdbcx/VUser.cxx
@@ -40,13 +40,13 @@ IMPLEMENT_SERVICE_INFO(OUser,"com.sun.star.sdbcx.VUser","com.sun.star.sdbcx.User
OUser::OUser(bool _bCase) : OUser_BASE(m_aMutex)
, ODescriptor(OUser_BASE::rBHelper,_bCase,true)
- , m_pGroups(NULL)
+ , m_pGroups(nullptr)
{
}
OUser::OUser(const OUString& _Name, bool _bCase) : OUser_BASE(m_aMutex)
,ODescriptor(OUser_BASE::rBHelper,_bCase)
- ,m_pGroups(NULL)
+ ,m_pGroups(nullptr)
{
m_Name = _Name;
}