summaryrefslogtreecommitdiff
path: root/sw/source/uibase/frmdlg
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:41 +0100
commit0ae2d98d1f6d29c80bd1ee830db4c333e4ee1e1d (patch)
treed9b77eece17b7b144a4ea50592b639b9f7c87095 /sw/source/uibase/frmdlg
parent506856ca50e676520bcc80a8b498355663d0388f (diff)
More loplugin:cstylecast: sw
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I0f49d21dfdf82742f11b27709f74294feb1e419e
Diffstat (limited to 'sw/source/uibase/frmdlg')
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx8
-rw-r--r--sw/source/uibase/frmdlg/colmgr.cxx10
2 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index cd71648e72fc..3c5fa5f07478 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -345,7 +345,7 @@ SwColumnOnlyExample::SwColumnOnlyExample(vcl::Window* pParent)
SetBorderStyle( WindowBorderStyle::MONO );
m_aFrameSize = SvxPaperInfo::GetPaperSize(PAPER_A4);// DIN A4
- ::FitToActualSize(m_aCols, (sal_uInt16)m_aFrameSize.Width());
+ ::FitToActualSize(m_aCols, static_cast<sal_uInt16>(m_aFrameSize.Width()));
long nHeight = m_aFrameSize.Height();
Fraction aScale( m_aWinSize.Height(), nHeight );
@@ -460,15 +460,15 @@ void SwColumnOnlyExample::SetColumns(const SwFormatCol& rCol)
long nWish = pCol->GetWishWidth();
nWish *= nFrameWidth;
nWish /= nWishSum;
- pCol->SetWishWidth((sal_uInt16)nWish);
+ pCol->SetWishWidth(static_cast<sal_uInt16>(nWish));
long nLeft = pCol->GetLeft();
nLeft *= nFrameWidth;
nLeft /= nWishSum;
- pCol->SetLeft((sal_uInt16)nLeft);
+ pCol->SetLeft(static_cast<sal_uInt16>(nLeft));
long nRight = pCol->GetRight();
nRight *= nFrameWidth;
nRight /= nWishSum;
- pCol->SetRight((sal_uInt16)nRight);
+ pCol->SetRight(static_cast<sal_uInt16>(nRight));
}
// #97495# make sure that the automatic column width's are always equal
if(nColCount && m_aCols.IsOrtho())
diff --git a/sw/source/uibase/frmdlg/colmgr.cxx b/sw/source/uibase/frmdlg/colmgr.cxx
index ade307c7c29c..0a38bc2e44bd 100644
--- a/sw/source/uibase/frmdlg/colmgr.cxx
+++ b/sw/source/uibase/frmdlg/colmgr.cxx
@@ -79,12 +79,12 @@ void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos )
// height separation line
short SwColMgr::GetLineHeightPercent() const
{
- return (short)aFormatCol.GetLineHeight();
+ return static_cast<short>(aFormatCol.GetLineHeight());
}
void SwColMgr::SetLineHeightPercent(short nPercent)
{
OSL_ENSURE(nPercent <= 100, "line height may be at most 100%");
- aFormatCol.SetLineHeight((sal_uInt8)nPercent);
+ aFormatCol.SetLineHeight(static_cast<sal_uInt8>(nPercent));
}
// column width
@@ -112,12 +112,12 @@ void SwColMgr::SetActualWidth(sal_uInt16 nW)
SwColMgr::SwColMgr(const SfxItemSet& rSet) :
aFormatCol(rSet.Get(RES_COL))
{
- nWidth = (sal_uInt16)rSet.Get(RES_FRM_SIZE).GetWidth();
+ nWidth = static_cast<sal_uInt16>(rSet.Get(RES_FRM_SIZE).GetWidth());
if (nWidth < MINLAY)
nWidth = USHRT_MAX;
const SvxLRSpaceItem &rLR = rSet.Get(RES_LR_SPACE);
- nWidth = nWidth - (sal_uInt16)rLR.GetLeft();
- nWidth = nWidth - (sal_uInt16)rLR.GetRight();
+ nWidth = nWidth - static_cast<sal_uInt16>(rLR.GetLeft());
+ nWidth = nWidth - static_cast<sal_uInt16>(rLR.GetRight());
::FitToActualSize(aFormatCol, nWidth);
}