diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-11 09:06:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-11 09:58:36 +0000 |
commit | 556373c41fddbac6cbee1c89e7707631270a1852 (patch) | |
tree | 026862690693419beb8810fdc6671ae30c72a026 /editeng | |
parent | 62b124b2704adf11a63681164d05a8eb49dfb105 (diff) |
V668 no sense in testing the result of new against null
Change-Id: I4a33bd92fc8448638a4bfe1eab7e5041a4c5cc39
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/accessibility/AccessibleContextBase.cxx | 24 | ||||
-rw-r--r-- | editeng/source/uno/unoedprx.cxx | 8 |
2 files changed, 9 insertions, 23 deletions
diff --git a/editeng/source/accessibility/AccessibleContextBase.cxx b/editeng/source/accessibility/AccessibleContextBase.cxx index 0fb932c24e08..bd364892b890 100644 --- a/editeng/source/accessibility/AccessibleContextBase.cxx +++ b/editeng/source/accessibility/AccessibleContextBase.cxx @@ -69,31 +69,22 @@ AccessibleContextBase::AccessibleContextBase ( // Set some states. Don't use the SetState method because no events // shall be broadcastet (that is not yet initialized anyway). - if (pStateSet != NULL) - { - pStateSet->AddState (AccessibleStateType::ENABLED); - pStateSet->AddState (AccessibleStateType::SENSITIVE); - pStateSet->AddState (AccessibleStateType::SHOWING); - pStateSet->AddState (AccessibleStateType::VISIBLE); - pStateSet->AddState (AccessibleStateType::FOCUSABLE); - pStateSet->AddState (AccessibleStateType::SELECTABLE); - } + pStateSet->AddState (AccessibleStateType::ENABLED); + pStateSet->AddState (AccessibleStateType::SENSITIVE); + pStateSet->AddState (AccessibleStateType::SHOWING); + pStateSet->AddState (AccessibleStateType::VISIBLE); + pStateSet->AddState (AccessibleStateType::FOCUSABLE); + pStateSet->AddState (AccessibleStateType::SELECTABLE); // Create the relation set. ::utl::AccessibleRelationSetHelper* pRelationSet = new ::utl::AccessibleRelationSetHelper (); mxRelationSet = pRelationSet; } - - - AccessibleContextBase::~AccessibleContextBase(void) { } - - - bool AccessibleContextBase::SetState (sal_Int16 aState) { ::osl::ClearableMutexGuard aGuard (maMutex); @@ -368,8 +359,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL // We are already disposed! // Create a new state set that has only set the DEFUNC state. pStateSet = new ::utl::AccessibleStateSetHelper (); - if (pStateSet != NULL) - pStateSet->AddState (AccessibleStateType::DEFUNC); + pStateSet->AddState (AccessibleStateType::DEFUNC); } else { diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index ad198b55bbbf..9de8512a70a5 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -320,12 +320,8 @@ SvxEditSource* SvxEditSourceAdapter::Clone() const if( pClonedAdaptee.get() ) { SvxEditSourceAdapter* pClone = new SvxEditSourceAdapter(); - - if( pClone ) - { - pClone->SetEditSource( std::move(pClonedAdaptee) ); - return pClone; - } + pClone->SetEditSource( std::move(pClonedAdaptee) ); + return pClone; } } |