Kaydet (Commit) 65464ed0 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:nullptr (automatic rewrite)

Change-Id: I9b7d8de65780325175d24965057596b88d3c0f05
üst d61d47ad
...@@ -76,7 +76,7 @@ namespace basprov ...@@ -76,7 +76,7 @@ namespace basprov
static Sequence< OUString > getSupportedServiceNames_BasicProviderImpl() static Sequence< OUString > getSupportedServiceNames_BasicProviderImpl()
{ {
static Sequence< OUString >* pNames = 0; static Sequence< OUString >* pNames = nullptr;
if ( !pNames ) if ( !pNames )
{ {
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
...@@ -98,10 +98,10 @@ namespace basprov ...@@ -98,10 +98,10 @@ namespace basprov
BasicProviderImpl::BasicProviderImpl( const Reference< XComponentContext >& xContext ) BasicProviderImpl::BasicProviderImpl( const Reference< XComponentContext >& xContext )
:m_pAppBasicManager( 0 ) :m_pAppBasicManager( nullptr )
,m_pDocBasicManager( 0 ) ,m_pDocBasicManager( nullptr )
,m_xLibContainerApp( 0 ) ,m_xLibContainerApp( nullptr )
,m_xLibContainerDoc( 0 ) ,m_xLibContainerDoc( nullptr )
,m_xContext( xContext ) ,m_xContext( xContext )
,m_bIsAppScriptCtx( true ) ,m_bIsAppScriptCtx( true )
,m_bIsUserCtx(true) ,m_bIsUserCtx(true)
...@@ -315,7 +315,7 @@ namespace basprov ...@@ -315,7 +315,7 @@ namespace basprov
// In some strange circumstances the Library name can have an // In some strange circumstances the Library name can have an
// apparently illegal '.' in it ( in imported VBA ) // apparently illegal '.' in it ( in imported VBA )
BasicManager* pBasicMgr = NULL; BasicManager* pBasicMgr = nullptr;
if ( aLocation == "document" ) if ( aLocation == "document" )
{ {
pBasicMgr = m_pDocBasicManager; pBasicMgr = m_pDocBasicManager;
...@@ -417,7 +417,7 @@ namespace basprov ...@@ -417,7 +417,7 @@ namespace basprov
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
Reference< script::XLibraryContainer > xLibContainer; Reference< script::XLibraryContainer > xLibContainer;
BasicManager* pBasicManager = NULL; BasicManager* pBasicManager = nullptr;
if ( m_bIsAppScriptCtx ) if ( m_bIsAppScriptCtx )
{ {
...@@ -516,9 +516,9 @@ namespace basprov ...@@ -516,9 +516,9 @@ namespace basprov
{ {
create_BasicProviderImpl, getImplementationName_BasicProviderImpl, create_BasicProviderImpl, getImplementationName_BasicProviderImpl,
getSupportedServiceNames_BasicProviderImpl, ::cppu::createSingleComponentFactory, getSupportedServiceNames_BasicProviderImpl, ::cppu::createSingleComponentFactory,
0, 0 nullptr, 0
}, },
{ 0, 0, 0, 0, 0, 0 } { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
}; };
......
...@@ -64,7 +64,7 @@ namespace basprov ...@@ -64,7 +64,7 @@ namespace basprov
,OPropertyContainer( GetBroadcastHelper() ) ,OPropertyContainer( GetBroadcastHelper() )
,m_xMethod( xMethod ) ,m_xMethod( xMethod )
,m_funcName( funcName ) ,m_funcName( funcName )
,m_documentBasicManager( NULL ) ,m_documentBasicManager( nullptr )
,m_xDocumentScriptContext() ,m_xDocumentScriptContext()
{ {
registerProperty( BASSCRIPT_PROPERTY_CALLER, BASSCRIPT_PROPERTY_ID_CALLER, BASSCRIPT_DEFAULT_ATTRIBS(), &m_caller, cppu::UnoType<decltype(m_caller)>::get() ); 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 ...@@ -107,7 +107,7 @@ namespace basprov
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint ); const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
if ( pSimpleHint && ( pSimpleHint->GetId() == SFX_HINT_DYING ) ) if ( pSimpleHint && ( pSimpleHint->GetId() == SFX_HINT_DYING ) )
{ {
m_documentBasicManager = NULL; m_documentBasicManager = nullptr;
EndListening( rBC ); // prevent multiple notifications EndListening( rBC ); // prevent multiple notifications
} }
} }
...@@ -285,7 +285,7 @@ namespace basprov ...@@ -285,7 +285,7 @@ namespace basprov
aReturn = sbxToUnoValue( xReturn ); aReturn = sbxToUnoValue( xReturn );
// reset parameters // reset parameters
m_xMethod->SetParameters( NULL ); m_xMethod->SetParameters( nullptr );
} }
return aReturn; return aReturn;
......
...@@ -427,7 +427,7 @@ namespace dlgprov ...@@ -427,7 +427,7 @@ namespace dlgprov
{ {
//::osl::MutexGuard aGuard( getMutex() ); //::osl::MutexGuard aGuard( getMutex() );
firing_impl( Event, NULL ); firing_impl( Event, nullptr );
} }
...@@ -667,7 +667,7 @@ namespace dlgprov ...@@ -667,7 +667,7 @@ namespace dlgprov
{ {
//::osl::MutexGuard aGuard( getMutex() ); //::osl::MutexGuard aGuard( getMutex() );
firing_impl( aScriptEvent, NULL ); firing_impl( aScriptEvent, nullptr );
} }
......
...@@ -186,7 +186,7 @@ static const char aResourceResolverPropName[] = "ResourceResolver"; ...@@ -186,7 +186,7 @@ static const char aResourceResolverPropName[] = "ResourceResolver";
::osl::Mutex& getMutex() ::osl::Mutex& getMutex()
{ {
static ::osl::Mutex* s_pMutex = 0; static ::osl::Mutex* s_pMutex = nullptr;
if ( !s_pMutex ) if ( !s_pMutex )
{ {
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
...@@ -206,7 +206,7 @@ static const char aResourceResolverPropName[] = "ResourceResolver"; ...@@ -206,7 +206,7 @@ static const char aResourceResolverPropName[] = "ResourceResolver";
DialogProviderImpl::DialogProviderImpl( const Reference< XComponentContext >& rxContext ) DialogProviderImpl::DialogProviderImpl( const Reference< XComponentContext >& rxContext )
:m_xContext( rxContext ) :m_xContext( rxContext )
,m_xModel( 0 ) ,m_xModel( nullptr )
{ {
} }
...@@ -526,7 +526,7 @@ static const char aResourceResolverPropName[] = "ResourceResolver"; ...@@ -526,7 +526,7 @@ static const char aResourceResolverPropName[] = "ResourceResolver";
Reference< XScriptEventsAttacher > xScriptEventsAttacher = new DialogEventsAttacherImpl Reference< XScriptEventsAttacher > xScriptEventsAttacher = new DialogEventsAttacherImpl
( m_xContext, m_xModel, rxControl, rxHandler, rxIntrospectionAccess, ( 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; Any aHelper;
xScriptEventsAttacher->attachEvents( aObjects, Reference< XScriptListener >(), aHelper ); xScriptEventsAttacher->attachEvents( aObjects, Reference< XScriptListener >(), aHelper );
...@@ -777,9 +777,9 @@ static const char aResourceResolverPropName[] = "ResourceResolver"; ...@@ -777,9 +777,9 @@ static const char aResourceResolverPropName[] = "ResourceResolver";
static struct ::cppu::ImplementationEntry s_component_entries [] = static struct ::cppu::ImplementationEntry s_component_entries [] =
{ {
{create_DialogProviderImpl, getImplementationName_DialogProviderImpl,getSupportedServiceNames_DialogProviderImpl, ::cppu::createSingleComponentFactory,0, 0}, {create_DialogProviderImpl, getImplementationName_DialogProviderImpl,getSupportedServiceNames_DialogProviderImpl, ::cppu::createSingleComponentFactory,nullptr, 0},
{ &comp_DialogModelProvider::_create,&comp_DialogModelProvider::_getImplementationName,&comp_DialogModelProvider::_getSupportedServiceNames,&::cppu::createSingleComponentFactory, 0, 0 }, { &comp_DialogModelProvider::_create,&comp_DialogModelProvider::_getImplementationName,&comp_DialogModelProvider::_getSupportedServiceNames,&::cppu::createSingleComponentFactory, nullptr, 0 },
{ 0, 0, 0, 0, 0, 0 } { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
}; };
......
...@@ -106,7 +106,7 @@ static css::uno::Reference< css::frame::XModel > tDocUrlToModel( const OUString& ...@@ -106,7 +106,7 @@ static css::uno::Reference< css::frame::XModel > tDocUrlToModel( const OUString&
try try
{ {
::ucbhelper::Content root( url, NULL, comphelper::getProcessComponentContext() ); ::ucbhelper::Content root( url, nullptr, comphelper::getProcessComponentContext() );
OUString propName = "DocumentModel"; OUString propName = "DocumentModel";
result = getUCBProperty( root, propName ); result = getUCBProperty( root, propName );
} }
......
...@@ -271,10 +271,10 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification( ...@@ -271,10 +271,10 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
{ {
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact != NULL ) if ( pFact != nullptr )
{ {
std::unique_ptr<VclAbstractDialog> pDlg( std::unique_ptr<VclAbstractDialog> pDlg(
pFact->CreateScriptErrorDialog( NULL, aException )); pFact->CreateScriptErrorDialog( nullptr, aException ));
if ( pDlg ) if ( pDlg )
pDlg->Execute(); pDlg->Execute();
...@@ -356,7 +356,7 @@ ScriptProtocolHandler::getScriptInvocation() ...@@ -356,7 +356,7 @@ ScriptProtocolHandler::getScriptInvocation()
Reference< XFrame > xFrame( m_xFrame.get(), UNO_QUERY ); Reference< XFrame > xFrame( m_xFrame.get(), UNO_QUERY );
if ( xFrame.is() ) if ( xFrame.is() )
{ {
SfxFrame* pFrame = NULL; SfxFrame* pFrame = nullptr;
for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) ) for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) )
{ {
if ( pFrame->GetFrameInterface() == xFrame ) if ( pFrame->GetFrameInterface() == xFrame )
...@@ -513,11 +513,11 @@ extern "C" ...@@ -513,11 +513,11 @@ extern "C"
(void)pRegistryKey; (void)pRegistryKey;
// Set default return value for this operation - if it failed. // Set default return value for this operation - if it failed.
void * pReturn = NULL ; void * pReturn = nullptr ;
if ( if (
( pImplementationName != NULL ) && ( pImplementationName != nullptr ) &&
( pServiceManager != NULL ) ( pServiceManager != nullptr )
) )
{ {
// Define variables which are used in following macros. // Define variables which are used in following macros.
......
...@@ -140,7 +140,7 @@ Reference< provider::XScriptProvider > ...@@ -140,7 +140,7 @@ Reference< provider::XScriptProvider >
OUStringBuffer buf; OUStringBuffer buf;
buf.append( "Failed to create MasterScriptProvider for ScriptInvocationContext: " ); buf.append( "Failed to create MasterScriptProvider for ScriptInvocationContext: " );
buf.append( "Component supporting XEmbeddScripts interface not found." ); 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 ); ::osl::MutexGuard guard( m_mutex );
...@@ -179,7 +179,7 @@ Reference< provider::XScriptProvider > ...@@ -179,7 +179,7 @@ Reference< provider::XScriptProvider >
buf.append( "Failed to create MasterScriptProvider for '" ); buf.append( "Failed to create MasterScriptProvider for '" );
buf.append ( context ); buf.append ( context );
buf.append( "': Either XEmbeddScripts or XScriptInvocationContext need to be supported by the document." ); 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 ); ::osl::MutexGuard guard( m_mutex );
......
...@@ -185,7 +185,7 @@ public: ...@@ -185,7 +185,7 @@ public:
explicit LocationBrowseNode( const Reference< browse::XBrowseNode >& node ) explicit LocationBrowseNode( const Reference< browse::XBrowseNode >& node )
{ {
m_sNodeName = node->getName(); m_sNodeName = node->getName();
m_hBNA = NULL; m_hBNA = nullptr;
m_origNode.set( node ); m_origNode.set( node );
} }
...@@ -211,7 +211,7 @@ public: ...@@ -211,7 +211,7 @@ public:
getChildNodes() getChildNodes()
throw ( RuntimeException, std::exception ) override throw ( RuntimeException, std::exception ) override
{ {
if ( m_hBNA == NULL ) if ( m_hBNA == nullptr )
{ {
loadChildNodes(); loadChildNodes();
} }
......
...@@ -74,7 +74,7 @@ bool endsWith( const OUString& target, ...@@ -74,7 +74,7 @@ bool endsWith( const OUString& target,
MasterScriptProvider::MasterScriptProvider( const Reference< XComponentContext > & xContext ) throw ( RuntimeException ): MasterScriptProvider::MasterScriptProvider( const Reference< XComponentContext > & xContext ) throw ( RuntimeException ):
m_xContext( xContext ), m_bIsValid( false ), m_bInitialised( false ), 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" ); ENSURE_OR_THROW( m_xContext.is(), "MasterScriptProvider::MasterScriptProvider: No context available\n" );
m_xMgr = m_xContext->getServiceManager(); m_xMgr = m_xContext->getServiceManager();
...@@ -89,7 +89,7 @@ MasterScriptProvider::~MasterScriptProvider() ...@@ -89,7 +89,7 @@ MasterScriptProvider::~MasterScriptProvider()
{ {
delete m_pPCache; delete m_pPCache;
} }
m_pPCache = 0; m_pPCache = nullptr;
} }
...@@ -861,26 +861,26 @@ static const struct cppu::ImplementationEntry s_entries [] = ...@@ -861,26 +861,26 @@ static const struct cppu::ImplementationEntry s_entries [] =
{ {
sp_create, sp_getImplementationName, sp_create, sp_getImplementationName,
sp_getSupportedServiceNames, cppu::createSingleComponentFactory, sp_getSupportedServiceNames, cppu::createSingleComponentFactory,
0, 0 nullptr, 0
}, },
{ {
urihelper_create, urihelper_create,
urihelper_getImplementationName, urihelper_getImplementationName,
urihelper_getSupportedServiceNames, urihelper_getSupportedServiceNames,
cppu::createSingleComponentFactory, cppu::createSingleComponentFactory,
0, 0 nullptr, 0
}, },
{ {
func_provider::mspf_create, func_provider::mspf_getImplementationName, func_provider::mspf_create, func_provider::mspf_getImplementationName,
func_provider::mspf_getSupportedServiceNames, cppu::createSingleComponentFactory, func_provider::mspf_getSupportedServiceNames, cppu::createSingleComponentFactory,
0, 0 nullptr, 0
}, },
{ {
browsenodefactory::bnf_create, browsenodefactory::bnf_getImplementationName, browsenodefactory::bnf_create, browsenodefactory::bnf_getImplementationName,
browsenodefactory::bnf_getSupportedServiceNames, cppu::createSingleComponentFactory, browsenodefactory::bnf_getSupportedServiceNames, cppu::createSingleComponentFactory,
0, 0 nullptr, 0
}, },
{ 0, 0, 0, 0, 0, 0 } { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
}; };
} }
......
...@@ -227,49 +227,49 @@ TypeList listBoxList = {&typeXListBox, 1}; ...@@ -227,49 +227,49 @@ TypeList listBoxList = {&typeXListBox, 1};
//this array stores the OO event to VBA event translation info //this array stores the OO event to VBA event translation info
static TranslatePropMap aTranslatePropMap_Impl[] = 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 // actionPerformed ooo event
{ OUString("actionPerformed"), { OUString("_Click"), NULL, ApproveAll, NULL } }, { OUString("actionPerformed"), { OUString("_Click"), nullptr, ApproveAll, nullptr } },
{ OUString("itemStateChanged"), { OUString("_Change"), NULL, ApproveType, static_cast<void*>(&radioButtonList) } }, { OUString("itemStateChanged"), { OUString("_Change"), nullptr, ApproveType, static_cast<void*>(&radioButtonList) } },
// itemStateChanged ooo event // 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 // changed ooo event
{ OUString("changed"), { OUString("_Change"), NULL, ApproveAll, NULL } }, { OUString("changed"), { OUString("_Change"), nullptr, ApproveAll, nullptr } },
// focusGained ooo event // focusGained ooo event
{ OUString("focusGained"), { OUString("_GotFocus"), NULL, ApproveAll, NULL } }, { OUString("focusGained"), { OUString("_GotFocus"), nullptr, ApproveAll, nullptr } },
// focusLost ooo event // focusLost ooo event
{ OUString("focusLost"), { OUString("_LostFocus"), NULL, ApproveAll, NULL } }, { OUString("focusLost"), { OUString("_LostFocus"), nullptr, ApproveAll, nullptr } },
{ OUString("focusLost"), { OUString("_Exit"), NULL, ApproveType, static_cast<void*>(&textCompList) } }, // support VBA TextBox_Exit event { OUString("focusLost"), { OUString("_Exit"), nullptr, ApproveType, static_cast<void*>(&textCompList) } }, // support VBA TextBox_Exit event
// adjustmentValueChanged ooo event // adjustmentValueChanged ooo event
{ OUString("adjustmentValueChanged"), { OUString("_Scroll"), NULL, ApproveAll, NULL } }, { OUString("adjustmentValueChanged"), { OUString("_Scroll"), nullptr, ApproveAll, nullptr } },
{ OUString("adjustmentValueChanged"), { OUString("_Change"), NULL, ApproveAll, NULL } }, { OUString("adjustmentValueChanged"), { OUString("_Change"), nullptr, ApproveAll, nullptr } },
// textChanged ooo event // textChanged ooo event
{ OUString("textChanged"), { OUString("_Change"), NULL, ApproveAll, NULL } }, { OUString("textChanged"), { OUString("_Change"), nullptr, ApproveAll, nullptr } },
// keyReleased ooo event // keyReleased ooo event
{ OUString("keyReleased"), { OUString("_KeyUp"), ooKeyPressedToVBAKeyUpDown, ApproveAll, NULL } }, { OUString("keyReleased"), { OUString("_KeyUp"), ooKeyPressedToVBAKeyUpDown, ApproveAll, nullptr } },
// mouseReleased ooo event // mouseReleased ooo event
{ OUString("mouseReleased"), { OUString("_Click"), ooMouseEvtToVBAMouseEvt, ApproveType, static_cast<void*>(&fixedTextList) } }, { 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 // mousePressed ooo event
{ OUString("mousePressed"), { OUString("_MouseDown"), ooMouseEvtToVBAMouseEvt, ApproveAll, NULL } }, { OUString("mousePressed"), { OUString("_MouseDown"), ooMouseEvtToVBAMouseEvt, ApproveAll, nullptr } },
{ OUString("mousePressed"), { OUString("_DblClick"), ooMouseEvtToVBADblClick, ApproveAll, NULL } }, { OUString("mousePressed"), { OUString("_DblClick"), ooMouseEvtToVBADblClick, ApproveAll, nullptr } },
// mouseMoved ooo event // mouseMoved ooo event
{ OUString("mouseMoved"), { OUString("_MouseMove"), ooMouseEvtToVBAMouseEvt, ApproveAll, NULL } }, { OUString("mouseMoved"), { OUString("_MouseMove"), ooMouseEvtToVBAMouseEvt, ApproveAll, nullptr } },
{ OUString("mouseDragged"), { OUString("_MouseMove"), ooMouseEvtToVBAMouseEvt, DenyMouseDrag, NULL } }, { OUString("mouseDragged"), { OUString("_MouseMove"), ooMouseEvtToVBAMouseEvt, DenyMouseDrag, nullptr } },
// keyPressed ooo event // keyPressed ooo event
{ OUString("keyPressed"), { OUString("_KeyDown"), ooKeyPressedToVBAKeyUpDown, ApproveAll, NULL } }, { OUString("keyPressed"), { OUString("_KeyDown"), ooKeyPressedToVBAKeyUpDown, ApproveAll, nullptr } },
{ OUString("keyPressed"), { OUString("_KeyPress"), ooKeyPressedToVBAKeyPressed, ApproveAll, NULL } } { OUString("keyPressed"), { OUString("_KeyPress"), ooKeyPressedToVBAKeyPressed, ApproveAll, nullptr } }
}; };
EventInfoHash& getEventTransInfo() EventInfoHash& getEventTransInfo()
...@@ -647,7 +647,7 @@ private: ...@@ -647,7 +647,7 @@ private:
DECL_LINK( OnAsyncScriptEvent, ScriptEvent* ); DECL_LINK( OnAsyncScriptEvent, ScriptEvent* );
#endif #endif
void setShellFromModel(); 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< XComponentContext > m_xContext;
Reference< frame::XModel > m_xModel; Reference< frame::XModel > m_xModel;
...@@ -657,7 +657,7 @@ private: ...@@ -657,7 +657,7 @@ private:
}; };
EventListener::EventListener( const Reference< XComponentContext >& rxContext ) : 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, registerProperty( EVENTLSTNR_PROPERTY_MODEL, EVENTLSTNR_PROPERTY_ID_MODEL,
beans::PropertyAttribute::TRANSIENT, &m_xModel, cppu::UnoType<decltype(m_xModel)>::get() ); beans::PropertyAttribute::TRANSIENT, &m_xModel, cppu::UnoType<decltype(m_xModel)>::get() );
...@@ -668,7 +668,7 @@ void ...@@ -668,7 +668,7 @@ void
EventListener::setShellFromModel() EventListener::setShellFromModel()
{ {
// reset mpShell // reset mpShell
mpShell = 0; mpShell = nullptr;
SfxObjectShell* pShell = SfxObjectShell::GetFirst(); SfxObjectShell* pShell = SfxObjectShell::GetFirst();
while ( m_xModel.is() && pShell ) while ( m_xModel.is() && pShell )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment