loplugin:nullptr (automatic rewrite)
Change-Id: I62a63915dfc0bced2cd8ffe3999cbde5c4d97b0b
This commit is contained in:
@@ -156,7 +156,7 @@ namespace cppu_ifcontainer
|
||||
|
||||
pHelper = pContainer->getContainer(pTypes[i]);
|
||||
|
||||
CPPUNIT_ASSERT_MESSAGE("no helper", pHelper != NULL);
|
||||
CPPUNIT_ASSERT_MESSAGE("no helper", pHelper != nullptr);
|
||||
Sequence<Reference< XInterface > > aSeq = pHelper->getElements();
|
||||
CPPUNIT_ASSERT_MESSAGE("wrong num elements", aSeq.getLength() == 2);
|
||||
CPPUNIT_ASSERT_MESSAGE("match", aSeq[0] == xRefs[i*2]);
|
||||
@@ -174,7 +174,7 @@ namespace cppu_ifcontainer
|
||||
|
||||
pHelper = pContainer->getContainer(pTypes[i]);
|
||||
|
||||
CPPUNIT_ASSERT_MESSAGE("no helper", pHelper != NULL);
|
||||
CPPUNIT_ASSERT_MESSAGE("no helper", pHelper != nullptr);
|
||||
Sequence<Reference< XInterface > > aSeq = pHelper->getElements();
|
||||
CPPUNIT_ASSERT_MESSAGE("wrong num elements", aSeq.getLength() == 1);
|
||||
CPPUNIT_ASSERT_MESSAGE("match", aSeq[0] == xRefs[i*2]);
|
||||
@@ -190,7 +190,7 @@ namespace cppu_ifcontainer
|
||||
cppu::OInterfaceContainerHelper *pHelper;
|
||||
|
||||
pHelper = pContainer->getContainer(pTypes[i]);
|
||||
CPPUNIT_ASSERT_MESSAGE("no helper", pHelper != NULL);
|
||||
CPPUNIT_ASSERT_MESSAGE("no helper", pHelper != nullptr);
|
||||
Sequence<Reference< XInterface > > aSeq = pHelper->getElements();
|
||||
CPPUNIT_ASSERT_MESSAGE("wrong num elements", aSeq.getLength() == 0);
|
||||
}
|
||||
|
@@ -103,7 +103,7 @@ void AccessControl::checkRuntimePermission(
|
||||
{
|
||||
__checkPermission(
|
||||
m_xController,
|
||||
cppu::UnoType<security::RuntimePermission>::get(), name.pData, 0 );
|
||||
cppu::UnoType<security::RuntimePermission>::get(), name.pData, nullptr );
|
||||
}
|
||||
|
||||
void AccessControl::checkFilePermission(
|
||||
|
@@ -91,7 +91,7 @@ Reference< XComponentContext > SAL_CALL bootstrap()
|
||||
try
|
||||
{
|
||||
char const * p1 = cppuhelper_detail_findSofficePath();
|
||||
if (p1 == NULL) {
|
||||
if (p1 == nullptr) {
|
||||
throw BootstrapException(
|
||||
"no soffice installation found!");
|
||||
}
|
||||
@@ -136,7 +136,7 @@ Reference< XComponentContext > SAL_CALL bootstrap()
|
||||
|
||||
// create a random pipe name
|
||||
rtlRandomPool hPool = rtl_random_createPool();
|
||||
if ( hPool == 0 )
|
||||
if ( hPool == nullptr )
|
||||
throw BootstrapException( "cannot create random pool!" );
|
||||
sal_uInt8 bytes[ 16 ];
|
||||
if ( rtl_random_getBytes( hPool, bytes, ARLEN( bytes ) )
|
||||
@@ -166,13 +166,13 @@ Reference< XComponentContext > SAL_CALL bootstrap()
|
||||
::osl::Security sec;
|
||||
|
||||
// start office process
|
||||
oslProcess hProcess = 0;
|
||||
oslProcess hProcess = nullptr;
|
||||
oslProcessError rc = osl_executeProcess(
|
||||
OUString(path + "soffice").pData, ar_args, ARLEN( ar_args ),
|
||||
osl_Process_DETACHED,
|
||||
sec.getHandle(),
|
||||
0, // => current working dir
|
||||
0, 0, // => no env vars
|
||||
nullptr, // => current working dir
|
||||
nullptr, 0, // => no env vars
|
||||
&hProcess );
|
||||
switch ( rc )
|
||||
{
|
||||
|
@@ -115,7 +115,7 @@ void OComponentHelper::release() throw()
|
||||
|
||||
Sequence< Type > OComponentHelper::getTypes() throw (RuntimeException, std::exception)
|
||||
{
|
||||
static OTypeCollection * s_pTypes = 0;
|
||||
static OTypeCollection * s_pTypes = nullptr;
|
||||
if (! s_pTypes)
|
||||
{
|
||||
MutexGuard aGuard( Mutex::getGlobalMutex() );
|
||||
|
@@ -877,7 +877,7 @@ Reference< XComponentContext > SAL_CALL createComponentContext(
|
||||
}
|
||||
|
||||
void * mapped_delegate = curr2source.mapInterface(xDelegate.get(), cppu::UnoType<decltype(xDelegate)>::get());
|
||||
XComponentContext * pXComponentContext = NULL;
|
||||
XComponentContext * pXComponentContext = nullptr;
|
||||
source_env.invoke(s_createComponentContext_v, mapped_entries.get(), nEntries, mapped_delegate, &pXComponentContext, &source2curr);
|
||||
mapped_entries.reset();
|
||||
|
||||
|
@@ -49,7 +49,7 @@ css::uno::Reference< css::uno::XComponentContext >
|
||||
cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri)
|
||||
{
|
||||
rtl::Bootstrap bs(iniUri);
|
||||
if (bs.getHandle() == 0) {
|
||||
if (bs.getHandle() == nullptr) {
|
||||
throw css::uno::DeploymentException(
|
||||
"Cannot open uno ini " + iniUri);
|
||||
}
|
||||
|
@@ -89,29 +89,29 @@ static void SAL_CALL ExceptionThrower_dispatch(
|
||||
if (rType_demanded.equals( cppu::UnoType<XInterface>::get() ) ||
|
||||
rType_demanded.equals( ExceptionThrower::getCppuType() ))
|
||||
{
|
||||
typelib_TypeDescription * pTD = 0;
|
||||
typelib_TypeDescription * pTD = nullptr;
|
||||
TYPELIB_DANGER_GET( &pTD, rType_demanded.getTypeLibType() );
|
||||
uno_any_construct(
|
||||
static_cast< uno_Any * >( pReturn ), &pUnoI, pTD, 0 );
|
||||
static_cast< uno_Any * >( pReturn ), &pUnoI, pTD, nullptr );
|
||||
TYPELIB_DANGER_RELEASE( pTD );
|
||||
}
|
||||
else
|
||||
{
|
||||
uno_any_construct(
|
||||
static_cast< uno_Any * >( pReturn ), 0, 0, 0 );
|
||||
static_cast< uno_Any * >( pReturn ), nullptr, nullptr, nullptr );
|
||||
}
|
||||
*ppException = 0;
|
||||
*ppException = nullptr;
|
||||
break;
|
||||
}
|
||||
case 1: // acquire()
|
||||
case 2: // release()
|
||||
*ppException = 0;
|
||||
*ppException = nullptr;
|
||||
break;
|
||||
case 3: // throwException()
|
||||
{
|
||||
uno_Any * pAny = static_cast< uno_Any * >( pArgs[ 0 ] );
|
||||
OSL_ASSERT( pAny->pType->eTypeClass == typelib_TypeClass_EXCEPTION );
|
||||
uno_type_any_construct( *ppException, pAny->pData, pAny->pType, 0 );
|
||||
uno_type_any_construct( *ppException, pAny->pData, pAny->pType, nullptr );
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -119,7 +119,7 @@ static void SAL_CALL ExceptionThrower_dispatch(
|
||||
OSL_ASSERT( false );
|
||||
RuntimeException exc( "not implemented!" );
|
||||
uno_type_any_construct(
|
||||
*ppException, &exc, cppu::UnoType<decltype(exc)>::get().getTypeLibType(), 0 );
|
||||
*ppException, &exc, cppu::UnoType<decltype(exc)>::get().getTypeLibType(), nullptr );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -220,7 +220,7 @@ Any SAL_CALL getCaughtException()
|
||||
"cannot get binary UNO to C++ mapping!" );
|
||||
}
|
||||
|
||||
typelib_TypeDescription * pTD = 0;
|
||||
typelib_TypeDescription * pTD = nullptr;
|
||||
TYPELIB_DANGER_GET(
|
||||
&pTD, ExceptionThrower::getCppuType().getTypeLibType() );
|
||||
|
||||
@@ -230,7 +230,7 @@ Any SAL_CALL getCaughtException()
|
||||
static_cast< XExceptionThrower * >( &theExceptionThrower::get() ), pTD );
|
||||
OSL_ASSERT( unoI.is() );
|
||||
|
||||
typelib_TypeDescription * pMemberTD = 0;
|
||||
typelib_TypeDescription * pMemberTD = nullptr;
|
||||
TYPELIB_DANGER_GET(
|
||||
&pMemberTD,
|
||||
reinterpret_cast< typelib_InterfaceTypeDescription * >( pTD )->
|
||||
@@ -238,12 +238,12 @@ Any SAL_CALL getCaughtException()
|
||||
|
||||
uno_Any exc_mem;
|
||||
uno_Any * exc = &exc_mem;
|
||||
unoI.dispatch( pMemberTD, 0, 0, &exc );
|
||||
unoI.dispatch( pMemberTD, nullptr, nullptr, &exc );
|
||||
|
||||
TYPELIB_DANGER_RELEASE( pMemberTD );
|
||||
TYPELIB_DANGER_RELEASE( pTD );
|
||||
|
||||
if (exc == 0)
|
||||
if (exc == nullptr)
|
||||
{
|
||||
throw RuntimeException( "rethrowing C++ exception failed!" );
|
||||
}
|
||||
@@ -252,7 +252,7 @@ Any SAL_CALL getCaughtException()
|
||||
uno_any_destruct( &ret, reinterpret_cast< uno_ReleaseFunc >(cpp_release) );
|
||||
uno_type_any_constructAndConvert(
|
||||
&ret, exc->pData, exc->pType, uno2cpp.get() );
|
||||
uno_any_destruct( exc, 0 );
|
||||
uno_any_destruct( exc, nullptr );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@@ -477,7 +477,7 @@ public:
|
||||
const Reference<XRegistryKey > & xImplementationKey_,
|
||||
bool bOneInstance_ = false )
|
||||
: OFactoryComponentHelper(
|
||||
rServiceManager, rImplementationName_, 0, 0, 0, bOneInstance_ ),
|
||||
rServiceManager, rImplementationName_, nullptr, nullptr, nullptr, bOneInstance_ ),
|
||||
OPropertySetHelper( OComponentHelper::rBHelper ),
|
||||
xImplementationKey( xImplementationKey_ )
|
||||
{}
|
||||
@@ -598,7 +598,7 @@ ORegistryFactoryHelper::getPropertySetInfo() throw (RuntimeException, std::excep
|
||||
IPropertyArrayHelper & ORegistryFactoryHelper::getInfoHelper()
|
||||
{
|
||||
::osl::MutexGuard guard( aMutex );
|
||||
if (m_property_array_helper.get() == 0)
|
||||
if (m_property_array_helper.get() == nullptr)
|
||||
{
|
||||
beans::Property prop(
|
||||
"ImplementationKey" /* name */,
|
||||
@@ -960,7 +960,7 @@ Reference<XSingleServiceFactory > SAL_CALL createSingleFactory(
|
||||
rtl_ModuleCount * )
|
||||
{
|
||||
return new OFactoryComponentHelper(
|
||||
rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, false );
|
||||
rServiceManager, rImplementationName, pCreateFunction, nullptr, &rServiceNames, false );
|
||||
}
|
||||
|
||||
// global function
|
||||
@@ -980,7 +980,7 @@ Reference<XSingleServiceFactory > SAL_CALL createOneInstanceFactory(
|
||||
rtl_ModuleCount * )
|
||||
{
|
||||
return new OFactoryComponentHelper(
|
||||
rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, true );
|
||||
rServiceManager, rImplementationName, pCreateFunction, nullptr, &rServiceNames, true );
|
||||
}
|
||||
|
||||
// global function
|
||||
@@ -1011,7 +1011,7 @@ Reference< lang::XSingleComponentFactory > SAL_CALL createSingleComponentFactory
|
||||
rtl_ModuleCount *)
|
||||
{
|
||||
return new OFactoryComponentHelper(
|
||||
Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, false );
|
||||
Reference< XMultiServiceFactory >(), rImplementationName, nullptr, fptr, &rServiceNames, false );
|
||||
}
|
||||
|
||||
Reference< lang::XSingleComponentFactory > SAL_CALL createOneInstanceComponentFactory(
|
||||
@@ -1021,7 +1021,7 @@ Reference< lang::XSingleComponentFactory > SAL_CALL createOneInstanceComponentFa
|
||||
rtl_ModuleCount *)
|
||||
{
|
||||
return new OFactoryComponentHelper(
|
||||
Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, true );
|
||||
Reference< XMultiServiceFactory >(), rImplementationName, nullptr, fptr, &rServiceNames, true );
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -95,7 +95,7 @@ static inline type_entry * __getTypeEntries( class_data * cd )
|
||||
for ( sal_Int32 n = cd->m_nTypes; n--; )
|
||||
{
|
||||
type_entry * pEntry = &pEntries[ n ];
|
||||
Type const & rType = (*pEntry->m_type.getCppuType)( 0 );
|
||||
Type const & rType = (*pEntry->m_type.getCppuType)( nullptr );
|
||||
OSL_ENSURE( rType.getTypeClass() == TypeClass_INTERFACE, "### wrong helper init: expected interface!" );
|
||||
OSL_ENSURE( ! isXInterface( rType.getTypeLibType()->pTypeName ), "### want to implement XInterface: template argument is XInterface?!?!?!" );
|
||||
if (rType.getTypeClass() != TypeClass_INTERFACE)
|
||||
@@ -182,7 +182,7 @@ static inline void * __queryDeepNoXInterface(
|
||||
// query deep getting td
|
||||
for ( n = 0; n < nTypes; ++n )
|
||||
{
|
||||
typelib_TypeDescription * pTD = 0;
|
||||
typelib_TypeDescription * pTD = nullptr;
|
||||
TYPELIB_DANGER_GET( &pTD, pEntries[ n ].m_type.typeRef );
|
||||
if (pTD)
|
||||
{
|
||||
@@ -209,7 +209,7 @@ static inline void * __queryDeepNoXInterface(
|
||||
throw RuntimeException( msg );
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// ImplHelper
|
||||
|
@@ -65,7 +65,7 @@ void * component_getFactoryHelper(
|
||||
SAL_UNUSED_PARAMETER void *, ImplementationEntry const * entries)
|
||||
{
|
||||
|
||||
void * pRet = 0;
|
||||
void * pRet = nullptr;
|
||||
Reference< XSingleComponentFactory > xFactory;
|
||||
|
||||
for( sal_Int32 i = 0 ; entries[i].create ; i ++ )
|
||||
|
@@ -127,7 +127,7 @@ XInterface * OInterfaceIteratorHelper::next()
|
||||
return aData.pAsInterface;
|
||||
}
|
||||
// exception
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void OInterfaceIteratorHelper::remove()
|
||||
@@ -285,7 +285,7 @@ sal_Int32 OInterfaceContainerHelper::removeInterface( const Reference<XInterface
|
||||
else if( aData.pAsInterface && Reference<XInterface>( aData.pAsInterface ) == rListener )
|
||||
{
|
||||
aData.pAsInterface->release();
|
||||
aData.pAsInterface = 0;
|
||||
aData.pAsInterface = nullptr;
|
||||
}
|
||||
return aData.pAsInterface ? 1 : 0;
|
||||
}
|
||||
@@ -299,7 +299,7 @@ void OInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt )
|
||||
if( !bIsList && aData.pAsInterface )
|
||||
aData.pAsInterface->release();
|
||||
// set the member to null, use the iterator to delete the values
|
||||
aData.pAsInterface = NULL;
|
||||
aData.pAsInterface = nullptr;
|
||||
bIsList = sal_False;
|
||||
bInUse = sal_False;
|
||||
aGuard.clear();
|
||||
@@ -329,7 +329,7 @@ void OInterfaceContainerHelper::clear()
|
||||
if( !bIsList && aData.pAsInterface )
|
||||
aData.pAsInterface->release();
|
||||
// set the member to null, use the iterator to delete the values
|
||||
aData.pAsInterface = 0;
|
||||
aData.pAsInterface = nullptr;
|
||||
bIsList = sal_False;
|
||||
bInUse = sal_False;
|
||||
// release mutex before aIt destructor call
|
||||
@@ -355,7 +355,7 @@ OMultiTypeInterfaceContainerHelper::~OMultiTypeInterfaceContainerHelper()
|
||||
while( iter != end )
|
||||
{
|
||||
delete static_cast<OInterfaceContainerHelper*>((*iter).second);
|
||||
(*iter).second = 0;
|
||||
(*iter).second = nullptr;
|
||||
++iter;
|
||||
}
|
||||
delete pMap;
|
||||
@@ -416,7 +416,7 @@ OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelper::getContainer( co
|
||||
t_type2ptr::iterator iter = findType( pMap, rKey );
|
||||
if( iter != pMap->end() )
|
||||
return static_cast<OInterfaceContainerHelper*>((*iter).second);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
sal_Int32 OMultiTypeInterfaceContainerHelper::addInterface(
|
||||
@@ -519,7 +519,7 @@ static t_long2ptr::iterator findLong(t_long2ptr *pMap, sal_Int32 nKey )
|
||||
}
|
||||
|
||||
OMultiTypeInterfaceContainerHelperInt32::OMultiTypeInterfaceContainerHelperInt32( Mutex & rMutex_ )
|
||||
: m_pMap( NULL )
|
||||
: m_pMap( nullptr )
|
||||
, rMutex( rMutex_ )
|
||||
{
|
||||
// delay pMap allocation until necessary.
|
||||
@@ -537,7 +537,7 @@ OMultiTypeInterfaceContainerHelperInt32::~OMultiTypeInterfaceContainerHelperInt3
|
||||
while( iter != end )
|
||||
{
|
||||
delete static_cast<OInterfaceContainerHelper*>((*iter).second);
|
||||
(*iter).second = 0;
|
||||
(*iter).second = nullptr;
|
||||
++iter;
|
||||
}
|
||||
delete pMap;
|
||||
@@ -581,12 +581,12 @@ OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelperInt32::getContaine
|
||||
::osl::MutexGuard aGuard( rMutex );
|
||||
|
||||
if (!m_pMap)
|
||||
return 0;
|
||||
return nullptr;
|
||||
t_long2ptr * pMap = static_cast<t_long2ptr *>(m_pMap);
|
||||
t_long2ptr::iterator iter = findLong( pMap, rKey );
|
||||
if( iter != pMap->end() )
|
||||
return static_cast<OInterfaceContainerHelper*>((*iter).second);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
sal_Int32 OMultiTypeInterfaceContainerHelperInt32::addInterface(
|
||||
|
@@ -51,7 +51,7 @@ namespace cppu
|
||||
|
||||
Bootstrap const & get_unorc()
|
||||
{
|
||||
static rtlBootstrapHandle s_bstrap = 0;
|
||||
static rtlBootstrapHandle s_bstrap = nullptr;
|
||||
if (! s_bstrap)
|
||||
{
|
||||
OUString iniName(getUnoIniUri());
|
||||
|
@@ -89,7 +89,7 @@ rtl::OUString cppu::getUnoIniUri() {
|
||||
}
|
||||
|
||||
bool cppu::nextDirectoryItem(osl::Directory & directory, rtl::OUString * url) {
|
||||
assert(url != 0);
|
||||
assert(url != nullptr);
|
||||
for (;;) {
|
||||
osl::DirectoryItem i;
|
||||
switch (directory.getNextItem(i, SAL_MAX_UINT32)) {
|
||||
@@ -121,7 +121,7 @@ bool cppu::nextDirectoryItem(osl::Directory & directory, rtl::OUString * url) {
|
||||
|
||||
void cppu::decodeRdbUri(rtl::OUString * uri, bool * optional, bool * directory)
|
||||
{
|
||||
assert(uri != 0 && optional != 0 && directory != 0);
|
||||
assert(uri != nullptr && optional != nullptr && directory != nullptr);
|
||||
if(!(uri->isEmpty()))
|
||||
{
|
||||
*optional = (*uri)[0] == '?';
|
||||
|
@@ -700,7 +700,7 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty(
|
||||
"unexpected type of attribute " + name, object);
|
||||
}
|
||||
}
|
||||
if (state != 0) {
|
||||
if (state != nullptr) {
|
||||
//XXX If isAmbiguous && isDefaulted, arbitrarily choose AMBIGUOUS_VALUE
|
||||
// over DEFAULT_VALUE:
|
||||
*state = isAmbiguous
|
||||
@@ -878,7 +878,7 @@ void PropertySetMixinImpl::prepareSet(
|
||||
& css::beans::PropertyAttribute::BOUND)
|
||||
!= 0)
|
||||
{
|
||||
assert(boundListeners != 0);
|
||||
assert(boundListeners != nullptr);
|
||||
Impl::BoundListenerMap::const_iterator i(
|
||||
m_impl->boundListeners.find(propertyName));
|
||||
if (i != m_impl->boundListeners.end()) {
|
||||
@@ -915,7 +915,7 @@ void PropertySetMixinImpl::prepareSet(
|
||||
if ((it->second.property.Attributes & css::beans::PropertyAttribute::BOUND)
|
||||
!= 0)
|
||||
{
|
||||
assert(boundListeners != 0);
|
||||
assert(boundListeners != nullptr);
|
||||
boundListeners->m_impl->event = css::beans::PropertyChangeEvent(
|
||||
static_cast< css::beans::XPropertySet * >(this), propertyName,
|
||||
false, it->second.property.Handle, oldValue, newValue);
|
||||
@@ -1005,7 +1005,7 @@ css::uno::Any PropertySetMixinImpl::getPropertyValue(
|
||||
css::uno::RuntimeException, std::exception)
|
||||
{
|
||||
return m_impl->getProperty(
|
||||
static_cast< css::beans::XPropertySet * >(this), propertyName, 0);
|
||||
static_cast< css::beans::XPropertySet * >(this), propertyName, nullptr);
|
||||
}
|
||||
|
||||
void PropertySetMixinImpl::addPropertyChangeListener(
|
||||
@@ -1120,7 +1120,7 @@ css::uno::Any PropertySetMixinImpl::getFastPropertyValue(sal_Int32 handle)
|
||||
static_cast< css::beans::XPropertySet * >(this),
|
||||
m_impl->translateHandle(
|
||||
static_cast< css::beans::XPropertySet * >(this), handle),
|
||||
0);
|
||||
nullptr);
|
||||
}
|
||||
|
||||
css::uno::Sequence< css::beans::PropertyValue >
|
||||
|
@@ -127,7 +127,7 @@ sal_Bool OPropertySetHelperInfo_Impl::hasPropertyByName( const OUString & Proper
|
||||
pR = static_cast<Property *>(bsearch( &PropertyName, aInfos.getConstArray(), aInfos.getLength(),
|
||||
sizeof( Property ),
|
||||
compare_OUString_Property_Impl ));
|
||||
return pR != NULL;
|
||||
return pR != nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ OPropertySetHelper::OPropertySetHelper(
|
||||
: rBHelper( rBHelper_ ),
|
||||
aBoundLC( rBHelper_.rMutex ),
|
||||
aVetoableLC( rBHelper_.rMutex ),
|
||||
m_pReserved( new Impl(false, 0) )
|
||||
m_pReserved( new Impl(false, nullptr) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ OPropertySetHelper::OPropertySetHelper(
|
||||
: rBHelper( rBHelper_ ),
|
||||
aBoundLC( rBHelper_.rMutex ),
|
||||
aVetoableLC( rBHelper_.rMutex ),
|
||||
m_pReserved( new Impl( bIgnoreRuntimeExceptionsWhileFiring, 0 ) )
|
||||
m_pReserved( new Impl( bIgnoreRuntimeExceptionsWhileFiring, nullptr ) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ void OPropertySetHelper::addPropertyChangeListener(
|
||||
}
|
||||
|
||||
sal_Int16 nAttributes;
|
||||
rPH.fillPropertyMembersByHandle( NULL, &nAttributes, nHandle );
|
||||
rPH.fillPropertyMembersByHandle( nullptr, &nAttributes, nHandle );
|
||||
if( !(nAttributes & css::beans::PropertyAttribute::BOUND) )
|
||||
{
|
||||
OSL_FAIL( "add listener to an unbound property" );
|
||||
@@ -394,7 +394,7 @@ void OPropertySetHelper::addVetoableChangeListener(
|
||||
}
|
||||
|
||||
sal_Int16 nAttributes;
|
||||
rPH.fillPropertyMembersByHandle( NULL, &nAttributes, nHandle );
|
||||
rPH.fillPropertyMembersByHandle( nullptr, &nAttributes, nHandle );
|
||||
if( !(nAttributes & PropertyAttribute::CONSTRAINED) )
|
||||
{
|
||||
OSL_FAIL( "addVetoableChangeListener, and property is not constrained" );
|
||||
@@ -455,7 +455,7 @@ void OPropertySetHelper::setDependentFastPropertyValue( sal_Int32 i_handle, cons
|
||||
|
||||
sal_Int16 nAttributes(0);
|
||||
IPropertyArrayHelper& rInfo = getInfoHelper();
|
||||
if ( !rInfo.fillPropertyMembersByHandle( NULL, &nAttributes, i_handle ) )
|
||||
if ( !rInfo.fillPropertyMembersByHandle( nullptr, &nAttributes, i_handle ) )
|
||||
// unknown property
|
||||
throw UnknownPropertyException();
|
||||
|
||||
@@ -512,7 +512,7 @@ void OPropertySetHelper::setFastPropertyValue( sal_Int32 nHandle, const Any& rVa
|
||||
|
||||
IPropertyArrayHelper & rInfo = getInfoHelper();
|
||||
sal_Int16 nAttributes;
|
||||
if( !rInfo.fillPropertyMembersByHandle( NULL, &nAttributes, nHandle ) ) {
|
||||
if( !rInfo.fillPropertyMembersByHandle( nullptr, &nAttributes, nHandle ) ) {
|
||||
// unknown property
|
||||
throw UnknownPropertyException();
|
||||
}
|
||||
@@ -577,7 +577,7 @@ Any OPropertySetHelper::getFastPropertyValue( sal_Int32 nHandle )
|
||||
|
||||
{
|
||||
IPropertyArrayHelper & rInfo = getInfoHelper();
|
||||
if( !rInfo.fillPropertyMembersByHandle( NULL, NULL, nHandle ) )
|
||||
if( !rInfo.fillPropertyMembersByHandle( nullptr, nullptr, nHandle ) )
|
||||
// unknown property
|
||||
throw UnknownPropertyException();
|
||||
|
||||
@@ -786,7 +786,7 @@ void OPropertySetHelper::fire
|
||||
|
||||
if( !bVetoable )
|
||||
{
|
||||
OInterfaceContainerHelper * pCont = 0;
|
||||
OInterfaceContainerHelper * pCont = nullptr;
|
||||
pCont = rBHelper.aLC.getContainer(
|
||||
getPropertiesTypeIdentifier( )
|
||||
);
|
||||
@@ -854,7 +854,7 @@ void OPropertySetHelper::setFastPropertyValues(
|
||||
if( pHandles[i] != -1 )
|
||||
{
|
||||
sal_Int16 nAttributes;
|
||||
rPH.fillPropertyMembersByHandle( NULL, &nAttributes, pHandles[i] );
|
||||
rPH.fillPropertyMembersByHandle( nullptr, &nAttributes, pHandles[i] );
|
||||
if( nAttributes & PropertyAttribute::READONLY ) {
|
||||
throw PropertyVetoException();
|
||||
}
|
||||
@@ -1042,7 +1042,7 @@ OPropertyArrayHelper::OPropertyArrayHelper(
|
||||
Property * pProps,
|
||||
sal_Int32 nEle,
|
||||
sal_Bool bSorted )
|
||||
: m_pReserved(NULL)
|
||||
: m_pReserved(nullptr)
|
||||
, aInfos(pProps, nEle)
|
||||
, bRightOrdered( sal_False )
|
||||
{
|
||||
@@ -1052,7 +1052,7 @@ OPropertyArrayHelper::OPropertyArrayHelper(
|
||||
OPropertyArrayHelper::OPropertyArrayHelper(
|
||||
const Sequence< Property > & aProps,
|
||||
sal_Bool bSorted )
|
||||
: m_pReserved(NULL)
|
||||
: m_pReserved(nullptr)
|
||||
, aInfos(aProps)
|
||||
, bRightOrdered( sal_False )
|
||||
{
|
||||
@@ -1131,7 +1131,7 @@ sal_Bool OPropertyArrayHelper::hasPropertyByName(const OUString& aPropertyName)
|
||||
pR = static_cast<Property *>(bsearch( &aPropertyName, aInfos.getConstArray(), aInfos.getLength(),
|
||||
sizeof( Property ),
|
||||
compare_OUString_Property_Impl ));
|
||||
return pR != NULL;
|
||||
return pR != nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -59,7 +59,7 @@ void insertImplementationMap(
|
||||
cppuhelper::ServiceManager::Data::ImplementationMap * destination,
|
||||
cppuhelper::ServiceManager::Data::ImplementationMap const & source)
|
||||
{
|
||||
assert(destination != 0);
|
||||
assert(destination != nullptr);
|
||||
for (cppuhelper::ServiceManager::Data::ImplementationMap::const_iterator i(
|
||||
source.begin());
|
||||
i != source.end(); ++i)
|
||||
@@ -80,7 +80,7 @@ void removeFromImplementationMap(
|
||||
{
|
||||
// The underlying data structures make this function somewhat inefficient,
|
||||
// but the assumption is that it is rarely called:
|
||||
assert(map != 0);
|
||||
assert(map != nullptr);
|
||||
for (std::vector< rtl::OUString >::const_iterator i(elements.begin());
|
||||
i != elements.end(); ++i)
|
||||
{
|
||||
@@ -137,7 +137,7 @@ Parser::Parser(
|
||||
cppuhelper::ServiceManager::Data * data):
|
||||
reader_(uri), alienContext_(alienContext), data_(data)
|
||||
{
|
||||
assert(data != 0);
|
||||
assert(data != nullptr);
|
||||
int ucNsId = reader_.registerNamespaceIri(
|
||||
xmlreader::Span(
|
||||
RTL_CONSTASCII_STRINGPARAM(
|
||||
@@ -497,7 +497,7 @@ public:
|
||||
cppuhelper::ServiceManager::Data::Implementation > const &
|
||||
implementation):
|
||||
manager_(manager), implementation_(implementation)
|
||||
{ assert(manager.is()); assert(implementation.get() != 0); }
|
||||
{ assert(manager.is()); assert(implementation.get() != nullptr); }
|
||||
|
||||
private:
|
||||
virtual ~SingletonFactory() {}
|
||||
@@ -551,7 +551,7 @@ public:
|
||||
cppuhelper::ServiceManager::Data::Implementation > const &
|
||||
implementation):
|
||||
manager_(manager), implementation_(implementation)
|
||||
{ assert(manager.is()); assert(implementation.get() != 0); }
|
||||
{ assert(manager.is()); assert(implementation.get() != nullptr); }
|
||||
|
||||
private:
|
||||
virtual ~ImplementationWrapper() {}
|
||||
@@ -677,7 +677,7 @@ cppuhelper::ServiceManager::Data::Implementation::createInstance(
|
||||
bool singletonRequest)
|
||||
{
|
||||
css::uno::Reference<css::uno::XInterface> inst;
|
||||
if (constructor != 0) {
|
||||
if (constructor != nullptr) {
|
||||
inst.set(
|
||||
(*constructor)(context.get(), css::uno::Sequence<css::uno::Any>()),
|
||||
SAL_NO_ACQUIRE);
|
||||
@@ -697,7 +697,7 @@ cppuhelper::ServiceManager::Data::Implementation::createInstanceWithArguments(
|
||||
bool singletonRequest, css::uno::Sequence<css::uno::Any> const & arguments)
|
||||
{
|
||||
css::uno::Reference<css::uno::XInterface> inst;
|
||||
if (constructor != 0) {
|
||||
if (constructor != nullptr) {
|
||||
inst.set((*constructor)(context.get(), arguments), SAL_NO_ACQUIRE);
|
||||
//HACK: The constructor will either observe arguments and return inst
|
||||
// that does not implement XInitialization (or null), or ignore
|
||||
@@ -749,12 +749,12 @@ void cppuhelper::ServiceManager::Data::Implementation::updateDisposeSingleton(
|
||||
void cppuhelper::ServiceManager::addSingletonContextEntries(
|
||||
std::vector< cppu::ContextEntry_Init > * entries)
|
||||
{
|
||||
assert(entries != 0);
|
||||
assert(entries != nullptr);
|
||||
for (Data::ImplementationMap::const_iterator i(data_.singletons.begin());
|
||||
i != data_.singletons.end(); ++i)
|
||||
{
|
||||
assert(!i->second.empty());
|
||||
assert(i->second[0].get() != 0);
|
||||
assert(i->second[0].get() != nullptr);
|
||||
SAL_INFO_IF(
|
||||
i->second.size() > 1, "cppuhelper",
|
||||
"Arbitrarily chosing " << i->second[0]->info->name
|
||||
@@ -773,7 +773,7 @@ void cppuhelper::ServiceManager::loadImplementation(
|
||||
css::uno::Reference< css::uno::XComponentContext > const & context,
|
||||
std::shared_ptr< Data::Implementation > & implementation)
|
||||
{
|
||||
assert(implementation.get() != 0);
|
||||
assert(implementation.get() != nullptr);
|
||||
{
|
||||
osl::MutexGuard g(rBHelper.rMutex);
|
||||
if (implementation->status == Data::Implementation::STATUS_LOADED) {
|
||||
@@ -788,7 +788,7 @@ void cppuhelper::ServiceManager::loadImplementation(
|
||||
"Cannot expand URI" + implementation->info->uri + ": " + e.Message,
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
cppuhelper::ImplementationConstructorFn * ctor = 0;
|
||||
cppuhelper::ImplementationConstructorFn * ctor = nullptr;
|
||||
css::uno::Reference< css::uno::XInterface > f0;
|
||||
// Special handling of SharedLibrary loader, with support for environment,
|
||||
// constructor, and prefix arguments:
|
||||
@@ -799,7 +799,7 @@ void cppuhelper::ServiceManager::loadImplementation(
|
||||
uri, implementation->info->environment,
|
||||
implementation->info->prefix, implementation->info->name,
|
||||
implementation->info->constructor, this, &ctor, &f0);
|
||||
if (ctor != 0) {
|
||||
if (ctor != nullptr) {
|
||||
assert(!implementation->info->environment.isEmpty());
|
||||
css::uno::Environment curEnv(css::uno::Environment::getCurrent());
|
||||
css::uno::Environment env(
|
||||
@@ -849,7 +849,7 @@ void cppuhelper::ServiceManager::loadImplementation(
|
||||
}
|
||||
css::uno::Reference<css::lang::XSingleComponentFactory> f1;
|
||||
css::uno::Reference<css::lang::XSingleServiceFactory> f2;
|
||||
if (ctor == 0) {
|
||||
if (ctor == nullptr) {
|
||||
f1.set(f0, css::uno::UNO_QUERY);
|
||||
if (!f1.is()) {
|
||||
f2.set(f0, css::uno::UNO_QUERY);
|
||||
@@ -885,7 +885,7 @@ void cppuhelper::ServiceManager::disposing() {
|
||||
data_.namedImplementations.begin());
|
||||
i != data_.namedImplementations.end(); ++i)
|
||||
{
|
||||
assert(i->second.get() != 0);
|
||||
assert(i->second.get() != nullptr);
|
||||
if (!i->second->info->singletons.empty()) {
|
||||
osl::MutexGuard g2(i->second->mutex);
|
||||
if (i->second->disposeSingleton.is()) {
|
||||
@@ -897,7 +897,7 @@ void cppuhelper::ServiceManager::disposing() {
|
||||
data_.dynamicImplementations.begin());
|
||||
i != data_.dynamicImplementations.end(); ++i)
|
||||
{
|
||||
assert(i->second.get() != 0);
|
||||
assert(i->second.get() != nullptr);
|
||||
if (!i->second->info->singletons.empty()) {
|
||||
osl::MutexGuard g2(i->second->mutex);
|
||||
if (i->second->disposeSingleton.is()) {
|
||||
@@ -1013,7 +1013,7 @@ cppuhelper::ServiceManager::createInstanceWithContext(
|
||||
{
|
||||
std::shared_ptr< Data::Implementation > impl(
|
||||
findServiceImplementation(Context, aServiceSpecifier));
|
||||
return impl.get() == 0
|
||||
return impl.get() == nullptr
|
||||
? css::uno::Reference< css::uno::XInterface >()
|
||||
: impl->createInstance(Context, false);
|
||||
}
|
||||
@@ -1027,7 +1027,7 @@ cppuhelper::ServiceManager::createInstanceWithArgumentsAndContext(
|
||||
{
|
||||
std::shared_ptr< Data::Implementation > impl(
|
||||
findServiceImplementation(Context, ServiceSpecifier));
|
||||
return impl.get() == 0
|
||||
return impl.get() == nullptr
|
||||
? css::uno::Reference< css::uno::XInterface >()
|
||||
: impl->createInstanceWithArguments(Context, false, Arguments);
|
||||
}
|
||||
@@ -1196,7 +1196,7 @@ cppuhelper::ServiceManager::createContentEnumeration(
|
||||
i != impls.end(); ++i)
|
||||
{
|
||||
Data::Implementation * impl = i->get();
|
||||
assert(impl != 0);
|
||||
assert(impl != nullptr);
|
||||
{
|
||||
osl::MutexGuard g(rBHelper.rMutex);
|
||||
if (isDisposed()) {
|
||||
@@ -1562,7 +1562,7 @@ void cppuhelper::ServiceManager::readLegacyRdbStrings(
|
||||
rtl::OUString const & uri, RegistryKey & key, rtl::OUString const & path,
|
||||
std::vector< rtl::OUString > * strings)
|
||||
{
|
||||
assert(strings != 0);
|
||||
assert(strings != nullptr);
|
||||
RegistryKey subkey;
|
||||
switch (key.openKey(path, subkey)) {
|
||||
case RegError::NO_ERROR:
|
||||
@@ -1705,7 +1705,7 @@ bool cppuhelper::ServiceManager::insertExtraData(Data const & extra) {
|
||||
cont->removeByName(name + "/arguments");
|
||||
} catch (const css::container::NoSuchElementException &) {}
|
||||
assert(!i->second.empty());
|
||||
assert(i->second[0].get() != 0);
|
||||
assert(i->second[0].get() != nullptr);
|
||||
SAL_INFO_IF(
|
||||
i->second.size() > 1, "cppuhelper",
|
||||
"Arbitrarily chosing " << i->second[0]->info->name
|
||||
@@ -1745,7 +1745,7 @@ void cppuhelper::ServiceManager::removeRdbFiles(
|
||||
data_.namedImplementations.begin());
|
||||
j != data_.namedImplementations.end();)
|
||||
{
|
||||
assert(j->second.get() != 0);
|
||||
assert(j->second.get() != nullptr);
|
||||
if (j->second->info->rdbFile == *i) {
|
||||
clear.push_back(j->second);
|
||||
//TODO: The below leaves data_ in an inconsistent state upon
|
||||
@@ -1779,7 +1779,7 @@ bool cppuhelper::ServiceManager::removeLegacyFactory(
|
||||
if (i == data_.dynamicImplementations.end()) {
|
||||
return isDisposed();
|
||||
}
|
||||
assert(i->second.get() != 0);
|
||||
assert(i->second.get() != nullptr);
|
||||
clear = i->second;
|
||||
if (removeListener) {
|
||||
comp = i->second->component;
|
||||
@@ -1816,7 +1816,7 @@ void cppuhelper::ServiceManager::removeImplementation(const rtl::OUString & name
|
||||
"Remove non-inserted implementation " + name,
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
assert(i->second.get() != 0);
|
||||
assert(i->second.get() != nullptr);
|
||||
clear = i->second;
|
||||
//TODO: The below leaves data_ in an inconsistent state upon exceptions:
|
||||
removeFromImplementationMap(
|
||||
@@ -1863,7 +1863,7 @@ cppuhelper::ServiceManager::findServiceImplementation(
|
||||
<< " among multiple implementations for " << i->first);
|
||||
impl = i->second[0];
|
||||
}
|
||||
assert(impl.get() != 0);
|
||||
assert(impl.get() != nullptr);
|
||||
loaded = impl->status == Data::Implementation::STATUS_LOADED;
|
||||
}
|
||||
if (!loaded) {
|
||||
|
@@ -108,7 +108,7 @@ public:
|
||||
new ImplementationInfo(
|
||||
name, loader, uri, environment, constructorName, prefix,
|
||||
alienContext, rdbFile)),
|
||||
constructor(0), status(STATUS_NEW), dispose(true)
|
||||
constructor(nullptr), status(STATUS_NEW), dispose(true)
|
||||
{}
|
||||
|
||||
Implementation(
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
theFactory2,
|
||||
css::uno::Reference< css::lang::XComponent > const &
|
||||
theComponent):
|
||||
info(new ImplementationInfo(name)), constructor(0),
|
||||
info(new ImplementationInfo(name)), constructor(nullptr),
|
||||
factory1(theFactory1), factory2(theFactory2),
|
||||
component(theComponent), status(STATUS_LOADED), dispose(true)
|
||||
{ assert(theFactory1.is() || theFactory2.is()); }
|
||||
|
@@ -43,7 +43,7 @@ css::uno::Environment cppuhelper::detail::getEnvironment(
|
||||
assert(!implementation.isEmpty());
|
||||
rtl::OUString n(name);
|
||||
static char const * log = std::getenv("UNO_ENV_LOG");
|
||||
if (log != 0 && *log != 0) {
|
||||
if (log != nullptr && *log != 0) {
|
||||
rtl::OString imps(log);
|
||||
for (sal_Int32 i = 0; i != -1;) {
|
||||
rtl::OString imp(imps.getToken(0, ';', i));
|
||||
@@ -65,7 +65,7 @@ css::uno::Environment getEnvironmentFromModule(
|
||||
osl::Module const & module, css::uno::Environment const & target,
|
||||
rtl::OUString const & implementation, rtl::OUString const & prefix)
|
||||
{
|
||||
char const * name = 0;
|
||||
char const * name = nullptr;
|
||||
css::uno::Environment env;
|
||||
rtl::OUString fullPrefix(prefix);
|
||||
if (!fullPrefix.isEmpty()) {
|
||||
@@ -74,7 +74,7 @@ css::uno::Environment getEnvironmentFromModule(
|
||||
component_getImplementationEnvironmentExtFunc fp1
|
||||
= reinterpret_cast<component_getImplementationEnvironmentExtFunc>(
|
||||
module.getFunctionSymbol(fullPrefix + COMPONENT_GETENVEXT));
|
||||
if (fp1 != 0) {
|
||||
if (fp1 != nullptr) {
|
||||
(*fp1)(
|
||||
&name, reinterpret_cast<uno_Environment **>(&env),
|
||||
(rtl::OUStringToOString(implementation, RTL_TEXTENCODING_ASCII_US)
|
||||
@@ -84,13 +84,13 @@ css::uno::Environment getEnvironmentFromModule(
|
||||
component_getImplementationEnvironmentFunc fp2
|
||||
= reinterpret_cast<component_getImplementationEnvironmentFunc>(
|
||||
module.getFunctionSymbol(fullPrefix + COMPONENT_GETENV));
|
||||
if (fp2 != 0) {
|
||||
if (fp2 != nullptr) {
|
||||
(*fp2)(&name, reinterpret_cast<uno_Environment **>(&env));
|
||||
} else {
|
||||
name = CPPU_CURRENT_LANGUAGE_BINDING_NAME; //TODO: fail
|
||||
}
|
||||
}
|
||||
if (!env.is() && name != 0) {
|
||||
if (!env.is() && name != nullptr) {
|
||||
env = cppuhelper::detail::getEnvironment(
|
||||
rtl::OUString::createFromAscii(name), implementation);
|
||||
}
|
||||
@@ -124,7 +124,7 @@ css::uno::Reference<css::uno::XInterface> invokeComponentFactory(
|
||||
if (source.get() == target.get()) {
|
||||
return css::uno::Reference<css::uno::XInterface>(
|
||||
static_cast<css::uno::XInterface *>(
|
||||
(*function)(impl.getStr(), serviceManager.get(), 0)),
|
||||
(*function)(impl.getStr(), serviceManager.get(), nullptr)),
|
||||
SAL_NO_ACQUIRE);
|
||||
} else {
|
||||
css::uno::Mapping mapTo(source, target);
|
||||
@@ -137,13 +137,13 @@ css::uno::Reference<css::uno::XInterface> invokeComponentFactory(
|
||||
void * smgr = mapTo.mapInterface(
|
||||
serviceManager.get(),
|
||||
cppu::UnoType<css::lang::XMultiServiceFactory>::get());
|
||||
void * factory = 0;
|
||||
void * factory = nullptr;
|
||||
target.invoke(getFactory, function, &impl, smgr, 0, &factory);
|
||||
if (smgr != 0) {
|
||||
if (smgr != nullptr) {
|
||||
(*target.get()->pExtEnv->releaseInterface)(
|
||||
target.get()->pExtEnv, smgr);
|
||||
}
|
||||
if (factory == 0) {
|
||||
if (factory == nullptr) {
|
||||
throw css::loader::CannotActivateFactoryException(
|
||||
("calling factory function for \"" + implementation + "\" in <"
|
||||
+ uri + "> returned null"),
|
||||
@@ -171,9 +171,9 @@ void cppuhelper::detail::loadSharedLibComponentFactory(
|
||||
{
|
||||
assert(constructor.isEmpty() || !environment.isEmpty());
|
||||
assert(
|
||||
(constructorFunction == 0 && constructor.isEmpty())
|
||||
|| *constructorFunction == 0);
|
||||
assert(factory != 0 && !factory->is());
|
||||
(constructorFunction == nullptr && constructor.isEmpty())
|
||||
|| *constructorFunction == nullptr);
|
||||
assert(factory != nullptr && !factory->is());
|
||||
#if defined DISABLE_DYNLOADING
|
||||
assert(!environment.isEmpty());
|
||||
if (constructor.isEmpty()) {
|
||||
@@ -249,7 +249,7 @@ void cppuhelper::detail::loadSharedLibComponentFactory(
|
||||
sym = COMPONENT_GETFACTORY;
|
||||
}
|
||||
oslGenericFunction fp = mod.getFunctionSymbol(sym);
|
||||
if (fp == 0) {
|
||||
if (fp == nullptr) {
|
||||
throw css::loader::CannotActivateFactoryException(
|
||||
("no factory symbol \"" + sym + "\" in component library <"
|
||||
+ uri + ">"),
|
||||
@@ -266,7 +266,7 @@ void cppuhelper::detail::loadSharedLibComponentFactory(
|
||||
} else {
|
||||
SAL_INFO("cppuhelper.shlib", "constructor=" << constructor);
|
||||
oslGenericFunction fp = mod.getFunctionSymbol(constructor);
|
||||
if (fp == 0) {
|
||||
if (fp == nullptr) {
|
||||
throw css::loader::CannotActivateFactoryException(
|
||||
("no constructor symbol \"" + constructor
|
||||
+ "\" in component library <" + uri + ">"),
|
||||
@@ -289,7 +289,7 @@ css::uno::Reference<css::uno::XInterface> cppu::loadSharedLibComponentFactory(
|
||||
assert(!xKey.is()); (void) xKey;
|
||||
css::uno::Reference<css::uno::XInterface> fac;
|
||||
cppuhelper::detail::loadSharedLibComponentFactory(
|
||||
uri, "", "", rImplName, "", xMgr, 0, &fac);
|
||||
uri, "", "", rImplName, "", xMgr, nullptr, &fac);
|
||||
return fac;
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ void cppu::writeSharedLibComponentInfo(
|
||||
css::uno::Reference<css::uno::XInterface>());
|
||||
}
|
||||
oslGenericFunction fp = mod.getFunctionSymbol(COMPONENT_WRITEINFO);
|
||||
if (fp == 0) {
|
||||
if (fp == nullptr) {
|
||||
throw css::registry::CannotRegisterImplementationException(
|
||||
("no symbol \"" COMPONENT_WRITEINFO "\" in component library <"
|
||||
+ uri + ">"),
|
||||
@@ -345,7 +345,7 @@ void cppu::writeSharedLibComponentInfo(
|
||||
sal_Bool ok;
|
||||
env.invoke(writeInfo, fp, smgr, key, &ok);
|
||||
(*env.get()->pExtEnv->releaseInterface)(env.get()->pExtEnv, key);
|
||||
if (smgr != 0) {
|
||||
if (smgr != nullptr) {
|
||||
(*env.get()->pExtEnv->releaseInterface)(env.get()->pExtEnv, smgr);
|
||||
}
|
||||
if (!ok) {
|
||||
|
@@ -20,7 +20,7 @@
|
||||
bool cppu::supportsService(
|
||||
css::lang::XServiceInfo * implementation, rtl::OUString const & name)
|
||||
{
|
||||
assert(implementation != 0);
|
||||
assert(implementation != nullptr);
|
||||
css::uno::Sequence< rtl::OUString > s(
|
||||
implementation->getSupportedServiceNames());
|
||||
for (sal_Int32 i = 0; i != s.getLength(); ++i) {
|
||||
|
@@ -68,7 +68,7 @@ static typelib_TypeDescription * createCTD(
|
||||
inline static typelib_TypeDescription * createCTD(
|
||||
const Reference< XCompoundTypeDescription > & xType )
|
||||
{
|
||||
typelib_TypeDescription * pRet = 0;
|
||||
typelib_TypeDescription * pRet = nullptr;
|
||||
if (xType.is())
|
||||
{
|
||||
typelib_TypeDescription * pBaseType = createCTD(
|
||||
@@ -108,7 +108,7 @@ inline static typelib_TypeDescription * createCTD(
|
||||
&pRet,
|
||||
(typelib_TypeClass)xType->getTypeClass(),
|
||||
aTypeName.pData,
|
||||
(pBaseType ? pBaseType->pWeakRef : 0),
|
||||
(pBaseType ? pBaseType->pWeakRef : nullptr),
|
||||
nMembers, pMemberInits );
|
||||
|
||||
// cleanup
|
||||
@@ -126,7 +126,7 @@ inline static typelib_TypeDescription * createCTD(
|
||||
Reference< container::XHierarchicalNameAccess > const & access,
|
||||
const Reference< XStructTypeDescription > & xType )
|
||||
{
|
||||
typelib_TypeDescription * pRet = 0;
|
||||
typelib_TypeDescription * pRet = nullptr;
|
||||
if (xType.is() && xType->getTypeParameters().getLength() == 0)
|
||||
{
|
||||
typelib_TypeDescription * pBaseType = createCTD(
|
||||
@@ -184,7 +184,7 @@ inline static typelib_TypeDescription * createCTD(
|
||||
typelib_typedescription_newStruct(
|
||||
&pRet,
|
||||
aTypeName.pData,
|
||||
(pBaseType ? pBaseType->pWeakRef : 0),
|
||||
(pBaseType ? pBaseType->pWeakRef : nullptr),
|
||||
nMembers, pMemberInits );
|
||||
|
||||
// cleanup
|
||||
@@ -201,7 +201,7 @@ inline static typelib_TypeDescription * createCTD(
|
||||
inline static typelib_TypeDescription * createCTD(
|
||||
const Reference< XInterfaceAttributeTypeDescription2 > & xAttribute )
|
||||
{
|
||||
typelib_TypeDescription * pRet = 0;
|
||||
typelib_TypeDescription * pRet = nullptr;
|
||||
if (xAttribute.is())
|
||||
{
|
||||
OUString aMemberName( xAttribute->getName() );
|
||||
@@ -239,7 +239,7 @@ inline static typelib_TypeDescription * createCTD(
|
||||
static typelib_TypeDescription * createCTD(
|
||||
const Reference< XInterfaceMethodTypeDescription > & xMethod )
|
||||
{
|
||||
typelib_TypeDescription * pRet = 0;
|
||||
typelib_TypeDescription * pRet = nullptr;
|
||||
if (xMethod.is())
|
||||
{
|
||||
Reference< XTypeDescription > xReturnType( xMethod->getReturnType() );
|
||||
@@ -311,7 +311,7 @@ inline static typelib_TypeDescription * createCTD(
|
||||
Reference< container::XHierarchicalNameAccess > const & access,
|
||||
const Reference< XInterfaceTypeDescription2 > & xType )
|
||||
{
|
||||
typelib_TypeDescription * pRet = 0;
|
||||
typelib_TypeDescription * pRet = nullptr;
|
||||
if (xType.is())
|
||||
{
|
||||
Sequence< Reference< XTypeDescription > > aBases(xType->getBaseTypes());
|
||||
@@ -346,7 +346,7 @@ inline static typelib_TypeDescription * createCTD(
|
||||
for ( nPos = nMembers; nPos--; )
|
||||
{
|
||||
OUString aMemberTypeName( pMembers[nPos]->getName() );
|
||||
ppMemberRefs[nPos] = 0;
|
||||
ppMemberRefs[nPos] = nullptr;
|
||||
typelib_typedescriptionreference_new(
|
||||
ppMemberRefs + nPos,
|
||||
(typelib_TypeClass)pMembers[nPos]->getTypeClass(),
|
||||
@@ -375,7 +375,7 @@ inline static typelib_TypeDescription * createCTD(
|
||||
|
||||
inline static typelib_TypeDescription * createCTD( const Reference< XEnumTypeDescription > & xType )
|
||||
{
|
||||
typelib_TypeDescription * pRet = 0;
|
||||
typelib_TypeDescription * pRet = nullptr;
|
||||
if (xType.is())
|
||||
{
|
||||
OUString aTypeName( xType->getName() );
|
||||
@@ -396,7 +396,7 @@ inline static typelib_TypeDescription * createCTD(
|
||||
Reference< container::XHierarchicalNameAccess > const & access,
|
||||
const Reference< XIndirectTypeDescription > & xType )
|
||||
{
|
||||
typelib_TypeDescription * pRet = 0;
|
||||
typelib_TypeDescription * pRet = nullptr;
|
||||
if (xType.is())
|
||||
{
|
||||
typelib_TypeDescription * pRefType = createCTD(
|
||||
@@ -410,7 +410,7 @@ inline static typelib_TypeDescription * createCTD(
|
||||
(typelib_TypeClass)xType->getTypeClass(),
|
||||
aTypeName.pData,
|
||||
pRefType->pWeakRef,
|
||||
0, 0 );
|
||||
0, nullptr );
|
||||
|
||||
// cleanup
|
||||
typelib_typedescription_release( pRefType );
|
||||
@@ -423,7 +423,7 @@ static typelib_TypeDescription * createCTD(
|
||||
Reference< container::XHierarchicalNameAccess > const & access,
|
||||
const Reference< XTypeDescription > & xType )
|
||||
{
|
||||
typelib_TypeDescription * pRet = 0;
|
||||
typelib_TypeDescription * pRet = nullptr;
|
||||
|
||||
if (xType.is())
|
||||
{
|
||||
@@ -433,91 +433,91 @@ static typelib_TypeDescription * createCTD(
|
||||
case TypeClass_VOID:
|
||||
{
|
||||
OUString aTypeName("void");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_VOID, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_VOID, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_CHAR:
|
||||
{
|
||||
OUString aTypeName("char");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_CHAR, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_CHAR, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_BOOLEAN:
|
||||
{
|
||||
OUString aTypeName("boolean");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_BOOLEAN, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_BOOLEAN, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_BYTE:
|
||||
{
|
||||
OUString aTypeName("byte");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_BYTE, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_BYTE, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_SHORT:
|
||||
{
|
||||
OUString aTypeName("short");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_SHORT, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_SHORT, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_UNSIGNED_SHORT:
|
||||
{
|
||||
OUString aTypeName("unsigned short");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_UNSIGNED_SHORT, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_UNSIGNED_SHORT, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_LONG:
|
||||
{
|
||||
OUString aTypeName("long");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_LONG, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_LONG, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_UNSIGNED_LONG:
|
||||
{
|
||||
OUString aTypeName("unsigned long");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_UNSIGNED_LONG, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_UNSIGNED_LONG, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_HYPER:
|
||||
{
|
||||
OUString aTypeName("hyper");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_HYPER, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_HYPER, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_UNSIGNED_HYPER:
|
||||
{
|
||||
OUString aTypeName("unsigned hyper");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_UNSIGNED_HYPER, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_UNSIGNED_HYPER, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_FLOAT:
|
||||
{
|
||||
OUString aTypeName("float");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_FLOAT, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_FLOAT, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_DOUBLE:
|
||||
{
|
||||
OUString aTypeName("double");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_DOUBLE, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_DOUBLE, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_STRING:
|
||||
{
|
||||
OUString aTypeName("string");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_STRING, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_STRING, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_TYPE:
|
||||
{
|
||||
OUString aTypeName("type");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_TYPE, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_TYPE, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
case TypeClass_ANY:
|
||||
{
|
||||
OUString aTypeName("any");
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_ANY, aTypeName.pData, 0, 0, 0 );
|
||||
typelib_typedescription_new( &pRet, typelib_TypeClass_ANY, aTypeName.pData, nullptr, 0, nullptr );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -574,7 +574,7 @@ static void SAL_CALL typelib_callback(
|
||||
if (*ppRet)
|
||||
{
|
||||
::typelib_typedescription_release( *ppRet );
|
||||
*ppRet = 0;
|
||||
*ppRet = nullptr;
|
||||
}
|
||||
if (pContext && pTypeName)
|
||||
{
|
||||
|
@@ -42,7 +42,7 @@ Sequence< sal_Int8 > OImplementationId::getImplementationId() const
|
||||
if (! _pSeq)
|
||||
{
|
||||
Sequence< sal_Int8 > * pSeq = new Sequence< sal_Int8 >( 16 );
|
||||
::rtl_createUuid( reinterpret_cast<sal_uInt8 *>(pSeq->getArray()), 0, _bUseEthernetAddress );
|
||||
::rtl_createUuid( reinterpret_cast<sal_uInt8 *>(pSeq->getArray()), nullptr, _bUseEthernetAddress );
|
||||
_pSeq = pSeq;
|
||||
}
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ namespace cppu
|
||||
// due to static Reflection destruction from usr, there must be a mutex leak (#73272#)
|
||||
inline static Mutex & getWeakMutex()
|
||||
{
|
||||
static Mutex * s_pMutex = 0;
|
||||
static Mutex * s_pMutex = nullptr;
|
||||
if (! s_pMutex)
|
||||
s_pMutex = new Mutex();
|
||||
return *s_pMutex;
|
||||
@@ -209,9 +209,9 @@ void SAL_CALL OWeakObject::release() throw()
|
||||
void OWeakObject::disposeWeakConnectionPoint()
|
||||
{
|
||||
OSL_PRECOND( m_refCount == 0, "OWeakObject::disposeWeakConnectionPoint: only to be called with a ref count of 0!" );
|
||||
if (m_pWeakConnectionPoint != 0) {
|
||||
if (m_pWeakConnectionPoint != nullptr) {
|
||||
OWeakConnectionPoint * const p = m_pWeakConnectionPoint;
|
||||
m_pWeakConnectionPoint = 0;
|
||||
m_pWeakConnectionPoint = nullptr;
|
||||
try {
|
||||
p->dispose();
|
||||
}
|
||||
@@ -412,7 +412,7 @@ void SAL_CALL OWeakRefListener::dispose()
|
||||
//-- WeakReferenceHelper ----------------------------------------------------------
|
||||
|
||||
WeakReferenceHelper::WeakReferenceHelper(const Reference< XInterface >& xInt)
|
||||
: m_pImpl( 0 )
|
||||
: m_pImpl( nullptr )
|
||||
{
|
||||
if (xInt.is())
|
||||
{
|
||||
@@ -422,7 +422,7 @@ WeakReferenceHelper::WeakReferenceHelper(const Reference< XInterface >& xInt)
|
||||
}
|
||||
|
||||
WeakReferenceHelper::WeakReferenceHelper(const WeakReferenceHelper& rWeakRef)
|
||||
: m_pImpl( 0 )
|
||||
: m_pImpl( nullptr )
|
||||
{
|
||||
Reference< XInterface > xInt( rWeakRef.get() );
|
||||
if (xInt.is())
|
||||
@@ -445,7 +445,7 @@ void WeakReferenceHelper::clear()
|
||||
m_pImpl->m_XWeakConnectionPoint.clear();
|
||||
}
|
||||
m_pImpl->release();
|
||||
m_pImpl = 0;
|
||||
m_pImpl = nullptr;
|
||||
}
|
||||
}
|
||||
catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected()
|
||||
|
@@ -138,7 +138,7 @@ SAL_CALL createSingleComponentFactory(
|
||||
ComponentFactoryFunc fptr,
|
||||
::rtl::OUString const & rImplementationName,
|
||||
css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
|
||||
rtl_ModuleCount * pModCount = 0 );
|
||||
rtl_ModuleCount * pModCount = NULL );
|
||||
|
||||
/** Creates a single service factory which holds the instance created only once.
|
||||
|
||||
@@ -155,7 +155,7 @@ createOneInstanceComponentFactory(
|
||||
ComponentFactoryFunc fptr,
|
||||
::rtl::OUString const & rImplementationName,
|
||||
css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
|
||||
rtl_ModuleCount * pModCount = 0 );
|
||||
rtl_ModuleCount * pModCount = NULL );
|
||||
|
||||
/** Deprecated. The type of the instanciate function used as argument of the create*Factory functions.
|
||||
|
||||
@@ -186,7 +186,7 @@ createSingleFactory(
|
||||
const ::rtl::OUString & rImplementationName,
|
||||
ComponentInstantiation pCreateFunction,
|
||||
const css::uno::Sequence< ::rtl::OUString > & rServiceNames,
|
||||
rtl_ModuleCount * pModCount = 0 );
|
||||
rtl_ModuleCount * pModCount = NULL );
|
||||
|
||||
/** Deprecated. Creates a factory wrapping another one.
|
||||
This means the methods of the interfaces XServiceProvider, XServiceInfo and
|
||||
@@ -227,7 +227,7 @@ createOneInstanceFactory(
|
||||
const ::rtl::OUString & rComponentName,
|
||||
ComponentInstantiation pCreateFunction,
|
||||
const css::uno::Sequence< ::rtl::OUString > & rServiceNames,
|
||||
rtl_ModuleCount * pModCount = 0 );
|
||||
rtl_ModuleCount * pModCount = NULL );
|
||||
|
||||
/** Deprecated. Creates a single service factory based on a registry.
|
||||
|
||||
|
@@ -49,7 +49,7 @@ namespace detail {
|
||||
{
|
||||
css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > *pAsSequence;
|
||||
css::uno::XInterface * pAsInterface;
|
||||
element_alias() : pAsInterface(0) {}
|
||||
element_alias() : pAsInterface(NULL) {}
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -90,7 +90,7 @@ OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelperVar< key , hashImp
|
||||
typename InterfaceMap::iterator iter = find( rKey );
|
||||
if( iter != m_pMap->end() )
|
||||
return static_cast<OInterfaceContainerHelper*>( (*iter).second );
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -191,7 +191,7 @@ public:
|
||||
@param bUseEthernetAddress whether an ethernet mac address should be taken into account
|
||||
*/
|
||||
inline OImplementationId( bool bUseEthernetAddress = true )
|
||||
: _pSeq( 0 )
|
||||
: _pSeq( NULL )
|
||||
, _bUseEthernetAddress( bUseEthernetAddress )
|
||||
{}
|
||||
/** Constructor giving implementation id.
|
||||
|
@@ -100,8 +100,8 @@ public:
|
||||
*/
|
||||
inline OWeakObject()
|
||||
: m_refCount( 0 )
|
||||
, m_pWeakConnectionPoint( 0 )
|
||||
, m_pReserved(0)
|
||||
, m_pWeakConnectionPoint( NULL )
|
||||
, m_pReserved(NULL)
|
||||
{}
|
||||
#endif
|
||||
/** Dummy copy constructor. Set the reference count to zero.
|
||||
@@ -111,8 +111,8 @@ public:
|
||||
inline OWeakObject( const OWeakObject & rObj )
|
||||
: css::uno::XWeak()
|
||||
, m_refCount( 0 )
|
||||
, m_pWeakConnectionPoint( 0 )
|
||||
, m_pReserved(0)
|
||||
, m_pWeakConnectionPoint( NULL )
|
||||
, m_pReserved(NULL)
|
||||
{
|
||||
(void) rObj;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
*/
|
||||
static inline css::uno::XInterface * acquire(OWeakObject * instance)
|
||||
{
|
||||
assert(instance != 0);
|
||||
assert(instance != NULL);
|
||||
instance->acquire();
|
||||
return instance;
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
/** Default ctor. Creates an empty weak reference.
|
||||
*/
|
||||
inline WeakReferenceHelper()
|
||||
: m_pImpl( 0 )
|
||||
: m_pImpl( NULL )
|
||||
{}
|
||||
|
||||
/** Copy ctor. Initialize this reference with the same interface as in rWeakRef.
|
||||
|
Reference in New Issue
Block a user