summaryrefslogtreecommitdiff
path: root/toolkit/source/controls
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:26:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:54 +0100
commit175e2adfd1677cb83373b0ba47853493f3b77859 (patch)
tree8509fc88a7b4875ece2b50530e35bef17d9d4d29 /toolkit/source/controls
parenta9b4c9ca3df362cbe0f7904003197bcadd607215 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: Ied9204441c07f1f6a6026c8c1a2fa21b93b98e1a
Diffstat (limited to 'toolkit/source/controls')
-rw-r--r--toolkit/source/controls/accessiblecontrolcontext.cxx10
-rw-r--r--toolkit/source/controls/animatedimages.cxx4
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx8
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx12
-rw-r--r--toolkit/source/controls/formattedcontrol.cxx2
-rw-r--r--toolkit/source/controls/geometrycontrolmodel.cxx6
-rw-r--r--toolkit/source/controls/grid/defaultgridcolumnmodel.cxx4
-rw-r--r--toolkit/source/controls/grid/gridcolumn.cxx2
-rw-r--r--toolkit/source/controls/grid/gridcontrol.cxx2
-rw-r--r--toolkit/source/controls/grid/sortablegriddatamodel.cxx2
-rw-r--r--toolkit/source/controls/roadmapcontrol.cxx2
-rw-r--r--toolkit/source/controls/stdtabcontroller.cxx6
-rw-r--r--toolkit/source/controls/stdtabcontrollermodel.cxx2
-rw-r--r--toolkit/source/controls/tabpagecontainer.cxx4
-rw-r--r--toolkit/source/controls/tabpagemodel.cxx2
-rw-r--r--toolkit/source/controls/tkscrollbar.cxx2
-rw-r--r--toolkit/source/controls/tkspinbutton.cxx2
-rw-r--r--toolkit/source/controls/tree/treecontrol.cxx4
-rw-r--r--toolkit/source/controls/tree/treedatamodel.cxx6
-rw-r--r--toolkit/source/controls/unocontrol.cxx22
-rw-r--r--toolkit/source/controls/unocontrolcontainer.cxx8
-rw-r--r--toolkit/source/controls/unocontrolcontainermodel.cxx2
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx8
-rw-r--r--toolkit/source/controls/unocontrols.cxx38
24 files changed, 80 insertions, 80 deletions
diff --git a/toolkit/source/controls/accessiblecontrolcontext.cxx b/toolkit/source/controls/accessiblecontrolcontext.cxx
index 3c23acff6f89..33e99cebdd3e 100644
--- a/toolkit/source/controls/accessiblecontrolcontext.cxx
+++ b/toolkit/source/controls/accessiblecontrolcontext.cxx
@@ -86,7 +86,7 @@ namespace toolkit
OAccessibleControlContext* OAccessibleControlContext::create( const Reference< XAccessible >& _rxCreator )
{
- OAccessibleControlContext* pNew = NULL;
+ OAccessibleControlContext* pNew = nullptr;
try
{
pNew = new OAccessibleControlContext;
@@ -164,7 +164,7 @@ namespace toolkit
Reference< XAccessibleRelationSet > SAL_CALL OAccessibleControlContext::getAccessibleRelationSet( ) throw (RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
@@ -173,7 +173,7 @@ namespace toolkit
::osl::MutexGuard aGuard( GetMutex() );
// no OContextEntryGuard here, as we do not want to throw an exception in case we're not alive anymore
- ::utl::AccessibleStateSetHelper* pStateSet = NULL;
+ ::utl::AccessibleStateSetHelper* pStateSet = nullptr;
if ( isAlive() )
{
// no own states, only the ones which are foreign controlled
@@ -264,7 +264,7 @@ namespace toolkit
// ugly, but .... though the XWindow has a getPosSize, it is impossible to determine the
// parent which this position/size is relative to. This means we must tunnel UNO and ask the
// implementation
- vcl::Window* pVCLParent = pVCLWindow ? pVCLWindow->GetParent() : NULL;
+ vcl::Window* pVCLParent = pVCLWindow ? pVCLWindow->GetParent() : nullptr;
// the relative location of the window
::Point aWindowRelativePos( 0, 0);
@@ -300,7 +300,7 @@ namespace toolkit
Reference< XAccessible > SAL_CALL OAccessibleControlContext::getAccessibleAtPoint( const awt::Point& /* _rPoint */ ) throw (RuntimeException, std::exception)
{
// no children at all
- return NULL;
+ return nullptr;
}
diff --git a/toolkit/source/controls/animatedimages.cxx b/toolkit/source/controls/animatedimages.cxx
index 55df02f25af3..aa45bdaabcca 100644
--- a/toolkit/source/controls/animatedimages.cxx
+++ b/toolkit/source/controls/animatedimages.cxx
@@ -226,7 +226,7 @@ namespace toolkit {
const sal_Int32 i_accessor, const Sequence< OUString >& i_imageURLs, const Reference< XInterface >& i_context )
{
::cppu::OInterfaceContainerHelper* pContainerListeners = i_broadcaseHelper.getContainer( cppu::UnoType<XContainerListener>::get() );
- if ( pContainerListeners == NULL )
+ if ( pContainerListeners == nullptr )
return;
ContainerEvent aEvent;
@@ -351,7 +351,7 @@ namespace toolkit {
::cppu::IPropertyArrayHelper& SAL_CALL AnimatedImagesControlModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
Sequence< sal_Int32 > aIDs = ImplGetPropertyIds();
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 0e615ec2c5fe..6269f38fd3c3 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -249,7 +249,7 @@ Any ControlModelContainerBase::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& ControlModelContainerBase::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -328,7 +328,7 @@ Reference< XInterface > ControlModelContainerBase::createInstance( const OUStrin
{
SolarMutexGuard aGuard;
- OGeometryControlModel_Base* pNewModel = NULL;
+ OGeometryControlModel_Base* pNewModel = nullptr;
if ( aServiceSpecifier == "com.sun.star.awt.UnoControlEditModel" )
pNewModel = new OGeometryControlModel< UnoControlEditModel >( m_xContext );
@@ -422,7 +422,7 @@ Reference< XInterface > ControlModelContainerBase::createInstanceWithArguments(
Sequence< OUString > ControlModelContainerBase::getAvailableServiceNames() throw(RuntimeException, std::exception)
{
- static Sequence< OUString >* pNamesSeq = NULL;
+ static Sequence< OUString >* pNamesSeq = nullptr;
if ( !pNamesSeq )
{
pNamesSeq = new Sequence< OUString >( 26 );
@@ -1498,7 +1498,7 @@ sal_Bool ControlContainerBase::setModel( const Reference< XControlModel >& rxMod
// destroy the old tab controller, if existent
if ( mxTabController.is() )
{
- mxTabController->setModel( NULL ); // just to be sure, should not be necessary
+ mxTabController->setModel( nullptr ); // just to be sure, should not be necessary
removeTabController( mxTabController );
::comphelper::disposeComponent( mxTabController ); // just to be sure, should not be necessary
mxTabController.clear();
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 48b5db568b88..e46281434897 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -277,7 +277,7 @@ Any UnoControlDialogModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& UnoControlDialogModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -824,7 +824,7 @@ void UnoMultiPageControl::bindPage( const uno::Reference< awt::XControl >& _rxCo
uno::Reference< beans::XPropertySet > xProps( _rxControl->getModel(), uno::UNO_QUERY );
VCLXTabPage* pXPage = dynamic_cast< VCLXTabPage* >( xPage.get() );
- TabPage* pPage = pXPage ? pXPage->getTabPage() : NULL;
+ TabPage* pPage = pXPage ? pXPage->getTabPage() : nullptr;
if ( xTabCntrl.is() && pPage )
{
VCLXMultiPage* pXTab = dynamic_cast< VCLXMultiPage* >( xTabCntrl.get() );
@@ -873,7 +873,7 @@ void UnoMultiPageControl::impl_createControlPeerIfNecessary( const uno::Refer
if( xMyPeer.is() )
{
- _rxControl->createPeer( NULL, xMyPeer );
+ _rxControl->createPeer( nullptr, xMyPeer );
bindPage( _rxControl );
ImplActivateTabControllers();
}
@@ -946,7 +946,7 @@ uno::Any UnoMultiPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& UnoMultiPageModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -1066,7 +1066,7 @@ uno::Any UnoPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& UnoPageModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -1245,7 +1245,7 @@ uno::Any UnoFrameModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& UnoFrameModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx
index 5cd650da2d6b..8a567b27fa3b 100644
--- a/toolkit/source/controls/formattedcontrol.cxx
+++ b/toolkit/source/controls/formattedcontrol.cxx
@@ -401,7 +401,7 @@ namespace toolkit
::cppu::IPropertyArrayHelper& UnoControlFormattedFieldModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx
index 600c8d81930e..c0707d1d97ea 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -81,7 +81,7 @@
,m_nStep(0)
,m_bCloneable(false)
{
- OSL_ENSURE(NULL != _pAggregateInstance, "OGeometryControlModel_Base::OGeometryControlModel_Base: invalid aggregate!");
+ OSL_ENSURE(nullptr != _pAggregateInstance, "OGeometryControlModel_Base::OGeometryControlModel_Base: invalid aggregate!");
osl_atomic_increment(&m_refCount);
{
@@ -291,8 +291,8 @@
{
// release the aggregate (_before_ clearing m_xAggregate)
if (m_xAggregate.is())
- m_xAggregate->setDelegator(NULL);
- setAggregation(NULL);
+ m_xAggregate->setDelegator(nullptr);
+ setAggregation(nullptr);
}
diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
index 8de9356bffd0..41d95d5f8824 100644
--- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
+++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
@@ -114,7 +114,7 @@ private:
Reference< XGridColumn > const xClone( xCloneable->createClone(), UNO_QUERY_THROW );
GridColumn* const pGridColumn = GridColumn::getImplementation( xClone );
- if ( pGridColumn == NULL )
+ if ( pGridColumn == nullptr )
throw RuntimeException( "invalid clone source implementation", *this );
// that's indeed a RuntimeException, not an IllegalArgumentException or some such:
// a DefaultGridColumnModel implementation whose columns are not GridColumn implementations
@@ -157,7 +157,7 @@ private:
::comphelper::ComponentGuard aGuard( *this, rBHelper );
GridColumn* const pGridColumn = GridColumn::getImplementation( i_column );
- if ( pGridColumn == NULL )
+ if ( pGridColumn == nullptr )
throw css::lang::IllegalArgumentException( "invalid column implementation", *this, 1 );
m_aColumns.push_back( i_column );
diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx
index 39eaa564c270..90f79dae8fa8 100644
--- a/toolkit/source/controls/grid/gridcolumn.cxx
+++ b/toolkit/source/controls/grid/gridcolumn.cxx
@@ -305,7 +305,7 @@ namespace toolkit
Reference< XUnoTunnel > const xTunnel( i_component, UNO_QUERY );
if ( xTunnel.is() )
return reinterpret_cast< GridColumn* >( ::sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething( getUnoTunnelId() ) ) );
- return NULL;
+ return nullptr;
}
}
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx
index 3fb05f95790c..a3991bcfb2c4 100644
--- a/toolkit/source/controls/grid/gridcontrol.cxx
+++ b/toolkit/source/controls/grid/gridcontrol.cxx
@@ -251,7 +251,7 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& UnoGridModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx
index 7de6d318ce9e..e8809a16d2a1 100644
--- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx
+++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx
@@ -345,7 +345,7 @@ private:
GridDataEvent const & i_publicEvent, MethodGuard& i_instanceLock )
{
::cppu::OInterfaceContainerHelper* pListeners = rBHelper.getContainer( cppu::UnoType<XGridDataListener>::get() );
- if ( pListeners == NULL )
+ if ( pListeners == nullptr )
return;
i_instanceLock.clear();
diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx
index 139d2fdaef94..4b13004d243d 100644
--- a/toolkit/source/controls/roadmapcontrol.cxx
+++ b/toolkit/source/controls/roadmapcontrol.cxx
@@ -160,7 +160,7 @@ static void lcl_throwIndexOutOfBoundsException( )
::cppu::IPropertyArrayHelper& UnoControlRoadmapModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx
index e6a5387a7318..d4ecae320b20 100644
--- a/toolkit/source/controls/stdtabcontroller.cxx
+++ b/toolkit/source/controls/stdtabcontroller.cxx
@@ -89,7 +89,7 @@ bool StdTabController::ImplCreateComponentSequence(
sal_uInt32 nCtrls = rControls.getLength();
rComponents.realloc( nCtrls );
Reference< XWindow > * pComps = rComponents.getArray();
- Any* pTabs = NULL;
+ Any* pTabs = nullptr;
if ( pTabStops )
@@ -247,7 +247,7 @@ void StdTabController::autoTabOrder( ) throw(RuntimeException, std::exception)
// #58317# Some Models may be missing from the Container. Plus there is a
// autoTabOrder call later on.
- if( !ImplCreateComponentSequence( aControls, aSeq, aCompSeq, NULL, false ) )
+ if( !ImplCreateComponentSequence( aControls, aSeq, aCompSeq, nullptr, false ) )
return;
sal_uInt32 nCtrls = aCompSeq.getLength();
@@ -345,7 +345,7 @@ void StdTabController::activateTabOrder( ) throw(RuntimeException, std::excepti
aControlComponents.realloc( 0 );
- ImplCreateComponentSequence( aControls, aThisGroupModels, aControlComponents, NULL, true );
+ ImplCreateComponentSequence( aControls, aThisGroupModels, aControlComponents, nullptr, true );
xVclContainerPeer->setGroup( aControlComponents );
}
}
diff --git a/toolkit/source/controls/stdtabcontrollermodel.cxx b/toolkit/source/controls/stdtabcontrollermodel.cxx
index 139307a2822c..f9c0f9c0d154 100644
--- a/toolkit/source/controls/stdtabcontrollermodel.cxx
+++ b/toolkit/source/controls/stdtabcontrollermodel.cxx
@@ -70,7 +70,7 @@ size_t UnoControlModelEntryList::size() const {
}
UnoControlModelEntry* UnoControlModelEntryList::operator[]( size_t i ) const {
- return ( i < maList.size() ) ? maList[ i ] : NULL;
+ return ( i < maList.size() ) ? maList[ i ] : nullptr;
}
void UnoControlModelEntryList::push_back( UnoControlModelEntry* item ) {
diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx
index 68cbdda95621..58c3fe4ff400 100644
--- a/toolkit/source/controls/tabpagecontainer.cxx
+++ b/toolkit/source/controls/tabpagecontainer.cxx
@@ -81,7 +81,7 @@ uno::Any UnoControlTabPageContainerModel::ImplGetDefaultValue( sal_uInt16 nPropI
::cppu::IPropertyArrayHelper& UnoControlTabPageContainerModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
css::uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -125,7 +125,7 @@ namespace
{
DBG_UNHANDLED_EXCEPTION();
}
- return NULL;
+ return nullptr;
}
}
diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx
index 175f06392324..fe86a22c3882 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -95,7 +95,7 @@ Any UnoControlTabPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& UnoControlTabPageModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
diff --git a/toolkit/source/controls/tkscrollbar.cxx b/toolkit/source/controls/tkscrollbar.cxx
index b08216cb2d8a..150f911a1cf4 100644
--- a/toolkit/source/controls/tkscrollbar.cxx
+++ b/toolkit/source/controls/tkscrollbar.cxx
@@ -83,7 +83,7 @@ namespace toolkit
::cppu::IPropertyArrayHelper& UnoControlScrollBarModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
diff --git a/toolkit/source/controls/tkspinbutton.cxx b/toolkit/source/controls/tkspinbutton.cxx
index 7f46bc83c3b5..47263967c2c9 100644
--- a/toolkit/source/controls/tkspinbutton.cxx
+++ b/toolkit/source/controls/tkspinbutton.cxx
@@ -170,7 +170,7 @@ public:
::cppu::IPropertyArrayHelper& UnoSpinButtonModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx
index 70196f6ccb5f..ffc9109822e8 100644
--- a/toolkit/source/controls/tree/treecontrol.cxx
+++ b/toolkit/source/controls/tree/treecontrol.cxx
@@ -93,7 +93,7 @@ Any UnoTreeModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
case BASEPROPERTY_ROW_HEIGHT:
return Any( sal_Int32( 0 ) );
case BASEPROPERTY_TREE_DATAMODEL:
- return Any( Reference< XTreeDataModel >( 0 ) );
+ return Any( Reference< XTreeDataModel >( nullptr ) );
case BASEPROPERTY_TREE_EDITABLE:
case BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING:
return Any( sal_False );
@@ -110,7 +110,7 @@ Any UnoTreeModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& UnoTreeModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx
index ad9a9031909a..b0a0c20630cf 100644
--- a/toolkit/source/controls/tree/treedatamodel.cxx
+++ b/toolkit/source/controls/tree/treedatamodel.cxx
@@ -266,7 +266,7 @@ Sequence< OUString > SAL_CALL MutableTreeDataModel::getSupportedServiceNames( )
MutableTreeNode::MutableTreeNode( const MutableTreeDataModelRef& xModel, const Any& rValue, bool bChildrenOnDemand )
: maDisplayValue( rValue )
, mbHasChildrenOnDemand( bChildrenOnDemand )
-, mpParent( 0 )
+, mpParent( nullptr )
, mxModel( xModel )
, mbIsInserted( false )
{
@@ -276,7 +276,7 @@ MutableTreeNode::~MutableTreeNode()
{
TreeNodeVector::iterator aIter( maChildren.begin() );
while( aIter != maChildren.end() )
- (*aIter++)->setParent(0);
+ (*aIter++)->setParent(nullptr);
}
void MutableTreeNode::setParent( MutableTreeNode* pParent )
@@ -382,7 +382,7 @@ void SAL_CALL MutableTreeNode::removeChildByIndex( sal_Int32 nChildIndex ) throw
if( !xImpl.is() )
throw IndexOutOfBoundsException();
- xImpl->setParent(0);
+ xImpl->setParent(nullptr);
xImpl->mbIsInserted = false;
broadcast_changes( getReference( xImpl.get() ), false );
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 0cf63e514010..050b0aa61ed9 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -73,7 +73,7 @@ static const LanguageDependentProp aLanguageDependentProp[] =
{ "HelpText", 8 },
{ "CurrencySymbol", 14 },
{ "StringItemList", 14 },
- { 0, 0 }
+ { nullptr, 0 }
};
static Sequence< OUString> lcl_ImplGetPropertyNames( const Reference< XMultiPropertySet > & rxModel )
@@ -175,21 +175,21 @@ Reference< XWindowPeer > UnoControl::ImplGetCompatiblePeer( bool bAcceptExist
maComponentInfos.bVisible = false;
Reference< XWindowPeer > xCurrentPeer = getPeer();
- setPeer( NULL );
+ setPeer( nullptr );
// queryInterface ourself, to allow aggregation
Reference< XControl > xMe;
OWeakAggObject::queryInterface( cppu::UnoType<decltype(xMe)>::get() ) >>= xMe;
- vcl::Window* pParentWindow( NULL );
+ vcl::Window* pParentWindow( nullptr );
{
SolarMutexGuard aGuard;
pParentWindow = dynamic_cast< vcl::Window* >( Application::GetDefaultDevice() );
- ENSURE_OR_THROW( pParentWindow != NULL, "could obtain a default parent window!" );
+ ENSURE_OR_THROW( pParentWindow != nullptr, "could obtain a default parent window!" );
}
try
{
- xMe->createPeer( NULL, pParentWindow->GetComponentInterface() );
+ xMe->createPeer( nullptr, pParentWindow->GetComponentInterface() );
}
catch( const Exception& )
{
@@ -353,7 +353,7 @@ void UnoControl::dispose( ) throw(RuntimeException, std::exception)
{
xPeer = mxPeer;
}
- setPeer( NULL );
+ setPeer( nullptr );
xAccessibleComp.set(maAccessibleContext, UNO_QUERY);
maAccessibleContext.clear();
}
@@ -585,7 +585,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent
// Our resource resolver has been changed and we must be sure
// that language dependent props use the new resolver.
const LanguageDependentProp* pLangDepProp = aLanguageDependentProp;
- while ( pLangDepProp->pPropName != 0 )
+ while ( pLangDepProp->pPropName != nullptr )
{
bool bMustBeInserted( true );
for ( size_t i = 0; i < aPeerPropertiesToSet.size(); i++ )
@@ -626,7 +626,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent
// Doesn't work for Container!
getPeer()->dispose();
mxPeer.clear();
- mxVclWindowPeer = NULL;
+ mxVclWindowPeer = nullptr;
mbRefeshingPeer = true;
Reference< XWindowPeer > xP( xParent, UNO_QUERY );
xThis->createPeer( Reference< XToolkit > (), xP );
@@ -644,7 +644,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent
{
SolarMutexGuard g;
vcl::Window* pVclPeer = VCLUnoHelper::GetWindow( getPeer() );
- pPeer = pVclPeer ? pVclPeer->GetWindowPeer() : NULL;
+ pPeer = pVclPeer ? pVclPeer->GetWindowPeer() : nullptr;
}
VclListenerLock aNoVclEventMultiplexing( pPeer );
@@ -670,7 +670,7 @@ void UnoControl::disposing( const EventObject& rEvt ) throw(RuntimeException, st
if ( maAccessibleContext.get() == rEvt.Source )
{
// just in case the context is disposed, but not released - ensure that we do not re-use it in the future
- maAccessibleContext = NULL;
+ maAccessibleContext = nullptr;
}
else if( mxModel.get() == Reference< XControlModel >(rEvt.Source,UNO_QUERY).get() )
{
@@ -1559,7 +1559,7 @@ uno::Reference< awt::XStyleSettings > SAL_CALL UnoControl::getStyleSettings() th
}
if ( xPeerSupplier.is() )
return xPeerSupplier->getStyleSettings();
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx
index 5cc00ea55ff3..895cc79d4aa5 100644
--- a/toolkit/source/controls/unocontrolcontainer.cxx
+++ b/toolkit/source/controls/unocontrolcontainer.cxx
@@ -510,7 +510,7 @@ void SAL_CALL UnoControlContainer::removeByIdentifier( ::sal_Int32 _nIdentifier
*this
);
- impl_removeControl( _nIdentifier, xControl, NULL );
+ impl_removeControl( _nIdentifier, xControl, nullptr );
}
void SAL_CALL UnoControlContainer::replaceByIdentifer( ::sal_Int32 _nIdentifier, const uno::Any& _rElement ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
@@ -628,7 +628,7 @@ void UnoControlContainer::impl_createControlPeerIfNecessary( const uno::Referenc
if( xMyPeer.is() )
{
- _rxControl->createPeer( NULL, xMyPeer );
+ _rxControl->createPeer( nullptr, xMyPeer );
ImplActivateTabControllers();
}
@@ -666,7 +666,7 @@ void UnoControlContainer::removingControl( const uno::Reference< awt::XControl >
if ( _rxControl.is() )
{
_rxControl->removeEventListener( this );
- _rxControl->setContext( NULL );
+ _rxControl->setContext( nullptr );
}
}
@@ -701,7 +701,7 @@ void UnoControlContainer::removeControl( const uno::Reference< awt::XControl >&
UnoControlHolderList::ControlIdentifier id = mpControls->getControlIdentifier( _rxControl );
if ( id != -1 )
- impl_removeControl( id, _rxControl, NULL );
+ impl_removeControl( id, _rxControl, nullptr );
}
}
diff --git a/toolkit/source/controls/unocontrolcontainermodel.cxx b/toolkit/source/controls/unocontrolcontainermodel.cxx
index 864a07738cf1..9198e8f7f0ad 100644
--- a/toolkit/source/controls/unocontrolcontainermodel.cxx
+++ b/toolkit/source/controls/unocontrolcontainermodel.cxx
@@ -83,7 +83,7 @@ css::uno::Reference< css::beans::XPropertySetInfo > UnoControlContainerModel::ge
{
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
css::uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 75add058c1d3..8a0f22a31dd9 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -772,7 +772,7 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre
// No data for the model may be added following the properties
// Used for import of old parts in css::awt::FontDescriptor
- css::awt::FontDescriptor* pFD = NULL;
+ css::awt::FontDescriptor* pFD = nullptr;
sal_uInt32 i;
for ( i = 0; i < nProps; i++ )
@@ -1125,7 +1125,7 @@ sal_Bool UnoControlModel::convertFastPropertyValue( Any & rConvertedValue, Any &
if ( xPure.is() )
rConvertedValue = xPure->queryInterface( *pDestType );
else
- rConvertedValue.setValue( NULL, *pDestType );
+ rConvertedValue.setValue( nullptr, *pDestType );
bConverted = true;
}
}
@@ -1171,7 +1171,7 @@ void UnoControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nPropId, const
// Missing: the fake solo properties of the FontDescriptor
ImplPropertyTable::const_iterator it = maData.find( nPropId );
- const css::uno::Any* pProp = it == maData.end() ? NULL : &(it->second);
+ const css::uno::Any* pProp = it == maData.end() ? nullptr : &(it->second);
ENSURE_OR_RETURN_VOID( pProp, "UnoControlModel::setFastPropertyValue_NoBroadcast: invalid property id!" );
DBG_ASSERT( ( rValue.getValueType().getTypeClass() != css::uno::TypeClass_VOID ) || ( GetPropertyAttribs( (sal_uInt16)nPropId ) & css::beans::PropertyAttribute::MAYBEVOID ), "Property darf nicht VOID sein!" );
@@ -1183,7 +1183,7 @@ void UnoControlModel::getFastPropertyValue( css::uno::Any& rValue, sal_Int32 nPr
::osl::Guard< ::osl::Mutex > aGuard( const_cast<UnoControlModel*>(this)->GetMutex() );
ImplPropertyTable::const_iterator it = maData.find( nPropId );
- const css::uno::Any* pProp = it == maData.end() ? NULL : &(it->second);
+ const css::uno::Any* pProp = it == maData.end() ? nullptr : &(it->second);
if ( pProp )
rValue = *pProp;
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 2e691041a740..226be956dd14 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -81,7 +81,7 @@ ImageHelper::getGraphicAndGraphicObjectFromURL_nothrow( uno::Reference< graphic:
xOutGraphicObj = graphic::GraphicObject::createWithId( ::comphelper::getProcessComponentContext(), sID );
}
else // linked
- xOutGraphicObj = NULL; // release the GraphicObject
+ xOutGraphicObj = nullptr; // release the GraphicObject
return ImageHelper::getGraphicFromURL_nothrow( _rURL );
}
@@ -144,7 +144,7 @@ uno::Any UnoControlEditModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& UnoControlEditModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -555,7 +555,7 @@ uno::Any UnoControlFileControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) c
::cppu::IPropertyArrayHelper& UnoControlFileControlModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -745,7 +745,7 @@ uno::Any UnoControlButtonModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& UnoControlButtonModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -996,7 +996,7 @@ uno::Any UnoControlImageControlModel::ImplGetDefaultValue( sal_uInt16 nPropId )
::cppu::IPropertyArrayHelper& UnoControlImageControlModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -1159,7 +1159,7 @@ uno::Any UnoControlRadioButtonModel::ImplGetDefaultValue( sal_uInt16 nPropId ) c
::cppu::IPropertyArrayHelper& UnoControlRadioButtonModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -1416,7 +1416,7 @@ uno::Any UnoControlCheckBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) cons
::cppu::IPropertyArrayHelper& UnoControlCheckBoxModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -1657,7 +1657,7 @@ uno::Any UnoControlFixedHyperlinkModel::ImplGetDefaultValue( sal_uInt16 nPropId
::cppu::IPropertyArrayHelper& UnoControlFixedHyperlinkModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -1854,7 +1854,7 @@ uno::Any UnoControlFixedTextModel::ImplGetDefaultValue( sal_uInt16 nPropId ) con
::cppu::IPropertyArrayHelper& UnoControlFixedTextModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -2036,7 +2036,7 @@ uno::Any UnoControlGroupBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) cons
::cppu::IPropertyArrayHelper& UnoControlGroupBoxModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -2284,7 +2284,7 @@ uno::Any UnoControlListBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& UnoControlListBoxModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -3169,7 +3169,7 @@ uno::Reference< beans::XPropertySetInfo > UnoControlComboBoxModel::getPropertySe
::cppu::IPropertyArrayHelper& UnoControlComboBoxModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -3690,7 +3690,7 @@ uno::Any UnoControlDateFieldModel::ImplGetDefaultValue( sal_uInt16 nPropId ) con
::cppu::IPropertyArrayHelper& UnoControlDateFieldModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -3979,7 +3979,7 @@ uno::Any UnoControlTimeFieldModel::ImplGetDefaultValue( sal_uInt16 nPropId ) con
::cppu::IPropertyArrayHelper& UnoControlTimeFieldModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -4227,7 +4227,7 @@ uno::Any UnoControlNumericFieldModel::ImplGetDefaultValue( sal_uInt16 nPropId )
::cppu::IPropertyArrayHelper& UnoControlNumericFieldModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -4478,7 +4478,7 @@ uno::Any UnoControlCurrencyFieldModel::ImplGetDefaultValue( sal_uInt16 nPropId )
::cppu::IPropertyArrayHelper& UnoControlCurrencyFieldModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -4722,7 +4722,7 @@ uno::Any UnoControlPatternFieldModel::ImplGetDefaultValue( sal_uInt16 nPropId )
::cppu::IPropertyArrayHelper& UnoControlPatternFieldModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -4916,7 +4916,7 @@ uno::Any UnoControlProgressBarModel::ImplGetDefaultValue( sal_uInt16 nPropId ) c
::cppu::IPropertyArrayHelper& UnoControlProgressBarModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
@@ -5093,7 +5093,7 @@ uno::Any UnoControlFixedLineModel::ImplGetDefaultValue( sal_uInt16 nPropId ) con
::cppu::IPropertyArrayHelper& UnoControlFixedLineModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
+ static UnoPropertyArrayHelper* pHelper = nullptr;
if ( !pHelper )
{
uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();