diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-07 11:36:20 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-07 11:36:20 +0200 |
commit | 15da84c9c3a5323075c5e97ccd595a130f54cf20 (patch) | |
tree | a44ab237c892ccfbbddabeac7d47a7bf2a977553 /sw/source/uibase/frmdlg | |
parent | c158c00489d35af7f5f9278b8ee545678d6a42e5 (diff) |
loplugin:constantparam in sw
Change-Id: I16badc615e98202668b1b201035b5137cb94c10c
Diffstat (limited to 'sw/source/uibase/frmdlg')
-rw-r--r-- | sw/source/uibase/frmdlg/colmgr.cxx | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/sw/source/uibase/frmdlg/colmgr.cxx b/sw/source/uibase/frmdlg/colmgr.cxx index bc47c06e1bef..9b38ce677547 100644 --- a/sw/source/uibase/frmdlg/colmgr.cxx +++ b/sw/source/uibase/frmdlg/colmgr.cxx @@ -109,19 +109,15 @@ void SwColMgr::SetActualWidth(sal_uInt16 nW) } // ctor -SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) : - aFormatCol(static_cast<const SwFormatCol&>(rSet.Get(RES_COL))), - nWidth(nActWidth) +SwColMgr::SwColMgr(const SfxItemSet& rSet) : + aFormatCol(static_cast<const SwFormatCol&>(rSet.Get(RES_COL))) { - if(nWidth == USHRT_MAX) - { - nWidth = (sal_uInt16)static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth(); - if (nWidth < MINLAY) - nWidth = USHRT_MAX; - const SvxLRSpaceItem &rLR = static_cast<const SvxLRSpaceItem&>(rSet.Get(RES_LR_SPACE)); - nWidth = nWidth - (sal_uInt16)rLR.GetLeft(); - nWidth = nWidth - (sal_uInt16)rLR.GetRight(); - } + nWidth = (sal_uInt16)static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth(); + if (nWidth < MINLAY) + nWidth = USHRT_MAX; + const SvxLRSpaceItem &rLR = static_cast<const SvxLRSpaceItem&>(rSet.Get(RES_LR_SPACE)); + nWidth = nWidth - (sal_uInt16)rLR.GetLeft(); + nWidth = nWidth - (sal_uInt16)rLR.GetRight(); ::FitToActualSize(aFormatCol, nWidth); } |