summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 16:18:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 16:20:34 +0100
commit1d2a407d90c140e2edab6390c7d46814993b988f (patch)
treeb70c695d982cf1dc2dedda6dfb0fce6eee340e24 /connectivity
parent520cd4e6886db99b6dd47527871f0d573933da8d (diff)
loplugin:nullptr (automatic rewrite; Mac-specific code)
Change-Id: I1d4f6975a7f3deac65510b3bf7ab80e9d01a3a6c
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/macab/MacabAddressBook.cxx18
-rw-r--r--connectivity/source/drivers/macab/MacabColumns.cxx2
-rw-r--r--connectivity/source/drivers/macab/MacabConnection.cxx12
-rw-r--r--connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/macab/MacabDriver.cxx14
-rw-r--r--connectivity/source/drivers/macab/MacabGroup.cxx6
-rw-r--r--connectivity/source/drivers/macab/MacabHeader.cxx12
-rw-r--r--connectivity/source/drivers/macab/MacabPreparedStatement.cxx44
-rw-r--r--connectivity/source/drivers/macab/MacabRecord.cxx36
-rw-r--r--connectivity/source/drivers/macab/MacabRecords.cxx54
-rw-r--r--connectivity/source/drivers/macab/MacabResultSet.cxx60
-rw-r--r--connectivity/source/drivers/macab/MacabResultSetMetaData.cxx8
-rw-r--r--connectivity/source/drivers/macab/MacabServices.cxx4
-rw-r--r--connectivity/source/drivers/macab/MacabStatement.cxx20
-rw-r--r--connectivity/source/drivers/macab/MacabTables.cxx2
-rw-r--r--connectivity/source/drivers/macab/macabcondition.cxx18
-rw-r--r--connectivity/source/drivers/macab/macabutilities.hxx2
-rw-r--r--connectivity/source/drivers/mork/MNSFolders.cxx6
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx6
-rw-r--r--connectivity/source/drivers/odbc/OConnection.cxx2
20 files changed, 165 insertions, 165 deletions
diff --git a/connectivity/source/drivers/macab/MacabAddressBook.cxx b/connectivity/source/drivers/macab/MacabAddressBook.cxx
index 14f27b39eabd..a7a9bda10f3b 100644
--- a/connectivity/source/drivers/macab/MacabAddressBook.cxx
+++ b/connectivity/source/drivers/macab/MacabAddressBook.cxx
@@ -80,17 +80,17 @@ void manageDuplicateGroups(::std::vector<MacabGroup *> _xGroups)
MacabAddressBook::MacabAddressBook( )
{
m_aAddressBook = ABGetSharedAddressBook();
- m_xMacabRecords = NULL;
+ m_xMacabRecords = nullptr;
m_bRetrievedGroups = false;
}
MacabAddressBook::~MacabAddressBook()
{
- if(m_xMacabRecords != NULL)
+ if(m_xMacabRecords != nullptr)
{
delete m_xMacabRecords;
- m_xMacabRecords = NULL;
+ m_xMacabRecords = nullptr;
}
if(!m_xMacabGroups.empty())
@@ -122,7 +122,7 @@ const OUString & MacabAddressBook::getDefaultTableName()
MacabRecords *MacabAddressBook::getMacabRecords()
{
/* If the MacabRecords don't exist, create them. */
- if(m_xMacabRecords == NULL)
+ if(m_xMacabRecords == nullptr)
{
m_xMacabRecords = new MacabRecords(m_aAddressBook);
m_xMacabRecords->setName(getDefaultTableName());
@@ -166,7 +166,7 @@ MacabRecords *MacabAddressBook::getMacabRecordsMatch(const OUString& _tableName)
if(!m_bRetrievedGroups)
{
/* If the MacabRecords haven't been created yet, create them. */
- if(m_xMacabRecords == NULL)
+ if(m_xMacabRecords == nullptr)
{
m_xMacabRecords = new MacabRecords(m_aAddressBook);
m_xMacabRecords->setName(getDefaultTableName());
@@ -209,7 +209,7 @@ MacabGroup *MacabAddressBook::getMacabGroup(OUString const & _groupName)
for(i = 0; i < nGroups; i++)
{
- if(m_xMacabGroups[i] != NULL)
+ if(m_xMacabGroups[i] != nullptr)
{
if(m_xMacabGroups[i]->getName() == _groupName)
{
@@ -218,7 +218,7 @@ MacabGroup *MacabAddressBook::getMacabGroup(OUString const & _groupName)
}
}
- return NULL;
+ return nullptr;
}
@@ -233,7 +233,7 @@ MacabGroup *MacabAddressBook::getMacabGroupMatch(OUString const & _groupName)
for(i = 0; i < nGroups; i++)
{
- if(m_xMacabGroups[i] != NULL)
+ if(m_xMacabGroups[i] != nullptr)
{
if(match(m_xMacabGroups[i]->getName(), _groupName, '\0'))
{
@@ -242,7 +242,7 @@ MacabGroup *MacabAddressBook::getMacabGroupMatch(OUString const & _groupName)
}
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/macab/MacabColumns.cxx b/connectivity/source/drivers/macab/MacabColumns.cxx
index 22cd54c0cfa8..f74f952d88cd 100644
--- a/connectivity/source/drivers/macab/MacabColumns.cxx
+++ b/connectivity/source/drivers/macab/MacabColumns.cxx
@@ -44,7 +44,7 @@ sdbcx::ObjectType MacabColumns::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/macab/MacabConnection.cxx b/connectivity/source/drivers/macab/MacabConnection.cxx
index 9e408a9bdae2..894ac7c2a7cb 100644
--- a/connectivity/source/drivers/macab/MacabConnection.cxx
+++ b/connectivity/source/drivers/macab/MacabConnection.cxx
@@ -39,7 +39,7 @@ IMPLEMENT_SERVICE_INFO(MacabConnection, "com.sun.star.sdbc.drivers.MacabConnecti
MacabConnection::MacabConnection(MacabDriver* _pDriver)
: OSubComponent<MacabConnection, MacabConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this),
- m_pAddressBook(NULL),
+ m_pAddressBook(nullptr),
m_pDriver(_pDriver)
{
m_pDriver->acquire();
@@ -51,7 +51,7 @@ MacabConnection::~MacabConnection()
close();
m_pDriver->release();
- m_pDriver = NULL;
+ m_pDriver = nullptr;
}
void SAL_CALL MacabConnection::release() throw()
@@ -100,7 +100,7 @@ Reference< XPreparedStatement > SAL_CALL MacabConnection::prepareCall( const OUS
checkDisposed(MacabConnection_BASE::rBHelper.bDisposed);
// not implemented yet :-) a task to do
- return NULL;
+ return nullptr;
}
OUString SAL_CALL MacabConnection::nativeSQL( const OUString& _sSql ) throw(SQLException, RuntimeException)
@@ -230,7 +230,7 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL MacabConnection::
// if your driver has special database types you can return it here
- return NULL;
+ return nullptr;
}
void SAL_CALL MacabConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& ) throw(SQLException, RuntimeException)
@@ -273,10 +273,10 @@ void MacabConnection::disposing()
}
m_aStatements.clear();
- if (m_pAddressBook != NULL)
+ if (m_pAddressBook != nullptr)
{
delete m_pAddressBook;
- m_pAddressBook = NULL;
+ m_pAddressBook = nullptr;
}
m_xMetaData = ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData>();
diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
index c0798543c0fa..d32f4f9815ce 100644
--- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
@@ -878,7 +878,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns(
aRecords = m_xConnection->getAddressBook()->getMacabRecordsMatch(tableNamePattern);
ODatabaseMetaDataResultSet::ORows aRows;
- if(aRecords != NULL)
+ if(aRecords != nullptr)
{
MacabHeader *aHeader = aRecords->getHeader();
sTableName = aRecords->getName();
@@ -1035,7 +1035,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getVersionColumns(
ODatabaseMetaDataResultSet::ORows aRows;
- if (m_xConnection->getAddressBook()->getMacabRecords(table) != NULL)
+ if (m_xConnection->getAddressBook()->getMacabRecords(table) != nullptr)
{
ODatabaseMetaDataResultSet::ORow aRow( 9 );
diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx
index 3972e5bc289d..69881a4ac1a4 100644
--- a/connectivity/source/drivers/macab/MacabDriver.cxx
+++ b/connectivity/source/drivers/macab/MacabDriver.cxx
@@ -70,8 +70,8 @@ void throwNoMacOSException()
MacabImplModule::MacabImplModule()
:m_bAttemptedLoadModule(false)
- ,m_hConnectorModule(NULL)
- ,m_pConnectionFactoryFunc(NULL)
+ ,m_hConnectorModule(nullptr)
+ ,m_pConnectionFactoryFunc(nullptr)
{
}
@@ -98,7 +98,7 @@ namespace
{ // did not find the symbol
OSL_FAIL( OString( OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + OString( _pAsciiSymbolName ) ).getStr() );
osl_unloadModule( _rModule );
- _rModule = NULL;
+ _rModule = nullptr;
}
}
}
@@ -110,7 +110,7 @@ extern "C" { static void SAL_CALL thisModule() {} }
bool MacabImplModule::impl_loadModule()
{
if ( m_bAttemptedLoadModule )
- return ( m_hConnectorModule != NULL );
+ return ( m_hConnectorModule != nullptr );
m_bAttemptedLoadModule = true;
OSL_ENSURE( !m_hConnectorModule && !m_pConnectionFactoryFunc,
@@ -134,12 +134,12 @@ bool MacabImplModule::impl_loadModule()
void MacabImplModule::impl_unloadModule()
{
- OSL_PRECOND( m_hConnectorModule != NULL, "MacabImplModule::impl_unloadModule: no module!" );
+ OSL_PRECOND( m_hConnectorModule != nullptr, "MacabImplModule::impl_unloadModule: no module!" );
osl_unloadModule( m_hConnectorModule );
- m_hConnectorModule = NULL;
+ m_hConnectorModule = nullptr;
- m_pConnectionFactoryFunc = NULL;
+ m_pConnectionFactoryFunc = nullptr;
m_bAttemptedLoadModule = false;
}
diff --git a/connectivity/source/drivers/macab/MacabGroup.cxx b/connectivity/source/drivers/macab/MacabGroup.cxx
index 715896c469ef..ab25b4789efe 100644
--- a/connectivity/source/drivers/macab/MacabGroup.cxx
+++ b/connectivity/source/drivers/macab/MacabGroup.cxx
@@ -61,16 +61,16 @@ MacabGroup::MacabGroup(const ABAddressBookRef _addressBook, const MacabRecords *
for(i = 0; i < recordsSize; i++)
{
xPerson = static_cast<ABPersonRef>(const_cast<void *>(CFArrayGetValueAtIndex(xGroupMembers,i)));
- if(xPerson != NULL)
+ if(xPerson != nullptr)
{
sGroupMemberUID = static_cast<CFStringRef>(ABRecordCopyValue(xPerson, kABUIDProperty));
- if(sGroupMemberUID != NULL)
+ if(sGroupMemberUID != nullptr)
{
bFound = false;
for(j = 0; j < nAllRecordsSize; j++)
{
xRecordField = _allRecords->getField(j,CFStringToOUString(kABUIDProperty));
- if(xRecordField != NULL && xRecordField->value != NULL)
+ if(xRecordField != nullptr && xRecordField->value != nullptr)
{
if(CFEqual(xRecordField->value, sGroupMemberUID))
{
diff --git a/connectivity/source/drivers/macab/MacabHeader.cxx b/connectivity/source/drivers/macab/MacabHeader.cxx
index a639c4ad5993..62e2875ef77a 100644
--- a/connectivity/source/drivers/macab/MacabHeader.cxx
+++ b/connectivity/source/drivers/macab/MacabHeader.cxx
@@ -39,9 +39,9 @@ MacabHeader::MacabHeader(const sal_Int32 _size, macabfield **_fields)
fields = new macabfield *[size];
for(i = 0; i < size; i++)
{
- if(_fields[i] == NULL)
+ if(_fields[i] == nullptr)
{
- fields[i] = NULL;
+ fields[i] = nullptr;
}
else
{
@@ -62,7 +62,7 @@ MacabHeader::MacabHeader(const sal_Int32 _size, macabfield **_fields)
MacabHeader::MacabHeader()
{
size = 0;
- fields = NULL;
+ fields = nullptr;
}
@@ -146,7 +146,7 @@ OUString MacabHeader::getString(const sal_Int32 i) const
if(i < size)
{
- if(fields[i] == NULL || fields[i]->value == NULL || CFGetTypeID(fields[i]->value) != CFStringGetTypeID())
+ if(fields[i] == nullptr || fields[i]->value == nullptr || CFGetTypeID(fields[i]->value) != CFStringGetTypeID())
return OUString();
try
{
@@ -250,9 +250,9 @@ sal_Int32 MacabHeader::compareFields(const macabfield *_field1, const macabfield
*/
if(_field1 == _field2)
return 0;
- if(_field1 == NULL)
+ if(_field1 == nullptr)
return 1;
- if(_field2 == NULL)
+ if(_field2 == nullptr)
return -1;
CFComparisonResult result = CFStringCompare(
diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx
index 600b3ce96927..d74059fddc87 100644
--- a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx
+++ b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx
@@ -57,7 +57,7 @@ void MacabPreparedStatement::setMacabFields() const throw(SQLException)
const OUString sError( aResources.getResourceString(
STR_INVALID_COLUMN_SELECTION
) );
- ::dbtools::throwGenericSQLException(sError,NULL);
+ ::dbtools::throwGenericSQLException(sError,nullptr);
}
m_xMetaData->setMacabFields(xColumns);
}
@@ -106,7 +106,7 @@ void MacabPreparedStatement::disposing()
if (m_aParameterRow.is())
{
m_aParameterRow->get().clear();
- m_aParameterRow = NULL;
+ m_aParameterRow = nullptr;
}
}
@@ -202,42 +202,42 @@ void SAL_CALL MacabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int3
void SAL_CALL MacabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OUString&) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", nullptr);
}
void SAL_CALL MacabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setBoolean", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setBoolean", nullptr);
}
void SAL_CALL MacabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setByte", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setByte", nullptr);
}
void SAL_CALL MacabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setShort", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setShort", nullptr);
}
void SAL_CALL MacabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setInt", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setInt", nullptr);
}
void SAL_CALL MacabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setLong", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setLong", nullptr);
}
void SAL_CALL MacabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setFloat", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setFloat", nullptr);
}
void SAL_CALL MacabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setDouble", nullptr);
}
void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const OUString &x) throw(SQLException, RuntimeException)
@@ -252,33 +252,33 @@ void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const
void SAL_CALL MacabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setBytes", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setBytes", nullptr);
}
void SAL_CALL MacabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setDate", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setDate", nullptr);
}
void SAL_CALL MacabPreparedStatement::setTime(sal_Int32, const css::util::Time&) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setTime", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setTime", nullptr);
}
void SAL_CALL MacabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setTimestamp", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setTimestamp", nullptr);
}
void SAL_CALL MacabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setBinaryStream", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setBinaryStream", nullptr);
}
void SAL_CALL MacabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", nullptr);
}
void SAL_CALL MacabPreparedStatement::setObject(sal_Int32 parameterIndex, const Any& x) throw(SQLException, RuntimeException)
@@ -295,32 +295,32 @@ void SAL_CALL MacabPreparedStatement::setObject(sal_Int32 parameterIndex, const
void SAL_CALL MacabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", nullptr);
}
void SAL_CALL MacabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setRef", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setRef", nullptr);
}
void SAL_CALL MacabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setBlob", nullptr);
}
void SAL_CALL MacabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setClob", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setClob", nullptr);
}
void SAL_CALL MacabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("setArray", nullptr);
}
void SAL_CALL MacabPreparedStatement::clearParameters() throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedSQLException("clearParameters", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("clearParameters", nullptr);
}
void MacabPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
diff --git a/connectivity/source/drivers/macab/MacabRecord.cxx b/connectivity/source/drivers/macab/MacabRecord.cxx
index 51b150bc5f6e..d2195a823379 100644
--- a/connectivity/source/drivers/macab/MacabRecord.cxx
+++ b/connectivity/source/drivers/macab/MacabRecord.cxx
@@ -36,7 +36,7 @@ using namespace ::dbtools;
MacabRecord::MacabRecord()
{
size = 0;
- fields = NULL;
+ fields = nullptr;
}
@@ -46,7 +46,7 @@ MacabRecord::MacabRecord(const sal_Int32 _size)
fields = new macabfield *[size];
sal_Int32 i;
for(i = 0; i < size; i++)
- fields[i] = NULL;
+ fields[i] = nullptr;
}
@@ -58,11 +58,11 @@ MacabRecord::~MacabRecord()
for(i = 0; i < size; i++)
{
delete fields[i];
- fields[i] = NULL;
+ fields[i] = nullptr;
}
}
delete [] fields;
- fields = NULL;
+ fields = nullptr;
}
@@ -70,7 +70,7 @@ void MacabRecord::insertAtColumn (CFTypeRef _value, ABPropertyType _type, const
{
if(_column < size)
{
- if(fields[_column] == NULL)
+ if(fields[_column] == nullptr)
fields[_column] = new macabfield;
fields[_column]->value = _value;
@@ -83,7 +83,7 @@ void MacabRecord::insertAtColumn (CFTypeRef _value, ABPropertyType _type, const
bool MacabRecord::contains (const macabfield *_field) const
{
- if(_field == NULL)
+ if(_field == nullptr)
return false;
else
return contains(_field->value);
@@ -95,7 +95,7 @@ bool MacabRecord::contains (const CFTypeRef _value) const
sal_Int32 i;
for(i = 0; i < size; i++)
{
- if(fields[i] != NULL)
+ if(fields[i] != nullptr)
{
if(CFEqual(fields[i]->value, _value))
{
@@ -130,7 +130,7 @@ macabfield *MacabRecord::copy(const sal_Int32 i) const
return _copy;
}
- return NULL;
+ return nullptr;
}
@@ -145,7 +145,7 @@ macabfield *MacabRecord::get(const sal_Int32 i) const
return fields[i];
}
- return NULL;
+ return nullptr;
}
@@ -171,9 +171,9 @@ sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield
*/
if(_field1 == _field2)
return 0;
- if(_field1 == NULL)
+ if(_field1 == nullptr)
return 1;
- if(_field2 == NULL)
+ if(_field2 == nullptr)
return -1;
/* If they aren't the same type, for now, return the one with
@@ -199,7 +199,7 @@ sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield
result = CFDateCompare(
static_cast<CFDateRef>(_field1->value),
static_cast<CFDateRef>(_field2->value),
- NULL); // NULL = unused variable
+ nullptr); // NULL = unused variable
break;
case kABIntegerProperty:
@@ -207,7 +207,7 @@ sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield
result = CFNumberCompare(
static_cast<CFNumberRef>(_field1->value),
static_cast<CFNumberRef>(_field2->value),
- NULL); // NULL = unused variable
+ nullptr); // NULL = unused variable
break;
default:
@@ -225,7 +225,7 @@ sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield
*/
macabfield *MacabRecord::createMacabField(const OUString& _newFieldString, const ABPropertyType _abType)
{
- macabfield *newField = NULL;
+ macabfield *newField = nullptr;
switch(_abType)
{
case kABStringProperty:
@@ -246,7 +246,7 @@ macabfield *MacabRecord::createMacabField(const OUString& _newFieldString, const
double nTime = DBTypeConversion::toDouble(aDateTime, DBTypeConversion::getStandardDate());
nTime -= kCFAbsoluteTimeIntervalSince1970;
newField = new macabfield;
- newField->value = CFDateCreate(NULL, (CFAbsoluteTime) nTime);
+ newField->value = CFDateCreate(nullptr, (CFAbsoluteTime) nTime);
newField->type = _abType;
}
}
@@ -257,7 +257,7 @@ macabfield *MacabRecord::createMacabField(const OUString& _newFieldString, const
sal_Int64 nVal = _newFieldString.toInt64();
newField = new macabfield;
- newField->value = CFNumberCreate(NULL,kCFNumberLongType, &nVal);
+ newField->value = CFNumberCreate(nullptr,kCFNumberLongType, &nVal);
newField->type = _abType;
}
// bad format...
@@ -271,7 +271,7 @@ macabfield *MacabRecord::createMacabField(const OUString& _newFieldString, const
double nVal = _newFieldString.toDouble();
newField = new macabfield;
- newField->value = CFNumberCreate(NULL,kCFNumberDoubleType, &nVal);
+ newField->value = CFNumberCreate(nullptr,kCFNumberDoubleType, &nVal);
newField->type = _abType;
}
// bad format...
@@ -293,7 +293,7 @@ macabfield *MacabRecord::createMacabField(const OUString& _newFieldString, const
*/
OUString MacabRecord::fieldToString(const macabfield *_aField)
{
- if(_aField == NULL)
+ if(_aField == nullptr)
return OUString();
OUString fieldString;
diff --git a/connectivity/source/drivers/macab/MacabRecords.cxx b/connectivity/source/drivers/macab/MacabRecords.cxx
index 7923ccb16142..a08759fa9f0d 100644
--- a/connectivity/source/drivers/macab/MacabRecords.cxx
+++ b/connectivity/source/drivers/macab/MacabRecords.cxx
@@ -102,7 +102,7 @@ MacabRecords::MacabRecords(const MacabRecords *_copy)
/* Default variables... */
currentRecord = 0;
- header = NULL;
+ header = nullptr;
records = new MacabRecord *[recordsSize];
recordType = kABPersonRecordType;
@@ -120,8 +120,8 @@ MacabRecords::MacabRecords(const ABAddressBookRef _addressBook)
/* Default variables... */
recordsSize = 0;
currentRecord = 0;
- records = NULL;
- header = NULL;
+ records = nullptr;
+ header = nullptr;
recordType = kABPersonRecordType;
/* Variables constructed... */
@@ -138,7 +138,7 @@ void MacabRecords::initialize()
* MacabAddressBook, so these variables will most likely already be
* NULL.
*/
- if(records != NULL)
+ if(records != nullptr)
{
sal_Int32 i;
@@ -148,7 +148,7 @@ void MacabRecords::initialize()
delete [] records;
}
- if(header != NULL)
+ if(header != nullptr)
delete header;
/* We can handle both default record Address Book record types in
@@ -187,7 +187,7 @@ MacabRecords::~MacabRecords()
void MacabRecords::setHeader(MacabHeader *_header)
{
- if(header != NULL)
+ if(header != nullptr)
delete header;
header = _header;
}
@@ -244,7 +244,7 @@ void MacabRecords::insertRecord(MacabRecord *_newRecord)
MacabRecord *MacabRecords::getRecord(const sal_Int32 _location) const
{
if(_location >= recordsSize)
- return NULL;
+ return nullptr;
return records[_location];
}
@@ -252,12 +252,12 @@ MacabRecord *MacabRecords::getRecord(const sal_Int32 _location) const
macabfield *MacabRecords::getField(const sal_Int32 _recordNumber, const sal_Int32 _columnNumber) const
{
if(_recordNumber >= recordsSize)
- return NULL;
+ return nullptr;
MacabRecord *record = records[_recordNumber];
if(_columnNumber < 0 || _columnNumber >= record->getSize())
- return NULL;
+ return nullptr;
return record->get(_columnNumber);
}
@@ -265,25 +265,25 @@ macabfield *MacabRecords::getField(const sal_Int32 _recordNumber, const sal_Int3
macabfield *MacabRecords::getField(const sal_Int32 _recordNumber, const OUString& _columnName) const
{
- if(header != NULL)
+ if(header != nullptr)
{
sal_Int32 columnNumber = header->getColumnNumber(_columnName);
if(columnNumber == -1)
- return NULL;
+ return nullptr;
return getField(_recordNumber, columnNumber);
}
else
{
// error: shouldn't access field with null header!
- return NULL;
+ return nullptr;
}
}
sal_Int32 MacabRecords::getFieldNumber(const OUString& _columnName) const
{
- if(header != NULL)
+ if(header != nullptr)
return header->getColumnNumber(_columnName);
else
// error: shouldn't access field with null header!
@@ -460,7 +460,7 @@ MacabHeader *MacabRecords::createHeaderForRecordType(const CFArrayRef _records,
{
record = const_cast<ABRecordRef>(CFArrayGetValueAtIndex(_records, j));
headerDataForProperty = createHeaderForProperty(record,requiredProperties[i],_recordType,true);
- if(headerDataForProperty != NULL)
+ if(headerDataForProperty != nullptr)
{
(*lcl_header) += headerDataForProperty;
delete headerDataForProperty;
@@ -484,7 +484,7 @@ MacabHeader *MacabRecords::createHeaderForRecordType(const CFArrayRef _records,
{
property = nonRequiredProperties[j];
headerDataForProperty = createHeaderForProperty(record,property,_recordType,false);
- if(headerDataForProperty != NULL)
+ if(headerDataForProperty != nullptr)
{
(*nonRequiredHeader) += headerDataForProperty;
delete headerDataForProperty;
@@ -518,15 +518,15 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABRecordRef _record, co
/* Get the property's value */
propertyValue = ABRecordCopyValue(_record,_propertyName);
- if(propertyValue == NULL && !_isPropertyRequired)
- return NULL;
+ if(propertyValue == nullptr && !_isPropertyRequired)
+ return nullptr;
propertyType = ABTypeOfProperty(addressBook, _recordType, _propertyName);
localizedPropertyName = ABCopyLocalizedPropertyOrLabel(_propertyName);
result = createHeaderForProperty(propertyType, propertyValue, localizedPropertyName);
- if(propertyValue != NULL)
+ if(propertyValue != nullptr)
CFRelease(propertyValue);
return result;
@@ -539,7 +539,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABRecordRef _record, co
*/
MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propertyType, const CFTypeRef _propertyValue, const CFStringRef _propertyName) const
{
- macabfield **headerNames = NULL;
+ macabfield **headerNames = nullptr;
sal_Int32 length = 0;
switch(_propertyType)
@@ -565,7 +565,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert
/* For non-scalars, we can only get more information if the property
* actually exists.
*/
- if(_propertyValue != NULL)
+ if(_propertyValue != nullptr)
{
sal_Int32 i;
@@ -604,7 +604,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert
/* For non-scalars, we can only get more information if the property
* actually exists.
*/
- if(_propertyValue != NULL)
+ if(_propertyValue != nullptr)
{
sal_Int32 i,j,k;
@@ -688,7 +688,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert
/* For non-scalars, we can only get more information if the property
* actually exists.
*/
- if(_propertyValue != NULL)
+ if(_propertyValue != nullptr)
{
/* Assume all keys are strings */
sal_Int32 numRecords = (sal_Int32) CFDictionaryGetCount(static_cast<CFDictionaryRef>(_propertyValue));
@@ -769,7 +769,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert
/* For non-scalars, we can only get more information if the property
* actually exists.
*/
- if(_propertyValue != NULL)
+ if(_propertyValue != nullptr)
{
sal_Int32 arrLength = (sal_Int32) CFArrayGetCount(static_cast<CFArrayRef>(_propertyValue));
sal_Int32 i,j,k;
@@ -840,7 +840,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert
return headerResult;
}
else
- return NULL;
+ return nullptr;
}
@@ -877,7 +877,7 @@ MacabRecord *MacabRecords::createMacabRecord(const ABRecordRef _abrecord, const
/* Get the property's value */
propertyValue = ABRecordCopyValue(_abrecord,propertyName);
- if(propertyValue != NULL)
+ if(propertyValue != nullptr)
{
propertyType = ABTypeOfProperty(addressBook, _recordType, propertyName);
if(propertyType != kABErrorInProperty)
@@ -912,7 +912,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(MacabRecord *_abrecord, const M
void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyType, MacabRecord *_abrecord, const MacabHeader *_header, const OUString& _propertyName, const CFTypeRef _propertyValue) const
{
/* If there is no value, return */
- if(_propertyValue == NULL)
+ if(_propertyValue == nullptr)
return;
/* The main switch statement */
@@ -954,7 +954,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyT
if(columnNumber != -1)
{
// collision! A property already exists here!
- if(_abrecord->get(columnNumber) != NULL)
+ if(_abrecord->get(columnNumber) != nullptr)
{
bPlaced = false;
i++;
diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx
index c125af2d6afc..dd19ebb549c6 100644
--- a/connectivity/source/drivers/macab/MacabResultSet.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSet.cxx
@@ -49,7 +49,7 @@ MacabResultSet::MacabResultSet(MacabCommonStatement* pStmt)
: MacabResultSet_BASE(m_aMutex),
OPropertySetHelper(MacabResultSet_BASE::rBHelper),
m_xStatement(pStmt),
- m_xMetaData(NULL),
+ m_xMetaData(nullptr),
m_aMacabRecords(),
m_nRowPos(-1),
m_bWasNull(true)
@@ -76,10 +76,10 @@ void MacabResultSet::someMacabRecords(const MacabCondition *pCondition)
allRecords = pConnection->getAddressBook()->getMacabRecords(m_sTableName);
// Bad table!! Throw exception?
- if(allRecords == NULL)
+ if(allRecords == nullptr)
return;
- if(m_aMacabRecords != NULL && m_aMacabRecords != allRecords)
+ if(m_aMacabRecords != nullptr && m_aMacabRecords != allRecords)
delete m_aMacabRecords;
// The copy constructor copies everything but records (including the
@@ -215,7 +215,7 @@ OUString SAL_CALL MacabResultSet::getString(sal_Int32 columnIndex) throw(SQLExce
{
sal_Int32 nFieldNumber = m_xMetaData->fieldAtColumn(columnIndex);
macabfield *aField = m_aMacabRecords->getField(m_nRowPos,nFieldNumber);
- if(aField != NULL)
+ if(aField != nullptr)
{
if(aField->type == kABStringProperty)
{
@@ -234,7 +234,7 @@ sal_Bool SAL_CALL MacabResultSet::getBoolean(sal_Int32) throw(SQLException, Runt
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
-::dbtools::throwFunctionNotSupportedSQLException("getBoolean", NULL);
+::dbtools::throwFunctionNotSupportedSQLException("getBoolean", nullptr);
return sal_False;
}
@@ -244,7 +244,7 @@ sal_Int8 SAL_CALL MacabResultSet::getByte(sal_Int32) throw(SQLException, Runtime
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
-::dbtools::throwFunctionNotSupportedSQLException("getByte", NULL);
+::dbtools::throwFunctionNotSupportedSQLException("getByte", nullptr);
sal_Int8 nRet = 0;
return nRet;
@@ -255,7 +255,7 @@ sal_Int16 SAL_CALL MacabResultSet::getShort(sal_Int32) throw(SQLException, Runti
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
-::dbtools::throwFunctionNotSupportedSQLException("getShort", NULL);
+::dbtools::throwFunctionNotSupportedSQLException("getShort", nullptr);
sal_Int16 nRet = 0;
return nRet;
@@ -274,7 +274,7 @@ sal_Int32 SAL_CALL MacabResultSet::getInt(sal_Int32 columnIndex) throw(SQLExcept
{
sal_Int32 nFieldNumber = m_xMetaData->fieldAtColumn(columnIndex);
macabfield *aField = m_aMacabRecords->getField(m_nRowPos,nFieldNumber);
- if(aField != NULL)
+ if(aField != nullptr)
{
if(aField->type == kABIntegerProperty)
{
@@ -303,7 +303,7 @@ sal_Int64 SAL_CALL MacabResultSet::getLong(sal_Int32 columnIndex) throw(SQLExcep
{
sal_Int32 nFieldNumber = m_xMetaData->fieldAtColumn(columnIndex);
macabfield *aField = m_aMacabRecords->getField(m_nRowPos,nFieldNumber);
- if(aField != NULL)
+ if(aField != nullptr)
{
if(aField->type == kABIntegerProperty)
{
@@ -332,7 +332,7 @@ float SAL_CALL MacabResultSet::getFloat(sal_Int32 columnIndex) throw(SQLExceptio
{
sal_Int32 nFieldNumber = m_xMetaData->fieldAtColumn(columnIndex);
macabfield *aField = m_aMacabRecords->getField(m_nRowPos,nFieldNumber);
- if(aField != NULL)
+ if(aField != nullptr)
{
if(aField->type == kABRealProperty)
{
@@ -361,7 +361,7 @@ double SAL_CALL MacabResultSet::getDouble(sal_Int32 columnIndex) throw(SQLExcept
{
sal_Int32 nFieldNumber = m_xMetaData->fieldAtColumn(columnIndex);
macabfield *aField = m_aMacabRecords->getField(m_nRowPos,nFieldNumber);
- if(aField != NULL)
+ if(aField != nullptr)
{
if(aField->type == kABRealProperty)
{
@@ -382,7 +382,7 @@ Sequence< sal_Int8 > SAL_CALL MacabResultSet::getBytes(sal_Int32) throw(SQLExcep
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
- ::dbtools::throwFunctionNotSupportedSQLException("getBytes", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("getBytes", nullptr);
return Sequence< sal_Int8 >();
}
@@ -392,7 +392,7 @@ Date SAL_CALL MacabResultSet::getDate(sal_Int32) throw(SQLException, RuntimeExce
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
- ::dbtools::throwFunctionNotSupportedSQLException("getDate", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("getDate", nullptr);
Date aRet;
return aRet;
@@ -403,7 +403,7 @@ Time SAL_CALL MacabResultSet::getTime(sal_Int32) throw(SQLException, RuntimeExce
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
- ::dbtools::throwFunctionNotSupportedSQLException("getTime", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("getTime", nullptr);
css::util::Time nRet;
return nRet;
@@ -422,7 +422,7 @@ DateTime SAL_CALL MacabResultSet::getTimestamp(sal_Int32 columnIndex) throw(SQLE
{
sal_Int32 nFieldNumber = m_xMetaData->fieldAtColumn(columnIndex);
macabfield *aField = m_aMacabRecords->getField(m_nRowPos,nFieldNumber);
- if(aField != NULL)
+ if(aField != nullptr)
{
if(aField->type == kABDateProperty)
{
@@ -441,9 +441,9 @@ Reference< XInputStream > SAL_CALL MacabResultSet::getBinaryStream(sal_Int32) th
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
- ::dbtools::throwFunctionNotSupportedSQLException("getBinaryStream", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("getBinaryStream", nullptr);
- return NULL;
+ return nullptr;
}
Reference< XInputStream > SAL_CALL MacabResultSet::getCharacterStream(sal_Int32) throw(SQLException, RuntimeException)
@@ -451,9 +451,9 @@ Reference< XInputStream > SAL_CALL MacabResultSet::getCharacterStream(sal_Int32)
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
- ::dbtools::throwFunctionNotSupportedSQLException("getCharacterStream", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("getCharacterStream", nullptr);
- return NULL;
+ return nullptr;
}
Any SAL_CALL MacabResultSet::getObject(sal_Int32, const Reference< ::com::sun::star::container::XNameAccess >&) throw(SQLException, RuntimeException)
@@ -461,7 +461,7 @@ Any SAL_CALL MacabResultSet::getObject(sal_Int32, const Reference< ::com::sun::s
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
- ::dbtools::throwFunctionNotSupportedSQLException("getObject", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("getObject", nullptr);
return Any();
}
@@ -471,9 +471,9 @@ Reference< XRef > SAL_CALL MacabResultSet::getRef(sal_Int32) throw(SQLException,
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
- ::dbtools::throwFunctionNotSupportedSQLException("getRef", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("getRef", nullptr);
- return NULL;
+ return nullptr;
}
Reference< XBlob > SAL_CALL MacabResultSet::getBlob(sal_Int32) throw(SQLException, RuntimeException)
@@ -481,9 +481,9 @@ Reference< XBlob > SAL_CALL MacabResultSet::getBlob(sal_Int32) throw(SQLExceptio
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
- ::dbtools::throwFunctionNotSupportedSQLException("getBlob", NULL);
+ ::dbtools::throwFunctionNotSupportedSQLException("getBlob", nullptr);
- return NULL;
+ return nullptr;
}
Reference< XClob > SAL_CALL MacabResultSet::getClob(sal_Int32) throw(SQLException, RuntimeException)
@@ -491,9 +491,9 @@ Reference< XClob > SAL_CALL MacabResultSet::getClob(sal_Int32) throw(SQLExceptio
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
-::dbtools::throwFunctionNotSupportedSQLException("getClob", NULL);
+::dbtools::throwFunctionNotSupportedSQLException("getClob", nullptr);
- return NULL;
+ return nullptr;
}
Reference< XArray > SAL_CALL MacabResultSet::getArray(sal_Int32) throw(SQLException, RuntimeException)
@@ -501,9 +501,9 @@ Reference< XArray > SAL_CALL MacabResultSet::getArray(sal_Int32) throw(SQLExcept
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed);
-::dbtools::throwFunctionNotSupportedSQLException("getArray", NULL);
+::dbtools::throwFunctionNotSupportedSQLException("getArray", nullptr);
- return NULL;
+ return nullptr;
}
Reference< XResultSetMetaData > SAL_CALL MacabResultSet::getMetaData() throw(SQLException, RuntimeException)
@@ -881,7 +881,7 @@ Any SAL_CALL MacabResultSet::getBookmark() throw( SQLException, RuntimeExceptio
if (m_nRowPos != -1 && m_nRowPos != nRecords)
{
macabfield *uidField = m_aMacabRecords->getField(m_nRowPos,OUString("UID"));
- if(uidField != NULL)
+ if(uidField != nullptr)
{
if(uidField->type == kABStringProperty)
{
@@ -903,7 +903,7 @@ sal_Bool SAL_CALL MacabResultSet::moveToBookmark(const Any& bookmark) throw( SQ
for (sal_Int32 nRow = 0; nRow < nRecords; nRow++)
{
macabfield *uidField = m_aMacabRecords->getField(m_nRowPos,OUString("UID"));
- if(uidField != NULL)
+ if(uidField != nullptr)
{
if(uidField->type == kABStringProperty)
{
diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
index 6248ade38d6f..af82c345961a 100644
--- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
@@ -51,7 +51,7 @@ void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity:
aRecords = m_pConnection->getAddressBook()->getMacabRecords(m_sTableName);
// In case, somehow, we don't have anything with the name m_sTableName
- if(aRecords == NULL)
+ if(aRecords == nullptr)
{
impl_throwError(STR_NO_TABLE);
}
@@ -85,7 +85,7 @@ sal_Int32 SAL_CALL MacabResultSetMetaData::getColumnType(sal_Int32 column) throw
aRecords = m_pConnection->getAddressBook()->getMacabRecords(m_sTableName);
// In case, somehow, we don't have anything with the name m_sTableName
- if(aRecords == NULL)
+ if(aRecords == nullptr)
{
impl_throwError(STR_NO_TABLE);
}
@@ -93,7 +93,7 @@ sal_Int32 SAL_CALL MacabResultSetMetaData::getColumnType(sal_Int32 column) throw
aHeader = aRecords->getHeader();
aField = aHeader->get(column-1);
- if(aField == NULL)
+ if(aField == nullptr)
{
::dbtools::throwInvalidIndexException(*this,Any());
return -1;
@@ -126,7 +126,7 @@ OUString SAL_CALL MacabResultSetMetaData::getColumnName(sal_Int32 column) throw(
aRecords = m_pConnection->getAddressBook()->getMacabRecords(m_sTableName);
// In case, somehow, we don't have anything with the name m_sTableName
- if(aRecords == NULL)
+ if(aRecords == nullptr)
{
impl_throwError(STR_NO_TABLE);
}
diff --git a/connectivity/source/drivers/macab/MacabServices.cxx b/connectivity/source/drivers/macab/MacabServices.cxx
index 161ffd0d0fbf..54688136fa3a 100644
--- a/connectivity/source/drivers/macab/MacabServices.cxx
+++ b/connectivity/source/drivers/macab/MacabServices.cxx
@@ -63,7 +63,7 @@ struct ProviderRequest
if (!xRet.is() && (Implname == sImplementationName))
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 macab_component_getFactory(
void* pServiceManager,
void*)
{
- void* pRet = 0;
+ void* pRet = nullptr;
if (pServiceManager)
{
ProviderRequest aReq(pServiceManager,pImplementationName);
diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx
index 7756f4fc6f83..1b91c10f3ce8 100644
--- a/connectivity/source/drivers/macab/MacabStatement.cxx
+++ b/connectivity/source/drivers/macab/MacabStatement.cxx
@@ -56,7 +56,7 @@ namespace connectivity
{
::connectivity::SharedResources aResources;
const OUString sError( aResources.getResourceString(_nErrorId) );
- ::dbtools::throwGenericSQLException(sError,NULL);
+ ::dbtools::throwGenericSQLException(sError,nullptr);
}
}
}
@@ -67,8 +67,8 @@ MacabCommonStatement::MacabCommonStatement(MacabConnection* _pConnection )
: MacabCommonStatement_BASE(m_aMutex),
OPropertySetHelper(MacabCommonStatement_BASE::rBHelper),
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_pConnection(_pConnection),
rBHelper(MacabCommonStatement_BASE::rBHelper)
{
@@ -235,7 +235,7 @@ MacabCondition *MacabCommonStatement::analyseWhereClause(const OSQLParseNode *pP
impl_throwError(STR_QUERY_TOO_COMPLEX);
// Unreachable:
OSL_ASSERT(false);
- return 0;
+ return nullptr;
}
MacabOrder *MacabCommonStatement::analyseOrderByClause(const OSQLParseNode *pParseNode) const throw(SQLException)
@@ -281,7 +281,7 @@ MacabOrder *MacabCommonStatement::analyseOrderByClause(const OSQLParseNode *pPar
impl_throwError(STR_QUERY_TOO_COMPLEX);
// Unreachable:
OSL_ASSERT(false);
- return 0;
+ return nullptr;
}
OUString MacabCommonStatement::getTableName() const
@@ -310,7 +310,7 @@ void MacabCommonStatement::setMacabFields(MacabResultSet *pResult) const throw(S
const OUString sError( aResources.getResourceString(
STR_INVALID_COLUMN_SELECTION
) );
- ::dbtools::throwGenericSQLException(sError,NULL);
+ ::dbtools::throwGenericSQLException(sError,nullptr);
}
pMeta = static_cast<MacabResultSetMetaData *>(pResult->getMetaData().get());
pMeta->setMacabFields(xColumns);
@@ -321,7 +321,7 @@ void MacabCommonStatement::selectRecords(MacabResultSet *pResult) const throw(SQ
const OSQLParseNode *pParseNode;
pParseNode = m_aSQLIterator.getWhereTree();
- if (pParseNode != NULL)
+ if (pParseNode != nullptr)
{
if (SQL_ISRULE(pParseNode, where_clause))
{
@@ -346,7 +346,7 @@ void MacabCommonStatement::sortRecords(MacabResultSet *pResult) const throw(SQLE
const OSQLParseNode *pParseNode;
pParseNode = m_aSQLIterator.getOrderTree();
- if (pParseNode != NULL)
+ if (pParseNode != nullptr)
{
if (SQL_ISRULE(pParseNode, opt_order_by_clause))
{
@@ -417,7 +417,7 @@ OSL_TRACE("Mac OS Address book - SQL Request: %s", OUtoCStr(sql));
OUString aErr;
m_pParseTree = m_aParser.parseTree(aErr, sql);
- if (m_pParseTree == NULL)
+ if (m_pParseTree == nullptr)
throw SQLException(aErr, *this, aErr, 0, Any());
m_aSQLIterator.setParseTree(m_pParseTree);
@@ -433,7 +433,7 @@ OSL_TRACE("Mac OS Address book - SQL Request: %s", OUtoCStr(sql));
aRecords = m_pConnection->getAddressBook()->getMacabRecords(sTableName);
// In case, somehow, we don't have anything with the name m_sTableName
- if(aRecords == NULL)
+ if(aRecords == nullptr)
{
impl_throwError(STR_NO_TABLE);
}
diff --git a/connectivity/source/drivers/macab/MacabTables.cxx b/connectivity/source/drivers/macab/MacabTables.cxx
index a33400249cea..ee724de3ec91 100644
--- a/connectivity/source/drivers/macab/MacabTables.cxx
+++ b/connectivity/source/drivers/macab/MacabTables.cxx
@@ -46,7 +46,7 @@ sdbcx::ObjectType MacabTables::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/macab/macabcondition.cxx b/connectivity/source/drivers/macab/macabcondition.cxx
index 81586ddd19ef..c0f10a77b79f 100644
--- a/connectivity/source/drivers/macab/macabcondition.cxx
+++ b/connectivity/source/drivers/macab/macabcondition.cxx
@@ -78,9 +78,9 @@ bool MacabConditionNull::eval(const MacabRecord *aRecord) const
{
macabfield *aValue = aRecord->get(m_nFieldNumber);
- if(aValue == NULL)
+ if(aValue == nullptr)
return true;
- else if(aValue->value == NULL)
+ else if(aValue->value == nullptr)
return true;
else
return false;
@@ -95,9 +95,9 @@ bool MacabConditionNotNull::eval(const MacabRecord *aRecord) const
{
macabfield *aValue = aRecord->get(m_nFieldNumber);
- if(aValue == NULL)
+ if(aValue == nullptr)
return false;
- else if(aValue->value == NULL)
+ else if(aValue->value == nullptr)
return false;
else
return true;
@@ -118,12 +118,12 @@ bool MacabConditionEqual::eval(const MacabRecord *aRecord) const
{
macabfield *aValue = aRecord->get(m_nFieldNumber);
- if(aValue == NULL)
+ if(aValue == nullptr)
return false;
macabfield *aValue2 = MacabRecord::createMacabField(m_sMatchString,aValue->type);
- if(aValue2 == NULL)
+ if(aValue2 == nullptr)
return false;
sal_Int32 nReturn = MacabRecord::compareFields(aValue, aValue2);
@@ -141,12 +141,12 @@ bool MacabConditionDifferent::eval(const MacabRecord *aRecord) const
{
macabfield *aValue = aRecord->get(m_nFieldNumber);
- if(aValue == NULL)
+ if(aValue == nullptr)
return false;
macabfield *aValue2 = MacabRecord::createMacabField(m_sMatchString,aValue->type);
- if(aValue2 == NULL)
+ if(aValue2 == nullptr)
return false;
sal_Int32 nReturn = MacabRecord::compareFields(aValue, aValue2);
@@ -164,7 +164,7 @@ bool MacabConditionSimilar::eval(const MacabRecord *aRecord) const
{
macabfield *aValue = aRecord->get(m_nFieldNumber);
- if(aValue == NULL)
+ if(aValue == nullptr)
return false;
OUString sName = MacabRecord::fieldToString(aValue);
diff --git a/connectivity/source/drivers/macab/macabutilities.hxx b/connectivity/source/drivers/macab/macabutilities.hxx
index 6d6887510d6e..c1b9880aa139 100644
--- a/connectivity/source/drivers/macab/macabutilities.hxx
+++ b/connectivity/source/drivers/macab/macabutilities.hxx
@@ -42,7 +42,7 @@ namespace connectivity
* I only removed commented debugging lines and changed variable
* names.
*/
- if (NULL == sOrig) {
+ if (nullptr == sOrig) {
return OUString();
}
diff --git a/connectivity/source/drivers/mork/MNSFolders.cxx b/connectivity/source/drivers/mork/MNSFolders.cxx
index 1dad6e4c91b5..46da642c288f 100644
--- a/connectivity/source/drivers/mork/MNSFolders.cxx
+++ b/connectivity/source/drivers/mork/MNSFolders.cxx
@@ -74,9 +74,9 @@ namespace
{ "Mozilla/Firefox/", NULL, NULL, NULL },
{ "Thunderbird/", "Mozilla/Thunderbird/", NULL, NULL }
#elif defined(MACOSX)
- { "../Mozilla/SeaMonkey/", NULL, NULL, NULL },
- { "Firefox/", NULL, NULL, NULL },
- { "../Thunderbird/", NULL, NULL, NULL }
+ { "../Mozilla/SeaMonkey/", nullptr, nullptr, nullptr },
+ { "Firefox/", nullptr, nullptr, nullptr },
+ { "../Thunderbird/", nullptr, nullptr, nullptr }
#else
{ ".mozilla/seamonkey/", nullptr, nullptr, nullptr },
{ ".mozilla/firefox/", nullptr, nullptr, nullptr },
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
index 7667447ab064..d97a1bf41e04 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
@@ -72,9 +72,9 @@ namespace
{ "Mozilla/Firefox/", NULL, NULL, NULL },
{ "Thunderbird/", "Mozilla/Thunderbird/", NULL, NULL }
#elif defined(MACOSX)
- { "../Mozilla/SeaMonkey/", NULL, NULL, NULL },
- { "Firefox/", NULL, NULL, NULL },
- { "../Thunderbird/", NULL, NULL, NULL }
+ { "../Mozilla/SeaMonkey/", nullptr, nullptr, nullptr },
+ { "Firefox/", nullptr, nullptr, nullptr },
+ { "../Thunderbird/", nullptr, nullptr, nullptr }
#else
{ ".mozilla/seamonkey/", nullptr, nullptr, nullptr },
{ ".mozilla/firefox/", nullptr, nullptr, nullptr },
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx
index 50d60f8ce299..5d34e21aea1f 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -133,7 +133,7 @@ SQLRETURN OConnection::OpenConnection(const OUString& aConnectStr, sal_Int32 nTi
SQLUSMALLINT nSilent = bSilent ? SQL_DRIVER_NOPROMPT : SQL_DRIVER_COMPLETE;
nSQLRETURN = N3SQLDriverConnect(m_aConnectionHandle,
- NULL,
+ nullptr,
szConnStrIn,
(SQLSMALLINT) ::std::min<sal_Int32>((sal_Int32)2048,aConStr.getLength()),
szConnStrOut,