diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-02-07 11:55:24 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-02-11 07:07:30 +0100 |
commit | 121182bddbce8f14cccdf7db9af8c08867a0912f (patch) | |
tree | dbad1ab9b7a4a4ea0f5862ae1a8679aa117c8829 /sd | |
parent | 6e8c9bdf0a55141d3cbd181862aec89b788bb060 (diff) |
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: I67462369d93e9d9ff3c056800947c4b75f71ba5f
Reviewed-on: https://gerrit.libreoffice.org/67486
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/unolayer.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopback.cxx | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx index 0a42ecdad7b3..662da98dfad6 100644 --- a/sd/source/ui/unoidl/unolayer.cxx +++ b/sd/source/ui/unoidl/unolayer.cxx @@ -482,7 +482,7 @@ void SAL_CALL SdLayerManager::attachShapeToLayer( const uno::Reference< drawing: SvxShape* pShape = SvxShape::getImplementation( xShape ); SdrObject* pSdrObject = pShape?pShape->GetSdrObject():nullptr; - if(pSdrObject && pSdrLayer ) + if(pSdrObject) pSdrObject->SetLayer(pSdrLayer->GetID()); mpModel->SetModified(); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 5006a49a2f59..457afdffdefa 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -610,7 +610,7 @@ sal_Bool SAL_CALL SdXImpressDocument::hasControllersLocked( ) if( nullptr == mpDoc ) throw lang::DisposedException(); - return mpDoc && mpDoc->isLocked(); + return mpDoc->isLocked(); } uno::Reference < container::XIndexAccess > SAL_CALL SdXImpressDocument::getViewData() @@ -1466,7 +1466,7 @@ sal_Int32 SAL_CALL SdXImpressDocument::getRendererCount( const uno::Any& rSelect if( nullptr == mpDoc ) throw lang::DisposedException(); - if( mpDocShell && mpDoc ) + if (mpDocShell) { uno::Reference< frame::XModel > xModel; @@ -1502,7 +1502,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SdXImpressDocument::getRenderer( rxOptions[ nProperty].Value >>= bExportNotesPages; } uno::Sequence< beans::PropertyValue > aRenderer; - if( mpDocShell && mpDoc ) + if (mpDocShell) { awt::Size aPageSize; if ( bExportNotesPages ) @@ -1890,7 +1890,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r if( nullptr == mpDoc ) throw lang::DisposedException(); - if( mpDocShell && mpDoc ) + if (mpDocShell) { uno::Reference< awt::XDevice > xRenderDevice; const sal_Int32 nPageNumber = nRenderer + 1; diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index 375000182ba3..e60b495b2855 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -245,7 +245,7 @@ void SAL_CALL SdUnoPageBackground::setPropertyValue( const OUString& aPropertyNa } else { - if(pEntry && pEntry->nWID) + if(pEntry->nWID) mpPropSet->setPropertyValue( pEntry, aValue ); } } @@ -294,7 +294,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyValue( const OUString& Propert } else { - if(pEntry && pEntry->nWID) + if(pEntry->nWID) aAny = mpPropSet->getPropertyValue( pEntry ); } return aAny; |