summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/viewtab.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-06 10:12:29 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-10 12:23:42 +0100
commit065edb4c8e91170017df482843d0c3eb8d4db114 (patch)
tree1d030ec9868a56b375a563c9d6e6d81c6115d717 /sw/source/uibase/uiview/viewtab.cxx
parent0b34a5dd39e177ba99cd21b639d67ac8123b8458 (diff)
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I0b3c407331bfa1fa0c5003250d327d4f26de3643 Reviewed-on: https://gerrit.libreoffice.org/63235 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/uibase/uiview/viewtab.cxx')
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx25
1 files changed, 4 insertions, 21 deletions
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 5fa4446755b4..2a42029afd2c 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1329,18 +1329,9 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aLongLR.SetRight(rPageRect.Right() - aRect.Right());
}
}
- if( nWhich == SID_ATTR_LONG_LRSPACE )
- rSet.Put( aLongLR );
- else
- {
- SvxLRSpaceItem aLR( aLongLR.GetLeft(),
- aLongLR.GetRight(),
- 0, 0,
- nWhich);
- rSet.Put(aLR);
- }
- break;
+ rSet.Put( aLongLR );
}
+ break;
// provide left and right margins of current page style
case SID_ATTR_PAGE_LRSPACE:
@@ -1387,17 +1378,9 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aLongUL.SetUpper(rPagePrtRect.Top());
aLongUL.SetLower(nPageHeight - rPagePrtRect.Bottom());
}
- if( nWhich == SID_ATTR_LONG_ULSPACE )
- rSet.Put( aLongUL );
- else
- {
- SvxULSpaceItem aULTmp(static_cast<sal_uInt16>(aLongUL.GetUpper()),
- static_cast<sal_uInt16>(aLongUL.GetLower()),
- nWhich);
- rSet.Put(aULTmp);
- }
- break;
+ rSet.Put( aLongUL );
}
+ break;
// provide top and bottom margins of current page style
case SID_ATTR_PAGE_ULSPACE: