loplugin:nullptr (automatic rewrite)
Change-Id: I225d5fe2e3476121e2ca307d815d5615e32311d7
This commit is contained in:
parent
217f7f236f
commit
09efeeb41a
@ -119,7 +119,7 @@ void OCommonEmbeddedObject::StateChangeNotification_Impl( bool bBeforeChange, sa
|
||||
{
|
||||
::cppu::OInterfaceContainerHelper* pContainer = m_pInterfaceContainer->getContainer(
|
||||
cppu::UnoType<embed::XStateChangeListener>::get());
|
||||
if ( pContainer != NULL )
|
||||
if ( pContainer != nullptr )
|
||||
{
|
||||
lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >( this ) );
|
||||
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
|
||||
|
@ -41,8 +41,8 @@ using namespace ::com::sun::star;
|
||||
|
||||
OCommonEmbeddedObject::OCommonEmbeddedObject( const uno::Reference< uno::XComponentContext >& rxContext,
|
||||
const uno::Sequence< beans::NamedValue >& aObjProps )
|
||||
: m_pDocHolder( NULL )
|
||||
, m_pInterfaceContainer( NULL )
|
||||
: m_pDocHolder( nullptr )
|
||||
, m_pInterfaceContainer( nullptr )
|
||||
, m_bReadOnly( false )
|
||||
, m_bDisposed( false )
|
||||
, m_bClosed( false )
|
||||
@ -68,8 +68,8 @@ OCommonEmbeddedObject::OCommonEmbeddedObject(
|
||||
const uno::Sequence< beans::NamedValue >& aObjProps,
|
||||
const uno::Sequence< beans::PropertyValue >& aMediaDescr,
|
||||
const uno::Sequence< beans::PropertyValue >& aObjectDescr )
|
||||
: m_pDocHolder( NULL )
|
||||
, m_pInterfaceContainer( NULL )
|
||||
: m_pDocHolder( nullptr )
|
||||
, m_pInterfaceContainer( nullptr )
|
||||
, m_bReadOnly( false )
|
||||
, m_bDisposed( false )
|
||||
, m_bClosed( false )
|
||||
@ -271,7 +271,7 @@ OCommonEmbeddedObject::~OCommonEmbeddedObject()
|
||||
m_pInterfaceContainer->disposeAndClear( aSource );
|
||||
|
||||
delete m_pInterfaceContainer;
|
||||
m_pInterfaceContainer = NULL;
|
||||
m_pInterfaceContainer = nullptr;
|
||||
}
|
||||
} catch( const uno::Exception& ) {}
|
||||
|
||||
@ -285,7 +285,7 @@ OCommonEmbeddedObject::~OCommonEmbeddedObject()
|
||||
m_pDocHolder->FreeOffice();
|
||||
|
||||
m_pDocHolder->release();
|
||||
m_pDocHolder = NULL;
|
||||
m_pDocHolder = nullptr;
|
||||
}
|
||||
} catch( const uno::Exception& ) {}
|
||||
}
|
||||
@ -494,7 +494,7 @@ void SAL_CALL OCommonEmbeddedObject::close( sal_Bool bDeliverOwnership )
|
||||
{
|
||||
::cppu::OInterfaceContainerHelper* pContainer =
|
||||
m_pInterfaceContainer->getContainer( cppu::UnoType<util::XCloseListener>::get());
|
||||
if ( pContainer != NULL )
|
||||
if ( pContainer != nullptr )
|
||||
{
|
||||
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
|
||||
while (pIterator.hasMoreElements())
|
||||
@ -512,7 +512,7 @@ void SAL_CALL OCommonEmbeddedObject::close( sal_Bool bDeliverOwnership )
|
||||
|
||||
pContainer = m_pInterfaceContainer->getContainer(
|
||||
cppu::UnoType<util::XCloseListener>::get());
|
||||
if ( pContainer != NULL )
|
||||
if ( pContainer != nullptr )
|
||||
{
|
||||
::cppu::OInterfaceIteratorHelper pCloseIterator(*pContainer);
|
||||
while (pCloseIterator.hasMoreElements())
|
||||
@ -549,7 +549,7 @@ void SAL_CALL OCommonEmbeddedObject::close( sal_Bool bDeliverOwnership )
|
||||
if ( bDeliverOwnership )
|
||||
{
|
||||
m_pDocHolder->release();
|
||||
m_pDocHolder = NULL;
|
||||
m_pDocHolder = nullptr;
|
||||
m_bClosed = true;
|
||||
}
|
||||
|
||||
@ -559,7 +559,7 @@ void SAL_CALL OCommonEmbeddedObject::close( sal_Bool bDeliverOwnership )
|
||||
m_pDocHolder->FreeOffice();
|
||||
|
||||
m_pDocHolder->release();
|
||||
m_pDocHolder = NULL;
|
||||
m_pDocHolder = nullptr;
|
||||
}
|
||||
|
||||
// TODO: for now the storage will be disposed by the object, but after the document
|
||||
|
@ -1752,7 +1752,7 @@ void SAL_CALL OCommonEmbeddedObject::reload(
|
||||
|
||||
// TODO/LATER: probably the document holder could be cleaned explicitly as in the destructor
|
||||
m_pDocHolder->release();
|
||||
m_pDocHolder = NULL;
|
||||
m_pDocHolder = nullptr;
|
||||
|
||||
LinkInit_Impl( aObject, lArguments, lObjArgs );
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL embobj_component_getFactory(
|
||||
const sal_Char * pImplName, void * pServiceManager,
|
||||
SAL_UNUSED_PARAMETER void * /*pRegistryKey*/ )
|
||||
{
|
||||
void * pRet = 0;
|
||||
void * pRet = nullptr;
|
||||
|
||||
OUString aImplName( OUString::createFromAscii( pImplName ) );
|
||||
uno::Reference< lang::XSingleServiceFactory > xFactory;
|
||||
|
@ -149,7 +149,7 @@ static void InsertMenu_Impl( const uno::Reference< container::XIndexContainer >&
|
||||
DocumentHolder::DocumentHolder( const uno::Reference< uno::XComponentContext >& xContext,
|
||||
OCommonEmbeddedObject* pEmbObj )
|
||||
: m_pEmbedObj( pEmbObj ),
|
||||
m_pInterceptor( NULL ),
|
||||
m_pInterceptor( nullptr ),
|
||||
m_xContext( xContext ),
|
||||
m_bReadOnly( false ),
|
||||
m_bWaitForClose( false ),
|
||||
@ -293,7 +293,7 @@ void DocumentHolder::CloseDocument( bool bDeliverOwnership, bool bWaitForClose )
|
||||
}
|
||||
}
|
||||
|
||||
m_xComponent = 0;
|
||||
m_xComponent = nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -739,7 +739,7 @@ bool DocumentHolder::ShowUI( const uno::Reference< css::frame::XLayoutManager >&
|
||||
{
|
||||
uno::Reference< frame::XFramesSupplier > xSupp( m_xFrame->getCreator(), uno::UNO_QUERY );
|
||||
if ( xSupp.is() )
|
||||
xSupp->setActiveFrame( 0 );
|
||||
xSupp->setActiveFrame( nullptr );
|
||||
|
||||
// remove control about containers window from own LM
|
||||
if ( bLock )
|
||||
@ -789,7 +789,7 @@ bool DocumentHolder::HideUI( const uno::Reference< css::frame::XLayoutManager >&
|
||||
try {
|
||||
uno::Reference< frame::XFramesSupplier > xSupp( m_xFrame->getCreator(), uno::UNO_QUERY );
|
||||
if ( xSupp.is() )
|
||||
xSupp->setActiveFrame( 0 );
|
||||
xSupp->setActiveFrame( nullptr );
|
||||
|
||||
uno::Reference< css::ui::XDockingAreaAcceptor > xDocAreaAcc = xOwnLM->getDockingAreaAcceptor();
|
||||
|
||||
@ -834,7 +834,7 @@ uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame()
|
||||
{
|
||||
m_pInterceptor->DisconnectDocHolder();
|
||||
m_pInterceptor->release();
|
||||
m_pInterceptor = NULL;
|
||||
m_pInterceptor = nullptr;
|
||||
}
|
||||
|
||||
m_pInterceptor = new Interceptor( this );
|
||||
@ -1096,7 +1096,7 @@ void SAL_CALL DocumentHolder::disposing( const css::lang::EventObject& aSource )
|
||||
{
|
||||
if ( m_xComponent.is() && m_xComponent == aSource.Source )
|
||||
{
|
||||
m_xComponent = 0;
|
||||
m_xComponent = nullptr;
|
||||
if ( m_bWaitForClose )
|
||||
{
|
||||
m_bWaitForClose = false;
|
||||
@ -1127,7 +1127,7 @@ void SAL_CALL DocumentHolder::notifyClosing( const lang::EventObject& aSource )
|
||||
{
|
||||
if ( m_xComponent.is() && m_xComponent == aSource.Source )
|
||||
{
|
||||
m_xComponent = 0;
|
||||
m_xComponent = nullptr;
|
||||
if ( m_bWaitForClose )
|
||||
{
|
||||
m_bWaitForClose = false;
|
||||
|
@ -627,7 +627,7 @@ void SAL_CALL ODummyEmbeddedObject::close( sal_Bool bDeliverOwnership )
|
||||
{
|
||||
::cppu::OInterfaceContainerHelper* pContainer =
|
||||
m_pInterfaceContainer->getContainer( cppu::UnoType<util::XCloseListener>::get());
|
||||
if ( pContainer != NULL )
|
||||
if ( pContainer != nullptr )
|
||||
{
|
||||
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
|
||||
while (pIterator.hasMoreElements())
|
||||
@ -645,7 +645,7 @@ void SAL_CALL ODummyEmbeddedObject::close( sal_Bool bDeliverOwnership )
|
||||
|
||||
pContainer = m_pInterfaceContainer->getContainer(
|
||||
cppu::UnoType<util::XCloseListener>::get());
|
||||
if ( pContainer != NULL )
|
||||
if ( pContainer != nullptr )
|
||||
{
|
||||
::cppu::OInterfaceIteratorHelper pCloseIterator(*pContainer);
|
||||
while (pCloseIterator.hasMoreElements())
|
||||
|
@ -43,13 +43,13 @@ public:
|
||||
void Interceptor::DisconnectDocHolder()
|
||||
{
|
||||
osl::MutexGuard aGuard( m_aMutex );
|
||||
m_pDocHolder = NULL;
|
||||
m_pDocHolder = nullptr;
|
||||
}
|
||||
|
||||
Interceptor::Interceptor( DocumentHolder* pDocHolder )
|
||||
: m_pDocHolder( pDocHolder ),
|
||||
m_pDisposeEventListeners(0),
|
||||
m_pStatCL(0)
|
||||
m_pDisposeEventListeners(nullptr),
|
||||
m_pStatCL(nullptr)
|
||||
{
|
||||
m_aInterceptedURL[0] = ".uno:Save";
|
||||
m_aInterceptedURL[1] = ".uno:SaveAll";
|
||||
@ -263,7 +263,7 @@ Interceptor::queryDispatch(
|
||||
return m_xSlaveDispatchProvider->queryDispatch(
|
||||
URL,TargetFrameName,SearchFlags);
|
||||
else
|
||||
return uno::Reference<frame::XDispatch>(0);
|
||||
return uno::Reference<frame::XDispatch>(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ protected:
|
||||
public:
|
||||
|
||||
ODummyEmbeddedObject()
|
||||
: m_pInterfaceContainer( NULL )
|
||||
: m_pInterfaceContainer( nullptr )
|
||||
, m_bDisposed( false )
|
||||
, m_nObjectState( -1 )
|
||||
, m_nCachedAspect( 0 )
|
||||
|
@ -126,7 +126,7 @@ void OleEmbeddedObject::MoveListeners()
|
||||
{
|
||||
::cppu::OInterfaceContainerHelper* pStateChangeContainer =
|
||||
m_pInterfaceContainer->getContainer( cppu::UnoType<embed::XStateChangeListener>::get());
|
||||
if ( pStateChangeContainer != NULL )
|
||||
if ( pStateChangeContainer != nullptr )
|
||||
{
|
||||
uno::Reference< embed::XStateChangeBroadcaster > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
|
||||
if ( xWrappedObject.is() )
|
||||
@ -151,7 +151,7 @@ void OleEmbeddedObject::MoveListeners()
|
||||
{
|
||||
::cppu::OInterfaceContainerHelper* pEventContainer =
|
||||
m_pInterfaceContainer->getContainer( cppu::UnoType<document::XEventListener>::get());
|
||||
if ( pEventContainer != NULL )
|
||||
if ( pEventContainer != nullptr )
|
||||
{
|
||||
uno::Reference< document::XEventBroadcaster > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
|
||||
if ( xWrappedObject.is() )
|
||||
@ -176,7 +176,7 @@ void OleEmbeddedObject::MoveListeners()
|
||||
{
|
||||
::cppu::OInterfaceContainerHelper* pCloseContainer =
|
||||
m_pInterfaceContainer->getContainer( cppu::UnoType<util::XCloseListener>::get());
|
||||
if ( pCloseContainer != NULL )
|
||||
if ( pCloseContainer != nullptr )
|
||||
{
|
||||
uno::Reference< util::XCloseBroadcaster > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
|
||||
if ( xWrappedObject.is() )
|
||||
@ -198,7 +198,7 @@ void OleEmbeddedObject::MoveListeners()
|
||||
}
|
||||
|
||||
delete m_pInterfaceContainer;
|
||||
m_pInterfaceContainer = NULL;
|
||||
m_pInterfaceContainer = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,8 +44,8 @@ using namespace ::com::sun::star;
|
||||
OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceFactory >& xFactory,
|
||||
const uno::Sequence< sal_Int8 >& aClassID,
|
||||
const OUString& aClassName )
|
||||
: m_pOleComponent( NULL )
|
||||
, m_pInterfaceContainer( NULL )
|
||||
: m_pOleComponent( nullptr )
|
||||
, m_pInterfaceContainer( nullptr )
|
||||
, m_bReadOnly( false )
|
||||
, m_bDisposed( false )
|
||||
, m_nObjectState( -1 )
|
||||
@ -68,7 +68,7 @@ OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceF
|
||||
, m_bGotStatus( false )
|
||||
, m_nStatus( 0 )
|
||||
, m_nStatusAspect( 0 )
|
||||
, m_pOwnView( NULL )
|
||||
, m_pOwnView( nullptr )
|
||||
, m_bFromClipboard( false )
|
||||
, m_bTriedConversion( false )
|
||||
{
|
||||
@ -78,8 +78,8 @@ OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceF
|
||||
// In case of loading from persistent entry the classID of the object
|
||||
// will be retrieved from the entry, during construction it is unknown
|
||||
OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceFactory >& xFactory, bool bLink )
|
||||
: m_pOleComponent( NULL )
|
||||
, m_pInterfaceContainer( NULL )
|
||||
: m_pOleComponent( nullptr )
|
||||
, m_pInterfaceContainer( nullptr )
|
||||
, m_bReadOnly( false )
|
||||
, m_bDisposed( false )
|
||||
, m_nObjectState( -1 )
|
||||
@ -100,7 +100,7 @@ OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceF
|
||||
, m_bGotStatus( false )
|
||||
, m_nStatus( 0 )
|
||||
, m_nStatusAspect( 0 )
|
||||
, m_pOwnView( NULL )
|
||||
, m_pOwnView( nullptr )
|
||||
, m_bFromClipboard( false )
|
||||
, m_bTriedConversion( false )
|
||||
{
|
||||
@ -167,7 +167,7 @@ void OleEmbeddedObject::MakeEventListenerNotification_Impl( const OUString& aEve
|
||||
::cppu::OInterfaceContainerHelper* pContainer =
|
||||
m_pInterfaceContainer->getContainer(
|
||||
cppu::UnoType<document::XEventListener>::get());
|
||||
if ( pContainer != NULL )
|
||||
if ( pContainer != nullptr )
|
||||
{
|
||||
document::EventObject aEvent( static_cast< ::cppu::OWeakObject* >( this ), aEventName );
|
||||
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
|
||||
@ -263,14 +263,14 @@ void OleEmbeddedObject::Dispose()
|
||||
lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >( this ) );
|
||||
m_pInterfaceContainer->disposeAndClear( aSource );
|
||||
delete m_pInterfaceContainer;
|
||||
m_pInterfaceContainer = NULL;
|
||||
m_pInterfaceContainer = nullptr;
|
||||
}
|
||||
|
||||
if ( m_pOwnView )
|
||||
{
|
||||
m_pOwnView->Close();
|
||||
m_pOwnView->release();
|
||||
m_pOwnView = NULL;
|
||||
m_pOwnView = nullptr;
|
||||
}
|
||||
|
||||
if ( m_pOleComponent )
|
||||
@ -393,7 +393,7 @@ uno::Reference< util::XCloseable > SAL_CALL OleEmbeddedObject::getComponent()
|
||||
}
|
||||
#endif
|
||||
|
||||
assert(m_pOleComponent == 0);
|
||||
assert(m_pOleComponent == nullptr);
|
||||
// TODO/LATER: Is it correct???
|
||||
return uno::Reference< util::XCloseable >();
|
||||
// throw uno::RuntimeException(); // TODO
|
||||
@ -472,7 +472,7 @@ void SAL_CALL OleEmbeddedObject::close( sal_Bool bDeliverOwnership )
|
||||
{
|
||||
::cppu::OInterfaceContainerHelper* pContainer =
|
||||
m_pInterfaceContainer->getContainer( cppu::UnoType<util::XCloseListener>::get());
|
||||
if ( pContainer != NULL )
|
||||
if ( pContainer != nullptr )
|
||||
{
|
||||
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
|
||||
while (pIterator.hasMoreElements())
|
||||
@ -490,7 +490,7 @@ void SAL_CALL OleEmbeddedObject::close( sal_Bool bDeliverOwnership )
|
||||
|
||||
pContainer = m_pInterfaceContainer->getContainer(
|
||||
cppu::UnoType<util::XCloseListener>::get());
|
||||
if ( pContainer != NULL )
|
||||
if ( pContainer != nullptr )
|
||||
{
|
||||
::cppu::OInterfaceIteratorHelper pCloseIterator(*pContainer);
|
||||
while (pCloseIterator.hasMoreElements())
|
||||
|
@ -36,7 +36,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL emboleobj_component_getFactory(
|
||||
const sal_Char * pImplName, void * pServiceManager,
|
||||
SAL_UNUSED_PARAMETER void * /*pRegistryKey*/ )
|
||||
{
|
||||
void * pRet = 0;
|
||||
void * pRet = nullptr;
|
||||
|
||||
OUString aImplName( OUString::createFromAscii( pImplName ) );
|
||||
uno::Reference< lang::XSingleServiceFactory > xFactory;
|
||||
|
Loading…
x
Reference in New Issue
Block a user