summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-10 16:19:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-11 01:16:33 +0000
commitffe060e954d172f8603a4e9f625445e49132c7bf (patch)
tree4a939673cd597c0812261fe28da2103526ac51a2 /chart2
parentd59358ee28f0cd3e1eb56a0a923f165304fc17c9 (diff)
V668 no sense in testing the result of new against null
Change-Id: I7783d96e40de7a8df794f143d2c7830bf3314218
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/accessibility/AccessibleTextHelper.cxx9
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard.cxx2
-rw-r--r--chart2/source/controller/main/ChartController.cxx14
3 files changed, 8 insertions, 17 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index 96564fcd904c..878ecd1914c4 100644
--- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
+++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
@@ -80,8 +80,7 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg
SolarMutexGuard aSolarGuard;
- if( m_pTextHelper )
- delete m_pTextHelper;
+ delete m_pTextHelper;
vcl::Window* pWindow( VCLUnoHelper::GetWindow( xWindow ));
if( pWindow )
@@ -93,10 +92,8 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg
if( pTextObj )
{
std::unique_ptr<SvxEditSource> pEditSource(new SvxTextEditSource( *pTextObj, 0, *pView, *pWindow ));
- m_pTextHelper = new ::accessibility::AccessibleTextHelper(
- std::move(pEditSource));
- if( m_pTextHelper )
- m_pTextHelper->SetEventSource( xEventSource );
+ m_pTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
+ m_pTextHelper->SetEventSource( xEventSource );
}
}
}
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index d7faca0c4571..9094da82cbf1 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -124,7 +124,7 @@ svt::OWizardPage* CreationWizard::createPage(WizardState nState)
ChartTypeTabPage* pChartTypeTabPage = new ChartTypeTabPage(this,m_xChartModel,m_xCC,bDoLiveUpdate);
pRet = pChartTypeTabPage;
m_pTemplateProvider = pChartTypeTabPage;
- if (m_pTemplateProvider && m_pDialogModel)
+ if (m_pDialogModel)
m_pDialogModel->setTemplate( m_pTemplateProvider->getCurrentTemplate());
}
break;
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 780ea4623959..242fdf282915 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -553,18 +553,12 @@ sal_Bool SAL_CALL ChartController::attachModel( const uno::Reference< frame::XMo
m_aDispatchContainer.setChartDispatch( pDispatch, impl_getAvailableCommands() );
DrawCommandDispatch* pDrawDispatch = new DrawCommandDispatch( m_xCC, this );
- if ( pDrawDispatch )
- {
- pDrawDispatch->initialize();
- m_aDispatchContainer.setDrawCommandDispatch( pDrawDispatch );
- }
+ pDrawDispatch->initialize();
+ m_aDispatchContainer.setDrawCommandDispatch( pDrawDispatch );
ShapeController* pShapeController = new ShapeController( m_xCC, this );
- if ( pShapeController )
- {
- pShapeController->initialize();
- m_aDispatchContainer.setShapeController( pShapeController );
- }
+ pShapeController->initialize();
+ m_aDispatchContainer.setShapeController( pShapeController );
aGuard.clear();
#ifdef TEST_ENABLE_MODIFY_LISTENER