diff options
Diffstat (limited to 'svx/source/sdr/contact')
9 files changed, 31 insertions, 31 deletions
diff --git a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx index 71b973bdb7f9..fa2d7645991c 100644 --- a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx @@ -60,9 +60,9 @@ namespace sdr const basegfx::B2DVector aTextureSize(aRange.getWidth(), aRange.getHeight()); // get more data - const double fDepth((double)GetE3dExtrudeObj().GetExtrudeDepth()); - const double fDiagonal((double)GetE3dExtrudeObj().GetPercentDiagonal() / 100.0); - const double fBackScale((double)GetE3dExtrudeObj().GetPercentBackScale() / 100.0); + const double fDepth(static_cast<double>(GetE3dExtrudeObj().GetExtrudeDepth())); + const double fDiagonal(static_cast<double>(GetE3dExtrudeObj().GetPercentDiagonal()) / 100.0); + const double fBackScale(static_cast<double>(GetE3dExtrudeObj().GetPercentBackScale()) / 100.0); const bool bSmoothNormals(GetE3dExtrudeObj().GetSmoothNormals()); // Plane itself const bool bSmoothLids(GetE3dExtrudeObj().GetSmoothLids()); // Front/back const bool bCharacterMode(GetE3dExtrudeObj().GetCharacterMode()); diff --git a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx index 695edc001e4a..d3bba8823edf 100644 --- a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx @@ -74,9 +74,9 @@ namespace sdr // get more data const sal_uInt32 nHorizontalSegments(GetE3dLatheObj().GetHorizontalSegments()); const sal_uInt32 nVerticalSegments(GetE3dLatheObj().GetVerticalSegments()); - const double fDiagonal((double)GetE3dLatheObj().GetPercentDiagonal() / 100.0); - const double fBackScale((double)GetE3dLatheObj().GetBackScale() / 100.0); - const double fRotation(((double)GetE3dLatheObj().GetEndAngle() / 1800.0) * F_PI); + const double fDiagonal(static_cast<double>(GetE3dLatheObj().GetPercentDiagonal()) / 100.0); + const double fBackScale(static_cast<double>(GetE3dLatheObj().GetBackScale()) / 100.0); + const double fRotation((static_cast<double>(GetE3dLatheObj().GetEndAngle()) / 1800.0) * F_PI); const bool bSmoothNormals(GetE3dLatheObj().GetSmoothNormals()); // Plane itself const bool bSmoothLids(GetE3dLatheObj().GetSmoothLids()); // Front/back const bool bCharacterMode(GetE3dLatheObj().GetCharacterMode()); diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 79e5900f4f40..488b69beb941 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -306,7 +306,7 @@ namespace sdr aLocalGrafInfo.SetChannelG(rItemSet.Get(SDRATTR_GRAFGREEN).GetValue()); aLocalGrafInfo.SetChannelB(rItemSet.Get(SDRATTR_GRAFBLUE).GetValue()); aLocalGrafInfo.SetGamma(rItemSet.Get(SDRATTR_GRAFGAMMA).GetValue() * 0.01); - aLocalGrafInfo.SetTransparency((sal_uInt8)::basegfx::fround(std::min(nTrans, (sal_uInt16)100) * 2.55)); + aLocalGrafInfo.SetTransparency(static_cast<sal_uInt8>(::basegfx::fround(std::min(nTrans, sal_uInt16(100)) * 2.55))); aLocalGrafInfo.SetInvert(rItemSet.Get(SDRATTR_GRAFINVERT).GetValue()); aLocalGrafInfo.SetDrawMode(rItemSet.Get(SDRATTR_GRAFMODE).GetValue()); aLocalGrafInfo.SetCrop(rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom()); diff --git a/svx/source/sdr/contact/viewcontactofsdrobj.cxx b/svx/source/sdr/contact/viewcontactofsdrobj.cxx index 44a29e487257..14a7efed54c6 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobj.cxx @@ -155,7 +155,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrObj::createGlueP // create GluePoint primitives. ATM these are relative to the SnapRect for(sal_uInt32 a(0); a < nCount; a++) { - const SdrGluePoint& rCandidate = (*pGluePointList)[(sal_uInt16)a]; + const SdrGluePoint& rCandidate = (*pGluePointList)[static_cast<sal_uInt16>(a)]; const Point aPosition(rCandidate.GetAbsolutePos(GetSdrObject())); aGluepointVector.emplace_back(aPosition.X(), aPosition.Y()); diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx index fd49657dd723..26616111848a 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx @@ -106,8 +106,8 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageShadow::createV static bool bUseOldPageShadow(false); const SdrPage& rPage = getPage(); basegfx::B2DHomMatrix aPageMatrix; - aPageMatrix.set(0, 0, (double)rPage.GetWidth()); - aPageMatrix.set(1, 1, (double)rPage.GetHeight()); + aPageMatrix.set(0, 0, static_cast<double>(rPage.GetWidth())); + aPageMatrix.set(1, 1, static_cast<double>(rPage.GetHeight())); if(bUseOldPageShadow) { @@ -246,7 +246,7 @@ ViewObjectContact& ViewContactOfPageFill::CreateObjectSpecificViewObjectContact( drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageFill::createViewIndependentPrimitive2DSequence() const { const SdrPage& rPage = getPage(); - const basegfx::B2DRange aPageFillRange(0.0, 0.0, (double)rPage.GetWidth(), (double)rPage.GetHeight()); + const basegfx::B2DRange aPageFillRange(0.0, 0.0, static_cast<double>(rPage.GetWidth()), static_cast<double>(rPage.GetHeight())); const basegfx::B2DPolygon aPageFillPolygon(basegfx::utils::createPolygonFromRect(aPageFillRange)); // We have only the page information, not the view information. Use the @@ -282,11 +282,11 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfOuterPageBorder::cr { drawinglayer::primitive2d::Primitive2DContainer xRetval; const SdrPage& rPage = getPage(); - const basegfx::B2DRange aPageBorderRange(0.0, 0.0, (double)rPage.GetWidth(), (double)rPage.GetHeight()); + const basegfx::B2DRange aPageBorderRange(0.0, 0.0, static_cast<double>(rPage.GetWidth()), static_cast<double>(rPage.GetHeight())); // Changed to 0x949599 for renaissance, before svtools::FONTCOLOR was used. // Added old case as fallback for HighContrast. - basegfx::BColor aRGBBorderColor(0x94 / (double)0xff, 0x95 / (double)0xff, 0x99 / (double)0xff); + basegfx::BColor aRGBBorderColor(0x94 / double(0xff), 0x95 / double(0xff), 0x99 / double(0xff)); if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) { @@ -343,8 +343,8 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfInnerPageBorder::cr { const SdrPage& rPage = getPage(); const basegfx::B2DRange aPageBorderRange( - (double)rPage.GetLeftBorder(), (double)rPage.GetUpperBorder(), - (double)(rPage.GetWidth() - rPage.GetRightBorder()), (double)(rPage.GetHeight() - rPage.GetLowerBorder())); + static_cast<double>(rPage.GetLeftBorder()), static_cast<double>(rPage.GetUpperBorder()), + static_cast<double>(rPage.GetWidth() - rPage.GetRightBorder()), static_cast<double>(rPage.GetHeight() - rPage.GetLowerBorder())); const basegfx::B2DPolygon aPageBorderPolygon(basegfx::utils::createPolygonFromRect(aPageBorderRange)); // We have only the page information, not the view information. Use the diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index ccdf9c2a9940..db64344e0447 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -164,7 +164,7 @@ void PagePrimitiveExtractor::InvalidatePartOfView(const basegfx::B2DRange& rRang if(pStartPage && !rRange.isEmpty()) { - const basegfx::B2DRange aPageRange(0.0, 0.0, (double)pStartPage->GetWidth(), (double)pStartPage->GetHeight()); + const basegfx::B2DRange aPageRange(0.0, 0.0, static_cast<double>(pStartPage->GetWidth()), static_cast<double>(pStartPage->GetHeight())); if(rRange.overlaps(aPageRange)) { diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx index 8b6915259ada..ec1df67520cb 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx @@ -107,8 +107,8 @@ void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rIte aViewRange.transform(GetObjectContact().getViewInformation2D().getViewTransformation()); const tools::Rectangle aViewRectangle( - (sal_Int32)floor(aViewRange.getMinX()), (sal_Int32)floor(aViewRange.getMinY()), - (sal_Int32)ceil(aViewRange.getMaxX()), (sal_Int32)ceil(aViewRange.getMaxY())); + static_cast<sal_Int32>(floor(aViewRange.getMinX())), static_cast<sal_Int32>(floor(aViewRange.getMinY())), + static_cast<sal_Int32>(ceil(aViewRange.getMaxX())), static_cast<sal_Int32>(ceil(aViewRange.getMaxY()))); mpMediaWindow->setPosSize(aViewRectangle); mpMediaWindow->show(); diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx index 1022a51f16f7..6760043bdc08 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx @@ -215,7 +215,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageFill::cre { const SdrPage& rPage = getPage(); - const basegfx::B2DRange aPageFillRange(0.0, 0.0, (double)rPage.GetWidth(), (double)rPage.GetHeight()); + const basegfx::B2DRange aPageFillRange(0.0, 0.0, static_cast<double>(rPage.GetWidth()), static_cast<double>(rPage.GetHeight())); const basegfx::B2DPolygon aPageFillPolygon(basegfx::utils::createPolygonFromRect(aPageFillRange)); Color aPageFillColor; @@ -454,10 +454,10 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageGrid::cre const basegfx::BColor aRGBGridColor(aGridColor.getBColor()); basegfx::B2DHomMatrix aGridMatrix; - aGridMatrix.set(0, 0, (double)(rPage.GetWidth() - (rPage.GetRightBorder() + rPage.GetLeftBorder()))); - aGridMatrix.set(1, 1, (double)(rPage.GetHeight() - (rPage.GetLowerBorder() + rPage.GetUpperBorder()))); - aGridMatrix.set(0, 2, (double)rPage.GetLeftBorder()); - aGridMatrix.set(1, 2, (double)rPage.GetUpperBorder()); + aGridMatrix.set(0, 0, static_cast<double>(rPage.GetWidth() - (rPage.GetRightBorder() + rPage.GetLeftBorder()))); + aGridMatrix.set(1, 1, static_cast<double>(rPage.GetHeight() - (rPage.GetLowerBorder() + rPage.GetUpperBorder()))); + aGridMatrix.set(0, 2, static_cast<double>(rPage.GetLeftBorder())); + aGridMatrix.set(1, 2, static_cast<double>(rPage.GetUpperBorder())); const Size aRaw(rView.GetGridCoarse()); const Size aFine(rView.GetGridFine()); @@ -537,8 +537,8 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageHelplines for(sal_uInt32 a(0); a < nCount; a++) { - const SdrHelpLine& rHelpLine = rHelpLineList[(sal_uInt16)a]; - const basegfx::B2DPoint aPosition((double)rHelpLine.GetPos().X(), (double)rHelpLine.GetPos().Y()); + const SdrHelpLine& rHelpLine = rHelpLineList[static_cast<sal_uInt16>(a)]; + const basegfx::B2DPoint aPosition(static_cast<double>(rHelpLine.GetPos().X()), static_cast<double>(rHelpLine.GetPos().Y())); const double fDiscreteDashLength(4.0); switch(rHelpLine.GetKind()) diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index ad7415abc495..c9a3d29f0ef5 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -236,7 +236,7 @@ namespace sdr { namespace contact { void ControlHolder::setZoom( const ::basegfx::B2DVector& _rScale ) const { // no check whether we're valid, this is the responsibility of the caller - m_xControlView->setZoom( (float)_rScale.getX(), (float)_rScale.getY() ); + m_xControlView->setZoom( static_cast<float>(_rScale.getX()), static_cast<float>(_rScale.getY()) ); } @@ -265,8 +265,8 @@ namespace sdr { namespace contact { if ( pWindow ) { const Fraction& rZoom( pWindow->GetZoom() ); - aZoom.setX( (double)rZoom ); - aZoom.setY( (double)rZoom ); + aZoom.setX( static_cast<double>(rZoom) ); + aZoom.setY( static_cast<double>(rZoom) ); } return aZoom; } @@ -298,7 +298,7 @@ namespace sdr { namespace contact { ::basegfx::B2DPoint aBottomRight( _rLogicBoundingRect.Right(), _rLogicBoundingRect.Bottom() ); aBottomRight *= _rViewTransformation; - const tools::Rectangle aPaintRectPixel( (long)aTopLeft.getX(), (long)aTopLeft.getY(), (long)aBottomRight.getX(), (long)aBottomRight.getY() ); + const tools::Rectangle aPaintRectPixel( static_cast<long>(aTopLeft.getX()), static_cast<long>(aTopLeft.getY()), static_cast<long>(aBottomRight.getX()), static_cast<long>(aBottomRight.getY()) ); _rControl.setPosSize( aPaintRectPixel ); // determine the scale from the current view transformation, and the normalization matrix @@ -840,8 +840,8 @@ namespace sdr { namespace contact { ::basegfx::B2DHomMatrix aScaleNormalization; const MapMode& aCurrentDeviceMapMode( rPageViewDevice.GetMapMode() ); - aScaleNormalization.set( 0, 0, (double)aCurrentDeviceMapMode.GetScaleX() ); - aScaleNormalization.set( 1, 1, (double)aCurrentDeviceMapMode.GetScaleY() ); + aScaleNormalization.set( 0, 0, static_cast<double>(aCurrentDeviceMapMode.GetScaleX()) ); + aScaleNormalization.set( 1, 1, static_cast<double>(aCurrentDeviceMapMode.GetScaleY()) ); m_aZoomLevelNormalization *= aScaleNormalization; #if OSL_DEBUG_LEVEL > 0 |