summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:14:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:24 +0100
commit09efeeb41a8a7f610ebbc3222e1231b5355f9904 (patch)
treee3cfae982652e132e5b78dc4ab845bdd8e2205ce /embeddedobj
parent217f7f236fd0ef0535cf11de35807bc5f1de9bb6 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I225d5fe2e3476121e2ca307d815d5615e32311d7
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx2
-rw-r--r--embeddedobj/source/commonembedding/miscobj.cxx20
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx2
-rw-r--r--embeddedobj/source/commonembedding/register.cxx2
-rw-r--r--embeddedobj/source/general/docholder.cxx14
-rw-r--r--embeddedobj/source/general/dummyobject.cxx4
-rw-r--r--embeddedobj/source/general/intercept.cxx8
-rw-r--r--embeddedobj/source/inc/dummyobject.hxx2
-rw-r--r--embeddedobj/source/msole/oleembed.cxx8
-rw-r--r--embeddedobj/source/msole/olemisc.cxx24
-rw-r--r--embeddedobj/source/msole/oleregister.cxx2
11 files changed, 44 insertions, 44 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index e24443217eeb..1c7886c61a2d 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -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);
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx
index 0601c03188c2..fcd2ff85361d 100644
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -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
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index c7b2d7ac8110..52107129d012 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -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 );
}
diff --git a/embeddedobj/source/commonembedding/register.cxx b/embeddedobj/source/commonembedding/register.cxx
index e1321f49c898..7c4ccfad8852 100644
--- a/embeddedobj/source/commonembedding/register.cxx
+++ b/embeddedobj/source/commonembedding/register.cxx
@@ -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;
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index 584253804ed0..e89695e25f5a 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -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;
diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx
index f6d8bfc3bcd6..caaf3881a450 100644
--- a/embeddedobj/source/general/dummyobject.cxx
+++ b/embeddedobj/source/general/dummyobject.cxx
@@ -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())
diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx
index 1a0c7f2aeae6..c37ae995b879 100644
--- a/embeddedobj/source/general/intercept.cxx
+++ b/embeddedobj/source/general/intercept.cxx
@@ -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);
}
}
diff --git a/embeddedobj/source/inc/dummyobject.hxx b/embeddedobj/source/inc/dummyobject.hxx
index 416b681a4801..1a0739c43dee 100644
--- a/embeddedobj/source/inc/dummyobject.hxx
+++ b/embeddedobj/source/inc/dummyobject.hxx
@@ -75,7 +75,7 @@ protected:
public:
ODummyEmbeddedObject()
- : m_pInterfaceContainer( NULL )
+ : m_pInterfaceContainer( nullptr )
, m_bDisposed( false )
, m_nObjectState( -1 )
, m_nCachedAspect( 0 )
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index 83647109296e..aeb7e5148a35 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -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;
}
}
diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx
index 24b3b73f8de8..9fdeb18b80a6 100644
--- a/embeddedobj/source/msole/olemisc.cxx
+++ b/embeddedobj/source/msole/olemisc.cxx
@@ -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())
diff --git a/embeddedobj/source/msole/oleregister.cxx b/embeddedobj/source/msole/oleregister.cxx
index 4ccdbdbc79e0..aa87776d0af4 100644
--- a/embeddedobj/source/msole/oleregister.cxx
+++ b/embeddedobj/source/msole/oleregister.cxx
@@ -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;