diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-28 16:10:06 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-28 15:05:32 +0100 |
commit | 3040d328c944d91b0cd612d86d358823b5c5b883 (patch) | |
tree | 689dd912ebff40137de98a7cf61b4042b9ec2cf2 /sd | |
parent | d86778573a1ef207748cf8a6ca67eaef5cf04b02 (diff) |
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: Iaa1a1811b638aadfe6b06b3465a182cb675031b5
Reviewed-on: https://gerrit.libreoffice.org/62476
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/stlfamily.cxx | 12 | ||||
-rw-r--r-- | sd/source/core/stlpool.cxx | 11 |
2 files changed, 7 insertions, 16 deletions
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index 52fb2d612b5d..54680db5d510 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -249,10 +249,7 @@ Sequence< OUString > SAL_CALL SdStyleFamily::getElementNames() { // we assume that we have only SdStyleSheets SdStyleSheet* pSdStyle = static_cast< SdStyleSheet* >( pStyle ); - if( pSdStyle ) - { - aNames.push_back( pSdStyle->GetApiName() ); - } + aNames.push_back(pSdStyle->GetApiName()); } return Sequence< OUString >( &(*aNames.begin()), aNames.size() ); } @@ -279,12 +276,9 @@ sal_Bool SAL_CALL SdStyleFamily::hasByName( const OUString& aName ) { // we assume that we have only SdStyleSheets SdStyleSheet* pSdStyle = static_cast< SdStyleSheet* >( pStyle ); - if( pSdStyle ) + if (pSdStyle->GetApiName() == aName) { - if (pSdStyle->GetApiName() == aName) - { - return true; - } + return true; } } } diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 47c105a7d38a..cfbaf9f31079 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -898,13 +898,10 @@ void SdStyleSheetPool::CreatePseudosIfNecessary() { pSheet = &Make(aLevelName, SfxStyleFamily::Pseudo, nUsedMask); - if (pSheet) - { - if (pParent) - pSheet->SetParent(pParent->GetName()); - pParent = pSheet; - static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this); - } + if (pParent) + pSheet->SetParent(pParent->GetName()); + pParent = pSheet; + static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this); } pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_OUTLINE + nLevel ); } |