summaryrefslogtreecommitdiff
path: root/editeng/source/outliner/outliner.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:25:09 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:25:09 +0100
commit54a8e708b4822f6887b5d18af39ccb87387e0774 (patch)
tree8b94f887d875dedffc39974347fc075a3765cd93 /editeng/source/outliner/outliner.cxx
parent2e1559cd85d2f1b4e308d63d34bf3632ba4b6d4b (diff)
More loplugin:cstylecast: editeng
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: I09a4d688e6f3c1ecbe05a7d27ebd955e8ba1eb65
Diffstat (limited to 'editeng/source/outliner/outliner.cxx')
-rw-r--r--editeng/source/outliner/outliner.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 3cc9b49917e9..5112c7cfd000 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -230,7 +230,7 @@ void Outliner::SetMaxDepth( sal_Int16 nDepth )
{
if( nMaxDepth != nDepth )
{
- nMaxDepth = std::min( nDepth, (sal_Int16)(SVX_MAX_NUM-1) );
+ nMaxDepth = std::min( nDepth, sal_Int16(SVX_MAX_NUM-1) );
}
}
@@ -940,8 +940,8 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
// Translation...
aTextPos -= rOrigin;
// Rotation...
- aRotatedPos.X()=(long) (nCos*aTextPos.X() + nSin*aTextPos.Y());
- aRotatedPos.Y()=(long) - (nSin*aTextPos.X() - nCos*aTextPos.Y());
+ aRotatedPos.X()=static_cast<long>(nCos*aTextPos.X() + nSin*aTextPos.Y());
+ aRotatedPos.Y()=static_cast<long>(- (nSin*aTextPos.X() - nCos*aTextPos.Y()));
aTextPos = aRotatedPos;
// Translation...
aTextPos += rOrigin;
@@ -1067,7 +1067,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
void Outliner::InvalidateBullet(sal_Int32 nPara)
{
- long nLineHeight = (long)pEditEngine->GetLineHeight(nPara );
+ long nLineHeight = static_cast<long>(pEditEngine->GetLineHeight(nPara ));
for (OutlinerView* pView : aViewList)
{
Point aPos( pView->pEditView->GetWindowPosTopLeft(nPara ) );
@@ -1522,7 +1522,7 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo
const SvxLRSpaceItem& rLR = pEditEngine->GetParaAttrib( nPara, bOutlineMode ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE );
aTopLeft.X() = rLR.GetTextLeft() + rLR.GetTextFirstLineOfst() + nSpaceBefore;
- long nBulletWidth = std::max( (long) -rLR.GetTextFirstLineOfst(), (long) ((-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance()) );
+ long nBulletWidth = std::max( static_cast<long>(-rLR.GetTextFirstLineOfst()), static_cast<long>((-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance()) );
if ( nBulletWidth < aBulletSize.Width() ) // The Bullet creates its space
nBulletWidth = aBulletSize.Width();