diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:11:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:18 +0100 |
commit | 40c4a086521703e64f7f182d8e07490855cfeb0a (patch) | |
tree | 713a700c6bc2966a3d8376c5c9da661e90fd2c50 /chart2/source/controller | |
parent | c40c7a8c364bd8f1d7777e803e5a6b0cfddeaca3 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I71de514405bb9bcc746c1ab9633e7fe659888943
Diffstat (limited to 'chart2/source/controller')
104 files changed, 383 insertions, 383 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index c14f9da137c2..ad2da3791873 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -293,7 +293,7 @@ bool AccessibleBase::ImplUpdateChildren() void AccessibleBase::AddChild( AccessibleBase * pChild ) { - OSL_ENSURE( pChild != NULL, "Invalid Child" ); + OSL_ENSURE( pChild != nullptr, "Invalid Child" ); if( pChild ) { ClearableMutexGuard aGuard( GetMutex() ); @@ -467,12 +467,12 @@ void SAL_CALL AccessibleBase::disposing() } // reset pointers - m_aAccInfo.m_pParent = NULL; + m_aAccInfo.m_pParent = nullptr; // invalidate implementation for helper, but keep UNO reference to still // allow a tool to query the DEFUNC state. // Note: The object will be deleted when the last reference is released - m_pStateSetHelper = NULL; + m_pStateSetHelper = nullptr; // attach new empty state set helper to member reference ::utl::AccessibleStateSetHelper * pHelper = new ::utl::AccessibleStateSetHelper(); @@ -739,13 +739,13 @@ awt::Point SAL_CALL AccessibleBase::getLocationOnScreen() { CheckDisposeState(); - if( m_aAccInfo.m_pParent != NULL ) + if( m_aAccInfo.m_pParent != nullptr ) { AccessibleBase * pParent = m_aAccInfo.m_pParent; awt::Point aLocThisRel( getLocation()); awt::Point aUpperLeft; - if( pParent != NULL ) + if( pParent != nullptr ) aUpperLeft = pParent->getLocationOnScreen(); return awt::Point( aUpperLeft.X + aLocThisRel.X, diff --git a/chart2/source/controller/accessibility/AccessibleChartShape.cxx b/chart2/source/controller/accessibility/AccessibleChartShape.cxx index 7f64e3667525..ffc91da953c2 100644 --- a/chart2/source/controller/accessibility/AccessibleChartShape.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartShape.cxx @@ -56,7 +56,7 @@ AccessibleChartShape::AccessibleChartShape( ::accessibility::AccessibleShapeInfo aShapeInfo( xShape, xParent, nIndex ); m_aShapeTreeInfo.SetSdrView( rAccInfo.m_pSdrView ); - m_aShapeTreeInfo.SetController( NULL ); + m_aShapeTreeInfo.SetController( nullptr ); m_aShapeTreeInfo.SetWindow( VCLUnoHelper::GetWindow( rAccInfo.m_xWindow ) ); m_aShapeTreeInfo.SetViewForwarder( rAccInfo.m_pViewForwarder ); diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx index b230b978c884..d147357b601b 100644 --- a/chart2/source/controller/accessibility/AccessibleChartView.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx @@ -58,7 +58,7 @@ AccessibleChartView::AccessibleChartView( ), m_xContext( xContext ), m_pSdrView( pView ), - m_pViewForwarder( NULL ) + m_pViewForwarder( nullptr ) { AddState( AccessibleStateType::OPAQUE ); } @@ -213,7 +213,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments else if( xChartModel.is() ) { bChanged = true; - xChartModel = 0; + xChartModel = nullptr; } if( rArguments.getLength() > 2 ) @@ -229,7 +229,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments else if( xChartView.is() ) { bChanged = true; - xChartView = 0; + xChartView = nullptr; } if( rArguments.getLength() > 3 ) @@ -272,14 +272,14 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments { bChanged = true; xSelectionSupplier->removeSelectionChangeListener(this); - xSelectionSupplier = 0; + xSelectionSupplier = nullptr; } if( !xSelectionSupplier.is() || !xChartModel.is() || !xChartView.is() ) { if(xSelectionSupplier.is()) xSelectionSupplier->removeSelectionChangeListener(this); - xSelectionSupplier = 0; + xSelectionSupplier = nullptr; xChartModel.clear(); xChartView.clear(); xParent.clear(); @@ -321,7 +321,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments aAccInfo.m_xSelectionSupplier = m_xSelectionSupplier; aAccInfo.m_xView = m_xChartView; aAccInfo.m_xWindow = m_xWindow; - aAccInfo.m_pParent = 0; + aAccInfo.m_pParent = nullptr; aAccInfo.m_spObjectHierarchy = m_spObjectHierarchy; aAccInfo.m_pSdrView = m_pSdrView; vcl::Window* pWindow = VCLUnoHelper::GetWindow( m_xWindow ); diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx index f2321666a279..cc88d354c0d1 100644 --- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx +++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx @@ -47,7 +47,7 @@ namespace chart AccessibleTextHelper::AccessibleTextHelper( DrawViewWrapper * pDrawViewWrapper ) : impl::AccessibleTextHelper_Base( m_aMutex ), - m_pTextHelper( 0 ), + m_pTextHelper( nullptr ), m_pDrawViewWrapper( pDrawViewWrapper ) {} @@ -90,7 +90,7 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg SdrObject * pTextObj = m_pDrawViewWrapper->getNamedSdrObject( aCID ); if( pTextObj ) { - std::unique_ptr<SvxEditSource> pEditSource(new SvxTextEditSource( *pTextObj, 0, *pView, *pWindow )); + std::unique_ptr<SvxEditSource> pEditSource(new SvxTextEditSource( *pTextObj, nullptr, *pView, *pWindow )); m_pTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource)); m_pTextHelper->SetEventSource( xEventSource ); } diff --git a/chart2/source/controller/accessibility/ChartElementFactory.cxx b/chart2/source/controller/accessibility/ChartElementFactory.cxx index 5c2c4f8b74ac..ab26c023c153 100644 --- a/chart2/source/controller/accessibility/ChartElementFactory.cxx +++ b/chart2/source/controller/accessibility/ChartElementFactory.cxx @@ -63,7 +63,7 @@ AccessibleBase* ChartElementFactory::CreateChartElement( const AccessibleElement break; } - return 0; + return nullptr; } } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx index 9bed1d66d375..80b551bbcaf9 100644 --- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx @@ -151,7 +151,7 @@ Reference< beans::XPropertySet > AreaWrapper::getInnerPropertySet() if( xChartDoc.is() ) return xChartDoc->getPageBackground(); OSL_FAIL("AreaWrapper::getInnerPropertySet() is NULL"); - return 0; + return nullptr; } const Sequence< beans::Property >& AreaWrapper::getPropertySequence() diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx index 2cc97cebc91d..a064752aae72 100644 --- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx @@ -440,7 +440,7 @@ Reference< beans::XPropertySet > SAL_CALL AxisWrapper::getAxisTitle() throw (uno eTitleType = TitleHelper::SECONDARY_Y_AXIS_TITLE; break; default: - return 0; + return nullptr; } m_xAxisTitle = new TitleWrapper( eTitleType, m_spChart2ModelContact ); } @@ -463,7 +463,7 @@ Reference< beans::XPropertySet > SAL_CALL AxisWrapper::getMajorGrid() throw (uno eGridType = GridWrapper::Z_MAJOR_GRID; break; default: - return 0; + return nullptr; } m_xMajorGrid = new GridWrapper( eGridType, m_spChart2ModelContact ); } @@ -486,7 +486,7 @@ Reference< beans::XPropertySet > SAL_CALL AxisWrapper::getMinorGrid() throw (uno eGridType = GridWrapper::Z_MINOR_GRID; break; default: - return 0; + return nullptr; } m_xMinorGrid = new GridWrapper( eGridType, m_spChart2ModelContact ); } diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx index 9c776ec51228..5b9545bc15f2 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx @@ -45,9 +45,9 @@ namespace wrapper Chart2ModelContact::Chart2ModelContact( const Reference< uno::XComponentContext > & xContext ) : m_xContext( xContext ), - m_xChartModel( 0 ), - mpModel( NULL ), - m_xChartView(0) + m_xChartModel( nullptr ), + mpModel( nullptr ), + m_xChartView(nullptr) { } @@ -82,7 +82,7 @@ void Chart2ModelContact::clear() { m_xChartModel.clear(); m_xChartView.clear(); - mpModel = NULL; + mpModel = nullptr; } Reference< frame::XModel > Chart2ModelContact::getChartModel() const @@ -117,7 +117,7 @@ ExplicitValueProvider* Chart2ModelContact::getExplicitValueProvider() const { getChartView(); if(!m_xChartView.is()) - return 0; + return nullptr; //obtain the ExplicitValueProvider from the chart view ExplicitValueProvider* pProvider = reinterpret_cast<ExplicitValueProvider*>(m_xChartView->getSomething( diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx index 4b6fe80edd18..8c850b7ff7d0 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx @@ -573,7 +573,7 @@ void SAL_CALL ChartDataWrapper::dispose() throw (uno::RuntimeException, std::exception) { m_aEventListenerContainer.disposeAndClear( lang::EventObject( static_cast< ::cppu::OWeakObject* >( this ))); - m_xDataAccess=0; + m_xDataAccess=nullptr; } void SAL_CALL ChartDataWrapper::addEventListener( diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index a6ed2f615c75..495e8dcd1d58 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -298,7 +298,7 @@ WrappedDataSourceLabelsInFirstRowProperty::WrappedDataSourceLabelsInFirstRowProp , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { - m_aOuterValue = WrappedDataSourceLabelsInFirstRowProperty::getPropertyDefault( 0 ); + m_aOuterValue = WrappedDataSourceLabelsInFirstRowProperty::getPropertyDefault( nullptr ); } WrappedDataSourceLabelsInFirstRowProperty::~WrappedDataSourceLabelsInFirstRowProperty() @@ -310,7 +310,7 @@ void WrappedDataSourceLabelsInFirstRowProperty::setPropertyValue( const Any& rOu { bool bLabelsInFirstRow = true; if( ! (rOuterValue >>= bLabelsInFirstRow) ) - throw lang::IllegalArgumentException("Property DataSourceLabelsInFirstRow requires value of type boolean", 0, 0 ); + throw lang::IllegalArgumentException("Property DataSourceLabelsInFirstRow requires value of type boolean", nullptr, 0 ); m_aOuterValue = rOuterValue; bool bNewValue = bLabelsInFirstRow; @@ -396,7 +396,7 @@ WrappedDataSourceLabelsInFirstColumnProperty::WrappedDataSourceLabelsInFirstColu , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { - m_aOuterValue = WrappedDataSourceLabelsInFirstColumnProperty::getPropertyDefault( 0 ); + m_aOuterValue = WrappedDataSourceLabelsInFirstColumnProperty::getPropertyDefault( nullptr ); } WrappedDataSourceLabelsInFirstColumnProperty::~WrappedDataSourceLabelsInFirstColumnProperty() @@ -408,7 +408,7 @@ void WrappedDataSourceLabelsInFirstColumnProperty::setPropertyValue( const Any& { bool bLabelsInFirstRow = true; if( ! (rOuterValue >>= bLabelsInFirstRow) ) - throw lang::IllegalArgumentException("Property DataSourceLabelsInFirstRow requires value of type boolean", 0, 0 ); + throw lang::IllegalArgumentException("Property DataSourceLabelsInFirstRow requires value of type boolean", nullptr, 0 ); m_aOuterValue = rOuterValue; bool bNewValue = bLabelsInFirstRow; @@ -503,7 +503,7 @@ void WrappedHasLegendProperty::setPropertyValue( const Any& rOuterValue, const R { bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException("Property HasLegend requires value of type boolean", 0, 0 ); + throw lang::IllegalArgumentException("Property HasLegend requires value of type boolean", nullptr, 0 ); try { @@ -587,7 +587,7 @@ void WrappedHasMainTitleProperty::setPropertyValue( const Any& rOuterValue, cons { bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException("Property HasMainTitle requires value of type boolean", 0, 0 ); + throw lang::IllegalArgumentException("Property HasMainTitle requires value of type boolean", nullptr, 0 ); try { @@ -660,7 +660,7 @@ void WrappedHasSubTitleProperty::setPropertyValue( const Any& rOuterValue, const { bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException("Property HasSubTitle requires value of type boolean", 0, 0 ); + throw lang::IllegalArgumentException("Property HasSubTitle requires value of type boolean", nullptr, 0 ); try { @@ -920,7 +920,7 @@ Reference< frame::XController > SAL_CALL ChartDocumentWrapper::getCurrentControl Reference< frame::XModel > xModel( m_spChart2ModelContact->getChartModel() ); if( xModel.is() ) return xModel->getCurrentController(); - return 0; + return nullptr; } void SAL_CALL ChartDocumentWrapper::setCurrentController( @@ -939,7 +939,7 @@ Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::getCurrentSelection( Reference< frame::XModel > xModel( m_spChart2ModelContact->getChartModel() ); if( xModel.is() ) return xModel->getCurrentSelection(); - return 0; + return nullptr; } // ____ XComponent ____ @@ -961,9 +961,9 @@ void SAL_CALL ChartDocumentWrapper::dispose() DisposeHelper::DisposeAndClear( m_xChartData ); DisposeHelper::DisposeAndClear( m_xDiagram ); DisposeHelper::DisposeAndClear( m_xArea ); - m_xChartView.set( 0 ); - m_xShapeFactory.set( 0 ); - m_xDelegator.set( 0 ); + m_xChartView.set( nullptr ); + m_xShapeFactory.set( nullptr ); + m_xDelegator.set( nullptr ); clearWrappedPropertySet(); m_spChart2ModelContact->clear(); @@ -990,7 +990,7 @@ void SAL_CALL ChartDocumentWrapper::dispose() void ChartDocumentWrapper::impl_resetAddIn() { Reference< util::XRefreshable > xAddIn( m_xAddIn ); - m_xAddIn.set( 0 ); + m_xAddIn.set( nullptr ); if( xAddIn.is() ) { @@ -1006,7 +1006,7 @@ void ChartDocumentWrapper::impl_resetAddIn() if( xInit.is() ) { uno::Any aParam; - uno::Reference< com::sun::star::chart::XChartDocument > xDoc( 0 ); + uno::Reference< com::sun::star::chart::XChartDocument > xDoc( nullptr ); aParam <<= xDoc; uno::Sequence< uno::Any > aSeq( &aParam, 1 ); xInit->initialize( aSeq ); @@ -1507,27 +1507,27 @@ uno::Any SAL_CALL ChartDocumentWrapper::queryAggregation( const uno::Type& rType void ChartDocumentWrapper::_disposing( const lang::EventObject& rSource ) { if( rSource.Source == m_xTitle ) - m_xTitle.set( 0 ); + m_xTitle.set( nullptr ); else if( rSource.Source == m_xSubTitle ) - m_xSubTitle.set( 0 ); + m_xSubTitle.set( nullptr ); else if( rSource.Source == m_xLegend ) - m_xLegend.set( 0 ); + m_xLegend.set( nullptr ); else if( rSource.Source == m_xChartData ) - m_xChartData.set( 0 ); + m_xChartData.set( nullptr ); else if( rSource.Source == m_xDiagram ) - m_xDiagram.set( 0 ); + m_xDiagram.set( nullptr ); else if( rSource.Source == m_xArea ) - m_xArea.set( 0 ); + m_xArea.set( nullptr ); else if( rSource.Source == m_xAddIn ) - m_xAddIn.set( 0 ); + m_xAddIn.set( nullptr ); else if( rSource.Source == m_xChartView ) - m_xChartView.set( 0 ); + m_xChartView.set( nullptr ); } // WrappedPropertySet Reference< beans::XPropertySet > ChartDocumentWrapper::getInnerPropertySet() { - return 0; + return nullptr; } const Sequence< beans::Property >& ChartDocumentWrapper::getPropertySequence() { diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index d29f31588193..f48e6ef6b16e 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -317,7 +317,7 @@ void WrappedAttachedAxisProperty::setPropertyValue( const Any& rOuterValue, cons sal_Int32 nChartAxisAssign = ::com::sun::star::chart::ChartAxisAssign::PRIMARY_Y; if( ! (rOuterValue >>= nChartAxisAssign) ) - throw lang::IllegalArgumentException("Property Axis requires value of type sal_Int32", 0, 0 ); + throw lang::IllegalArgumentException("Property Axis requires value of type sal_Int32", nullptr, 0 ); bool bNewAttachedToMainAxis = nChartAxisAssign == ::com::sun::star::chart::ChartAxisAssign::PRIMARY_Y; bool bOldAttachedToMainAxis = ::chart::DiagramHelper::isSeriesAttachedToMainAxis( xDataSeries ); @@ -500,7 +500,7 @@ DataSeriesPointWrapper::DataSeriesPointWrapper( , m_nSeriesIndexInNewAPI( -1 ) , m_nPointIndex( -1 ) , m_bLinesAllowed(true) - , m_xDataSeries(0) + , m_xDataSeries(nullptr) { //need initialize call afterwards } @@ -541,7 +541,7 @@ DataSeriesPointWrapper::DataSeriesPointWrapper( eType _eType, , m_nSeriesIndexInNewAPI( nSeriesIndexInNewAPI ) , m_nPointIndex( (_eType == DATA_POINT) ? nPointIndex : -1 ) , m_bLinesAllowed( false ) - , m_xDataSeries(0) + , m_xDataSeries(nullptr) { } @@ -829,7 +829,7 @@ void SAL_CALL DataSeriesPointWrapper::setPropertyValue( const OUString& rPropert if(rPropertyName == "Lines") { if( ! (rValue >>= m_bLinesAllowed) ) - throw lang::IllegalArgumentException("Property Lines requires value of type sal_Bool", 0, 0 ); + throw lang::IllegalArgumentException("Property Lines requires value of type sal_Bool", nullptr, 0 ); } sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName ); diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 4bb26f973933..e38aaba322d7 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -1225,7 +1225,7 @@ WrappedDataRowSourceProperty::WrappedDataRowSourceProperty( std::shared_ptr< Cha , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { - m_aOuterValue = WrappedDataRowSourceProperty::getPropertyDefault( 0 ); + m_aOuterValue = WrappedDataRowSourceProperty::getPropertyDefault( nullptr ); } WrappedDataRowSourceProperty::~WrappedDataRowSourceProperty() @@ -1240,7 +1240,7 @@ void WrappedDataRowSourceProperty::setPropertyValue( const Any& rOuterValue, con { sal_Int32 nNew = ::com::sun::star::chart::ChartDataRowSource_ROWS; if( !(rOuterValue >>= nNew) ) - throw lang::IllegalArgumentException( "Property DataRowSource requires ::com::sun::star::chart::ChartDataRowSource value", 0, 0 ); + throw lang::IllegalArgumentException( "Property DataRowSource requires ::com::sun::star::chart::ChartDataRowSource value", nullptr, 0 ); else eChartDataRowSource = ::com::sun::star::chart::ChartDataRowSource(nNew); } @@ -1367,7 +1367,7 @@ void WrappedStackingProperty::setPropertyValue( const Any& rOuterValue, const Re { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Stacking Properties require boolean values", 0, 0 ); + throw lang::IllegalArgumentException( "Stacking Properties require boolean values", nullptr, 0 ); StackMode eInnerStackMode; bool bHasDetectableInnerValue = detectInnerValue( eInnerStackMode ); @@ -1439,7 +1439,7 @@ WrappedDim3DProperty::WrappedDim3DProperty( std::shared_ptr< Chart2ModelContact , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { - m_aOuterValue = WrappedDim3DProperty::getPropertyDefault( 0 ); + m_aOuterValue = WrappedDim3DProperty::getPropertyDefault( nullptr ); } WrappedDim3DProperty::~WrappedDim3DProperty() @@ -1451,7 +1451,7 @@ void WrappedDim3DProperty::setPropertyValue( const Any& rOuterValue, const Refer { bool bNew3D = false; if( ! (rOuterValue >>= bNew3D) ) - throw lang::IllegalArgumentException( "Property Dim3D requires boolean value", 0, 0 ); + throw lang::IllegalArgumentException( "Property Dim3D requires boolean value", nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -1510,7 +1510,7 @@ WrappedVerticalProperty::WrappedVerticalProperty( std::shared_ptr< Chart2ModelCo , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { - m_aOuterValue = WrappedVerticalProperty::getPropertyDefault( 0 ); + m_aOuterValue = WrappedVerticalProperty::getPropertyDefault( nullptr ); } WrappedVerticalProperty::~WrappedVerticalProperty() @@ -1522,7 +1522,7 @@ void WrappedVerticalProperty::setPropertyValue( const Any& rOuterValue, const Re { bool bNewVertical = false; if( ! (rOuterValue >>= bNewVertical) ) - throw lang::IllegalArgumentException( "Property Vertical requires boolean value", 0, 0 ); + throw lang::IllegalArgumentException( "Property Vertical requires boolean value", nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -1587,7 +1587,7 @@ private: //member WrappedNumberOfLinesProperty::WrappedNumberOfLinesProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact ) : WrappedProperty("NumberOfLines",OUString()) , m_spChart2ModelContact( spChart2ModelContact ) - , m_aOuterValue( this->getPropertyDefault(0) ) + , m_aOuterValue( this->getPropertyDefault(nullptr) ) { } @@ -1635,7 +1635,7 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con { sal_Int32 nNewValue; if( ! (rOuterValue >>= nNewValue) ) - throw lang::IllegalArgumentException( "property NumberOfLines requires sal_Int32 value", 0, 0 ); + throw lang::IllegalArgumentException( "property NumberOfLines requires sal_Int32 value", nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -1648,7 +1648,7 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con DiagramHelper::tTemplateWithServiceName aTemplateAndService = DiagramHelper::getTemplateForDiagram( xDiagram, xFact ); - uno::Reference< chart2::XChartTypeTemplate > xTemplate(0); + uno::Reference< chart2::XChartTypeTemplate > xTemplate(nullptr); if( aTemplateAndService.second == "com.sun.star.chart2.template.ColumnWithLine" ) { if( nNewValue != 0 ) @@ -1740,7 +1740,7 @@ WrappedAttributedDataPointsProperty::WrappedAttributedDataPointsProperty( std::s , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { - m_aOuterValue = WrappedAttributedDataPointsProperty::getPropertyDefault( 0 ); + m_aOuterValue = WrappedAttributedDataPointsProperty::getPropertyDefault( nullptr ); } WrappedAttributedDataPointsProperty::~WrappedAttributedDataPointsProperty() @@ -1752,7 +1752,7 @@ void WrappedAttributedDataPointsProperty::setPropertyValue( const Any& rOuterVal { uno::Sequence< uno::Sequence< sal_Int32 > > aNewValue; if( ! (rOuterValue >>= aNewValue) ) - throw lang::IllegalArgumentException( "Property AttributedDataPoints requires value of type uno::Sequence< uno::Sequence< sal_Int32 > >", 0, 0 ); + throw lang::IllegalArgumentException( "Property AttributedDataPoints requires value of type uno::Sequence< uno::Sequence< sal_Int32 > >", nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -1854,7 +1854,7 @@ WrappedSolidTypeProperty::WrappedSolidTypeProperty( std::shared_ptr< Chart2Model , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { - m_aOuterValue = WrappedSolidTypeProperty::getPropertyDefault( 0 ); + m_aOuterValue = WrappedSolidTypeProperty::getPropertyDefault( nullptr ); } WrappedSolidTypeProperty::~WrappedSolidTypeProperty() @@ -1866,7 +1866,7 @@ void WrappedSolidTypeProperty::setPropertyValue( const Any& rOuterValue, const R { sal_Int32 nNewSolidType = ::com::sun::star::chart::ChartSolidType::RECTANGULAR_SOLID; if( ! (rOuterValue >>= nNewSolidType) ) - throw lang::IllegalArgumentException( "Property SolidType requires integer value", 0, 0 ); + throw lang::IllegalArgumentException( "Property SolidType requires integer value", nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -1934,7 +1934,7 @@ void WrappedAutomaticSizeProperty::setPropertyValue( const Any& rOuterValue, con { bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Property AutomaticSize requires value of type boolean", 0, 0 ); + throw lang::IllegalArgumentException( "Property AutomaticSize requires value of type boolean", nullptr, 0 ); try { @@ -2004,7 +2004,7 @@ void WrappedIncludeHiddenCellsProperty::setPropertyValue( const Any& rOuterValue { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Property IncludeHiddenCells requires boolean value", 0, 0 ); + throw lang::IllegalArgumentException( "Property IncludeHiddenCells requires boolean value", nullptr, 0 ); ChartModelHelper::setIncludeHiddenCells( bNewValue, *m_spChart2ModelContact->getModel() ); } diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx index 72d5e79a4af1..7483e1429553 100644 --- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx @@ -172,7 +172,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL MinMaxLineWrapper::getPropert void SAL_CALL MinMaxLineWrapper::setPropertyValue( const OUString& rPropertyName, const uno::Any& rValue ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { - Reference< beans::XPropertySet > xPropSet(0); + Reference< beans::XPropertySet > xPropSet(nullptr); Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() ); Sequence< Reference< chart2::XChartType > > aTypes( @@ -211,7 +211,7 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const OUString& rProperty { Any aRet; - Reference< beans::XPropertySet > xPropSet(0); + Reference< beans::XPropertySet > xPropSet(nullptr); Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() ); Sequence< Reference< chart2::XChartType > > aTypes( diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx index bbcec11c7672..4928e5dd31fa 100644 --- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx @@ -174,7 +174,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL UpDownBarWrapper::getProperty void SAL_CALL UpDownBarWrapper::setPropertyValue( const OUString& rPropertyName, const uno::Any& rValue ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { - Reference< beans::XPropertySet > xPropSet(0); + Reference< beans::XPropertySet > xPropSet(nullptr); Sequence< Reference< chart2::XChartType > > aTypes( ::chart::DiagramHelper::getChartTypesFromDiagram( m_spChart2ModelContact->getChart2Diagram() ) ); @@ -198,7 +198,7 @@ uno::Any SAL_CALL UpDownBarWrapper::getPropertyValue( const OUString& rPropertyN { Any aRet; - Reference< beans::XPropertySet > xPropSet(0); + Reference< beans::XPropertySet > xPropSet(nullptr); Sequence< Reference< chart2::XChartType > > aTypes( ::chart::DiagramHelper::getChartTypesFromDiagram( m_spChart2ModelContact->getChart2Diagram() ) ); diff --git a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx index ad3c3ddd0384..241f716c09ca 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx @@ -43,7 +43,7 @@ void WrappedAddInProperty::setPropertyValue( const Any& rOuterValue, const Refer { Reference< util::XRefreshable > xAddIn; if( ! (rOuterValue >>= xAddIn) ) - throw lang::IllegalArgumentException( "AddIn properties require type XRefreshable", 0, 0 ); + throw lang::IllegalArgumentException( "AddIn properties require type XRefreshable", nullptr, 0 ); m_rChartDocumentWrapper.setAddIn( xAddIn ); } @@ -68,7 +68,7 @@ void WrappedBaseDiagramProperty::setPropertyValue( const Any& rOuterValue, const { OUString aBaseDiagram; if( ! (rOuterValue >>= aBaseDiagram) ) - throw lang::IllegalArgumentException( "BaseDiagram properties require type OUString", 0, 0 ); + throw lang::IllegalArgumentException( "BaseDiagram properties require type OUString", nullptr, 0 ); m_rChartDocumentWrapper.setBaseDiagram( aBaseDiagram ); } @@ -91,7 +91,7 @@ WrappedAdditionalShapesProperty::~WrappedAdditionalShapesProperty() void WrappedAdditionalShapesProperty::setPropertyValue( const Any& /*rOuterValue*/, const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - throw lang::IllegalArgumentException( "AdditionalShapes is a read only property", 0, 0 ); + throw lang::IllegalArgumentException( "AdditionalShapes is a read only property", nullptr, 0 ); } Any WrappedAdditionalShapesProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const @@ -114,7 +114,7 @@ void WrappedRefreshAddInAllowedProperty::setPropertyValue( const Any& rOuterValu { bool bUpdateAddIn = true; if( ! (rOuterValue >>= bUpdateAddIn) ) - throw lang::IllegalArgumentException( "The property RefreshAddInAllowed requires type boolean", 0, 0 ); + throw lang::IllegalArgumentException( "The property RefreshAddInAllowed requires type boolean", nullptr, 0 ); m_rChartDocumentWrapper.setUpdateAddIn( bUpdateAddIn ); } diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx index eb9088f9ea53..0ad0b68d16db 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx @@ -63,7 +63,7 @@ void WrappedAutomaticPositionProperty::setPropertyValue( const Any& rOuterValue, { bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Property AutomaticPosition requires value of type boolean", 0, 0 ); + throw lang::IllegalArgumentException( "Property AutomaticPosition requires value of type boolean", nullptr, 0 ); try { diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx index 94d3791d0972..f4fd05c614cd 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx @@ -149,7 +149,7 @@ void WrappedAxisAndGridExistenceProperty::setPropertyValue( const Any& rOuterVal { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", 0, 0 ); + throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", nullptr, 0 ); bool bOldValue = false; getPropertyValue( xInnerPropertySet ) >>= bOldValue; @@ -271,7 +271,7 @@ void WrappedAxisTitleExistenceProperty::setPropertyValue( const Any& rOuterValue { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", 0, 0 ); + throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", nullptr, 0 ); bool bOldValue = false; getPropertyValue( xInnerPropertySet ) >>= bOldValue; @@ -377,7 +377,7 @@ void WrappedAxisLabelExistenceProperty::setPropertyValue( const Any& rOuterValue { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", 0, 0 ); + throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", nullptr, 0 ); bool bOldValue = false; getPropertyValue( xInnerPropertySet ) >>= bOldValue; diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx index 6ab5bce1136f..14ff874da7d9 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx @@ -63,7 +63,7 @@ void WrappedBarPositionProperty_Base::setPropertyValue( const Any& rOuterValue, { sal_Int32 nNewValue = 0; if( ! (rOuterValue >>= nNewValue) ) - throw lang::IllegalArgumentException( "GapWidth and Overlap property require value of type sal_Int32", 0, 0 ); + throw lang::IllegalArgumentException( "GapWidth and Overlap property require value of type sal_Int32", nullptr, 0 ); m_aOuterValue = rOuterValue; diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx index e514d4cd7f6a..1ddeafd89397 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx @@ -46,7 +46,7 @@ void WrappedNumberFormatProperty::setPropertyValue( const Any& rOuterValue, cons { sal_Int32 nFormat = 0; if( ! (rOuterValue >>= nFormat) ) - throw lang::IllegalArgumentException( "Property 'NumberFormat' requires value of type sal_Int32", 0, 0 ); + throw lang::IllegalArgumentException( "Property 'NumberFormat' requires value of type sal_Int32", nullptr, 0 ); if(xInnerPropertySet.is()) xInnerPropertySet->setPropertyValue(getInnerName(), this->convertOuterToInnerValue(rOuterValue)); @@ -111,7 +111,7 @@ Any WrappedLinkNumberFormatProperty::getPropertyValue( const Reference< beans::X if( !xInnerPropertySet.is() ) { OSL_FAIL("missing xInnerPropertySet in WrappedNumberFormatProperty::getPropertyValue"); - return getPropertyDefault(0); + return getPropertyDefault(nullptr); } return xInnerPropertySet->getPropertyValue(getInnerName()); diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx index a4fe2d0eae92..3cc7aef98073 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx @@ -314,7 +314,7 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons if( bBool ) aScaleData.Scaling = AxisHelper::createLogarithmicScaling( 10.0 ); else - aScaleData.Scaling = 0; + aScaleData.Scaling = nullptr; bSetScaleData = true; } } diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx index 1eb980cd8109..73282d2130e7 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx @@ -72,7 +72,7 @@ void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const R if( ! (rOuterValue >>= bNewValue) ) { if( rOuterValue.hasValue() ) - throw lang::IllegalArgumentException( "Property ScaleText requires value of type boolean", 0, 0 ); + throw lang::IllegalArgumentException( "Property ScaleText requires value of type boolean", nullptr, 0 ); } try diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx index 1f8dfc16eafa..5905cbd0c52d 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx @@ -115,7 +115,7 @@ public: { PROPERTYTYPE aNewValue = PROPERTYTYPE(); if( ! (rOuterValue >>= aNewValue) ) - throw ::com::sun::star::lang::IllegalArgumentException( "statistic property requires different type", 0, 0 ); + throw ::com::sun::star::lang::IllegalArgumentException( "statistic property requires different type", nullptr, 0 ); if( m_ePropertyType == DIAGRAM ) { diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx index e19ebc83024a..139c46b4ec75 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx @@ -100,7 +100,7 @@ public: { PROPERTYTYPE aNewValue; if( ! (rOuterValue >>= aNewValue) ) - throw ::com::sun::star::lang::IllegalArgumentException( "spline property requires different type", 0, 0 ); + throw ::com::sun::star::lang::IllegalArgumentException( "spline property requires different type", nullptr, 0 ); m_aOuterValue = rOuterValue; diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx index d1765b881af2..21f08fe6147a 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx @@ -183,7 +183,7 @@ protected: static uno::Reference< beans::XPropertySet > getOrCreateErrorBarProperties( const Reference< beans::XPropertySet >& xSeriesPropertySet ) { if(!xSeriesPropertySet.is()) - return 0; + return nullptr; uno::Reference< beans::XPropertySet > xErrorBarProperties; xSeriesPropertySet->getPropertyValue( CHART_UNONAME_ERRORBAR_Y ) >>= xErrorBarProperties; if( !xErrorBarProperties.is() ) @@ -346,7 +346,7 @@ void WrappedMeanValueProperty::setValueToSeries( const Reference< beans::XProper if( xRegCnt.is() ) { if(aNewValue) - RegressionCurveHelper::addMeanValueLine( xRegCnt, 0, 0 ); + RegressionCurveHelper::addMeanValueLine( xRegCnt, nullptr, nullptr ); else RegressionCurveHelper::removeMeanValueLine( xRegCnt ); } diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx index a41775b47358..33c9138331ce 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx @@ -77,7 +77,7 @@ void WrappedStockProperty::setPropertyValue( const ::com::sun::star::uno::Any& r { bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( "stock properties require type sal_Bool", 0, 0 ); + throw lang::IllegalArgumentException( "stock properties require type sal_Bool", nullptr, 0 ); m_aOuterValue = rOuterValue; @@ -164,7 +164,7 @@ WrappedVolumeProperty::~WrappedVolumeProperty() uno::Reference< chart2::XChartTypeTemplate > WrappedVolumeProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const { - uno::Reference< chart2::XChartTypeTemplate > xTemplate(0); + uno::Reference< chart2::XChartTypeTemplate > xTemplate(nullptr); if(!xFactory.is()) return xTemplate; @@ -232,7 +232,7 @@ WrappedUpDownProperty::~WrappedUpDownProperty() } uno::Reference< chart2::XChartTypeTemplate > WrappedUpDownProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const { - uno::Reference< chart2::XChartTypeTemplate > xTemplate(0); + uno::Reference< chart2::XChartTypeTemplate > xTemplate(nullptr); if( bNewValue ) //add open series { if( rCurrentTemplate == "com.sun.star.chart2.template.StockLowHighClose" ) diff --git a/chart2/source/controller/dialogs/ChangingResource.cxx b/chart2/source/controller/dialogs/ChangingResource.cxx index 7f47f3e8a2b3..6e1ba1c67274 100644 --- a/chart2/source/controller/dialogs/ChangingResource.cxx +++ b/chart2/source/controller/dialogs/ChangingResource.cxx @@ -27,7 +27,7 @@ ResourceChangeListener::~ResourceChangeListener() } ChangingResource::ChangingResource() - : m_pChangeListener(0) + : m_pChangeListener(nullptr) { } ChangingResource::~ChangingResource() diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index 9a410fd74bc1..768d92367af1 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -278,7 +278,7 @@ uno::Reference< XChartTypeTemplate > ChartTypeDialogController::getCurrentTempla const ChartTypeParameter& rParameter , const uno::Reference< lang::XMultiServiceFactory >& xTemplateManager ) const { - uno::Reference< XChartTypeTemplate > xTemplate(0); + uno::Reference< XChartTypeTemplate > xTemplate(nullptr); OUString aServiceName( this->getServiceNameForParameter( rParameter ) ); if(!aServiceName.isEmpty()) @@ -1115,8 +1115,8 @@ void StockChartDialogController::adjustParameterToSubType( ChartTypeParameter& r } CombiColumnLineChartDialogController::CombiColumnLineChartDialogController() - : m_pFT_NumberOfLines(0) - , m_pMF_NumberOfLines(0) + : m_pFT_NumberOfLines(nullptr) + , m_pMF_NumberOfLines(nullptr) { bSupports3D = false; } diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index e70242d46213..8ab0d411b98a 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -409,7 +409,7 @@ namespace */ bool lcl_SeriesHeaderHasFocus( const ::std::vector< std::shared_ptr< ::chart::impl::SeriesHeader > > & rSeriesHeader, - sal_Int32 * pOutIndex = 0 ) + sal_Int32 * pOutIndex = nullptr ) { sal_Int32 nIndex = 0; for( auto aIt = rSeriesHeader.begin(); aIt != rSeriesHeader.end(); ++aIt, ++nIndex ) @@ -1035,7 +1035,7 @@ bool DataBrowser::IsTabAllowed( bool bForward ) const ::svt::CellController* DataBrowser::GetController( long nRow, sal_uInt16 nCol ) { if( m_bIsReadOnly ) - return 0; + return nullptr; if( CellContainsNumbers( nRow, nCol )) { @@ -1091,7 +1091,7 @@ sal_uInt32 DataBrowser::GetNumberFormatKey( sal_Int32 nRow, sal_uInt16 nCol ) co bool DataBrowser::isDateTimeString( const OUString& aInputString, double& fOutDateTimeValue ) { sal_uInt32 nNumberFormat=0; - SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : 0; + SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : nullptr; if( !aInputString.isEmpty() && pSvNumberFormatter && pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, fOutDateTimeValue ) ) { short nType = pSvNumberFormatter->GetType( nNumberFormat); @@ -1112,7 +1112,7 @@ bool DataBrowser::SaveModified() OSL_ENSURE( nRow >= 0 || nCol >= 0, "This cell should not be modified!" ); - SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : 0; + SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : nullptr; switch( m_apDataBrowserModel->getCellType( nCol, nRow )) { case DataBrowserModel::NUMBER: @@ -1283,7 +1283,7 @@ void DataBrowser::ImplAdjustHeaderControls() { pWin->set_margin_left(nStartPos); pColorWin->set_margin_left(nStartPos); - pWin = pColorWin = NULL; + pWin = pColorWin = nullptr; } } diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index 37f259ec8b5b..fa7324b5c201 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -582,7 +582,7 @@ Reference< chart2::XDataSeries > tDataColumnVector::size_type nIndex( nColumn ); if( nIndex < m_aColumns.size()) return m_aColumns[nIndex].m_xDataSeries; - return 0; + return nullptr; } DataBrowserModel::eCellType DataBrowserModel::getCellType( sal_Int32 nAtColumn, sal_Int32 /* nAtRow */ ) const @@ -831,7 +831,7 @@ void DataBrowserModel::updateFromModel() { Reference< chart2::XChartTypeContainer > xCTCnt( aCooSysSeq[nCooSysIdx], uno::UNO_QUERY_THROW ); Sequence< Reference< chart2::XChartType > > aChartTypes( xCTCnt->getChartTypes()); - sal_Int32 nXAxisNumberFormat = DataSeriesHelper::getNumberFormatKeyFromAxis( 0, aCooSysSeq[nCooSysIdx], 0, 0 ); + sal_Int32 nXAxisNumberFormat = DataSeriesHelper::getNumberFormatKeyFromAxis( nullptr, aCooSysSeq[nCooSysIdx], 0, 0 ); for( sal_Int32 nCTIdx=0; nCTIdx<aChartTypes.getLength(); ++nCTIdx ) { diff --git a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx index b2fd8fb31a62..c092b32772d6 100644 --- a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx +++ b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx @@ -160,7 +160,7 @@ void RangeSelectionHelper::stopRangeListening( bool bRemoveListener /* = true */ m_xRangeSelection->removeRangeSelectionListener( m_xRangeSelectionListener ); } - m_xRangeSelectionListener = 0; + m_xRangeSelectionListener = nullptr; } bool RangeSelectionHelper::verifyCellRange( const OUString & rRangeStr ) diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx index 073d194a3afd..2591ea75bc34 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx @@ -38,7 +38,7 @@ ChartTypeDialog::ChartTypeDialog( vcl::Window* pParent , const uno::Reference< uno::XComponentContext >& xContext ) : ModalDialog( pParent, "ChartTypeDialog", "modules/schart/ui/charttypedialog.ui") - , m_pChartTypeTabPage(0) + , m_pChartTypeTabPage(nullptr) , m_xChartModel(xChartModel) , m_xCC( xContext ) { diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx index fbf84d893741..8730c4630729 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx @@ -62,7 +62,7 @@ CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< fram , m_xCC( xContext ) , m_bIsClosable(true) , m_nOnePageOnlyIndex(nOnePageOnlyIndex) - , m_pTemplateProvider(0) + , m_pTemplateProvider(nullptr) , m_nFirstState(STATE_FIRST) , m_nLastState(STATE_LAST) , m_aTimerTriggeredControllerLock( xChartModel ) diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index cac2042e04aa..2a6b79dd8bdd 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -41,10 +41,10 @@ using namespace ::com::sun::star; CreationWizardUnoDlg::CreationWizardUnoDlg( const uno::Reference< uno::XComponentContext >& xContext ) : OComponentHelper( m_aMutex ) - , m_xChartModel( 0 ) + , m_xChartModel( nullptr ) , m_xCC( xContext ) - , m_xParentWindow( 0 ) - , m_pDialog( 0 ) + , m_xParentWindow( nullptr ) + , m_pDialog( nullptr ) , m_bUnlockControllersOnExecute(false) { uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(m_xCC); @@ -190,7 +190,7 @@ void CreationWizardUnoDlg::createDialogOnDemand() SolarMutexGuard aSolarGuard; if( !m_pDialog ) { - vcl::Window* pParent = NULL; + vcl::Window* pParent = nullptr; if( !m_xParentWindow.is() && m_xChartModel.is() ) { uno::Reference< frame::XController > xController( @@ -220,7 +220,7 @@ void CreationWizardUnoDlg::createDialogOnDemand() IMPL_LINK_TYPED( CreationWizardUnoDlg, DialogEventHdl, VclWindowEvent&, rEvent, void ) { if(rEvent.GetId() == VCLEVENT_OBJECT_DYING) - m_pDialog = 0;//avoid duplicate destruction of m_pDialog + m_pDialog = nullptr;//avoid duplicate destruction of m_pDialog } sal_Int16 SAL_CALL CreationWizardUnoDlg::execute( ) throw(uno::RuntimeException, std::exception) @@ -286,7 +286,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL CreationWizardUnoDlg::getProp throw (uno::RuntimeException, std::exception) { OSL_FAIL("not implemented"); - return 0; + return nullptr; } void SAL_CALL CreationWizardUnoDlg::setPropertyValue( const OUString& rPropertyName @@ -298,7 +298,7 @@ void SAL_CALL CreationWizardUnoDlg::setPropertyValue( const OUString& rPropertyN { awt::Point aPos; if( ! (rValue >>= aPos) ) - throw lang::IllegalArgumentException( "Property 'Position' requires value of type awt::Point", 0, 0 ); + throw lang::IllegalArgumentException( "Property 'Position' requires value of type awt::Point", nullptr, 0 ); //set left upper outer corner relative to screen //pixels, screen position @@ -307,7 +307,7 @@ void SAL_CALL CreationWizardUnoDlg::setPropertyValue( const OUString& rPropertyN if( m_pDialog ) { m_pDialog->SetPosPixel( Point(0,0) ); - Rectangle aRect( m_pDialog->GetWindowExtentsRelative( 0 ) ); + Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) ); Point aNewOuterPos = Point( aPos.X - aRect.Left(), aPos.Y - aRect.Top() ); m_pDialog->SetPosPixel( aNewOuterPos ); @@ -320,10 +320,10 @@ void SAL_CALL CreationWizardUnoDlg::setPropertyValue( const OUString& rPropertyN else if( rPropertyName == "UnlockControllersOnExecute" ) { if( ! (rValue >>= m_bUnlockControllersOnExecute) ) - throw lang::IllegalArgumentException( "Property 'UnlockControllers' requires value of type boolean" , 0, 0 ); + throw lang::IllegalArgumentException( "Property 'UnlockControllers' requires value of type boolean" , nullptr, 0 ); } else - throw beans::UnknownPropertyException( "unknown property was tried to set to chart wizard" , 0 ); + throw beans::UnknownPropertyException( "unknown property was tried to set to chart wizard" , nullptr ); } uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const OUString& rPropertyName ) @@ -338,7 +338,7 @@ uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const OUString& rPrope createDialogOnDemand(); if( m_pDialog ) { - Rectangle aRect( m_pDialog->GetWindowExtentsRelative( 0 ) ); + Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) ); awt::Point aPoint(aRect.Left(),aRect.Top()); aRet = uno::makeAny( aPoint ); } @@ -351,7 +351,7 @@ uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const OUString& rPrope createDialogOnDemand(); if( m_pDialog ) { - Rectangle aRect( m_pDialog->GetWindowExtentsRelative( 0 ) ); + Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) ); awt::Size aSize(aRect.GetWidth(),aRect.GetHeight()); aRet = uno::makeAny( aSize ); } @@ -361,7 +361,7 @@ uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const OUString& rPrope aRet = uno::makeAny( m_bUnlockControllersOnExecute ); } else - throw beans::UnknownPropertyException( "unknown property was tried to get from chart wizard" , 0 ); + throw beans::UnknownPropertyException( "unknown property was tried to get from chart wizard" , nullptr ); return aRet; } diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx index f7ac632ee515..78e0b5850efd 100644 --- a/chart2/source/controller/dialogs/dlg_DataSource.cxx +++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx @@ -134,8 +134,8 @@ DataSourceDialog::DataSourceDialog(vcl::Window * pParent, , m_apDocTemplateProvider(new DocumentChartTypeTemplateProvider(xChartDocument)) , m_apDialogModel(new DialogModel(xChartDocument, xContext)) , m_pTabControl(VclPtr<DataSourceTabControl>::Create(get_content_area())) - , m_pRangeChooserTabPage(0) - , m_pDataSourceTabPage(0) + , m_pRangeChooserTabPage(nullptr) + , m_pDataSourceTabPage(nullptr) , m_bRangeChooserTabIsValid(true) , m_bDataSourceTabIsValid(true) { diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index bed7ed6cb38c..40ee6a22f074 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -99,7 +99,7 @@ ObjectPropertiesDialogParameter::ObjectPropertiesDialogParameter( const OUString , m_bShowAxisOrigin(false) , m_bIsCrossingAxisIsCategoryAxis(false) , m_aCategories() - , m_xChartDocument( 0 ) + , m_xChartDocument( nullptr ) , m_bComplexCategoriesAxis( false ) , m_nNbPoints( 0 ) { @@ -330,9 +330,9 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, , nPageType(0) , m_pParameter( pDialogParameter ) , m_pViewElementListProvider( pViewElementListProvider ) - , m_pNumberFormatter(0) - , m_pSymbolShapeProperties(NULL) - , m_pAutoSymbolGraphic(NULL) + , m_pNumberFormatter(nullptr) + , m_pSymbolShapeProperties(nullptr) + , m_pAutoSymbolGraphic(nullptr) , m_fAxisMinorStepWidthForErrorBarDecimals(0.1) , m_bOKPressed(false) { @@ -351,7 +351,7 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, AddTabPage(RID_SVXPAGE_TRANSPARENCE, SCH_RESSTR(STR_PAGE_TRANSPARENCY)); AddTabPage(RID_SVXPAGE_CHAR_NAME, SCH_RESSTR(STR_PAGE_FONT)); AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SCH_RESSTR(STR_PAGE_FONT_EFFECTS)); - AddTabPage(TP_ALIGNMENT, SCH_RESSTR(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::Create, NULL); + AddTabPage(TP_ALIGNMENT, SCH_RESSTR(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::Create, nullptr); if( aCJKOptions.IsAsianTypographyEnabled() ) AddTabPage(RID_SVXPAGE_PARA_ASIAN, SCH_RESSTR(STR_PAGE_ASIAN)); break; @@ -362,7 +362,7 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, AddTabPage(RID_SVXPAGE_TRANSPARENCE, SCH_RESSTR(STR_PAGE_TRANSPARENCY)); AddTabPage(RID_SVXPAGE_CHAR_NAME, SCH_RESSTR(STR_PAGE_FONT)); AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SCH_RESSTR(STR_PAGE_FONT_EFFECTS)); - AddTabPage(TP_LEGEND_POS, SCH_RESSTR(STR_PAGE_POSITION), SchLegendPosTabPage::Create, NULL); + AddTabPage(TP_LEGEND_POS, SCH_RESSTR(STR_PAGE_POSITION), SchLegendPosTabPage::Create, nullptr); if( aCJKOptions.IsAsianTypographyEnabled() ) AddTabPage(RID_SVXPAGE_PARA_ASIAN, SCH_RESSTR(STR_PAGE_ASIAN)); break; @@ -370,12 +370,12 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, case OBJECTTYPE_DATA_SERIES: case OBJECTTYPE_DATA_POINT: if( m_pParameter->ProvidesSecondaryYAxis() || m_pParameter->ProvidesOverlapAndGapWidth() || m_pParameter->ProvidesMissingValueTreatments() ) - AddTabPage(TP_OPTIONS, SCH_RESSTR(STR_PAGE_OPTIONS),SchOptionTabPage::Create, NULL); + AddTabPage(TP_OPTIONS, SCH_RESSTR(STR_PAGE_OPTIONS),SchOptionTabPage::Create, nullptr); if( m_pParameter->ProvidesStartingAngle()) - AddTabPage(TP_POLAROPTIONS, SCH_RESSTR(STR_PAGE_OPTIONS),PolarOptionsTabPage::Create, NULL); + AddTabPage(TP_POLAROPTIONS, SCH_RESSTR(STR_PAGE_OPTIONS),PolarOptionsTabPage::Create, nullptr); if( m_pParameter->HasGeometryProperties() ) - AddTabPage(TP_LAYOUT, SCH_RESSTR(STR_PAGE_LAYOUT),SchLayoutTabPage::Create, NULL); + AddTabPage(TP_LAYOUT, SCH_RESSTR(STR_PAGE_LAYOUT),SchLayoutTabPage::Create, nullptr); if(m_pParameter->HasAreaProperties()) { @@ -388,7 +388,7 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, case OBJECTTYPE_DATA_LABEL: case OBJECTTYPE_DATA_LABELS: AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_BORDER)); - AddTabPage(TP_DATA_DESCR, SCH_RESSTR(STR_OBJECT_DATALABELS), DataLabelsTabPage::Create, NULL); + AddTabPage(TP_DATA_DESCR, SCH_RESSTR(STR_OBJECT_DATALABELS), DataLabelsTabPage::Create, nullptr); AddTabPage(RID_SVXPAGE_CHAR_NAME, SCH_RESSTR(STR_PAGE_FONT)); AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SCH_RESSTR(STR_PAGE_FONT_EFFECTS)); if( aCJKOptions.IsAsianTypographyEnabled() ) @@ -399,12 +399,12 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, case OBJECTTYPE_AXIS: { if( m_pParameter->HasScaleProperties() ) - AddTabPage(TP_SCALE, SCH_RESSTR(STR_PAGE_SCALE), ScaleTabPage::Create, NULL); + AddTabPage(TP_SCALE, SCH_RESSTR(STR_PAGE_SCALE), ScaleTabPage::Create, nullptr); if( m_pParameter->HasScaleProperties() )//no positioning page for z axes so far as the tickmarks are not shown so far - AddTabPage(TP_AXIS_POSITIONS, SCH_RESSTR(STR_PAGE_POSITIONING), AxisPositionsTabPage::Create, NULL); + AddTabPage(TP_AXIS_POSITIONS, SCH_RESSTR(STR_PAGE_POSITIONING), AxisPositionsTabPage::Create, nullptr); AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_LINE)); - AddTabPage(TP_AXIS_LABEL, SCH_RESSTR(STR_OBJECT_LABEL), SchAxisLabelTabPage::Create, NULL); + AddTabPage(TP_AXIS_LABEL, SCH_RESSTR(STR_OBJECT_LABEL), SchAxisLabelTabPage::Create, nullptr); if( m_pParameter->HasNumberProperties() ) AddTabPage(RID_SVXPAGE_NUMBERFORMAT, SCH_RESSTR(STR_PAGE_NUMBERS)); AddTabPage(RID_SVXPAGE_CHAR_NAME, SCH_RESSTR(STR_PAGE_FONT)); @@ -415,12 +415,12 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, } case OBJECTTYPE_DATA_ERRORS_X: - AddTabPage(TP_XERRORBAR, SCH_RESSTR(STR_PAGE_XERROR_BARS), ErrorBarsTabPage::Create, NULL); + AddTabPage(TP_XERRORBAR, SCH_RESSTR(STR_PAGE_XERROR_BARS), ErrorBarsTabPage::Create, nullptr); AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_LINE)); break; case OBJECTTYPE_DATA_ERRORS_Y: - AddTabPage(TP_YERRORBAR, SCH_RESSTR(STR_PAGE_YERROR_BARS), ErrorBarsTabPage::Create, NULL); + AddTabPage(TP_YERRORBAR, SCH_RESSTR(STR_PAGE_YERROR_BARS), ErrorBarsTabPage::Create, nullptr); AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_LINE)); break; @@ -435,7 +435,7 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, break; case OBJECTTYPE_DATA_CURVE: - AddTabPage(TP_TRENDLINE, SCH_RESSTR(STR_PAGE_TRENDLINE_TYPE), TrendlineTabPage::Create, NULL); + AddTabPage(TP_TRENDLINE, SCH_RESSTR(STR_PAGE_TRENDLINE_TYPE), TrendlineTabPage::Create, nullptr); AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_LINE)); break; @@ -466,7 +466,7 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, /* When rotation is supported for equation text boxes, use SchAlignmentTabPage::Create here. The special SchAlignmentTabPage::CreateWithoutRotation can be deleted. */ - AddTabPage(TP_ALIGNMENT, SCH_RESSTR(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::CreateWithoutRotation, NULL); + AddTabPage(TP_ALIGNMENT, SCH_RESSTR(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::CreateWithoutRotation, nullptr); break; default: break; @@ -487,9 +487,9 @@ SchAttribTabDlg::~SchAttribTabDlg() void SchAttribTabDlg::dispose() { delete m_pSymbolShapeProperties; - m_pSymbolShapeProperties = NULL; + m_pSymbolShapeProperties = nullptr; delete m_pAutoSymbolGraphic; - m_pAutoSymbolGraphic = NULL; + m_pAutoSymbolGraphic = nullptr; SfxTabDialog::dispose(); } diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx index ec67eb829f59..eb0150b1ad7a 100644 --- a/chart2/source/controller/dialogs/dlg_View3D.cxx +++ b/chart2/source/controller/dialogs/dlg_View3D.cxx @@ -41,9 +41,9 @@ sal_uInt16 View3DDialog::m_nLastPageId = 0; View3DDialog::View3DDialog(vcl::Window* pParent, const uno::Reference< frame::XModel > & xChartModel, const XColorListRef &pColorTable ) : TabDialog(pParent, "3DViewDialog", "modules/schart/ui/3dviewdialog.ui") - , m_pGeometry(0) - , m_pAppearance(0) - , m_pIllumination(0) + , m_pGeometry(nullptr) + , m_pAppearance(nullptr) + , m_pIllumination(nullptr) , m_aControllerLocker(xChartModel) { get(m_pTabControl, "tabcontrol"); diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 2cf50d91c8b5..d6db8f8dcedd 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -43,7 +43,7 @@ namespace bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, sal_uInt16 nValueWhich, sal_uInt16 nSourceFormatWhich, sal_uLong& rnFormatKeyOut, bool& rbSourceFormatOut, bool& rbSourceFormatMixedStateOut ) { bool bSet = false; - const SfxPoolItem *pItem1 = NULL; + const SfxPoolItem *pItem1 = nullptr; if( rSet.GetItemState( nValueWhich, true, &pItem1 ) == SfxItemState::SET ) { const SfxUInt32Item * pNumItem = dynamic_cast< const SfxUInt32Item * >( pItem1 ); @@ -55,7 +55,7 @@ bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, sal_uInt16 nValueW } rbSourceFormatMixedStateOut=true; - const SfxPoolItem *pItem2 = NULL; + const SfxPoolItem *pItem2 = nullptr; if( rSet.GetItemState( nSourceFormatWhich, true, &pItem2 ) == SfxItemState::SET ) { const SfxBoolItem * pBoolItem = dynamic_cast< const SfxBoolItem * >( pItem2 ); @@ -72,7 +72,7 @@ void lcl_setBoolItemToCheckBox( const SfxItemSet& rInAttrs, sal_uInt16 nWhichId, { rCheckbox.EnableTriState( false ); - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; if( rInAttrs.GetItemState(nWhichId, true, &pPoolItem) == SfxItemState::SET ) rCheckbox.Check( static_cast<const SfxBoolItem*>(pPoolItem)->GetValue() ); else @@ -86,7 +86,7 @@ void lcl_setBoolItemToCheckBox( const SfxItemSet& rInAttrs, sal_uInt16 nWhichId, DataLabelResources::DataLabelResources(VclBuilderContainer* pWindow, vcl::Window* pParent, const SfxItemSet& rInAttrs ) : - m_pNumberFormatter(0), + m_pNumberFormatter(nullptr), m_bNumberFormatMixedState(true), m_bPercentFormatMixedState(true), m_nNumberFormatForValue(0), @@ -134,7 +134,7 @@ DataLabelResources::DataLabelResources(VclBuilderContainer* pWindow, vcl::Window aPlacementToStringMap[nEnum] = m_pLB_LabelPlacement->GetEntry(static_cast<sal_uInt16>(nEnum)); ::com::sun::star::uno::Sequence < sal_Int32 > aAvailabelPlacementList; - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; if( rInAttrs.GetItemState(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, true, &pPoolItem) == SfxItemState::SET ) aAvailabelPlacementList = static_cast<const SfxIntegerListItem*>(pPoolItem)->GetConstSequence(); @@ -333,7 +333,7 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) m_bNumberFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, m_nNumberFormatForValue, m_bSourceFormatForValue, m_bSourceFormatMixedState ); m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState); - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; if( rInAttrs.GetItemState(SCHATTR_DATADESCR_SEPARATOR, true, &pPoolItem) == SfxItemState::SET ) for(sal_Int32 i=0; i < NUMBER_SEPARATORS; ++i ) { diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index a77a042eedc9..2837307c6dbe 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -96,7 +96,7 @@ ErrorBarResources::ErrorBarResources( VclBuilderContainer* pParent, Dialog * pPa m_fPlusValue(0.0), m_fMinusValue(0.0), m_pParentDialog( pParentDialog ), - m_pCurrentRangeChoosingField( 0 ), + m_pCurrentRangeChoosingField( nullptr ), m_bHasInternalDataProvider( true ), m_bEnableDataTableDialog( true ) { @@ -342,7 +342,7 @@ void ErrorBarResources::UpdateControlStates() IMPL_LINK_NOARG_TYPED( ErrorBarResources, CategoryChosen2, ListBox&, void ) { - CategoryChosen(NULL); + CategoryChosen(nullptr); } IMPL_LINK_NOARG_TYPED( ErrorBarResources, CategoryChosen, Button*, void ) @@ -467,7 +467,7 @@ IMPL_LINK_TYPED( ErrorBarResources, ChooseRange, Button*, pButton, void ) aUIString, *this ); } else - m_pCurrentRangeChoosingField = 0; + m_pCurrentRangeChoosingField = nullptr; } IMPL_LINK_TYPED( ErrorBarResources, RangeChanged, Edit&, rEdit, void ) @@ -487,7 +487,7 @@ IMPL_LINK_TYPED( ErrorBarResources, RangeChanged, Edit&, rEdit, void ) void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) { - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; // category m_eErrorKind = CHERROR_NONE; @@ -704,7 +704,7 @@ void ErrorBarResources::listeningFinished( PosValueChanged( *m_pMfPositive ); } - m_pCurrentRangeChoosingField = 0; + m_pCurrentRangeChoosingField = nullptr; UpdateControlStates(); OSL_ASSERT( m_pParentDialog ); diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx index d9445e34e00e..8a9353a4eb5b 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx @@ -40,7 +40,7 @@ using namespace ::com::sun::star::chart2; LegendPositionResources::LegendPositionResources(VclBuilderContainer& rParent) : m_xCC() //unused in this scenario - , m_pCbxShow( NULL ) //unused in this scenario, assumed to be visible + , m_pCbxShow( nullptr ) //unused in this scenario, assumed to be visible { rParent.get(m_pRbtLeft, "left"); rParent.get(m_pRbtRight, "right"); @@ -174,12 +174,12 @@ IMPL_LINK_NOARG_TYPED(LegendPositionResources, PositionEnableHdl, CheckBox&, voi m_pRbtRight->Enable( bEnable ); m_pRbtBottom->Enable( bEnable ); - m_aChangeLink.Call(NULL); + m_aChangeLink.Call(nullptr); } void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs ) { - const SfxPoolItem* pPoolItem = NULL; + const SfxPoolItem* pPoolItem = nullptr; if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SfxItemState::SET ) { sal_Int32 nLegendPosition = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); @@ -231,7 +231,7 @@ IMPL_LINK_TYPED( LegendPositionResources, PositionChangeHdl, RadioButton&, rRadi //first uncheck of previous button -> ignore that call //the second call gives the check of the new button if( rRadio.IsChecked() ) - m_aChangeLink.Call(NULL); + m_aChangeLink.Call(nullptr); } void LegendPositionResources::SetChangeHdl( const Link<LinkParamNone*,void>& rLink ) diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index c5fcb3c5ab2b..2ce1262110ff 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -42,7 +42,7 @@ void lcl_setValue( FormattedField& rFmtField, double fValue ) TrendlineResources::TrendlineResources( vcl::Window * pParent, const SfxItemSet& rInAttrs ) : m_eTrendLineType( CHREGRESS_LINEAR ), m_bTrendLineUnique( true ), - m_pNumFormatter( NULL ), + m_pNumFormatter( nullptr ), m_nNbPoints( 0 ) { SfxTabPage* pTabPage = reinterpret_cast<SfxTabPage*>(pParent); @@ -110,7 +110,7 @@ IMPL_LINK_TYPED( TrendlineResources, SelectTrendLine, Button *, pRadioButton, vo void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) { - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; if( rInAttrs.GetItemState( SCHATTR_REGRESSION_CURVE_NAME, true, &pPoolItem ) == SfxItemState::SET ) { diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index 80255fb15264..5e9ea4c8a87b 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -84,7 +84,7 @@ struct LightSourceInfo }; LightSourceInfo::LightSourceInfo() - : pButton(0) + : pButton(nullptr) , aLightSource() { aLightSource.nDiffuseColor = 0xffffff; // white @@ -220,7 +220,7 @@ ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage( vcl::Window* : TabPage ( pWindow ,"tp_3D_SceneIllumination" ,"modules/schart/ui/tp_3D_SceneIllumination.ui") - , m_pLightSourceInfoList(0) + , m_pLightSourceInfoList(nullptr) , m_xSceneProperties( xSceneProperties ) , m_aTimerTriggeredControllerLock( xChartModel ) , m_bInCommitToModel( false ) @@ -261,7 +261,7 @@ ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage( vcl::Window* m_pLightSourceInfoList[6].pButton = m_pBtn_Light7; m_pLightSourceInfoList[7].pButton = m_pBtn_Light8; - fillControlsFromModel(0); + fillControlsFromModel(nullptr); m_pBtn_Light1->SetClickHdl( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) ); m_pBtn_Light2->SetClickHdl( LINK( this, ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl ) ); @@ -292,7 +292,7 @@ ThreeD_SceneIllumination_TabPage::~ThreeD_SceneIllumination_TabPage() void ThreeD_SceneIllumination_TabPage::dispose() { delete[] m_pLightSourceInfoList; - m_pLightSourceInfoList = NULL; + m_pLightSourceInfoList = nullptr; m_pBtn_Light1.clear(); m_pBtn_Light2.clear(); m_pBtn_Light3.clear(); @@ -426,14 +426,14 @@ IMPL_LINK_TYPED( ThreeD_SceneIllumination_TabPage, ColorDialogHdl, Button*, pBut else { //get active lightsource: - LightSourceInfo* pInfo = 0; + LightSourceInfo* pInfo = nullptr; sal_Int32 nL=0; for( nL=0; nL<8; nL++) { pInfo = &m_pLightSourceInfoList[nL]; if(pInfo->pButton->IsChecked()) break; - pInfo = 0; + pInfo = nullptr; } if(pInfo) applyLightSourceToModel( nL ); @@ -454,14 +454,14 @@ IMPL_LINK_TYPED( ThreeD_SceneIllumination_TabPage, SelectColorHdl, ListBox&, rBo else if(pListBox==m_pLB_LightSource) { //get active lightsource: - LightSourceInfo* pInfo = 0; + LightSourceInfo* pInfo = nullptr; sal_Int32 nL=0; for( nL=0; nL<8; nL++) { pInfo = &m_pLightSourceInfoList[nL]; if(pInfo->pButton->IsChecked()) break; - pInfo = 0; + pInfo = nullptr; } if(pInfo) { @@ -478,7 +478,7 @@ IMPL_LINK_TYPED( ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl, Bu if( !pButton ) return; - LightSourceInfo* pInfo = 0; + LightSourceInfo* pInfo = nullptr; sal_Int32 nL=0; for( nL=0; nL<8; nL++) { diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index f478eb08aa99..7aa4a181a3bf 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -78,7 +78,7 @@ SchAxisLabelTabPage::~SchAxisLabelTabPage() void SchAxisLabelTabPage::dispose() { delete m_pOrientHlp; - m_pOrientHlp = NULL; + m_pOrientHlp = nullptr; m_pCbShowDescription.clear(); m_pFlOrder.clear(); m_pRbSideBySide.clear(); @@ -156,7 +156,7 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs ) void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) { - const SfxPoolItem* pPoolItem = NULL; + const SfxPoolItem* pPoolItem = nullptr; // show description SfxItemState aState = rInAttrs->GetItemState( SCHATTR_AXIS_SHOWDESCR, false, &pPoolItem ); diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index 590c7543c4dd..6b29e4bc42ad 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -47,7 +47,7 @@ AxisPositionsTabPage::AxisPositionsTabPage(vcl::Window* pWindow,const SfxItemSet ,"tp_AxisPositions" ,"modules/schart/ui/tp_AxisPositions.ui" , &rInAttrs) - , m_pNumFormatter(NULL) + , m_pNumFormatter(nullptr) , m_bCrossingAxisIsCategoryAxis(false) , m_aCategories() , m_bSupportAxisPositioning(false) @@ -180,7 +180,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs) } //fill controls - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; //axis line if(rInAttrs->GetItemState(SCHATTR_AXIS_POSITION,true, &pPoolItem)== SfxItemState::SET) @@ -290,7 +290,7 @@ void AxisPositionsTabPage::SetNumFormatter( SvNumberFormatter* pFormatter ) m_pED_CrossesAt->SetFormatter( m_pNumFormatter ); m_pED_CrossesAt->UseInputStringForFormatting(); - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; if( GetItemSet().GetItemState( SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT, true, &pPoolItem ) == SfxItemState::SET ) { sal_uLong nFmt = (sal_uLong)static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.hxx b/chart2/source/controller/dialogs/tp_AxisPositions.hxx index 0eaad2d00437..19b6caeb032d 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.hxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.hxx @@ -40,7 +40,7 @@ public: virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override; virtual void Reset( const SfxItemSet* rInAttrs ) override; using TabPage::DeactivatePage; - virtual sfxpg DeactivatePage( SfxItemSet* pItemSet = NULL ) override; + virtual sfxpg DeactivatePage( SfxItemSet* pItemSet = nullptr ) override; void SetNumFormatter( SvNumberFormatter* pFormatter ); diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 7d93d6da2ddc..1d9a72409ca8 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -694,7 +694,7 @@ ChartTypeTabPage::ChartTypeTabPage(vcl::Window* pParent , m_xChartModel( xChartModel ) , m_xCC( xContext ) , m_aChartTypeDialogControllerList(0) - , m_pCurrentMainType(0) + , m_pCurrentMainType(nullptr) , m_nChangingCalls(0) , m_bDoLiveUpdate(bDoLiveUpdate) , m_aTimerTriggeredControllerLock( uno::Reference< frame::XModel >( m_xChartModel, uno::UNO_QUERY ) ) @@ -796,17 +796,17 @@ void ChartTypeTabPage::dispose() //delete all resource helper delete m_pDim3DLookResourceGroup; - m_pDim3DLookResourceGroup = NULL; + m_pDim3DLookResourceGroup = nullptr; delete m_pStackingResourceGroup; - m_pStackingResourceGroup = NULL; + m_pStackingResourceGroup = nullptr; delete m_pSplineResourceGroup; - m_pSplineResourceGroup = NULL; + m_pSplineResourceGroup = nullptr; delete m_pGeometryResourceGroup; - m_pGeometryResourceGroup = NULL; + m_pGeometryResourceGroup = nullptr; delete m_pSortByXValuesResourceGroup; - m_pSortByXValuesResourceGroup = NULL; + m_pSortByXValuesResourceGroup = nullptr; delete m_pGL3DResourceGroup; - m_pGL3DResourceGroup = NULL; + m_pGL3DResourceGroup = nullptr; m_pFT_ChooseType.clear(); m_pMainTypeList.clear(); m_pSubTypeList.clear(); @@ -868,7 +868,7 @@ void ChartTypeTabPage::stateChanged( ChangingResource* /*pResource*/ ) } ChartTypeDialogController* ChartTypeTabPage::getSelectedMainType() { - ChartTypeDialogController* pTypeController = 0; + ChartTypeDialogController* pTypeController = nullptr; ::std::vector< ChartTypeDialogController* >::size_type nM = static_cast< ::std::vector< ChartTypeDialogController* >::size_type >( m_pMainTypeList->GetSelectEntryPos() ); if( nM<m_aChartTypeDialogControllerList.size() ) @@ -1052,7 +1052,7 @@ uno::Reference< XChartTypeTemplate > ChartTypeTabPage::getCurrentTemplate() cons uno::Reference< lang::XMultiServiceFactory > xTemplateManager( m_xChartModel->getChartTypeManager(), uno::UNO_QUERY ); return m_pCurrentMainType->getCurrentTemplate( aParameter, xTemplateManager ); } - return 0; + return nullptr; } } //namespace chart diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index c8f4bf3857d6..aece13483cc5 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -192,7 +192,7 @@ DataSourceTabPage::DataSourceTabPage( m_pTemplateProvider( pTemplateProvider ), m_rDialogModel( rDialogModel ), - m_pCurrentRangeChoosingField( 0 ), + m_pCurrentRangeChoosingField( nullptr ), m_bIsDirty( false ), m_pParentDialog( pParentDialog ), m_pTabPageNotifiable( dynamic_cast< TabPageNotifiable * >( pParentDialog )) @@ -358,7 +358,7 @@ bool DataSourceTabPage::isValid() { bool bRoleRangeValid = true; bool bCategoriesRangeValid = true; - bool bHasSelectedEntry = (m_pLB_SERIES->FirstSelected() != 0); + bool bHasSelectedEntry = (m_pLB_SERIES->FirstSelected() != nullptr); if( bHasSelectedEntry ) bRoleRangeValid = isRangeFieldContentValid( *m_pEDT_RANGE ); @@ -386,7 +386,7 @@ void DataSourceTabPage::updateControlsFromDialogModel() { // series fillSeriesListBox(); - SeriesSelectionChangedHdl( 0 ); + SeriesSelectionChangedHdl( nullptr ); // categories m_pEDT_CATEGORIES->SetText( m_rDialogModel.getCategoriesRange() ); @@ -403,8 +403,8 @@ void DataSourceTabPage::fillSeriesListBox() if( pEntry ) xSelected.set( pEntry->m_xDataSeries ); - bool bHasSelectedEntry = (pEntry != 0); - SvTreeListEntry * pSelectedEntry = 0; + bool bHasSelectedEntry = (pEntry != nullptr); + SvTreeListEntry * pSelectedEntry = nullptr; m_pLB_SERIES->Clear(); ::std::vector< DialogModel::tSeriesWithChartTypeByName > aSeries( @@ -454,7 +454,7 @@ void DataSourceTabPage::fillSeriesListBox() void DataSourceTabPage::fillRoleListBox() { SeriesEntry * pSeriesEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); - bool bHasSelectedEntry = (pSeriesEntry != 0); + bool bHasSelectedEntry = (pSeriesEntry != nullptr); SvTreeListEntry * pRoleEntry = m_pLB_ROLE->FirstSelected(); sal_uLong nRoleIndex = SAL_MAX_UINT32; @@ -495,14 +495,14 @@ void DataSourceTabPage::fillRoleListBox() void DataSourceTabPage::updateControlState() { SvTreeListEntry * pSeriesEntry = m_pLB_SERIES->FirstSelected(); - bool bHasSelectedSeries = (pSeriesEntry != 0); + bool bHasSelectedSeries = (pSeriesEntry != nullptr); bool bHasValidRole = false; bool bHasRangeChooser = m_rDialogModel.getRangeSelectionHelper()->hasRangeSelection(); if( bHasSelectedSeries ) { SvTreeListEntry * pRoleEntry = m_pLB_ROLE->FirstSelected(); - bHasValidRole = (pRoleEntry != 0); + bHasValidRole = (pRoleEntry != nullptr); } m_pBTN_ADD->Enable(); @@ -539,7 +539,7 @@ IMPL_LINK_NOARG_TYPED(DataSourceTabPage, SeriesSelectionChangedHdl, SvTreeListBo if( m_pLB_SERIES->FirstSelected()) { fillRoleListBox(); - RoleSelectionChangedHdl( 0 ); + RoleSelectionChangedHdl( nullptr ); } updateControlState(); } @@ -577,11 +577,11 @@ IMPL_LINK_NOARG_TYPED(DataSourceTabPage, MainRangeButtonClickedHdl, Button*, voi return; SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); - bool bHasSelectedEntry = (pEntry != 0); + bool bHasSelectedEntry = (pEntry != nullptr); OUString aSelectedRolesRange = lcl_GetSelectedRolesRange( *m_pLB_ROLE ); - if( bHasSelectedEntry && (m_pLB_ROLE->FirstSelected() != 0)) + if( bHasSelectedEntry && (m_pLB_ROLE->FirstSelected() != nullptr)) { OUString aUIStr(SCH_RESSTR(STR_DATA_SELECT_RANGE_FOR_SERIES)); @@ -606,7 +606,7 @@ IMPL_LINK_NOARG_TYPED(DataSourceTabPage, MainRangeButtonClickedHdl, Button*, voi m_rDialogModel.getRangeSelectionHelper()->chooseRange( aSelectedRolesRange, aUIStr, *this ); } else - m_pCurrentRangeChoosingField = 0; + m_pCurrentRangeChoosingField = nullptr; } IMPL_LINK_NOARG_TYPED(DataSourceTabPage, CategoriesRangeButtonClickedHdl, Button*, void) @@ -658,7 +658,7 @@ IMPL_LINK_NOARG_TYPED(DataSourceTabPage, AddButtonClickedHdl, Button*, void) if( pNextEntry ) m_pLB_SERIES->Select( pNextEntry ); } - SeriesSelectionChangedHdl( 0 ); + SeriesSelectionChangedHdl( nullptr ); } IMPL_LINK_NOARG_TYPED(DataSourceTabPage, RemoveButtonClickedHdl, Button*, void) @@ -699,7 +699,7 @@ IMPL_LINK_NOARG_TYPED(DataSourceTabPage, RemoveButtonClickedHdl, Button*, void) pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->Next( pEntry )); } } - SeriesSelectionChangedHdl( 0 ); + SeriesSelectionChangedHdl( nullptr ); } } @@ -707,14 +707,14 @@ IMPL_LINK_NOARG_TYPED(DataSourceTabPage, UpButtonClickedHdl, Button*, void) { m_rDialogModel.startControllerLockTimer(); SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); - bool bHasSelectedEntry = (pEntry != 0); + bool bHasSelectedEntry = (pEntry != nullptr); if( bHasSelectedEntry ) { m_rDialogModel.moveSeries( pEntry->m_xDataSeries, DialogModel::MOVE_UP ); setDirty(); fillSeriesListBox(); - SeriesSelectionChangedHdl(0); + SeriesSelectionChangedHdl(nullptr); } } @@ -722,14 +722,14 @@ IMPL_LINK_NOARG_TYPED(DataSourceTabPage, DownButtonClickedHdl, Button*, void) { m_rDialogModel.startControllerLockTimer(); SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); - bool bHasSelectedEntry = (pEntry != 0); + bool bHasSelectedEntry = (pEntry != nullptr); if( bHasSelectedEntry ) { m_rDialogModel.moveSeries( pEntry->m_xDataSeries, DialogModel::MOVE_DOWN ); setDirty(); fillSeriesListBox(); - SeriesSelectionChangedHdl(0); + SeriesSelectionChangedHdl(nullptr); } } @@ -803,7 +803,7 @@ void DataSourceTabPage::listeningFinished( if( ! lcl_UpdateCurrentSeriesName( *m_pLB_SERIES )) fillSeriesListBox(); - m_pCurrentRangeChoosingField = 0; + m_pCurrentRangeChoosingField = nullptr; updateControlState(); lcl_enableRangeChoosing( false, m_pParentDialog ); @@ -823,7 +823,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField ) // @todo: validity check of field content bool bResult = true; - bool bAll = (pField == 0); + bool bAll = (pField == nullptr); Reference< data::XDataProvider > xDataProvider( m_rDialogModel.getDataProvider()); if( bAll || (pField == m_pEDT_CATEGORIES) ) @@ -837,7 +837,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField ) // create or change categories if( !xLabeledSeq.is()) { - xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence( Reference< uno::XComponentContext >(0))); + xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence( Reference< uno::XComponentContext >(nullptr))); m_rDialogModel.setCategories( xLabeledSeq ); } try @@ -853,14 +853,14 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField ) else if( xLabeledSeq.is()) { // clear existing categories - xLabeledSeq.set(0); + xLabeledSeq.set(nullptr); m_rDialogModel.setCategories( xLabeledSeq ); } } } SeriesEntry * pSeriesEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); - bool bHasSelectedEntry = (pSeriesEntry != 0); + bool bHasSelectedEntry = (pSeriesEntry != nullptr); if( bHasSelectedEntry ) { @@ -892,7 +892,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField ) if( ! xLabeledSeq.is()) { // no corresponding labeled data sequence for label found - xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence( Reference< uno::XComponentContext >(0))); + xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence( Reference< uno::XComponentContext >(nullptr))); lcl_addLSequenceToDataSource( xLabeledSeq, xSource ); } } @@ -956,7 +956,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField ) xLabeledSeq.set( lcl_findLSequenceWithOnlyLabel( xSource )); if( ! xLabeledSeq.is()) { - xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence( Reference< uno::XComponentContext >(0))); + xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence( Reference< uno::XComponentContext >(nullptr))); lcl_addLSequenceToDataSource( xLabeledSeq, xSource ); } } diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx index 672efc3527b0..3b2c224788d0 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.hxx +++ b/chart2/source/controller/dialogs/tp_DataSource.hxx @@ -98,7 +98,7 @@ protected: <TRUE/> if the text from the field is a valid format to the internal data was valid */ - bool updateModelFromControl( Edit * pField = 0 ); + bool updateModelFromControl( Edit * pField = nullptr ); /** @return </sal_True>, if the edit field contains a valid range entry. If no XCellRangesAccess can be obtained, </sal_False> is returned. diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx index 1a264f5b6b4f..c6967e8cc3f5 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx @@ -72,7 +72,7 @@ void SchLegendPosTabPage::Reset(const SfxItemSet* rInAttrs) { m_aLegendPositionResources.initFromItemSet(*rInAttrs); - const SfxPoolItem* pPoolItem = 0; + const SfxPoolItem* pPoolItem = nullptr; if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET ) m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue()) ); } diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx index 5975806aa9f1..a3925adbf5d9 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx @@ -32,7 +32,7 @@ namespace chart SchLayoutTabPage::SchLayoutTabPage(vcl::Window* pWindow,const SfxItemSet& rInAttrs) : SfxTabPage(pWindow, "tp_ChartType", "modules/schart/ui/tp_ChartType.ui", &rInAttrs) - , m_pGeometryResources(0) + , m_pGeometryResources(nullptr) { m_pGeometryResources = new BarGeometryResources( this ); } @@ -45,7 +45,7 @@ SchLayoutTabPage::~SchLayoutTabPage() void SchLayoutTabPage::dispose() { delete m_pGeometryResources; - m_pGeometryResources = NULL; + m_pGeometryResources = nullptr; SfxTabPage::dispose(); } @@ -74,7 +74,7 @@ bool SchLayoutTabPage::FillItemSet(SfxItemSet* rOutAttrs) void SchLayoutTabPage::Reset(const SfxItemSet* rInAttrs) { - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; if (rInAttrs->GetItemState(SCHATTR_STYLE_SHAPE,true, &pPoolItem) == SfxItemState::SET) { diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx index d01f02b97cb8..69de86ab9798 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx @@ -84,7 +84,7 @@ bool PolarOptionsTabPage::FillItemSet( SfxItemSet* rOutAttrs ) void PolarOptionsTabPage::Reset(const SfxItemSet* rInAttrs) { - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; if (rInAttrs->GetItemState(SCHATTR_STARTING_ANGLE, true, &pPoolItem) == SfxItemState::SET) { diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index aeb0e6c5d356..645ec8abcd16 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -72,9 +72,9 @@ RangeChooserTabPage::RangeChooserTabPage( vcl::Window* pParent ,"modules/schart/ui/tp_RangeChooser.ui") , m_nChangingControlCalls(0) , m_bIsDirty(false) - , m_xDataProvider( 0 ) + , m_xDataProvider( nullptr ) , m_aLastValidRangeString() - , m_xCurrentChartTypeTemplate(0) + , m_xCurrentChartTypeTemplate(nullptr) , m_pTemplateProvider(pTemplateProvider) , m_rDialogModel( rDialogModel ) , m_pParentDialog( pParentDialog ) diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index ece435b7d433..1160f34b8e79 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -66,7 +66,7 @@ ScaleTabPage::ScaleTabPage(vcl::Window* pWindow,const SfxItemSet& rInAttrs) : m_nHelpTimeUnit(1), m_nAxisType(chart2::AxisType::REALNUMBER), m_bAllowDateAxis(false), - pNumFormatter(NULL), + pNumFormatter(nullptr), m_bShowAxisOrigin(false) { get(m_pCbxReverse, "CBX_REVERSE"); @@ -316,7 +316,7 @@ void ScaleTabPage::Reset(const SfxItemSet* rInAttrs) if(!pNumFormatter) return; - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; if (rInAttrs->GetItemState(SCHATTR_AXIS_ALLOW_DATEAXIS, true, &pPoolItem) == SfxItemState::SET) m_bAllowDateAxis = (bool) static_cast<const SfxBoolItem*>(pPoolItem)->GetValue(); m_nAxisType=chart2::AxisType::REALNUMBER; @@ -434,7 +434,7 @@ SfxTabPage::sfxpg ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet) if ((pNumFormatter->GetType(nStepFmt) & ~css::util::NumberFormat::DEFINED) == css::util::NumberFormat::TEXT) nStepFmt = 0; - Control* pControl = NULL; + Control* pControl = nullptr; sal_uInt16 nErrStrId = 0; double fDummy; @@ -557,7 +557,7 @@ void ScaleTabPage::SetNumFormatter( SvNumberFormatter* pFormatter ) void ScaleTabPage::SetNumFormat() { - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; if( GetItemSet().GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, true, &pPoolItem ) == SfxItemState::SET ) { diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx index c4d2bc6d8194..0798240f1b0b 100644 --- a/chart2/source/controller/dialogs/tp_Scale.hxx +++ b/chart2/source/controller/dialogs/tp_Scale.hxx @@ -40,7 +40,7 @@ public: virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override; virtual void Reset( const SfxItemSet* rInAttrs ) override; using TabPage::DeactivatePage; - virtual sfxpg DeactivatePage( SfxItemSet* pItemSet = NULL ) override; + virtual sfxpg DeactivatePage( SfxItemSet* pItemSet = nullptr ) override; void SetNumFormatter( SvNumberFormatter* pFormatter ); void SetNumFormat(); @@ -116,7 +116,7 @@ private: @return false, if nResIdMessage was 0, true otherwise */ - bool ShowWarning( sal_uInt16 nResIdMessage, Control* pControl = NULL ); + bool ShowWarning( sal_uInt16 nResIdMessage, Control* pControl = nullptr ); void HideAllControls(); }; diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx index 22b68a9c4a95..20617dd167f8 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx @@ -137,7 +137,7 @@ bool SchOptionTabPage::FillItemSet(SfxItemSet* rOutAttrs) void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs) { - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; m_pRbtAxis1->Check(); m_pRbtAxis2->Check(false); diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index 42326214a03e..535ea60a1827 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -63,7 +63,7 @@ SchAlignmentTabPage::~SchAlignmentTabPage() void SchAlignmentTabPage::dispose() { delete m_pOrientHlp; - m_pOrientHlp = NULL; + m_pOrientHlp = nullptr; m_pCtrlDial.clear(); m_pFtRotate.clear(); m_pNfRotate.clear(); diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx index bbb96dfd6e1c..e28bb0571504 100644 --- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx +++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx @@ -148,11 +148,11 @@ void TitlesAndObjectsTabPage::commitToModel() IMPL_LINK_NOARG_TYPED(TitlesAndObjectsTabPage, ChangeCheckBoxHdl, CheckBox&, void) { - ChangeHdl(NULL); + ChangeHdl(nullptr); } IMPL_LINK_NOARG_TYPED(TitlesAndObjectsTabPage, ChangeEditHdl, Edit&, void) { - ChangeHdl(NULL); + ChangeHdl(nullptr); } IMPL_LINK_NOARG_TYPED(TitlesAndObjectsTabPage, ChangeHdl, LinkParamNone*, void) { diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index be031a0f22e8..1166959499cd 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -59,7 +59,7 @@ namespace // this code is copied from sfx2/source/doc/objembed.cxx SfxObjectShell * lcl_GetParentObjectShell( const uno::Reference< frame::XModel > & xModel ) { - SfxObjectShell* pResult = NULL; + SfxObjectShell* pResult = nullptr; try { @@ -90,14 +90,14 @@ OutputDevice * lcl_GetParentRefDevice( const uno::Reference< frame::XModel > & x SfxObjectShell * pParent = lcl_GetParentObjectShell( xModel ); if ( pParent ) return pParent->GetDocumentRefDev(); - return NULL; + return nullptr; } } DrawViewWrapper::DrawViewWrapper( SdrModel* pSdrModel, OutputDevice* pOut, bool bPaintPageForEditMode) : E3dView(pSdrModel, pOut) - , m_pMarkHandleProvider(NULL) + , m_pMarkHandleProvider(nullptr) , m_apOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel)) , m_bRestoreMapMode( false ) { @@ -108,7 +108,7 @@ DrawViewWrapper::DrawViewWrapper( SdrModel* pSdrModel, OutputDevice* pOut, bool // #i12587# support for shapes in chart SdrOutliner* pOutliner = getOutliner(); - SfxItemPool* pOutlinerPool = ( pOutliner ? pOutliner->GetEditTextObjectPool() : NULL ); + SfxItemPool* pOutlinerPool = ( pOutliner ? pOutliner->GetEditTextObjectPool() : nullptr ); if ( pOutlinerPool ) { SvtLinguConfig aLinguConfig; @@ -174,7 +174,7 @@ void DrawViewWrapper::SetMarkHandles() SdrObject* DrawViewWrapper::getHitObject( const Point& rPnt ) const { - SdrObject* pRet = NULL; + SdrObject* pRet = nullptr; SdrSearchOptions nOptions = SdrSearchOptions::DEEP | SdrSearchOptions::TESTMARKABLE; SdrPageView* pSdrPageView = this->GetPageView(); @@ -242,7 +242,7 @@ void DrawViewWrapper::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg SdrObject* DrawViewWrapper::getSelectedObject() const { - SdrObject* pObj(NULL); + SdrObject* pObj(nullptr); const SdrMarkList& rMarkList = this->GetMarkedObjectList(); if(rMarkList.GetMarkCount() == 1) { @@ -255,7 +255,7 @@ SdrObject* DrawViewWrapper::getSelectedObject() const SdrObject* DrawViewWrapper::getTextEditObject() const { SdrObject* pObj = this->getSelectedObject(); - SdrObject* pTextObj = NULL; + SdrObject* pTextObj = nullptr; if( pObj && pObj->HasTextEdit()) pTextObj = static_cast<SdrTextObj*>(pObj); return pTextObj; @@ -293,13 +293,13 @@ SfxItemSet DrawViewWrapper::getPositionAndSizeItemSetFromMarkedObject() const SdrObject* DrawViewWrapper::getNamedSdrObject( const OUString& rName ) const { if(rName.isEmpty()) - return 0; + return nullptr; SdrPageView* pSdrPageView = this->GetPageView(); if( pSdrPageView ) { return DrawModelWrapper::getNamedSdrObject( rName, pSdrPageView->GetObjList() ); } - return 0; + return nullptr; } bool DrawViewWrapper::IsObjectHit( SdrObject* pObj, const Point& rPnt ) @@ -331,7 +331,7 @@ void DrawViewWrapper::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) E3dView::Notify(rBC, rHint); - if( pSdrHint != 0 ) + if( pSdrHint != nullptr ) { SdrHintKind eKind = pSdrHint->GetKind(); if( eKind == HINT_BEGEDIT ) @@ -365,7 +365,7 @@ void DrawViewWrapper::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) SdrObject* DrawViewWrapper::getSdrObject( const uno::Reference< drawing::XShape >& xShape ) { - SdrObject* pRet = 0; + SdrObject* pRet = nullptr; uno::Reference< lang::XUnoTunnel > xUnoTunnel( xShape, uno::UNO_QUERY ); uno::Reference< lang::XTypeProvider > xTypeProvider( xShape, uno::UNO_QUERY ); if(xUnoTunnel.is()&&xTypeProvider.is()) diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx index 4dbe04c2f4e3..4663b70382d3 100644 --- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx +++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx @@ -48,7 +48,7 @@ using namespace ::com::sun::star; ViewElementListProvider::ViewElementListProvider( DrawModelWrapper* pDrawModelWrapper ) : m_pDrawModelWrapper( pDrawModelWrapper ) - , m_pFontList(NULL) + , m_pFontList(nullptr) { } @@ -88,7 +88,7 @@ XHatchListRef ViewElementListProvider::GetHatchList() const { if(m_pDrawModelWrapper) return m_pDrawModelWrapper->GetHatchList(); - return NULL; + return nullptr; } XBitmapListRef ViewElementListProvider::GetBitmapList() const @@ -101,8 +101,8 @@ XBitmapListRef ViewElementListProvider::GetBitmapList() const //create chartspecific symbols for linecharts SdrObjList* ViewElementListProvider::GetSymbolList() const { - SdrObjList* m_pSymbolList = NULL; - uno::Reference< drawing::XShapes > m_xSymbols(NULL);//@todo this keeps the first drawinglayer alive ... + SdrObjList* m_pSymbolList = nullptr; + uno::Reference< drawing::XShapes > m_xSymbols(nullptr);//@todo this keeps the first drawinglayer alive ... try { if(!m_pSymbolList || !m_pSymbolList->GetObjCount()) @@ -182,10 +182,10 @@ FontList* ViewElementListProvider::getFontList() const if(!m_pFontList) { - OutputDevice* pRefDev = m_pDrawModelWrapper ? m_pDrawModelWrapper->getReferenceDevice() : NULL; + OutputDevice* pRefDev = m_pDrawModelWrapper ? m_pDrawModelWrapper->getReferenceDevice() : nullptr; OutputDevice* pDefaultOut = Application::GetDefaultDevice(); m_pFontList = new FontList( pRefDev ? pRefDev : pDefaultOut - , pRefDev ? pDefaultOut : NULL + , pRefDev ? pDefaultOut : nullptr , false ); } return m_pFontList; diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx b/chart2/source/controller/inc/AxisItemConverter.hxx index 63ec727f3f11..7dac3054d019 100644 --- a/chart2/source/controller/inc/AxisItemConverter.hxx +++ b/chart2/source/controller/inc/AxisItemConverter.hxx @@ -39,9 +39,9 @@ public: const css::uno::Reference<css::beans::XPropertySet>& rPropertySet, SfxItemPool& rItemPool, SdrModel& rDrawModel, const css::uno::Reference<css::chart2::XChartDocument> & xChartDoc, - ExplicitScaleData* pScale = NULL, - ExplicitIncrementData* pIncrement = NULL, - const css::awt::Size* pRefSize = NULL ); + ExplicitScaleData* pScale = nullptr, + ExplicitIncrementData* pIncrement = nullptr, + const css::awt::Size* pRefSize = nullptr ); virtual ~AxisItemConverter(); diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx index b1c5c17bfd27..b9fb2d87849e 100644 --- a/chart2/source/controller/inc/ChartController.hxx +++ b/chart2/source/controller/inc/ChartController.hxx @@ -560,11 +560,11 @@ private: void executeDispatch_DeleteMinorGrid(); void executeDispatch_InsertSpecialCharacter(); - void executeDispatch_EditText( const Point* pMousePixel = NULL ); + void executeDispatch_EditText( const Point* pMousePixel = nullptr ); void executeDispatch_SourceData(); void executeDispatch_MoveSeries( bool bForward ); - void StartTextEdit( const Point* pMousePixel = NULL ); + void StartTextEdit( const Point* pMousePixel = nullptr ); bool EndTextEdit(); void executeDispatch_View3D(); @@ -587,7 +587,7 @@ private: const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ); DECL_LINK_TYPED( DoubleClickWaitingHdl, Timer*, void ); - void execute_DoubleClick( const Point* pMousePixel = NULL ); + void execute_DoubleClick( const Point* pMousePixel = nullptr ); void startDoubleClickWaiting(); void stopDoubleClickWaiting(); diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx b/chart2/source/controller/inc/DataPointItemConverter.hxx index 43e2563d257f..8dce43c4a567 100644 --- a/chart2/source/controller/inc/DataPointItemConverter.hxx +++ b/chart2/source/controller/inc/DataPointItemConverter.hxx @@ -46,7 +46,7 @@ public: const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory, GraphicPropertyItemConverter::eGraphicObjectType eMapTo = GraphicPropertyItemConverter::FILLED_DATA_POINT, - const css::awt::Size* pRefSize = NULL, + const css::awt::Size* pRefSize = nullptr, bool bDataSeries = false, bool bUseSpecialFillColor = false, sal_Int32 nSpecialFillColor = 0, diff --git a/chart2/source/controller/inc/DrawViewWrapper.hxx b/chart2/source/controller/inc/DrawViewWrapper.hxx index 4bf7c958102e..7e9853abe58e 100644 --- a/chart2/source/controller/inc/DrawViewWrapper.hxx +++ b/chart2/source/controller/inc/DrawViewWrapper.hxx @@ -66,7 +66,7 @@ public: //pMarkHandleProvider can be NULL; ownership is not taken void setMarkHandleProvider( MarkHandleProvider* pMarkHandleProvider ); - void CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0) override; + void CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr) override; SdrObject* getSelectedObject() const; SdrObject* getTextEditObject() const; diff --git a/chart2/source/controller/inc/LegendItemConverter.hxx b/chart2/source/controller/inc/LegendItemConverter.hxx index d25a8ac050d7..4a6cdcbf9d57 100644 --- a/chart2/source/controller/inc/LegendItemConverter.hxx +++ b/chart2/source/controller/inc/LegendItemConverter.hxx @@ -42,7 +42,7 @@ public: SdrModel& rDrawModel, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory, - const css::awt::Size* pRefSize = NULL ); + const css::awt::Size* pRefSize = nullptr ); virtual ~LegendItemConverter(); diff --git a/chart2/source/controller/inc/MultipleChartConverters.hxx b/chart2/source/controller/inc/MultipleChartConverters.hxx index d14cdffdfbe6..d1b65612948a 100644 --- a/chart2/source/controller/inc/MultipleChartConverters.hxx +++ b/chart2/source/controller/inc/MultipleChartConverters.hxx @@ -35,7 +35,7 @@ public: SfxItemPool& rItemPool, SdrModel& rDrawModel, const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory, - const css::awt::Size* pRefSize = NULL ); + const css::awt::Size* pRefSize = nullptr ); virtual ~AllAxisItemConverter(); @@ -65,7 +65,7 @@ public: SfxItemPool& rItemPool, SdrModel& rDrawModel, const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory, - const css::awt::Size* pRefSize = NULL ); + const css::awt::Size* pRefSize = nullptr ); virtual ~AllDataLabelItemConverter(); @@ -80,7 +80,7 @@ public: const css::uno::Reference<css::frame::XModel>& xChartModel, SfxItemPool& rItemPool, SdrModel& rDrawModel, const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory, - const css::awt::Size* pRefSize = NULL ); + const css::awt::Size* pRefSize = nullptr ); virtual ~AllTitleItemConverter(); diff --git a/chart2/source/controller/inc/ObjectHierarchy.hxx b/chart2/source/controller/inc/ObjectHierarchy.hxx index b48066270f00..193f2e6a3859 100644 --- a/chart2/source/controller/inc/ObjectHierarchy.hxx +++ b/chart2/source/controller/inc/ObjectHierarchy.hxx @@ -52,7 +52,7 @@ public: explicit ObjectHierarchy( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > & xChartDocument, - ExplicitValueProvider * pExplicitValueProvider = 0, + ExplicitValueProvider * pExplicitValueProvider = nullptr, bool bFlattenDiagram = false, bool bOrderingForElementSelector = false ); ~ObjectHierarchy(); @@ -83,7 +83,7 @@ public: explicit ObjectKeyNavigation( const ObjectHierarchy::tOID & rCurrentOID, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > & xChartDocument, - ExplicitValueProvider * pExplicitValueProvider = 0 ); + ExplicitValueProvider * pExplicitValueProvider = nullptr ); bool handleKeyEvent( const ::com::sun::star::awt::KeyEvent & rEvent ); ObjectHierarchy::tOID getCurrentSelection() const { return m_aCurrentOID;} diff --git a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx index b0c5f17fe8f2..030dc1874e96 100644 --- a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx +++ b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx @@ -42,7 +42,7 @@ public: SdrModel& rDrawModel, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory, - const css::awt::Size* pRefSize = NULL ); + const css::awt::Size* pRefSize = nullptr ); virtual ~RegressionEquationItemConverter(); diff --git a/chart2/source/controller/inc/TextDirectionListBox.hxx b/chart2/source/controller/inc/TextDirectionListBox.hxx index 706043034916..3e3562ed9ffa 100644 --- a/chart2/source/controller/inc/TextDirectionListBox.hxx +++ b/chart2/source/controller/inc/TextDirectionListBox.hxx @@ -31,7 +31,7 @@ class TextDirectionListBox : public svx::FrameDirectionListBox { public: explicit TextDirectionListBox( vcl::Window* pParent, - vcl::Window* pWindow1 = 0, vcl::Window* pWindow2 = 0 ); + vcl::Window* pWindow1 = nullptr, vcl::Window* pWindow2 = nullptr ); }; } //namespace chart diff --git a/chart2/source/controller/inc/TextLabelItemConverter.hxx b/chart2/source/controller/inc/TextLabelItemConverter.hxx index eb9b3feaf85e..0da20c0c7222 100644 --- a/chart2/source/controller/inc/TextLabelItemConverter.hxx +++ b/chart2/source/controller/inc/TextLabelItemConverter.hxx @@ -37,7 +37,7 @@ public: const css::uno::Reference<css::beans::XPropertySet>& rPropertySet, const css::uno::Reference<css::chart2::XDataSeries>& xSeries, SfxItemPool& rItemPool, - const css::awt::Size* pRefSize = NULL, + const css::awt::Size* pRefSize = nullptr, bool bDataSeries = false, sal_Int32 nNumberFormat = 0, sal_Int32 nPercentNumberFormat = 0 ); diff --git a/chart2/source/controller/inc/TitleDialogData.hxx b/chart2/source/controller/inc/TitleDialogData.hxx index cc17758c3215..4d52f4dc74b1 100644 --- a/chart2/source/controller/inc/TitleDialogData.hxx +++ b/chart2/source/controller/inc/TitleDialogData.hxx @@ -38,7 +38,7 @@ struct TitleDialogData ::com::sun::star::uno::Sequence< OUString > aTextList; std::unique_ptr< ReferenceSizeProvider > apReferenceSizeProvider; - TitleDialogData(ReferenceSizeProvider* pReferenzeSizeProvider = NULL); + TitleDialogData(ReferenceSizeProvider* pReferenzeSizeProvider = nullptr); void readFromModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel ); /* return true if anything has changed; @@ -46,7 +46,7 @@ struct TitleDialogData */ bool writeDifferenceToModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext - , TitleDialogData* pOldState=NULL ); + , TitleDialogData* pOldState=nullptr ); }; } //namespace chart diff --git a/chart2/source/controller/inc/TitleItemConverter.hxx b/chart2/source/controller/inc/TitleItemConverter.hxx index bc192119c457..93d9f1a93503 100644 --- a/chart2/source/controller/inc/TitleItemConverter.hxx +++ b/chart2/source/controller/inc/TitleItemConverter.hxx @@ -36,7 +36,7 @@ public: const css::uno::Reference<css::beans::XPropertySet>& rPropertySet, SfxItemPool& rItemPool, SdrModel& rDrawModel, const css::uno::Reference<css::lang::XMultiServiceFactory>& xNamedPropertyContainerFactory, - const css::awt::Size* pRefSize = NULL ); + const css::awt::Size* pRefSize = nullptr ); virtual ~TitleItemConverter(); diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx index 59f0b791ccf0..d42c166edf89 100644 --- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -84,8 +84,8 @@ AxisItemConverter::AxisItemConverter( const awt::Size* pRefSize ) : ItemConverter( rPropertySet, rItemPool ), m_xChartDoc( xChartDoc ), - m_pExplicitScale( NULL ), - m_pExplicitIncrement( NULL ) + m_pExplicitScale( nullptr ), + m_pExplicitIncrement( nullptr ) { Reference< lang::XMultiServiceFactory > xNamedPropertyContainerFactory( xChartDoc, uno::UNO_QUERY ); diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx index 805c1d21c480..714bb23fd697 100644 --- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx @@ -168,7 +168,7 @@ GraphicPropertyItemConverter::~GraphicPropertyItemConverter() const sal_uInt16 * GraphicPropertyItemConverter::GetWhichPairs() const { - const sal_uInt16 * pResult = NULL; + const sal_uInt16 * pResult = nullptr; switch( m_eGraphicObjectType ) { diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx index a5acbc5be764..312eaeadecbb 100644 --- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx @@ -34,7 +34,7 @@ ItemConverter::ItemConverter( const uno::Reference< beans::XPropertySet > & rPropertySet, SfxItemPool& rItemPool ) : m_xPropertySet( rPropertySet ), - m_xPropertySetInfo( NULL ), + m_xPropertySetInfo( nullptr ), m_rItemPool( rItemPool ), m_bIsValid( true ) { @@ -83,7 +83,7 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const tPropertyNameWithMemberId aProperty; SfxItemPool & rPool = GetItemPool(); - assert(pRanges != NULL); + assert(pRanges != nullptr); OSL_ASSERT( m_xPropertySetInfo.is()); OSL_ASSERT( m_xPropertySet.is()); @@ -221,7 +221,7 @@ void ItemConverter::InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItem { SfxWhichIter aIter (rSourceSet); sal_uInt16 nWhich = aIter.FirstWhich (); - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; while (nWhich) { diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx index 41b65a980bc6..7dd83bdd9473 100644 --- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx @@ -104,7 +104,7 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe { case SCHATTR_LEGEND_SHOW: { - const SfxPoolItem* pPoolItem = NULL; + const SfxPoolItem* pPoolItem = nullptr; if( rInItemSet.GetItemState( SCHATTR_LEGEND_SHOW, true, &pPoolItem ) == SfxItemState::SET ) { bool bShow = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); @@ -121,7 +121,7 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe break; case SCHATTR_LEGEND_POS: { - const SfxPoolItem* pPoolItem = NULL; + const SfxPoolItem* pPoolItem = nullptr; if( rInItemSet.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SfxItemState::SET ) { chart2::LegendPosition eNewPos = static_cast<chart2::LegendPosition>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue()); diff --git a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx index af676b1823fe..bfcd17a10cf3 100644 --- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx +++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx @@ -54,7 +54,7 @@ AllAxisItemConverter::AllAxisItemConverter( uno::Reference< beans::XPropertySet > xObjectProperties(aElementList[nA], uno::UNO_QUERY); m_aConverters.push_back( new ::chart::wrapper::AxisItemConverter( xObjectProperties, rItemPool, rDrawModel, - uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ), 0, 0, + uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ), nullptr, nullptr, pRefSize)); } } @@ -112,7 +112,7 @@ AllDataLabelItemConverter::AllDataLabelItemConverter( for( aIt = aSeriesList.begin(); aIt != aSeriesList.end(); ++aIt ) { uno::Reference< beans::XPropertySet > xObjectProperties( *aIt, uno::UNO_QUERY); - uno::Reference< uno::XComponentContext> xContext(0);//do not need Context for label properties + uno::Reference< uno::XComponentContext> xContext(nullptr);//do not need Context for label properties sal_Int32 nNumberFormat=ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( xObjectProperties, *aIt, -1/*nPointIndex*/, ChartModelHelper::findDiagram( xChartModel ) ); sal_Int32 nPercentNumberFormat=ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabel( diff --git a/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx index 32dd551f2987..3570366d0936 100644 --- a/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx @@ -28,7 +28,7 @@ using namespace ::com::sun::star; namespace chart { namespace wrapper { MultipleItemConverter::MultipleItemConverter( SfxItemPool& rItemPool ) - : ItemConverter( NULL, rItemPool ) + : ItemConverter( nullptr, rItemPool ) { } MultipleItemConverter::~MultipleItemConverter() diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx index f7d905c440a2..999bbe888699 100644 --- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx @@ -119,7 +119,7 @@ uno::Reference< beans::XPropertySet > lcl_getEquationProperties( if( pItemSet ) { SvxChartRegress eRegress = CHREGRESS_NONE; - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; if( pItemSet->GetItemState( SCHATTR_REGRESSION_TYPE, true, &pPoolItem ) == SfxItemState::SET ) { eRegress = static_cast< const SvxChartRegressItem * >( pPoolItem )->GetValue(); @@ -150,7 +150,7 @@ uno::Reference< beans::XPropertySet > lcl_getCurveProperties( if( pItemSet ) { SvxChartRegress eRegress = CHREGRESS_NONE; - const SfxPoolItem *pPoolItem = NULL; + const SfxPoolItem *pPoolItem = nullptr; if( pItemSet->GetItemState( SCHATTR_REGRESSION_TYPE, true, &pPoolItem ) == SfxItemState::SET ) { eRegress = static_cast< const SvxChartRegressItem * >( pPoolItem )->GetValue(); @@ -722,63 +722,63 @@ void StatisticsItemConverter::FillSpecialItem( case SCHATTR_REGRESSION_DEGREE: { - uno::Reference<beans::XPropertySet> xProperties( lcl_getCurveProperties( GetPropertySet(), 0 )); + uno::Reference<beans::XPropertySet> xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, "PolynomialDegree"); } break; case SCHATTR_REGRESSION_PERIOD: { - uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), 0 )); + uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); lclConvertToItemSet<sal_Int32, SfxInt32Item>(rOutItemSet, nWhichId, xProperties, "MovingAveragePeriod"); } break; case SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD: { - uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), 0 )); + uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); lclConvertToItemSetDouble(rOutItemSet, nWhichId, xProperties, "ExtrapolateForward"); } break; case SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD: { - uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), 0 )); + uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); lclConvertToItemSetDouble(rOutItemSet, nWhichId, xProperties, "ExtrapolateBackward"); } break; case SCHATTR_REGRESSION_SET_INTERCEPT: { - uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), 0 )); + uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); lclConvertToItemSet<sal_Bool, SfxBoolItem>(rOutItemSet, nWhichId, xProperties, "ForceIntercept"); } break; case SCHATTR_REGRESSION_INTERCEPT_VALUE: { - uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), 0 )); + uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); lclConvertToItemSetDouble(rOutItemSet, nWhichId, xProperties, "InterceptValue"); } break; case SCHATTR_REGRESSION_CURVE_NAME: { - uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), 0 )); + uno::Reference< beans::XPropertySet > xProperties( lcl_getCurveProperties( GetPropertySet(), nullptr )); lclConvertToItemSet<OUString, SfxStringItem>(rOutItemSet, nWhichId, xProperties, "CurveName"); } break; case SCHATTR_REGRESSION_SHOW_EQUATION: { - uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), 0 )); + uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), nullptr )); lclConvertToItemSet<sal_Bool, SfxBoolItem>(rOutItemSet, nWhichId, xEqProp, "ShowEquation"); } break; case SCHATTR_REGRESSION_SHOW_COEFF: { - uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), 0 )); + uno::Reference< beans::XPropertySet > xEqProp( lcl_getEquationProperties( GetPropertySet(), nullptr )); lclConvertToItemSet<sal_Bool, SfxBoolItem>(rOutItemSet, nWhichId, xEqProp, "ShowCorrelationCoefficient"); } break; diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 3b9f86aa79a3..b9631018f251 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -97,24 +97,24 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; ChartController::ChartController(uno::Reference<uno::XComponentContext> const & xContext) : - m_aLifeTimeManager( NULL ), + m_aLifeTimeManager( nullptr ), m_bSuspended( false ), m_bCanClose( true ), m_xCC(xContext), //@todo is it allowed to hold this context?? - m_xFrame( NULL ), + m_xFrame( nullptr ), m_aModelMutex(), - m_aModel( NULL, m_aModelMutex ), - m_pChartWindow( NULL ), + m_aModel( nullptr, m_aModelMutex ), + m_pChartWindow( nullptr ), m_xViewWindow(), m_xChartView(), m_pDrawModelWrapper(), - m_pDrawViewWrapper(NULL), + m_pDrawViewWrapper(nullptr), m_eDragMode(SDRDRAG_MOVE), m_bWaitingForDoubleClick(false), m_bWaitingForMouseUp(false), m_bConnectingToView(false), m_bDisposed(false), - m_xUndoManager( 0 ), + m_xUndoManager( nullptr ), m_aDispatchContainer( m_xCC, this ), m_eDrawMode( CHARTDRAW_SELECT ), mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler( @@ -131,7 +131,7 @@ ChartController::~ChartController() ChartController::TheModel::TheModel( const uno::Reference< frame::XModel > & xModel ) : m_xModel( xModel ), - m_xCloseable( NULL ), + m_xCloseable( nullptr ), m_bOwnership( true ) { m_xCloseable = @@ -277,7 +277,7 @@ ChartController::TheModelRef::~TheModelRef() } bool ChartController::TheModelRef::is() const { - return (m_pTheModel != 0); + return (m_pTheModel != nullptr); } namespace { @@ -399,19 +399,19 @@ uno::Reference<ui::XSidebar> getSidebarFromModel(uno::Reference<frame::XModel> x { uno::Reference<container::XChild> xChild(xModel, uno::UNO_QUERY); if (!xChild.is()) - return NULL; + return nullptr; uno::Reference<frame::XModel> xParent (xChild->getParent(), uno::UNO_QUERY); if (!xParent.is()) - return NULL; + return nullptr; uno::Reference<frame::XController2> xController(xParent->getCurrentController(), uno::UNO_QUERY); if (!xController.is()) - return NULL; + return nullptr; uno::Reference<ui::XSidebarProvider> xSidebarProvider (xController->getSidebar(), uno::UNO_QUERY); if (!xSidebarProvider.is()) - return NULL; + return nullptr; uno::Reference<ui::XSidebar> xSidebar(xSidebarProvider->getSidebar(), uno::UNO_QUERY); @@ -463,7 +463,7 @@ void SAL_CALL ChartController::attachFrame( //create view @todo is this the correct place here?? - vcl::Window* pParent = NULL; + vcl::Window* pParent = nullptr; //get the window parent from the frame to use as parent for our new window if(xFrame.is()) { @@ -869,7 +869,7 @@ void SAL_CALL ChartController::dispose() //the accessible view is disposed within window destructor of m_pChartWindow m_pChartWindow->clear(); - m_pChartWindow = NULL;//m_pChartWindow is deleted via UNO due to dispose of m_xViewWindow (trigerred by Framework (Controller pretends to be XWindow also)) + m_pChartWindow = nullptr;//m_pChartWindow is deleted via UNO due to dispose of m_xViewWindow (trigerred by Framework (Controller pretends to be XWindow also)) m_xViewWindow->dispose(); m_xChartView.clear(); } @@ -878,14 +878,14 @@ void SAL_CALL ChartController::dispose() if( m_xLayoutManagerEventBroadcaster.is()) { m_xLayoutManagerEventBroadcaster->removeLayoutManagerEventListener( this ); - m_xLayoutManagerEventBroadcaster.set( 0 ); + m_xLayoutManagerEventBroadcaster.set( nullptr ); } m_xFrame.clear(); m_xUndoManager.clear(); TheModelRef aModelRef( m_aModel, m_aModelMutex); - m_aModel = NULL; + m_aModel = nullptr; if( aModelRef.is()) { @@ -1017,7 +1017,7 @@ bool ChartController::impl_releaseThisModel( ::osl::Guard< ::osl::Mutex > aGuard( m_aModelMutex ); if( m_aModel.is() && m_aModel->getModel() == xModel ) { - m_aModel = NULL; + m_aModel = nullptr; m_xUndoManager.clear(); bReleaseModel = true; } @@ -1025,7 +1025,7 @@ bool ChartController::impl_releaseThisModel( if( bReleaseModel ) { SolarMutexGuard g; - m_aDispatchContainer.setModel( 0 ); + m_aDispatchContainer.setModel( nullptr ); } return bReleaseModel; } @@ -1038,7 +1038,7 @@ void SAL_CALL ChartController::disposing( if( !impl_releaseThisModel( rSource.Source )) { if( rSource.Source == m_xLayoutManagerEventBroadcaster ) - m_xLayoutManagerEventBroadcaster.set( 0 ); + m_xLayoutManagerEventBroadcaster.set( nullptr ); } } diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index dc33d0becc1d..5c65fd3457f1 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -56,7 +56,7 @@ void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectang RECT_POINT eRP = (RECT_POINT)RP_LT; - const SfxPoolItem* pPoolItem=NULL; + const SfxPoolItem* pPoolItem=nullptr; //read position if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem)) nPosX= static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index c1b2f16f5d65..43d9ca1212eb 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -74,14 +74,14 @@ wrapper::ItemConverter* createItemConverter( const uno::Reference<uno::XComponentContext>& xContext, SdrModel& rDrawModel, ExplicitValueProvider* pExplicitValueProvider, ReferenceSizeProvider* pRefSizeProvider ) { - wrapper::ItemConverter* pItemConverter=NULL; + wrapper::ItemConverter* pItemConverter=nullptr; //get type of selected object ObjectType eObjectType = ObjectIdentifier::getObjectType( aObjectCID ); if( OBJECTTYPE_UNKNOWN==eObjectType ) { OSL_FAIL("unknown ObjectType"); - return NULL; + return nullptr; } OUString aParticleID = ObjectIdentifier::getParticleID( aObjectCID ); @@ -91,7 +91,7 @@ wrapper::ItemConverter* createItemConverter( uno::Reference< beans::XPropertySet > xObjectProperties = ObjectIdentifier::getObjectPropertySet( aObjectCID, xChartModel ); if(!xObjectProperties.is()) - return NULL; + return nullptr; //create itemconverter for a single object switch(eObjectType) { @@ -768,7 +768,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( if(aDialogParameter.HasSymbolProperties()) { - SfxItemSet* pSymbolShapeProperties=NULL; + SfxItemSet* pSymbolShapeProperties=nullptr; uno::Reference< beans::XPropertySet > xObjectProperties = ObjectIdentifier::getObjectPropertySet( rObjectCID, getModel() ); wrapper::DataPointItemConverter aSymbolItemConverter( getModel(), m_xCC diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index 647471d7e4c9..9301e47cf770 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -76,7 +76,7 @@ void ChartController::StartTextEdit( const Point* pMousePixel ) , m_pChartWindow , false //bIsNewObj , pOutliner - , 0L //pOutlinerView + , nullptr //pOutlinerView , true //bDontDeleteOutliner , true //bOnlyOneView ); @@ -174,7 +174,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter() if( pDlg->Execute() == RET_OK ) { const SfxItemSet* pSet = pDlg->GetOutputItemSet(); - const SfxPoolItem* pItem=0; + const SfxPoolItem* pItem=nullptr; OUString aString; if ( pSet && pSet->GetItemState( SID_CHARMAP, true, &pItem) == SfxItemState::SET && dynamic_cast< const SfxStringItem* >(pItem) != nullptr ) diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index bd91f1c739eb..6cfece93b5dc 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -393,7 +393,7 @@ void ChartController::impl_PasteShapes( SdrModel* pModel ) while ( aIter.IsMore() ) { SdrObject* pObj = aIter.Next(); - SdrObject* pNewObj = ( pObj ? pObj->Clone() : NULL ); + SdrObject* pNewObj = ( pObj ? pObj->Clone() : nullptr ); if ( pNewObj ) { pNewObj->SetModel( &pDrawModelWrapper->getSdrModel() ); @@ -500,7 +500,7 @@ void ChartController::executeDispatch_Copy() SolarMutexGuard aSolarGuard; if ( m_pDrawModelWrapper ) { - SdrObject* pSelectedObj = 0; + SdrObject* pSelectedObj = nullptr; ObjectIdentifier aSelOID( m_aSelection.getSelectedOID() ); if ( aSelOID.isAutoGeneratedObject() ) { diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index f6b03de8406b..1b4dd62efc09 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -603,7 +603,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) if( isDoubleClick(rMEvt) ) //do not change selection if double click return;//double click is handled further in mousebutton up - SdrHdl* pHitSelectionHdl = 0; + SdrHdl* pHitSelectionHdl = nullptr; //switch from move to resize if handle is hit on a resizable object if( m_aSelection.isResizeableObjectSelected() ) pHitSelectionHdl = pDrawViewWrapper->PickHandle( aMPos ); @@ -662,7 +662,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) { //start drag sal_uInt16 nDrgLog = (sal_uInt16)m_pChartWindow->PixelToLogic(Size(DRGPIX,0)).Width(); - SdrDragMethod* pDragMethod = NULL; + SdrDragMethod* pDragMethod = nullptr; //change selection to 3D scene if rotate mode SdrDragMode eDragMode = pDrawViewWrapper->GetDragMode(); @@ -691,7 +691,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) if( aDragMethodServiceName.equals( ObjectIdentifier::getPieSegmentDragMethodServiceName() ) ) pDragMethod = new DragMethod_PieSegment( *pDrawViewWrapper, m_aSelection.getSelectedCID(), getModel() ); } - pDrawViewWrapper->SdrView::BegDragObj(aMPos, NULL, pHitSelectionHdl, nDrgLog, pDragMethod); + pDrawViewWrapper->SdrView::BegDragObj(aMPos, nullptr, pHitSelectionHdl, nDrgLog, pDragMethod); } impl_SetMousePointer( rMEvt ); @@ -1820,7 +1820,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) return;//don't change pointer during running action } - SdrHdl* pHitSelectionHdl = 0; + SdrHdl* pHitSelectionHdl = nullptr; if( m_aSelection.isResizeableObjectSelected() ) pHitSelectionHdl = m_pDrawViewWrapper->PickHandle( aMousePos ); diff --git a/chart2/source/controller/main/ChartDropTargetHelper.cxx b/chart2/source/controller/main/ChartDropTargetHelper.cxx index 39ffe3714880..097929533608 100644 --- a/chart2/source/controller/main/ChartDropTargetHelper.cxx +++ b/chart2/source/controller/main/ChartDropTargetHelper.cxx @@ -134,7 +134,7 @@ sal_Int8 ChartDropTargetHelper::ExecuteDrop( const ExecuteDropEvent& rEvt ) xDataProvider->detectArguments( xDataSource )); OUString aOldRange; - beans::PropertyValue * pCellRange = 0; + beans::PropertyValue * pCellRange = nullptr; for( sal_Int32 i=0; i<aArguments.getLength(); ++i ) { if ( aArguments[i].Name == "CellRangeRepresentation" ) diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx index 5669aa88c4fd..8e8c7d547196 100644 --- a/chart2/source/controller/main/ChartFrameloader.cxx +++ b/chart2/source/controller/main/ChartFrameloader.cxx @@ -120,8 +120,8 @@ sal_Bool SAL_CALL ChartFrameLoader::load( const uno::Sequence< beans::PropertyVa } //create the controller(+XWindow) - uno::Reference< frame::XController > xController = NULL; - uno::Reference< awt::XWindow > xComponentWindow = NULL; + uno::Reference< frame::XController > xController = nullptr; + uno::Reference< awt::XWindow > xComponentWindow = nullptr; { xController.set( m_xCC->getServiceManager()->createInstanceWithContext( diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx index c6f47028d0f0..963285af6870 100644 --- a/chart2/source/controller/main/ChartTransferable.cxx +++ b/chart2/source/controller/main/ChartTransferable.cxx @@ -43,7 +43,7 @@ namespace chart { ChartTransferable::ChartTransferable( SdrModel* pDrawModel, SdrObject* pSelectedObj, bool bDrawing ) - :m_pMarkedObjModel( NULL ) + :m_pMarkedObjModel( nullptr ) ,m_bDrawing( bDrawing ) { SdrExchangeView * pExchgView( new SdrView( pDrawModel )); diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index 1448b70bbba1..80b076930623 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -93,7 +93,7 @@ void ChartWindow::dispose() void ChartWindow::clear() { - m_pWindowController=0; + m_pWindowController=nullptr; this->ReleaseMouse(); } diff --git a/chart2/source/controller/main/CommandDispatch.cxx b/chart2/source/controller/main/CommandDispatch.cxx index 592d8a501a21..35cbf08400df 100644 --- a/chart2/source/controller/main/CommandDispatch.cxx +++ b/chart2/source/controller/main/CommandDispatch.cxx @@ -106,7 +106,7 @@ void SAL_CALL CommandDispatch::removeStatusListener( const Reference< frame::XSt void SAL_CALL CommandDispatch::modified( const lang::EventObject& /* aEvent */ ) throw (uno::RuntimeException, std::exception) { - fireAllStatusEvents( 0 ); + fireAllStatusEvents( nullptr ); } // ____ XEventListener (base of XModifyListener) ____ diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx index 172f8b17be3b..6a16ec031d12 100644 --- a/chart2/source/controller/main/CommandDispatchContainer.cxx +++ b/chart2/source/controller/main/CommandDispatchContainer.cxx @@ -42,8 +42,8 @@ CommandDispatchContainer::CommandDispatchContainer( const Reference< uno::XComponentContext > & xContext, ChartController* pController ) :m_xContext( xContext ) ,m_pChartController( pController ) - ,m_pDrawCommandDispatch( NULL ) - ,m_pShapeController( NULL ) + ,m_pDrawCommandDispatch( nullptr ) + ,m_pShapeController( nullptr ) { m_aContainerDocumentCommands = ::comphelper::MakeSet< OUString > @@ -158,9 +158,9 @@ void CommandDispatchContainer::DisposeAndClear() m_aToBeDisposedDispatches.clear(); m_xChartDispatcher.clear(); m_aChartCommands.clear(); - m_pChartController = NULL; - m_pDrawCommandDispatch = NULL; - m_pShapeController = NULL; + m_pChartController = nullptr; + m_pDrawCommandDispatch = nullptr; + m_pShapeController = nullptr; } Reference< frame::XDispatch > CommandDispatchContainer::getContainerDispatchForURL( diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index ea98429e3d51..b6ba92373b99 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -513,8 +513,8 @@ void ControllerCommandDispatch::fireStatusEventForURLImpl( void ControllerCommandDispatch::updateCommandAvailability() { - bool bModelStateIsValid = ( m_apModelState.get() != 0 ); - bool bControllerStateIsValid = ( m_apControllerState.get() != 0 ); + bool bModelStateIsValid = ( m_apModelState.get() != nullptr ); + bool bControllerStateIsValid = ( m_apControllerState.get() != nullptr ); // Model and controller states exist. OSL_ASSERT( bModelStateIsValid ); OSL_ASSERT( bControllerStateIsValid ); @@ -700,7 +700,7 @@ bool ControllerCommandDispatch::commandAvailable( const OUString & rCommand ) bool ControllerCommandDispatch::isShapeControllerCommandAvailable( const OUString& rCommand ) { - ShapeController* pShapeController(0); + ShapeController* pShapeController(nullptr); { SolarMutexGuard g; if (m_pDispatchContainer) diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx index d929342ad43d..d07ecfdae0f0 100644 --- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx +++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx @@ -48,7 +48,7 @@ DragMethod_RotateDiagram::DragMethod_RotateDiagram( DrawViewWrapper& rDrawViewWr , const Reference< frame::XModel >& xChartModel , RotationDirection eRotationDirection ) : DragMethod_Base( rDrawViewWrapper, rObjectCID, xChartModel, ActionDescriptionProvider::ROTATE ) - , m_pScene(0) + , m_pScene(nullptr) , m_aReferenceRect(100,100,100,100) , m_aStartPos(0,0) , m_aWireframePolyPolygon() diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index e0d9bd288c47..5c720970eb22 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -428,7 +428,7 @@ void DrawCommandDispatch::describeSupportedFeatures() void DrawCommandDispatch::setInsertObj( sal_uInt16 eObj ) { - DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL ); + DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : nullptr ); if ( pDrawViewWrapper ) { pDrawViewWrapper->SetCurrentObj( eObj /*, Inventor */); @@ -437,9 +437,9 @@ void DrawCommandDispatch::setInsertObj( sal_uInt16 eObj ) SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID ) { - SdrObject* pObj = NULL; - DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL ); - DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : NULL ); + SdrObject* pObj = nullptr; + DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : nullptr ); + DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : nullptr ); if ( pDrawViewWrapper && pDrawModelWrapper ) { diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx index ce31668418c0..2da31d272691 100644 --- a/chart2/source/controller/main/ElementSelector.cxx +++ b/chart2/source/controller/main/ElementSelector.cxx @@ -108,7 +108,7 @@ void SelectorListBox::UpdateChartElementsListAndSelection() Reference< lang::XMultiServiceFactory > xFact( xChartController->getModel(), uno::UNO_QUERY ); if( xFact.is() ) xChartView = xFact->createInstance( CHART_VIEW_SERVICE_NAME ); - ExplicitValueProvider* pExplicitValueProvider = 0; //ExplicitValueProvider::getExplicitValueProvider(xChartView); this creates all visible data points, that's too much + ExplicitValueProvider* pExplicitValueProvider = nullptr; //ExplicitValueProvider::getExplicitValueProvider(xChartView); this creates all visible data points, that's too much ObjectHierarchy aHierarchy( xChartDoc, pExplicitValueProvider, true /*bFlattenDiagram*/, true /*bOrderingForElementSelector*/ ); lcl_addObjectsToList( aHierarchy, ::chart::ObjectHierarchy::getRootNodeOID(), m_aEntries, 0, xChartDoc ); diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx index da568338deab..dcb63800505a 100644 --- a/chart2/source/controller/main/ObjectHierarchy.cxx +++ b/chart2/source/controller/main/ObjectHierarchy.cxx @@ -178,7 +178,7 @@ ImplObjectHierarchy::ImplObjectHierarchy( { createTree( xChartDocument ); // don't remember this helper to avoid access after lifetime - m_pExplicitValueProvider = 0; + m_pExplicitValueProvider = nullptr; } void ImplObjectHierarchy::createTree( const Reference< XChartDocument >& xChartDocument ) diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index 4dbdd26255f0..aa617af60e6c 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -56,7 +56,7 @@ void impl_selectObject( SdrObject* pObjectToSelect, DrawViewWrapper& rDrawViewWr SdrObject* pMarkObj = aSelectionHelper.getObjectToMark(); rDrawViewWrapper.setMarkHandleProvider(&aSelectionHelper); rDrawViewWrapper.MarkObject(pMarkObj); - rDrawViewWrapper.setMarkHandleProvider(NULL); + rDrawViewWrapper.setMarkHandleProvider(nullptr); } } @@ -143,7 +143,7 @@ void Selection::applySelection( DrawViewWrapper* pDrawViewWrapper ) SolarMutexGuard aSolarGuard; pDrawViewWrapper->UnmarkAll(); } - SdrObject* pObjectToSelect = 0; + SdrObject* pObjectToSelect = nullptr; if ( m_aSelectedOID.isAutoGeneratedObject() ) { pObjectToSelect = pDrawViewWrapper->getNamedSdrObject( m_aSelectedOID.getObjectCID() ); @@ -269,7 +269,7 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* //check whether the legend was hit but not selected (e.g. because it has no filling): if( bBackGroundHit || m_aSelectedOID.getObjectCID().equals( aDiagramCID ) ) { - OUString aLegendCID( ObjectIdentifier::createClassifiedIdentifierForParticle( ObjectIdentifier::createParticleForLegend(0,0) ) );//@todo read CID from model + OUString aLegendCID( ObjectIdentifier::createClassifiedIdentifierForParticle( ObjectIdentifier::createParticleForLegend(nullptr,nullptr) ) );//@todo read CID from model SdrObject* pLegend = pDrawViewWrapper->getNamedSdrObject( aLegendCID ); if( pLegend ) { @@ -458,7 +458,7 @@ bool SelectionHelper::isRotateableObject( const OUString& rCID } SelectionHelper::SelectionHelper( SdrObject* pSelectedObj ) - : m_pSelectedObj( pSelectedObj ), m_pMarkObj(NULL) + : m_pSelectedObj( pSelectedObj ), m_pMarkObj(nullptr) { } @@ -477,12 +477,12 @@ bool SelectionHelper::getFrameDragSingles() SdrObject* SelectionHelper::getMarkHandlesObject( SdrObject* pObj ) { if(!pObj) - return 0; + return nullptr; OUString aName( lcl_getObjectName( pObj ) ); if( aName.match("MarkHandles") || aName.match("HandlesOnly") ) return pObj; if( !aName.isEmpty() )//don't get the markhandles of a different object - return 0; + return nullptr; //search for a child with name "MarkHandles" or "HandlesOnly" SolarMutexGuard aSolarGuard; @@ -497,7 +497,7 @@ SdrObject* SelectionHelper::getMarkHandlesObject( SdrObject* pObj ) return pMarkHandles; } } - return 0; + return nullptr; } SdrObject* SelectionHelper::getObjectToMark() @@ -534,7 +534,7 @@ E3dScene* SelectionHelper::getSceneToRotate( SdrObject* pObj ) //search whether the object or one of its children is a 3D object //if so, return the accessory 3DScene - E3dObject* pRotateable = 0; + E3dObject* pRotateable = nullptr; if(pObj) { @@ -555,7 +555,7 @@ E3dScene* SelectionHelper::getSceneToRotate( SdrObject* pObj ) } } - E3dScene* pScene = 0; + E3dScene* pScene = nullptr; if(pRotateable) { SolarMutexGuard aSolarGuard; diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index 7fc856e3d9b2..fd0fd480b05d 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -236,7 +236,7 @@ IMPL_LINK_TYPED( ShapeController, CheckNameHdl, AbstractSvxObjectNameDialog&, rD if ( !aName.isEmpty() ) { - DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL ); + DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : nullptr ); if ( pDrawViewWrapper && pDrawViewWrapper->getNamedSdrObject( aName ) ) { return false; @@ -439,7 +439,7 @@ void ShapeController::executeDispatch_ObjectTitleDescription() if ( pFact ) { std::unique_ptr< AbstractSvxObjectTitleDescDialog > pDlg( - pFact->CreateSvxObjectTitleDescDialog( NULL, aTitle, aDescription ) ); + pFact->CreateSvxObjectTitleDescDialog( nullptr, aTitle, aDescription ) ); if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) ) { pDlg->GetTitle( aTitle ); @@ -469,7 +469,7 @@ void ShapeController::executeDispatch_RenameObject() if ( pFact ) { std::unique_ptr< AbstractSvxObjectNameDialog > pDlg( - pFact->CreateSvxObjectNameDialog( NULL, aName ) ); + pFact->CreateSvxObjectNameDialog( nullptr, aName ) ); pDlg->SetCheckNameHdl( LINK( this, ShapeController, CheckNameHdl ) ); if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) ) { @@ -488,7 +488,7 @@ void ShapeController::executeDispatch_RenameObject() void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId ) { SolarMutexGuard aGuard; - DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL ); + DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : nullptr ); if ( pDrawViewWrapper ) { switch ( nId ) @@ -597,11 +597,11 @@ void ShapeController::executeDispatch_ParagraphDialog() SdrObject* ShapeController::getFirstAdditionalShape() { - SdrObject* pFirstObj = NULL; + SdrObject* pFirstObj = nullptr; try { - DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : NULL ); + DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : nullptr ); if ( pDrawModelWrapper ) { Reference< drawing::XShape > xFirstShape; @@ -637,11 +637,11 @@ SdrObject* ShapeController::getFirstAdditionalShape() SdrObject* ShapeController::getLastAdditionalShape() { - SdrObject* pLastObj = NULL; + SdrObject* pLastObj = nullptr; try { - DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : NULL ); + DrawModelWrapper* pDrawModelWrapper = ( m_pChartController ? m_pChartController->GetDrawModelWrapper() : nullptr ); if ( pDrawModelWrapper ) { Reference< drawing::XShape > xLastShape; diff --git a/chart2/source/controller/main/StatusBarCommandDispatch.cxx b/chart2/source/controller/main/StatusBarCommandDispatch.cxx index 4fb944da814f..3fc479921fba 100644 --- a/chart2/source/controller/main/StatusBarCommandDispatch.cxx +++ b/chart2/source/controller/main/StatusBarCommandDispatch.cxx @@ -128,7 +128,7 @@ void SAL_CALL StatusBarCommandDispatch::selectionChanged( const lang::EventObjec m_aSelectedOID = ObjectIdentifier( m_xSelectionSupplier->getSelection() ); else m_aSelectedOID = ObjectIdentifier(); - fireAllStatusEvents( 0 ); + fireAllStatusEvents( nullptr ); } } // namespace chart diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx index 97a96db9ca82..98b628fcf503 100644 --- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx +++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx @@ -69,24 +69,24 @@ Reference<css::ui::XUIElement> SAL_CALL ChartPanelFactory::createUIElement ( Reference<css::frame::XController> xController (aArguments.getOrDefault("Controller", Reference<css::frame::XController>())); vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow); - if ( ! xParentWindow.is() || pParentWindow==NULL) + if ( ! xParentWindow.is() || pParentWindow==nullptr) throw RuntimeException( "PanelFactory::createUIElement called without ParentWindow", - NULL); + nullptr); if ( ! xFrame.is()) throw RuntimeException( "PanelFactory::createUIElement called without Frame", - NULL); + nullptr); if (!xController.is()) throw RuntimeException( "ChartPanelFactory::createUIElement called without Controller", - NULL); + nullptr); ChartController* pController = dynamic_cast<ChartController*>(xController.get()); if (!pController) throw RuntimeException( "ChartPanelFactory::createUIElement called without valid ChartController", - NULL); + nullptr); sal_Int32 nMinimumSize = -1; VclPtr<vcl::Window> pPanel; @@ -118,7 +118,7 @@ Reference<css::ui::XUIElement> SAL_CALL ChartPanelFactory::createUIElement ( { throw css::lang::WrappedTargetRuntimeException( OUString("ChartPanelFactory::createUIElement exception"), - 0, css::uno::makeAny(e)); + nullptr, css::uno::makeAny(e)); } return xElement; diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx index 815a12ae91fe..7dc2b766fd08 100644 --- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx @@ -227,10 +227,10 @@ VclPtr<vcl::Window> ChartAreaPanel::Create( const css::uno::Reference<css::frame::XFrame>& rxFrame, ChartController* pController) { - if (pParent == NULL) - throw css::lang::IllegalArgumentException("no parent Window given to ChartAxisPanel::Create", NULL, 0); + if (pParent == nullptr) + throw css::lang::IllegalArgumentException("no parent Window given to ChartAxisPanel::Create", nullptr, 0); if (!rxFrame.is()) - throw css::lang::IllegalArgumentException("no XFrame given to ChartAxisPanel::Create", NULL, 1); + throw css::lang::IllegalArgumentException("no XFrame given to ChartAxisPanel::Create", nullptr, 1); return VclPtr<ChartAreaPanel>::Create( pParent, rxFrame, pController); @@ -413,8 +413,8 @@ void ChartAreaPanel::updateData() xPropSet->getPropertyValue("FillBitmapName") >>= aBitmapName; GraphicObject xBitmap = getXBitmapFromName(mxModel, aBitmapName); XFillBitmapItem aBitmapItem(aBitmapName, xBitmap); - XFillBitmapItem* pBitmapItem = NULL; - DrawModelWrapper* pModelWrapper = NULL; + XFillBitmapItem* pBitmapItem = nullptr; + DrawModelWrapper* pModelWrapper = nullptr; try { pModelWrapper = getDrawModelWrapper(mxModel); diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.cxx b/chart2/source/controller/sidebar/ChartAxisPanel.cxx index bb7236097524..58fa4bbee981 100644 --- a/chart2/source/controller/sidebar/ChartAxisPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAxisPanel.cxx @@ -297,10 +297,10 @@ VclPtr<vcl::Window> ChartAxisPanel::Create ( const css::uno::Reference<css::frame::XFrame>& rxFrame, ChartController* pController) { - if (pParent == NULL) - throw lang::IllegalArgumentException("no parent Window given to ChartAxisPanel::Create", NULL, 0); + if (pParent == nullptr) + throw lang::IllegalArgumentException("no parent Window given to ChartAxisPanel::Create", nullptr, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to ChartAxisPanel::Create", NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to ChartAxisPanel::Create", nullptr, 1); return VclPtr<ChartAxisPanel>::Create( pParent, rxFrame, pController); diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx index 3d74fd22c654..223f5eb97795 100644 --- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx +++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx @@ -482,10 +482,10 @@ VclPtr<vcl::Window> ChartElementsPanel::Create ( const css::uno::Reference<css::frame::XFrame>& rxFrame, ChartController* pController) { - if (pParent == NULL) - throw lang::IllegalArgumentException("no parent Window given to ChartElementsPanel::Create", NULL, 0); + if (pParent == nullptr) + throw lang::IllegalArgumentException("no parent Window given to ChartElementsPanel::Create", nullptr, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to ChartElementsPanel::Create", NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to ChartElementsPanel::Create", nullptr, 1); return VclPtr<ChartElementsPanel>::Create( pParent, rxFrame, pController); } diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx index 04d5aefd5ab4..77a497c9c0f9 100644 --- a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx +++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx @@ -361,10 +361,10 @@ VclPtr<vcl::Window> ChartErrorBarPanel::Create ( const css::uno::Reference<css::frame::XFrame>& rxFrame, ChartController* pController) { - if (pParent == NULL) - throw lang::IllegalArgumentException("no parent Window given to ChartErrorBarPanel::Create", NULL, 0); + if (pParent == nullptr) + throw lang::IllegalArgumentException("no parent Window given to ChartErrorBarPanel::Create", nullptr, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to ChartErrorBarPanel::Create", NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to ChartErrorBarPanel::Create", nullptr, 1); return VclPtr<ChartErrorBarPanel>::Create( pParent, rxFrame, pController); diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx index 252a07eda566..70c817e8f753 100644 --- a/chart2/source/controller/sidebar/ChartLinePanel.cxx +++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx @@ -116,10 +116,10 @@ VclPtr<vcl::Window> ChartLinePanel::Create( const css::uno::Reference<css::frame::XFrame>& rxFrame, ChartController* pController) { - if (pParent == NULL) - throw css::lang::IllegalArgumentException("no parent Window given to ChartAxisPanel::Create", NULL, 0); + if (pParent == nullptr) + throw css::lang::IllegalArgumentException("no parent Window given to ChartAxisPanel::Create", nullptr, 0); if (!rxFrame.is()) - throw css::lang::IllegalArgumentException("no XFrame given to ChartAxisPanel::Create", NULL, 1); + throw css::lang::IllegalArgumentException("no XFrame given to ChartAxisPanel::Create", nullptr, 1); return VclPtr<ChartLinePanel>::Create( pParent, rxFrame, pController); diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx index 98106e3790af..e88a22c42896 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx @@ -395,10 +395,10 @@ VclPtr<vcl::Window> ChartSeriesPanel::Create ( const css::uno::Reference<css::frame::XFrame>& rxFrame, ChartController* pController) { - if (pParent == NULL) - throw lang::IllegalArgumentException("no parent Window given to ChartSeriesPanel::Create", NULL, 0); + if (pParent == nullptr) + throw lang::IllegalArgumentException("no parent Window given to ChartSeriesPanel::Create", nullptr, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException("no XFrame given to ChartSeriesPanel::Create", NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to ChartSeriesPanel::Create", nullptr, 1); return VclPtr<ChartSeriesPanel>::Create( pParent, rxFrame, pController); |