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 /svx/source | |
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 'svx/source')
-rw-r--r-- | svx/source/unodraw/unopool.cxx | 6 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 7 | ||||
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 2 |
3 files changed, 5 insertions, 10 deletions
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index 80cccf7e51d9..9e78b7ea574d 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -97,13 +97,11 @@ void SvxUnoDrawPool::getAny( SfxItemPool const * pPool, const comphelper::Proper { case OWN_ATTR_FILLBMP_MODE: { - const XFillBmpStretchItem* pStretchItem = &pPool->GetDefaultItem(XATTR_FILLBMP_STRETCH); - const XFillBmpTileItem* pTileItem = &pPool->GetDefaultItem(XATTR_FILLBMP_TILE); - if( pTileItem && pTileItem->GetValue() ) + if (pPool->GetDefaultItem(XATTR_FILLBMP_TILE).GetValue()) { rValue <<= drawing::BitmapMode_REPEAT; } - else if( pStretchItem && pStretchItem->GetValue() ) + else if (pPool->GetDefaultItem(XATTR_FILLBMP_STRETCH).GetValue()) { rValue <<= drawing::BitmapMode_STRETCH; } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 8da3c0d9f203..65ca35e38cd9 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2746,14 +2746,11 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl { const SfxItemSet& rObjItemSet = GetSdrObject()->GetMergedItemSet(); - const XFillBmpStretchItem* pStretchItem = &rObjItemSet.Get(XATTR_FILLBMP_STRETCH); - const XFillBmpTileItem* pTileItem = &rObjItemSet.Get(XATTR_FILLBMP_TILE); - - if( pTileItem && pTileItem->GetValue() ) + if (rObjItemSet.Get(XATTR_FILLBMP_TILE).GetValue()) { rValue <<= drawing::BitmapMode_REPEAT; } - else if( pStretchItem && pStretchItem->GetValue() ) + else if (rObjItemSet.Get(XATTR_FILLBMP_STRETCH).GetValue()) { rValue <<= drawing::BitmapMode_STRETCH; } diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 287d2bd18b42..2aadd092824b 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -760,7 +760,7 @@ void SvxTextEditSourceImpl::UpdateData() { if( mpOutliner->GetParagraphCount() > 1 ) { - if( pTextObj && pTextObj->IsTextFrame() && pTextObj->GetTextKind() == OBJ_TITLETEXT ) + if (pTextObj->IsTextFrame() && pTextObj->GetTextKind() == OBJ_TITLETEXT) { while( mpOutliner->GetParagraphCount() > 1 ) { |