summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:22:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:37 +0100
commit65464ed0985802edb96dbcbd1c3eed996f3778bd (patch)
tree4f45f84673b4e44ac3aa4a03b086a2b5fa295c86 /scripting
parentd61d47ad021711718d9bb41a6b548210781e8b26 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I9b7d8de65780325175d24965057596b88d3c0f05
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/basprov/basprov.cxx18
-rw-r--r--scripting/source/basprov/basscript.cxx6
-rw-r--r--scripting/source/dlgprov/dlgevtatt.cxx4
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx12
-rw-r--r--scripting/source/inc/util/MiscUtils.hxx2
-rw-r--r--scripting/source/protocolhandler/scripthandler.cxx12
-rw-r--r--scripting/source/provider/ActiveMSPList.cxx4
-rw-r--r--scripting/source/provider/BrowseNodeFactoryImpl.cxx4
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx14
-rw-r--r--scripting/source/stringresource/stringresource.cxx90
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx46
11 files changed, 106 insertions, 106 deletions
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx
index 2816d85cf36f..94a662c3f205 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -76,7 +76,7 @@ namespace basprov
static Sequence< OUString > getSupportedServiceNames_BasicProviderImpl()
{
- static Sequence< OUString >* pNames = 0;
+ static Sequence< OUString >* pNames = nullptr;
if ( !pNames )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
@@ -98,10 +98,10 @@ namespace basprov
BasicProviderImpl::BasicProviderImpl( const Reference< XComponentContext >& xContext )
- :m_pAppBasicManager( 0 )
- ,m_pDocBasicManager( 0 )
- ,m_xLibContainerApp( 0 )
- ,m_xLibContainerDoc( 0 )
+ :m_pAppBasicManager( nullptr )
+ ,m_pDocBasicManager( nullptr )
+ ,m_xLibContainerApp( nullptr )
+ ,m_xLibContainerDoc( nullptr )
,m_xContext( xContext )
,m_bIsAppScriptCtx( true )
,m_bIsUserCtx(true)
@@ -315,7 +315,7 @@ namespace basprov
// In some strange circumstances the Library name can have an
// apparently illegal '.' in it ( in imported VBA )
- BasicManager* pBasicMgr = NULL;
+ BasicManager* pBasicMgr = nullptr;
if ( aLocation == "document" )
{
pBasicMgr = m_pDocBasicManager;
@@ -417,7 +417,7 @@ namespace basprov
SolarMutexGuard aGuard;
Reference< script::XLibraryContainer > xLibContainer;
- BasicManager* pBasicManager = NULL;
+ BasicManager* pBasicManager = nullptr;
if ( m_bIsAppScriptCtx )
{
@@ -516,9 +516,9 @@ namespace basprov
{
create_BasicProviderImpl, getImplementationName_BasicProviderImpl,
getSupportedServiceNames_BasicProviderImpl, ::cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index ec621d23bc3d..00b2a40f880e 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -64,7 +64,7 @@ namespace basprov
,OPropertyContainer( GetBroadcastHelper() )
,m_xMethod( xMethod )
,m_funcName( funcName )
- ,m_documentBasicManager( NULL )
+ ,m_documentBasicManager( nullptr )
,m_xDocumentScriptContext()
{
registerProperty( BASSCRIPT_PROPERTY_CALLER, BASSCRIPT_PROPERTY_ID_CALLER, BASSCRIPT_DEFAULT_ATTRIBS(), &m_caller, cppu::UnoType<decltype(m_caller)>::get() );
@@ -107,7 +107,7 @@ namespace basprov
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
if ( pSimpleHint && ( pSimpleHint->GetId() == SFX_HINT_DYING ) )
{
- m_documentBasicManager = NULL;
+ m_documentBasicManager = nullptr;
EndListening( rBC ); // prevent multiple notifications
}
}
@@ -285,7 +285,7 @@ namespace basprov
aReturn = sbxToUnoValue( xReturn );
// reset parameters
- m_xMethod->SetParameters( NULL );
+ m_xMethod->SetParameters( nullptr );
}
return aReturn;
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx
index 5e217573b036..5d1c1401db75 100644
--- a/scripting/source/dlgprov/dlgevtatt.cxx
+++ b/scripting/source/dlgprov/dlgevtatt.cxx
@@ -427,7 +427,7 @@ namespace dlgprov
{
//::osl::MutexGuard aGuard( getMutex() );
- firing_impl( Event, NULL );
+ firing_impl( Event, nullptr );
}
@@ -667,7 +667,7 @@ namespace dlgprov
{
//::osl::MutexGuard aGuard( getMutex() );
- firing_impl( aScriptEvent, NULL );
+ firing_impl( aScriptEvent, nullptr );
}
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 464ae7d3b970..2d09fe625f9d 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -186,7 +186,7 @@ static const char aResourceResolverPropName[] = "ResourceResolver";
::osl::Mutex& getMutex()
{
- static ::osl::Mutex* s_pMutex = 0;
+ static ::osl::Mutex* s_pMutex = nullptr;
if ( !s_pMutex )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
@@ -206,7 +206,7 @@ static const char aResourceResolverPropName[] = "ResourceResolver";
DialogProviderImpl::DialogProviderImpl( const Reference< XComponentContext >& rxContext )
:m_xContext( rxContext )
- ,m_xModel( 0 )
+ ,m_xModel( nullptr )
{
}
@@ -526,7 +526,7 @@ static const char aResourceResolverPropName[] = "ResourceResolver";
Reference< XScriptEventsAttacher > xScriptEventsAttacher = new DialogEventsAttacherImpl
( m_xContext, m_xModel, rxControl, rxHandler, rxIntrospectionAccess,
- bDialogProviderMode, ( m_BasicInfo.get() ? m_BasicInfo->mxBasicRTLListener : NULL ), msDialogLibName );
+ bDialogProviderMode, ( m_BasicInfo.get() ? m_BasicInfo->mxBasicRTLListener : nullptr ), msDialogLibName );
Any aHelper;
xScriptEventsAttacher->attachEvents( aObjects, Reference< XScriptListener >(), aHelper );
@@ -777,9 +777,9 @@ static const char aResourceResolverPropName[] = "ResourceResolver";
static struct ::cppu::ImplementationEntry s_component_entries [] =
{
- {create_DialogProviderImpl, getImplementationName_DialogProviderImpl,getSupportedServiceNames_DialogProviderImpl, ::cppu::createSingleComponentFactory,0, 0},
- { &comp_DialogModelProvider::_create,&comp_DialogModelProvider::_getImplementationName,&comp_DialogModelProvider::_getSupportedServiceNames,&::cppu::createSingleComponentFactory, 0, 0 },
- { 0, 0, 0, 0, 0, 0 }
+ {create_DialogProviderImpl, getImplementationName_DialogProviderImpl,getSupportedServiceNames_DialogProviderImpl, ::cppu::createSingleComponentFactory,nullptr, 0},
+ { &comp_DialogModelProvider::_create,&comp_DialogModelProvider::_getImplementationName,&comp_DialogModelProvider::_getSupportedServiceNames,&::cppu::createSingleComponentFactory, nullptr, 0 },
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
diff --git a/scripting/source/inc/util/MiscUtils.hxx b/scripting/source/inc/util/MiscUtils.hxx
index c00b486af444..e503eb4faeea 100644
--- a/scripting/source/inc/util/MiscUtils.hxx
+++ b/scripting/source/inc/util/MiscUtils.hxx
@@ -106,7 +106,7 @@ static css::uno::Reference< css::frame::XModel > tDocUrlToModel( const OUString&
try
{
- ::ucbhelper::Content root( url, NULL, comphelper::getProcessComponentContext() );
+ ::ucbhelper::Content root( url, nullptr, comphelper::getProcessComponentContext() );
OUString propName = "DocumentModel";
result = getUCBProperty( root, propName );
}
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index 32792d7b142a..6d5306dbad88 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -271,10 +271,10 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- if ( pFact != NULL )
+ if ( pFact != nullptr )
{
std::unique_ptr<VclAbstractDialog> pDlg(
- pFact->CreateScriptErrorDialog( NULL, aException ));
+ pFact->CreateScriptErrorDialog( nullptr, aException ));
if ( pDlg )
pDlg->Execute();
@@ -356,7 +356,7 @@ ScriptProtocolHandler::getScriptInvocation()
Reference< XFrame > xFrame( m_xFrame.get(), UNO_QUERY );
if ( xFrame.is() )
{
- SfxFrame* pFrame = NULL;
+ SfxFrame* pFrame = nullptr;
for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) )
{
if ( pFrame->GetFrameInterface() == xFrame )
@@ -513,11 +513,11 @@ extern "C"
(void)pRegistryKey;
// Set default return value for this operation - if it failed.
- void * pReturn = NULL ;
+ void * pReturn = nullptr ;
if (
- ( pImplementationName != NULL ) &&
- ( pServiceManager != NULL )
+ ( pImplementationName != nullptr ) &&
+ ( pServiceManager != nullptr )
)
{
// Define variables which are used in following macros.
diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx
index 98b1d209f131..a591ee5b9ced 100644
--- a/scripting/source/provider/ActiveMSPList.cxx
+++ b/scripting/source/provider/ActiveMSPList.cxx
@@ -140,7 +140,7 @@ Reference< provider::XScriptProvider >
OUStringBuffer buf;
buf.append( "Failed to create MasterScriptProvider for ScriptInvocationContext: " );
buf.append( "Component supporting XEmbeddScripts interface not found." );
- throw lang::IllegalArgumentException( buf.makeStringAndClear(), NULL, 1 );
+ throw lang::IllegalArgumentException( buf.makeStringAndClear(), nullptr, 1 );
}
::osl::MutexGuard guard( m_mutex );
@@ -179,7 +179,7 @@ Reference< provider::XScriptProvider >
buf.append( "Failed to create MasterScriptProvider for '" );
buf.append ( context );
buf.append( "': Either XEmbeddScripts or XScriptInvocationContext need to be supported by the document." );
- throw lang::IllegalArgumentException( buf.makeStringAndClear(), NULL, 1 );
+ throw lang::IllegalArgumentException( buf.makeStringAndClear(), nullptr, 1 );
}
::osl::MutexGuard guard( m_mutex );
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index 75072a244a3c..6a76ad2d8629 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -185,7 +185,7 @@ public:
explicit LocationBrowseNode( const Reference< browse::XBrowseNode >& node )
{
m_sNodeName = node->getName();
- m_hBNA = NULL;
+ m_hBNA = nullptr;
m_origNode.set( node );
}
@@ -211,7 +211,7 @@ public:
getChildNodes()
throw ( RuntimeException, std::exception ) override
{
- if ( m_hBNA == NULL )
+ if ( m_hBNA == nullptr )
{
loadChildNodes();
}
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 1b6fea093de0..e979c420add3 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -74,7 +74,7 @@ bool endsWith( const OUString& target,
MasterScriptProvider::MasterScriptProvider( const Reference< XComponentContext > & xContext ) throw ( RuntimeException ):
m_xContext( xContext ), m_bIsValid( false ), m_bInitialised( false ),
- m_bIsPkgMSP( false ), m_pPCache( 0 )
+ m_bIsPkgMSP( false ), m_pPCache( nullptr )
{
ENSURE_OR_THROW( m_xContext.is(), "MasterScriptProvider::MasterScriptProvider: No context available\n" );
m_xMgr = m_xContext->getServiceManager();
@@ -89,7 +89,7 @@ MasterScriptProvider::~MasterScriptProvider()
{
delete m_pPCache;
}
- m_pPCache = 0;
+ m_pPCache = nullptr;
}
@@ -861,26 +861,26 @@ static const struct cppu::ImplementationEntry s_entries [] =
{
sp_create, sp_getImplementationName,
sp_getSupportedServiceNames, cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
{
urihelper_create,
urihelper_getImplementationName,
urihelper_getSupportedServiceNames,
cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
{
func_provider::mspf_create, func_provider::mspf_getImplementationName,
func_provider::mspf_getSupportedServiceNames, cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
{
browsenodefactory::bnf_create, browsenodefactory::bnf_getImplementationName,
browsenodefactory::bnf_getSupportedServiceNames, cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
}
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 9b25c697f0a3..c6b7cae2206c 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -59,7 +59,7 @@ namespace stringresource
::osl::Mutex& getMutex()
{
- static ::osl::Mutex* s_pMutex = 0;
+ static ::osl::Mutex* s_pMutex = nullptr;
if ( !s_pMutex )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
@@ -101,8 +101,8 @@ static Reference< XInterface > SAL_CALL create_StringResourceImpl(
StringResourceImpl::StringResourceImpl( const Reference< XComponentContext >& rxContext )
: m_xContext( rxContext )
- , m_pCurrentLocaleItem( NULL )
- , m_pDefaultLocaleItem( NULL )
+ , m_pCurrentLocaleItem( nullptr )
+ , m_pDefaultLocaleItem( nullptr )
, m_bDefaultModified( false )
, m_aListenerContainer( getMutex() )
, m_bModified( false )
@@ -181,7 +181,7 @@ OUString StringResourceImpl::implResolveString
{
OUString aRetStr;
bool bSuccess = false;
- if( pLocaleItem != NULL && loadLocale( pLocaleItem ) )
+ if( pLocaleItem != nullptr && loadLocale( pLocaleItem ) )
{
IdToStringMap::iterator it = pLocaleItem->m_aIdToStringMap.find( ResourceID );
if( !( it == pLocaleItem->m_aIdToStringMap.end() ) )
@@ -217,7 +217,7 @@ OUString StringResourceImpl::resolveStringForLocale( const OUString& ResourceID,
bool StringResourceImpl::implHasEntryForId( const OUString& ResourceID, LocaleItem* pLocaleItem )
{
bool bSuccess = false;
- if( pLocaleItem != NULL && loadLocale( pLocaleItem ) )
+ if( pLocaleItem != nullptr && loadLocale( pLocaleItem ) )
{
IdToStringMap::iterator it = pLocaleItem->m_aIdToStringMap.find( ResourceID );
if( !( it == pLocaleItem->m_aIdToStringMap.end() ) )
@@ -285,7 +285,7 @@ Locale StringResourceImpl::getCurrentLocale()
::osl::MutexGuard aGuard( getMutex() );
Locale aRetLocale;
- if( m_pCurrentLocaleItem != NULL )
+ if( m_pCurrentLocaleItem != nullptr )
aRetLocale = m_pCurrentLocaleItem->m_locale;
return aRetLocale;
}
@@ -296,7 +296,7 @@ Locale StringResourceImpl::getDefaultLocale( )
::osl::MutexGuard aGuard( getMutex() );
Locale aRetLocale;
- if( m_pDefaultLocaleItem != NULL )
+ if( m_pDefaultLocaleItem != nullptr )
aRetLocale = m_pDefaultLocaleItem->m_locale;
return aRetLocale;
}
@@ -345,16 +345,16 @@ void StringResourceImpl::implSetCurrentLocale( const Locale& locale,
{
::osl::MutexGuard aGuard( getMutex() );
- LocaleItem* pLocaleItem = NULL;
+ LocaleItem* pLocaleItem = nullptr;
if( FindClosestMatch )
pLocaleItem = getClosestMatchItemForLocale( locale );
else
pLocaleItem = getItemForLocale( locale, true );
- if( pLocaleItem == NULL && bUseDefaultIfNoMatch )
+ if( pLocaleItem == nullptr && bUseDefaultIfNoMatch )
pLocaleItem = m_pDefaultLocaleItem;
- if( pLocaleItem != NULL )
+ if( pLocaleItem != nullptr )
{
(void)loadLocale( pLocaleItem );
m_pCurrentLocaleItem = pLocaleItem;
@@ -395,7 +395,7 @@ void StringResourceImpl::setDefaultLocale( const Locale& locale )
void StringResourceImpl::implSetString( const OUString& ResourceID,
const OUString& Str, LocaleItem* pLocaleItem )
{
- if( pLocaleItem != NULL && loadLocale( pLocaleItem ) )
+ if( pLocaleItem != nullptr && loadLocale( pLocaleItem ) )
{
IdToStringMap& rHashMap = pLocaleItem->m_aIdToStringMap;
@@ -434,7 +434,7 @@ void StringResourceImpl::setStringForLocale
void StringResourceImpl::implRemoveId( const OUString& ResourceID, LocaleItem* pLocaleItem )
throw (css::resource::MissingResourceException)
{
- if( pLocaleItem != NULL && loadLocale( pLocaleItem ) )
+ if( pLocaleItem != nullptr && loadLocale( pLocaleItem ) )
{
IdToStringMap& rHashMap = pLocaleItem->m_aIdToStringMap;
IdToStringMap::iterator it = rHashMap.find( ResourceID );
@@ -473,7 +473,7 @@ void StringResourceImpl::newLocale( const Locale& locale )
::osl::MutexGuard aGuard( getMutex() );
implCheckReadOnly( "StringResourceImpl::newLocale(): Read only" );
- if( getItemForLocale( locale, false ) != NULL )
+ if( getItemForLocale( locale, false ) != nullptr )
{
OUString errorMsg("StringResourceImpl: locale already exists");
throw ElementExistException( errorMsg );
@@ -492,9 +492,9 @@ void StringResourceImpl::newLocale( const Locale& locale )
// Copy strings from default locale
LocaleItem* pCopyFromItem = m_pDefaultLocaleItem;
- if( pCopyFromItem == NULL )
+ if( pCopyFromItem == nullptr )
pCopyFromItem = m_pCurrentLocaleItem;
- if( pCopyFromItem != NULL && loadLocale( pCopyFromItem ) )
+ if( pCopyFromItem != nullptr && loadLocale( pCopyFromItem ) )
{
const IdToStringMap& rSourceMap = pCopyFromItem->m_aIdToStringMap;
IdToStringMap& rTargetMap = pLocaleItem->m_aIdToStringMap;
@@ -518,10 +518,10 @@ void StringResourceImpl::newLocale( const Locale& locale )
pLocaleItem->m_nNextIndex = pCopyFromItem->m_nNextIndex;
}
- if( m_pCurrentLocaleItem == NULL )
+ if( m_pCurrentLocaleItem == nullptr )
m_pCurrentLocaleItem = pLocaleItem;
- if( m_pDefaultLocaleItem == NULL )
+ if( m_pDefaultLocaleItem == nullptr )
{
m_pDefaultLocaleItem = pLocaleItem;
m_bDefaultModified = true;
@@ -546,7 +546,7 @@ void StringResourceImpl::removeLocale( const Locale& locale )
if( m_pCurrentLocaleItem == pRemoveItem ||
m_pDefaultLocaleItem == pRemoveItem )
{
- LocaleItem* pFallbackItem = NULL;
+ LocaleItem* pFallbackItem = nullptr;
for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
{
LocaleItem* pLocaleItem = *it;
@@ -584,8 +584,8 @@ void StringResourceImpl::removeLocale( const Locale& locale )
LocaleItem* pChangedDefaultLocaleItem = new LocaleItem( m_pDefaultLocaleItem->m_locale );
m_aChangedDefaultLocaleVector.push_back( pChangedDefaultLocaleItem );
}
- m_pCurrentLocaleItem = NULL;
- m_pDefaultLocaleItem = NULL;
+ m_pCurrentLocaleItem = nullptr;
+ m_pDefaultLocaleItem = nullptr;
}
m_aLocaleItemVector.erase( it );
@@ -644,7 +644,7 @@ LocaleItem* StringResourceImpl::getItemForLocale
( const Locale& locale, bool bException )
throw (css::lang::IllegalArgumentException)
{
- LocaleItem* pRetItem = NULL;
+ LocaleItem* pRetItem = nullptr;
// Search for locale
for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
@@ -663,7 +663,7 @@ LocaleItem* StringResourceImpl::getItemForLocale
}
}
- if( pRetItem == NULL && bException )
+ if( pRetItem == nullptr && bException )
{
OUString errorMsg("StringResourceImpl: Invalid locale");
throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
@@ -675,7 +675,7 @@ LocaleItem* StringResourceImpl::getItemForLocale
// This method performs a closest match search, at least the language must match.
LocaleItem* StringResourceImpl::getClosestMatchItemForLocale( const Locale& locale )
{
- LocaleItem* pRetItem = NULL;
+ LocaleItem* pRetItem = nullptr;
::std::vector< Locale > aLocales( m_aLocaleItemVector.size());
size_t i = 0;
@@ -1008,7 +1008,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
{
LocaleItemVectorIt it = m_aDeletedLocaleItemVector.begin();
LocaleItem* pLocaleItem = *it;
- if( pLocaleItem != NULL )
+ if( pLocaleItem != nullptr )
{
OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, m_aNameBase );
aStreamName += ".properties";
@@ -1029,7 +1029,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
{
LocaleItem* pLocaleItem = *it;
- if( pLocaleItem != NULL && (bStoreAll || pLocaleItem->m_bModified) &&
+ if( pLocaleItem != nullptr && (bStoreAll || pLocaleItem->m_bModified) &&
loadLocale( pLocaleItem ) )
{
OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, aNameBase );
@@ -1068,7 +1068,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
it != m_aChangedDefaultLocaleVector.end(); ++it )
{
LocaleItem* pLocaleItem = *it;
- if( pLocaleItem != NULL )
+ if( pLocaleItem != nullptr )
{
OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, m_aNameBase );
aStreamName += ".default";
@@ -1087,7 +1087,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
}
// Default locale
- if( m_pDefaultLocaleItem != NULL && (bStoreAll || m_bDefaultModified) )
+ if( m_pDefaultLocaleItem != nullptr && (bStoreAll || m_bDefaultModified) )
{
OUString aStreamName = implGetFileNameForLocaleItem( m_pDefaultLocaleItem, aNameBase );
aStreamName += ".default";
@@ -1134,7 +1134,7 @@ void StringResourcePersistenceImpl::implKillRemovedLocaleFiles
{
LocaleItemVectorIt it = m_aDeletedLocaleItemVector.begin();
LocaleItem* pLocaleItem = *it;
- if( pLocaleItem != NULL )
+ if( pLocaleItem != nullptr )
{
OUString aCompleteFileName =
implGetPathForLocaleItem( pLocaleItem, aNameBase, Location );
@@ -1160,7 +1160,7 @@ void StringResourcePersistenceImpl::implKillChangedDefaultFiles
it != m_aChangedDefaultLocaleVector.end(); ++it )
{
LocaleItem* pLocaleItem = *it;
- if( pLocaleItem != NULL )
+ if( pLocaleItem != nullptr )
{
OUString aCompleteFileName =
implGetPathForLocaleItem( pLocaleItem, aNameBase, Location, true );
@@ -1192,7 +1192,7 @@ void StringResourcePersistenceImpl::implStoreAtLocation
for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
{
LocaleItem* pLocaleItem = *it;
- if( pLocaleItem != NULL && (bStoreAll || bKillAll || pLocaleItem->m_bModified) &&
+ if( pLocaleItem != nullptr && (bStoreAll || bKillAll || pLocaleItem->m_bModified) &&
loadLocale( pLocaleItem ) )
{
OUString aCompleteFileName =
@@ -1220,7 +1220,7 @@ void StringResourcePersistenceImpl::implStoreAtLocation
implKillChangedDefaultFiles( Location, aNameBase, xFileAccess );
// Default locale
- if( m_pDefaultLocaleItem != NULL && (bStoreAll || bKillAll || m_bDefaultModified) )
+ if( m_pDefaultLocaleItem != nullptr && (bStoreAll || bKillAll || m_bDefaultModified) )
{
OUString aCompleteFileName =
implGetPathForLocaleItem( m_pDefaultLocaleItem, aNameBase, Location, true );
@@ -1393,7 +1393,7 @@ Sequence< sal_Int8 > StringResourcePersistenceImpl::exportBinary( )
it != m_aLocaleItemVector.end(); ++it,++iLocale )
{
LocaleItem* pLocaleItem = *it;
- if( pLocaleItem != NULL && loadLocale( pLocaleItem ) )
+ if( pLocaleItem != nullptr && loadLocale( pLocaleItem ) )
{
if( m_pDefaultLocaleItem == pLocaleItem )
iDefault = iLocale;
@@ -1622,7 +1622,7 @@ void StringResourcePersistenceImpl::importBinary( const Sequence< ::sal_Int8 >&
pPositions[i] = aIn.readInt32();
// Import locales
- LocaleItem* pUseAsDefaultItem = NULL;
+ LocaleItem* pUseAsDefaultItem = nullptr;
for( sal_Int32 i = 0; i < nLocaleCount; i++ )
{
sal_Int32 nPos = pPositions[i];
@@ -1646,7 +1646,7 @@ void StringResourcePersistenceImpl::importBinary( const Sequence< ::sal_Int8 >&
}
}
- if( pUseAsDefaultItem != NULL )
+ if( pUseAsDefaultItem != nullptr )
setDefaultLocale( pUseAsDefaultItem->m_locale );
delete[] pPositions;
@@ -1702,7 +1702,7 @@ void StringResourcePersistenceImpl::implLoadAllLocales()
for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
{
LocaleItem* pLocaleItem = *it;
- if( pLocaleItem != NULL )
+ if( pLocaleItem != nullptr )
loadLocale( pLocaleItem );
}
}
@@ -1739,10 +1739,10 @@ void StringResourcePersistenceImpl::implScanLocaleNames( const Sequence< OUStrin
LocaleItem* pLocaleItem = new LocaleItem( aLocale, false );
m_aLocaleItemVector.push_back( pLocaleItem );
- if( m_pCurrentLocaleItem == NULL )
+ if( m_pCurrentLocaleItem == nullptr )
m_pCurrentLocaleItem = pLocaleItem;
- if( m_pDefaultLocaleItem == NULL )
+ if( m_pDefaultLocaleItem == nullptr )
{
m_pDefaultLocaleItem = pLocaleItem;
m_bDefaultModified = true;
@@ -1974,7 +1974,7 @@ void CheckContinueInNextLine( Reference< io::XTextInputStream2 > xTextInputStrea
bool StringResourcePersistenceImpl::implReadPropertiesFile
( LocaleItem* pLocaleItem, const Reference< io::XInputStream >& xInputStream )
{
- if( !xInputStream.is() || pLocaleItem == NULL )
+ if( !xInputStream.is() || pLocaleItem == nullptr )
return false;
Reference< io::XTextInputStream2 > xTextInputStream = io::TextInputStream::create( m_xContext );
@@ -2183,7 +2183,7 @@ bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem* pLocale
static const char aAssignmentStr[] = "=";
static const char aLineFeedStr[] = "\n";
- if( !xOutputStream.is() || pLocaleItem == NULL )
+ if( !xOutputStream.is() || pLocaleItem == nullptr )
return false;
bool bSuccess = false;
@@ -2221,7 +2221,7 @@ bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem* pLocale
// Create sorted array of pointers to the id strings
const OUString** pIdPtrs = new const OUString*[nTabSize];
for(sal_Int32 i = 0 ; i < nTabSize ; i++ )
- pIdPtrs[i] = NULL;
+ pIdPtrs[i] = nullptr;
for( it_index = rIndexMap.begin(); it_index != rIndexMap.end(); ++it_index )
{
sal_Int32 nIndex = (*it_index).second;
@@ -2232,7 +2232,7 @@ bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem* pLocale
for(sal_Int32 i = 0 ; i < nTabSize ; i++ )
{
const OUString* pStr = pIdPtrs[i];
- if( pStr != NULL )
+ if( pStr != nullptr )
{
OUString aResourceID = *pStr;
IdToStringMap::const_iterator it = rHashMap.find( aResourceID );
@@ -2957,21 +2957,21 @@ static const struct ::cppu::ImplementationEntry s_component_entries [] =
create_StringResourceImpl, getImplementationName_StringResourceImpl,
getSupportedServiceNames_StringResourceImpl,
::cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
{
create_StringResourceWithLocationImpl, getImplementationName_StringResourceWithLocationImpl,
getSupportedServiceNames_StringResourceWithLocationImpl,
::cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
{
create_StringResourceWithStorageImpl, getImplementationName_StringResourceWithStorageImpl,
getSupportedServiceNames_StringResourceWithStorageImpl,
::cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 7c2dba47dc85..1f8a3db02147 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -227,49 +227,49 @@ TypeList listBoxList = {&typeXListBox, 1};
//this array stores the OO event to VBA event translation info
static TranslatePropMap aTranslatePropMap_Impl[] =
{
- { OUString("actionPerformed"), { OUString("_Change"), NULL, DenyType, static_cast<void*>(&radioButtonList) } },
+ { OUString("actionPerformed"), { OUString("_Change"), nullptr, DenyType, static_cast<void*>(&radioButtonList) } },
// actionPerformed ooo event
- { OUString("actionPerformed"), { OUString("_Click"), NULL, ApproveAll, NULL } },
- { OUString("itemStateChanged"), { OUString("_Change"), NULL, ApproveType, static_cast<void*>(&radioButtonList) } },
+ { OUString("actionPerformed"), { OUString("_Click"), nullptr, ApproveAll, nullptr } },
+ { OUString("itemStateChanged"), { OUString("_Change"), nullptr, ApproveType, static_cast<void*>(&radioButtonList) } },
// itemStateChanged ooo event
- { OUString("itemStateChanged"), { OUString("_Click"), NULL, ApproveType, static_cast<void*>(&comboBoxList) } },
+ { OUString("itemStateChanged"), { OUString("_Click"), nullptr, ApproveType, static_cast<void*>(&comboBoxList) } },
- { OUString("itemStateChanged"), { OUString("_Click"), NULL, ApproveType, static_cast<void*>(&listBoxList) } },
+ { OUString("itemStateChanged"), { OUString("_Click"), nullptr, ApproveType, static_cast<void*>(&listBoxList) } },
// changed ooo event
- { OUString("changed"), { OUString("_Change"), NULL, ApproveAll, NULL } },
+ { OUString("changed"), { OUString("_Change"), nullptr, ApproveAll, nullptr } },
// focusGained ooo event
- { OUString("focusGained"), { OUString("_GotFocus"), NULL, ApproveAll, NULL } },
+ { OUString("focusGained"), { OUString("_GotFocus"), nullptr, ApproveAll, nullptr } },
// focusLost ooo event
- { OUString("focusLost"), { OUString("_LostFocus"), NULL, ApproveAll, NULL } },
- { OUString("focusLost"), { OUString("_Exit"), NULL, ApproveType, static_cast<void*>(&textCompList) } }, // support VBA TextBox_Exit event
+ { OUString("focusLost"), { OUString("_LostFocus"), nullptr, ApproveAll, nullptr } },
+ { OUString("focusLost"), { OUString("_Exit"), nullptr, ApproveType, static_cast<void*>(&textCompList) } }, // support VBA TextBox_Exit event
// adjustmentValueChanged ooo event
- { OUString("adjustmentValueChanged"), { OUString("_Scroll"), NULL, ApproveAll, NULL } },
- { OUString("adjustmentValueChanged"), { OUString("_Change"), NULL, ApproveAll, NULL } },
+ { OUString("adjustmentValueChanged"), { OUString("_Scroll"), nullptr, ApproveAll, nullptr } },
+ { OUString("adjustmentValueChanged"), { OUString("_Change"), nullptr, ApproveAll, nullptr } },
// textChanged ooo event
- { OUString("textChanged"), { OUString("_Change"), NULL, ApproveAll, NULL } },
+ { OUString("textChanged"), { OUString("_Change"), nullptr, ApproveAll, nullptr } },
// keyReleased ooo event
- { OUString("keyReleased"), { OUString("_KeyUp"), ooKeyPressedToVBAKeyUpDown, ApproveAll, NULL } },
+ { OUString("keyReleased"), { OUString("_KeyUp"), ooKeyPressedToVBAKeyUpDown, ApproveAll, nullptr } },
// mouseReleased ooo event
{ OUString("mouseReleased"), { OUString("_Click"), ooMouseEvtToVBAMouseEvt, ApproveType, static_cast<void*>(&fixedTextList) } },
- { OUString("mouseReleased"), { OUString("_MouseUp"), ooMouseEvtToVBAMouseEvt, ApproveAll, NULL } },
+ { OUString("mouseReleased"), { OUString("_MouseUp"), ooMouseEvtToVBAMouseEvt, ApproveAll, nullptr } },
// mousePressed ooo event
- { OUString("mousePressed"), { OUString("_MouseDown"), ooMouseEvtToVBAMouseEvt, ApproveAll, NULL } },
- { OUString("mousePressed"), { OUString("_DblClick"), ooMouseEvtToVBADblClick, ApproveAll, NULL } },
+ { OUString("mousePressed"), { OUString("_MouseDown"), ooMouseEvtToVBAMouseEvt, ApproveAll, nullptr } },
+ { OUString("mousePressed"), { OUString("_DblClick"), ooMouseEvtToVBADblClick, ApproveAll, nullptr } },
// mouseMoved ooo event
- { OUString("mouseMoved"), { OUString("_MouseMove"), ooMouseEvtToVBAMouseEvt, ApproveAll, NULL } },
- { OUString("mouseDragged"), { OUString("_MouseMove"), ooMouseEvtToVBAMouseEvt, DenyMouseDrag, NULL } },
+ { OUString("mouseMoved"), { OUString("_MouseMove"), ooMouseEvtToVBAMouseEvt, ApproveAll, nullptr } },
+ { OUString("mouseDragged"), { OUString("_MouseMove"), ooMouseEvtToVBAMouseEvt, DenyMouseDrag, nullptr } },
// keyPressed ooo event
- { OUString("keyPressed"), { OUString("_KeyDown"), ooKeyPressedToVBAKeyUpDown, ApproveAll, NULL } },
- { OUString("keyPressed"), { OUString("_KeyPress"), ooKeyPressedToVBAKeyPressed, ApproveAll, NULL } }
+ { OUString("keyPressed"), { OUString("_KeyDown"), ooKeyPressedToVBAKeyUpDown, ApproveAll, nullptr } },
+ { OUString("keyPressed"), { OUString("_KeyPress"), ooKeyPressedToVBAKeyPressed, ApproveAll, nullptr } }
};
EventInfoHash& getEventTransInfo()
@@ -647,7 +647,7 @@ private:
DECL_LINK( OnAsyncScriptEvent, ScriptEvent* );
#endif
void setShellFromModel();
- void firing_Impl( const ScriptEvent& evt, Any *pSyncRet=NULL ) throw( RuntimeException, std::exception );
+ void firing_Impl( const ScriptEvent& evt, Any *pSyncRet=nullptr ) throw( RuntimeException, std::exception );
Reference< XComponentContext > m_xContext;
Reference< frame::XModel > m_xModel;
@@ -657,7 +657,7 @@ private:
};
EventListener::EventListener( const Reference< XComponentContext >& rxContext ) :
-OPropertyContainer(GetBroadcastHelper()), m_xContext( rxContext ), m_bDocClosed(false), mpShell( 0 )
+OPropertyContainer(GetBroadcastHelper()), m_xContext( rxContext ), m_bDocClosed(false), mpShell( nullptr )
{
registerProperty( EVENTLSTNR_PROPERTY_MODEL, EVENTLSTNR_PROPERTY_ID_MODEL,
beans::PropertyAttribute::TRANSIENT, &m_xModel, cppu::UnoType<decltype(m_xModel)>::get() );
@@ -668,7 +668,7 @@ void
EventListener::setShellFromModel()
{
// reset mpShell
- mpShell = 0;
+ mpShell = nullptr;
SfxObjectShell* pShell = SfxObjectShell::GetFirst();
while ( m_xModel.is() && pShell )
{