summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/xoutdev')
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx18
-rw-r--r--svx/source/xoutdev/_xpoly.cxx54
-rw-r--r--svx/source/xoutdev/xattr.cxx40
-rw-r--r--svx/source/xoutdev/xexch.cxx2
-rw-r--r--svx/source/xoutdev/xtabgrdt.cxx12
-rw-r--r--svx/source/xoutdev/xtabhtch.cxx4
-rw-r--r--svx/source/xoutdev/xtable.cxx2
7 files changed, 66 insertions, 66 deletions
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index bd16f0113c65..94f8d3f2cc5b 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -463,7 +463,7 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold )
const long nWidth2 = nWidth - 2;
const long nHeight = aSize.Height();
const long nHeight2 = nHeight - 2;
- const long lThres2 = (long) cThreshold * cThreshold;
+ const long lThres2 = static_cast<long>(cThreshold) * cThreshold;
const sal_uInt8 nWhitePalIdx(static_cast< sal_uInt8 >(pWriteAcc->GetBestPaletteIndex(Color(COL_WHITE))));
const sal_uInt8 nBlackPalIdx(static_cast< sal_uInt8 >(pWriteAcc->GetBestPaletteIndex(Color(COL_BLACK))));
long nSum1;
@@ -484,17 +484,17 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold )
nXTmp = nX;
nSum1 = -( nSum2 = lGray = pReadAcc->GetPixelIndex( nY, nXTmp++ ) );
- nSum2 += ( (long) pReadAcc->GetPixelIndex( nY, nXTmp++ ) ) << 1;
+ nSum2 += static_cast<long>(pReadAcc->GetPixelIndex( nY, nXTmp++ )) << 1;
nSum1 += ( lGray = pReadAcc->GetPixelIndex( nY, nXTmp ) );
nSum2 += lGray;
- nSum1 += ( (long) pReadAcc->GetPixelIndex( nY1, nXTmp ) ) << 1;
- nSum1 -= ( (long) pReadAcc->GetPixelIndex( nY1, nXTmp -= 2 ) ) << 1;
+ nSum1 += static_cast<long>(pReadAcc->GetPixelIndex( nY1, nXTmp )) << 1;
+ nSum1 -= static_cast<long>(pReadAcc->GetPixelIndex( nY1, nXTmp -= 2 )) << 1;
- nSum1 += ( lGray = -(long) pReadAcc->GetPixelIndex( nY2, nXTmp++ ) );
+ nSum1 += ( lGray = -static_cast<long>(pReadAcc->GetPixelIndex( nY2, nXTmp++ )) );
nSum2 += lGray;
- nSum2 -= ( (long) pReadAcc->GetPixelIndex( nY2, nXTmp++ ) ) << 1;
- nSum1 += ( lGray = (long) pReadAcc->GetPixelIndex( nY2, nXTmp ) );
+ nSum2 -= static_cast<long>(pReadAcc->GetPixelIndex( nY2, nXTmp++ )) << 1;
+ nSum1 += ( lGray = static_cast<long>(pReadAcc->GetPixelIndex( nY2, nXTmp )) );
nSum2 -= lGray;
if( ( nSum1 * nSum1 + nSum2 * nSum2 ) < lThres2 )
@@ -556,8 +556,8 @@ tools::Polygon XOutBitmap::GetContour( const Bitmap& rBmp, const XOutFlags nFlag
if (pAcc && nWidth && nHeight)
{
const Size& rPrefSize = aWorkBmp.GetPrefSize();
- const double fFactorX = (double) rPrefSize.Width() / nWidth;
- const double fFactorY = (double) rPrefSize.Height() / nHeight;
+ const double fFactorX = static_cast<double>(rPrefSize.Width()) / nWidth;
+ const double fFactorY = static_cast<double>(rPrefSize.Height()) / nHeight;
const long nStartX1 = aWorkRect.Left() + 1;
const long nEndX1 = aWorkRect.Right();
const long nStartX2 = nEndX1 - 1;
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index 2fdc6f028ab5..4718a873228e 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -244,8 +244,8 @@ XPolygon::XPolygon(const tools::Rectangle& rRect, long nRx, long nRy)
nRx = -nRx;
// factor for control points of the Bézier curve: 8/3 * (sin(45g) - 0.5)
- long nXHdl = (long)(0.552284749 * nRx);
- long nYHdl = (long)(0.552284749 * nRy);
+ long nXHdl = static_cast<long>(0.552284749 * nRx);
+ long nYHdl = static_cast<long>(0.552284749 * nRy);
sal_uInt16 nPos = 0;
if ( nRx && nRy )
@@ -300,8 +300,8 @@ XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy,
bool bFull = (nStartAngle == 0 && nEndAngle == 3600);
// factor for control points of the Bézier curve: 8/3 * (sin(45g) - 0.5)
- long nXHdl = (long)(0.552284749 * nRx);
- long nYHdl = (long)(0.552284749 * nRy);
+ long nXHdl = static_cast<long>(0.552284749 * nRx);
+ long nYHdl = static_cast<long>(0.552284749 * nRy);
sal_uInt16 nPos = 0;
bool bLoopEnd = false;
@@ -532,27 +532,27 @@ void XPolygon::SubdivideBezier(sal_uInt16 nPos, bool bCalcFirst, double fT)
nPosInc = 1;
nIdxInc = 1;
}
- pPoints[nPos].X() = (long) (fU3 * pPoints[nIdx ].X() +
+ pPoints[nPos].X() = static_cast<long>(fU3 * pPoints[nIdx ].X() +
fT * fU2 * pPoints[nIdx+1].X() * 3 +
fT2 * fU * pPoints[nIdx+2].X() * 3 +
fT3 * pPoints[nIdx+3].X());
- pPoints[nPos].Y() = (long) (fU3 * pPoints[nIdx ].Y() +
+ pPoints[nPos].Y() = static_cast<long>(fU3 * pPoints[nIdx ].Y() +
fT * fU2 * pPoints[nIdx+1].Y() * 3 +
fT2 * fU * pPoints[nIdx+2].Y() * 3 +
fT3 * pPoints[nIdx+3].Y());
nPos = nPos + nPosInc;
nIdx = nIdx + nIdxInc;
- pPoints[nPos].X() = (long) (fU2 * pPoints[nIdx ].X() +
+ pPoints[nPos].X() = static_cast<long>(fU2 * pPoints[nIdx ].X() +
fT * fU * pPoints[nIdx+1].X() * 2 +
fT2 * pPoints[nIdx+2].X());
- pPoints[nPos].Y() = (long) (fU2 * pPoints[nIdx ].Y() +
+ pPoints[nPos].Y() = static_cast<long>(fU2 * pPoints[nIdx ].Y() +
fT * fU * pPoints[nIdx+1].Y() * 2 +
fT2 * pPoints[nIdx+2].Y());
nPos = nPos + nPosInc;
nIdx = nIdx + nIdxInc;
- pPoints[nPos].X() = (long) (fU * pPoints[nIdx ].X() +
+ pPoints[nPos].X() = static_cast<long>(fU * pPoints[nIdx ].X() +
fT * pPoints[nIdx+1].X());
- pPoints[nPos].Y() = (long) (fU * pPoints[nIdx ].Y() +
+ pPoints[nPos].Y() = static_cast<long>(fU * pPoints[nIdx ].Y() +
fT * pPoints[nIdx+1].Y());
}
@@ -594,9 +594,9 @@ void XPolygon::GenBezArc(const Point& rCenter, long nRx, long nRy,
pPoints[nFirst+1].X() += nXHdl; pPoints[nFirst+2].Y() += nYHdl;
}
if ( nStart > 0 )
- SubdivideBezier(nFirst, false, (double)nStart / 900);
+ SubdivideBezier(nFirst, false, static_cast<double>(nStart) / 900);
if ( nEnd < 900 )
- SubdivideBezier(nFirst, true, (double)(nEnd-nStart) / (900-nStart));
+ SubdivideBezier(nFirst, true, static_cast<double>(nEnd-nStart) / (900-nStart));
SetFlags(nFirst+1, PolyFlags::Control);
SetFlags(nFirst+2, PolyFlags::Control);
}
@@ -649,8 +649,8 @@ void XPolygon::CalcSmoothJoin(sal_uInt16 nCenter, sal_uInt16 nDrag, sal_uInt16 n
// keep the length if SMOOTH
if ( GetFlags(nCenter) == PolyFlags::Smooth || !IsControl(nDrag) )
{
- aDiff.X() = (long) (fRatio * aDiff.X());
- aDiff.Y() = (long) (fRatio * aDiff.Y());
+ aDiff.X() = static_cast<long>(fRatio * aDiff.X());
+ aDiff.Y() = static_cast<long>(fRatio * aDiff.Y());
}
pPoints[nPnt] = pPoints[nCenter] - aDiff;
}
@@ -682,10 +682,10 @@ void XPolygon::CalcTangent(sal_uInt16 nCenter, sal_uInt16 nPrev, sal_uInt16 nNex
fPrevLen = (fNextLen + fPrevLen) / 2;
fNextLen = fPrevLen;
}
- rNext.X() = rCenter.X() + (long) (fNextLen * aDiff.X());
- rNext.Y() = rCenter.Y() + (long) (fNextLen * aDiff.Y());
- rPrev.X() = rCenter.X() - (long) (fPrevLen * aDiff.X());
- rPrev.Y() = rCenter.Y() - (long) (fPrevLen * aDiff.Y());
+ rNext.X() = rCenter.X() + static_cast<long>(fNextLen * aDiff.X());
+ rNext.Y() = rCenter.Y() + static_cast<long>(fNextLen * aDiff.Y());
+ rPrev.X() = rCenter.X() - static_cast<long>(fPrevLen * aDiff.X());
+ rPrev.Y() = rCenter.Y() - static_cast<long>(fPrevLen * aDiff.Y());
}
/// convert four polygon points into a Bézier curve
@@ -749,8 +749,8 @@ void XPolygon::PointsToBezier(sal_uInt16 nFirst)
fY2 -= fY1 * fU2 / fT2;
fY2 -= fY3 * fT2 / (fU2 * 3);
- pPoints[nFirst+1] = Point((long) fX1, (long) fY1);
- pPoints[nFirst+2] = Point((long) fX2, (long) fY2);
+ pPoints[nFirst+1] = Point(static_cast<long>(fX1), static_cast<long>(fY1));
+ pPoints[nFirst+2] = Point(static_cast<long>(fX2), static_cast<long>(fY2));
SetFlags(nFirst+1, PolyFlags::Control);
SetFlags(nFirst+2, PolyFlags::Control);
}
@@ -765,8 +765,8 @@ void XPolygon::Scale(double fSx, double fSy)
for (sal_uInt16 i = 0; i < nPntCnt; i++)
{
Point& rPnt = pImpXPolygon->pPointAry[i];
- rPnt.X() = (long)(fSx * rPnt.X());
- rPnt.Y() = (long)(fSy * rPnt.Y());
+ rPnt.X() = static_cast<long>(fSx * rPnt.X());
+ rPnt.Y() = static_cast<long>(fSy * rPnt.Y());
}
}
@@ -817,14 +817,14 @@ void XPolygon::Distort(const tools::Rectangle& rRefRect,
double fTx, fTy, fUx, fUy;
Point& rPnt = pImpXPolygon->pPointAry[i];
- fTx = (double)(rPnt.X() - Xr) / Wr;
- fTy = (double)(rPnt.Y() - Yr) / Hr;
+ fTx = static_cast<double>(rPnt.X() - Xr) / Wr;
+ fTy = static_cast<double>(rPnt.Y() - Yr) / Hr;
fUx = 1.0 - fTx;
fUy = 1.0 - fTy;
- rPnt.X() = (long) ( fUy * (fUx * X1 + fTx * X2) +
+ rPnt.X() = static_cast<long>( fUy * (fUx * X1 + fTx * X2) +
fTy * (fUx * X3 + fTx * X4) );
- rPnt.Y() = (long) ( fUx * (fUy * Y1 + fTy * Y3) +
+ rPnt.Y() = static_cast<long>( fUx * (fUy * Y1 + fTy * Y3) +
fTx * (fUy * Y2 + fTy * Y4) );
}
}
@@ -928,7 +928,7 @@ void XPolyPolygon::Clear()
sal_uInt16 XPolyPolygon::Count() const
{
- return (sal_uInt16)(pImpXPolyPolygon->aXPolyList.size());
+ return static_cast<sal_uInt16>(pImpXPolyPolygon->aXPolyList.size());
}
tools::Rectangle XPolyPolygon::GetBoundRect() const
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 024f41d93d2f..452f8b3fb5f4 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -294,7 +294,7 @@ const Color& XColorItem::GetColorValue() const
bool XColorItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
- rVal <<= (sal_Int32)GetColorValue().GetRGBColor();
+ rVal <<= static_cast<sal_Int32>(GetColorValue().GetRGBColor());
return true;
}
@@ -411,9 +411,9 @@ double XDash::CreateDotDashArray(::std::vector< double >& rDotDashArray, double
rDotDashArray.resize( nNumDotDashArray, 0.0 );
sal_uInt16 a;
sal_uInt16 nIns(0);
- double fDashDotDistance = (double)GetDistance();
- double fSingleDashLen = (double)GetDashLen();
- double fSingleDotLen = (double)GetDotLen();
+ double fDashDotDistance = static_cast<double>(GetDistance());
+ double fSingleDashLen = static_cast<double>(GetDashLen());
+ double fSingleDotLen = static_cast<double>(GetDotLen());
if (fLineWidth == 0.0)
fLineWidth = SMALLEST_DASH_WIDTH;
@@ -789,7 +789,7 @@ bool XLineDashItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
return false;
XDash aXDash = GetDashValue();
- aXDash.SetDashStyle((css::drawing::DashStyle)((sal_uInt16)nVal));
+ aXDash.SetDashStyle((css::drawing::DashStyle)static_cast<sal_uInt16>(nVal));
if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes()))
aXDash.SetDots(1);
@@ -888,7 +888,7 @@ bool XLineWidthItem::GetPresentation
OUString& rText, const IntlWrapper& rIntl
) const
{
- rText = GetMetricText( (long) GetValue(),
+ rText = GetMetricText( static_cast<long>(GetValue()),
eCoreUnit, ePresUnit, &rIntl) +
" " + EditResId( GetMetricId( ePresUnit) );
return true;
@@ -946,7 +946,7 @@ bool XLineColorItem::GetPresentation
bool XLineColorItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
- rVal <<= (sal_Int32)GetColorValue().GetRGBColor();
+ rVal <<= static_cast<sal_Int32>(GetColorValue().GetRGBColor());
return true;
}
@@ -1603,7 +1603,7 @@ bool XLineStartWidthItem::GetPresentation
OUString& rText, const IntlWrapper& rIntl
) const
{
- rText = GetMetricText( (long) GetValue(),
+ rText = GetMetricText( static_cast<long>(GetValue()),
eCoreUnit, ePresUnit, &rIntl) +
" " + EditResId( GetMetricId( ePresUnit) );
return true;
@@ -1641,7 +1641,7 @@ bool XLineEndWidthItem::GetPresentation
OUString& rText, const IntlWrapper& rIntl
) const
{
- rText = GetMetricText( (long) GetValue(),
+ rText = GetMetricText( static_cast<long>(GetValue()),
eCoreUnit, ePresUnit, &rIntl) +
" " + EditResId( GetMetricId( ePresUnit) );
return true;
@@ -1868,7 +1868,7 @@ bool XFillColorItem::GetPresentation
bool XFillColorItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
- rVal <<= (sal_Int32)GetColorValue().GetRGBColor();
+ rVal <<= static_cast<sal_Int32>(GetColorValue().GetRGBColor());
return true;
}
@@ -2046,9 +2046,9 @@ bool XFillGradientItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) c
const XGradient& aXGradient = GetGradientValue();
aGradient2.Style = aXGradient.GetGradientStyle();
- aGradient2.StartColor = (sal_Int32)aXGradient.GetStartColor().GetColor();
- aGradient2.EndColor = (sal_Int32)aXGradient.GetEndColor().GetColor();
- aGradient2.Angle = (short)aXGradient.GetAngle();
+ aGradient2.StartColor = static_cast<sal_Int32>(aXGradient.GetStartColor().GetColor());
+ aGradient2.EndColor = static_cast<sal_Int32>(aXGradient.GetEndColor().GetColor());
+ aGradient2.Angle = static_cast<short>(aXGradient.GetAngle());
aGradient2.Border = aXGradient.GetBorder();
aGradient2.XOffset = aXGradient.GetXOffset();
aGradient2.YOffset = aXGradient.GetYOffset();
@@ -2070,9 +2070,9 @@ bool XFillGradientItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) c
css::awt::Gradient aGradient2;
aGradient2.Style = aXGradient.GetGradientStyle();
- aGradient2.StartColor = (sal_Int32)aXGradient.GetStartColor().GetColor();
- aGradient2.EndColor = (sal_Int32)aXGradient.GetEndColor().GetColor();
- aGradient2.Angle = (short)aXGradient.GetAngle();
+ aGradient2.StartColor = static_cast<sal_Int32>(aXGradient.GetStartColor().GetColor());
+ aGradient2.EndColor = static_cast<sal_Int32>(aXGradient.GetEndColor().GetColor());
+ aGradient2.Angle = static_cast<short>(aXGradient.GetAngle());
aGradient2.Border = aXGradient.GetBorder();
aGradient2.XOffset = aXGradient.GetXOffset();
aGradient2.YOffset = aXGradient.GetYOffset();
@@ -2091,9 +2091,9 @@ bool XFillGradientItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) c
}
case MID_GRADIENT_STYLE: rVal <<= (sal_Int16)GetGradientValue().GetGradientStyle(); break;
- case MID_GRADIENT_STARTCOLOR: rVal <<= (sal_Int32)GetGradientValue().GetStartColor().GetColor(); break;
- case MID_GRADIENT_ENDCOLOR: rVal <<= (sal_Int32)GetGradientValue().GetEndColor().GetColor(); break;
- case MID_GRADIENT_ANGLE: rVal <<= (sal_Int16)GetGradientValue().GetAngle(); break;
+ case MID_GRADIENT_STARTCOLOR: rVal <<= static_cast<sal_Int32>(GetGradientValue().GetStartColor().GetColor()); break;
+ case MID_GRADIENT_ENDCOLOR: rVal <<= static_cast<sal_Int32>(GetGradientValue().GetEndColor().GetColor()); break;
+ case MID_GRADIENT_ANGLE: rVal <<= static_cast<sal_Int16>(GetGradientValue().GetAngle()); break;
case MID_GRADIENT_BORDER: rVal <<= GetGradientValue().GetBorder(); break;
case MID_GRADIENT_XOFFSET: rVal <<= GetGradientValue().GetXOffset(); break;
case MID_GRADIENT_YOFFSET: rVal <<= GetGradientValue().GetYOffset(); break;
@@ -2496,7 +2496,7 @@ bool XFillHatchItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) cons
case MID_HATCH_STYLE:
rVal <<= aHatch.GetHatchStyle(); break;
case MID_HATCH_COLOR:
- rVal <<= (sal_Int32)aHatch.GetColor().GetColor(); break;
+ rVal <<= static_cast<sal_Int32>(aHatch.GetColor().GetColor()); break;
case MID_HATCH_DISTANCE:
rVal <<= aHatch.GetDistance(); break;
case MID_HATCH_ANGLE:
diff --git a/svx/source/xoutdev/xexch.cxx b/svx/source/xoutdev/xexch.cxx
index 68f7d5bb1818..d0ead7dfa21a 100644
--- a/svx/source/xoutdev/xexch.cxx
+++ b/svx/source/xoutdev/xexch.cxx
@@ -61,7 +61,7 @@ SvStream& WriteXFillExchangeData( SvStream& rOStm, const XFillExchangeData& rDat
if( SfxItemState::SET == rData.pXFillAttrSetItem->GetItemSet().GetItemState( nWhich, false, &pItem ) )
{
VersionCompat aCompat( rOStm, StreamMode::WRITE );
- const sal_uInt16 nItemVersion2 = pItem->GetVersion( (sal_uInt16) rOStm.GetVersion() );
+ const sal_uInt16 nItemVersion2 = pItem->GetVersion( static_cast<sal_uInt16>(rOStm.GetVersion()) );
rOStm.WriteUInt16( nWhich ).WriteUInt16( nItemVersion2 );
pItem->Store( rOStm, nItemVersion2 );
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index f8257a6bfbcf..c068547c4c01 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -104,7 +104,7 @@ Bitmap XGradientList::CreateBitmap( long nIndex, const Size& rSize ) const
if(nStartIntens != 100)
{
const basegfx::BColor aBlack;
- aStart = interpolate(aBlack, aStart, (double)nStartIntens * 0.01);
+ aStart = interpolate(aBlack, aStart, static_cast<double>(nStartIntens) * 0.01);
}
const sal_uInt16 nEndIntens(rGradient.GetEndIntens());
@@ -113,7 +113,7 @@ Bitmap XGradientList::CreateBitmap( long nIndex, const Size& rSize ) const
if(nEndIntens != 100)
{
const basegfx::BColor aBlack;
- aEnd = interpolate(aBlack, aEnd, (double)nEndIntens * 0.01);
+ aEnd = interpolate(aBlack, aEnd, static_cast<double>(nEndIntens) * 0.01);
}
drawinglayer::attribute::GradientStyle aGradientStyle(drawinglayer::attribute::GradientStyle::Rect);
@@ -155,10 +155,10 @@ Bitmap XGradientList::CreateBitmap( long nIndex, const Size& rSize ) const
const sal_uInt16 nSteps((rSize.Width() + rSize.Height()) / 3);
const drawinglayer::attribute::FillGradientAttribute aFillGradient(
aGradientStyle,
- (double)rGradient.GetBorder() * 0.01,
- (double)rGradient.GetXOffset() * 0.01,
- (double)rGradient.GetYOffset() * 0.01,
- (double)rGradient.GetAngle() * F_PI1800,
+ static_cast<double>(rGradient.GetBorder()) * 0.01,
+ static_cast<double>(rGradient.GetXOffset()) * 0.01,
+ static_cast<double>(rGradient.GetYOffset()) * 0.01,
+ static_cast<double>(rGradient.GetAngle()) * F_PI1800,
aStart,
aEnd,
nSteps);
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index 8d0dcaeb9800..788f80e328a1 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -118,8 +118,8 @@ Bitmap XHatchList::CreateBitmap( long nIndex, const Size& rSize) const
const drawinglayer::attribute::FillHatchAttribute aFillHatch(
aHatchStyle,
- (double)rHatch.GetDistance() * fScaleValue,
- (double)rHatch.GetAngle() * F_PI1800,
+ static_cast<double>(rHatch.GetDistance()) * fScaleValue,
+ static_cast<double>(rHatch.GetAngle()) * F_PI1800,
rHatch.GetColor().getBColor(),
3, // same default as VCL, a minimum of three discrete units (pixels) offset
false);
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 7d0f1c149d28..b77c250e9553 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -126,7 +126,7 @@ XPropertyList::XPropertyList(
bool XPropertyList::isValidIdx(long nIndex) const
{
- return ((size_t)nIndex < maList.size() && nIndex >= 0);
+ return (static_cast<size_t>(nIndex) < maList.size() && nIndex >= 0);
}