summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdedtv1.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:55 +0100
commitc049c76fc521f2b55b39a6e9eb0f0092bcf6ef77 (patch)
tree2bc2c059a6f6a175a0c0e5321887adc077fef419 /svx/source/svdraw/svdedtv1.cxx
parent0ae2d98d1f6d29c80bd1ee830db4c333e4ee1e1d (diff)
More loplugin:cstylecast: svx
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: I100e6c14cbf1d780f0e5ebca6b0c9e71ce1caaf7
Diffstat (limited to 'svx/source/svdraw/svdedtv1.cxx')
-rw-r--r--svx/source/svdraw/svdedtv1.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index beb208537ad3..53da7eb8e21f 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -515,13 +515,13 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa
{
// for PolyObj's, but NOT for SdrPathObj's, e.g. the measurement object
sal_uInt32 nPointCount(pO->GetPointCount());
- XPolygon aXP((sal_uInt16)nPointCount);
+ XPolygon aXP(static_cast<sal_uInt16>(nPointCount));
sal_uInt32 nPtNum;
for(nPtNum = 0; nPtNum < nPointCount; nPtNum++)
{
Point aPt(pO->GetPoint(nPtNum));
- aXP[(sal_uInt16)nPtNum]=aPt;
+ aXP[static_cast<sal_uInt16>(nPtNum)]=aPt;
}
switch (eMode)
@@ -535,7 +535,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa
{
// broadcasting could be optimized here, but for the
// current two points of the measurement object, it's fine
- pO->SetPoint(aXP[(sal_uInt16)nPtNum],nPtNum);
+ pO->SetPoint(aXP[static_cast<sal_uInt16>(nPtNum)],nPtNum);
}
bDone = true;
@@ -629,13 +629,13 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const tools::Rectangle& rRef, con
{
// e. g. for the measurement object
sal_uInt32 nPointCount(pO->GetPointCount());
- XPolygon aXP((sal_uInt16)nPointCount);
+ XPolygon aXP(static_cast<sal_uInt16>(nPointCount));
sal_uInt32 nPtNum;
for(nPtNum = 0; nPtNum < nPointCount; nPtNum++)
{
Point aPt(pO->GetPoint(nPtNum));
- aXP[(sal_uInt16)nPtNum]=aPt;
+ aXP[static_cast<sal_uInt16>(nPtNum)]=aPt;
}
aXP.Distort(rRef, rDistortedRect);
@@ -644,7 +644,7 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const tools::Rectangle& rRef, con
{
// broadcasting could be optimized here, but for the
// current two points of the measurement object it's fine
- pO->SetPoint(aXP[(sal_uInt16)nPtNum],nPtNum);
+ pO->SetPoint(aXP[static_cast<sal_uInt16>(nPtNum)],nPtNum);
}
}
}
@@ -1097,7 +1097,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
if(SfxItemState::DONTCARE != rSet.GetItemState(XATTR_LINESTARTWIDTH))
{
const sal_Int32 nValAct(rSet.Get(XATTR_LINESTARTWIDTH).GetValue());
- const sal_Int32 nValNewStart(std::max((sal_Int32)0, nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10)));
+ const sal_Int32 nValNewStart(std::max(sal_Int32(0), nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10)));
pObj->SetMergedItem(XLineStartWidthItem(nValNewStart));
}
@@ -1105,7 +1105,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
if(SfxItemState::DONTCARE != rSet.GetItemState(XATTR_LINEENDWIDTH))
{
const sal_Int32 nValAct(rSet.Get(XATTR_LINEENDWIDTH).GetValue());
- const sal_Int32 nValNewEnd(std::max((sal_Int32)0, nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10)));
+ const sal_Int32 nValNewEnd(std::max(sal_Int32(0), nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10)));
pObj->SetMergedItem(XLineEndWidthItem(nValNewEnd));
}
@@ -1542,8 +1542,8 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
} else {
if (nNewShearAngle!=0 && nOldShearAngle!=0) {
// bug fix
- double nOld=tan((double)nOldShearAngle*nPi180);
- double nNew=tan((double)nNewShearAngle*nPi180);
+ double nOld=tan(static_cast<double>(nOldShearAngle)*nPi180);
+ double nNew=tan(static_cast<double>(nNewShearAngle)*nPi180);
nNew-=nOld;
nNew=atan(nNew)/nPi180;
nShearAngle=svx::Round(nNew);