summaryrefslogtreecommitdiff
path: root/sw/source/uibase/frmdlg
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-10-28 00:13:29 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-10-28 07:55:59 +0100
commit5f0ddb2d2068a4388a7df12cd0e11f628b91e4c0 (patch)
tree2007c4a1f6c21a9f0d5a11aab60a10cd178d1d8b /sw/source/uibase/frmdlg
parent8522572cdd27f62a031bb07c9cf7f6f85e8453ad (diff)
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: Ic92cc594979cac2edac04a085957398672a5dfcc Reviewed-on: https://gerrit.libreoffice.org/62450 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/uibase/frmdlg')
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 53028e9486fa..d00de282e8cb 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -54,10 +54,8 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET )
{
// alignment
- const SvxPageItem* pPage = static_cast<const SvxPageItem*>(&rSet.Get( nWhich ));
-
- if ( pPage )
- SetUsage( pPage->GetPageUsage() );
+ const SvxPageItem& rPage = static_cast<const SvxPageItem&>(rSet.Get(nWhich));
+ SetUsage(rPage.GetPageUsage());
}
nWhich = pPool->GetWhich( SID_ATTR_PAGE_SIZE );