diff options
Diffstat (limited to 'svx/source/dialog')
-rw-r--r-- | svx/source/dialog/_bmpmask.cxx | 24 | ||||
-rw-r--r-- | svx/source/dialog/pagectrl.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/swframeexample.cxx | 6 |
3 files changed, 17 insertions, 17 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 31b8f8c98946..5fc50dfca233 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -662,12 +662,12 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf ) tools::Long nR; tools::Long nG; tools::Long nB; - std::unique_ptr<long[]> pMinR(new long[nCount]); - std::unique_ptr<long[]> pMaxR(new long[nCount]); - std::unique_ptr<long[]> pMinG(new long[nCount]); - std::unique_ptr<long[]> pMaxG(new long[nCount]); - std::unique_ptr<long[]> pMinB(new long[nCount]); - std::unique_ptr<long[]> pMaxB(new long[nCount]); + std::unique_ptr<tools::Long[]> pMinR(new tools::Long[nCount]); + std::unique_ptr<tools::Long[]> pMaxR(new tools::Long[nCount]); + std::unique_ptr<tools::Long[]> pMinG(new tools::Long[nCount]); + std::unique_ptr<tools::Long[]> pMaxG(new tools::Long[nCount]); + std::unique_ptr<tools::Long[]> pMinB(new tools::Long[nCount]); + std::unique_ptr<tools::Long[]> pMaxB(new tools::Long[nCount]); sal_uInt16 i; aMtf.SetPrefSize( rMtf.GetPrefSize() ); @@ -679,16 +679,16 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf ) tools::Long nTol = ( pTols[i] * 255 ) / 100; tools::Long nVal = static_cast<tools::Long>(pSrcCols[i].GetRed()); - pMinR[i] = std::max( nVal - nTol, 0L ); - pMaxR[i] = std::min( nVal + nTol, 255L ); + pMinR[i] = std::max( nVal - nTol, tools::Long(0) ); + pMaxR[i] = std::min( nVal + nTol, tools::Long(255) ); nVal = static_cast<tools::Long>(pSrcCols[i].GetGreen()); - pMinG[i] = std::max( nVal - nTol, 0L ); - pMaxG[i] = std::min( nVal + nTol, 255L ); + pMinG[i] = std::max( nVal - nTol, tools::Long(0) ); + pMaxG[i] = std::min( nVal + nTol, tools::Long(255) ); nVal = static_cast<tools::Long>(pSrcCols[i].GetBlue()); - pMinB[i] = std::max( nVal - nTol, 0L ); - pMaxB[i] = std::min( nVal + nTol, 255L ); + pMinB[i] = std::max( nVal - nTol, tools::Long(0) ); + pMaxB[i] = std::min( nVal + nTol, tools::Long(255) ); pTrans[ i ] = (pDstCols[ i ] == COL_TRANSPARENT); } diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index 2a9dfb0a30b3..a60d3f23e51d 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -75,8 +75,8 @@ void SvxPageWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta rRenderContext.Push(PushFlags::MAPMODE); rRenderContext.SetMapMode(MapMode(MapUnit::MapTwip)); - Fraction aXScale(aWinSize.Width(), std::max(tools::Long(aSize.Width() * 2 + aSize.Width() / 8), 1L)); - Fraction aYScale(aWinSize.Height(), std::max(aSize.Height(), 1L)); + Fraction aXScale(aWinSize.Width(), std::max(aSize.Width() * 2 + aSize.Width() / 8, tools::Long(1))); + Fraction aYScale(aWinSize.Height(), std::max(aSize.Height(), tools::Long(1))); MapMode aMapMode(rRenderContext.GetMapMode()); if(aYScale < aXScale) diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index 770b58f1eee9..be970414cf8a 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -211,15 +211,15 @@ void SwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext) aFrmSize = Size(nLBorder - 3, (aTextLine.GetHeight() + 2) * 3); break; } - aFrmSize.setWidth( std::max(5L, aFrmSize.Width()) ); - aFrmSize.setHeight( std::max(5L, aFrmSize.Height()) ); + aFrmSize.setWidth( std::max(tools::Long(5), aFrmSize.Width()) ); + aFrmSize.setHeight( std::max(tools::Long(5), aFrmSize.Height()) ); } else { sal_uInt32 nFreeWidth = aPagePrtArea.GetWidth() - rRenderContext.GetTextWidth(DEMOTEXT); aFrmSize = Size(nFreeWidth / 2, (aTextLine.GetHeight() + 2) * 3); - aDrawObj.SetSize(Size(std::max(5L, static_cast<tools::Long>(nFreeWidth) / 3L), std::max(5L, aFrmSize.Height() * 3L))); + aDrawObj.SetSize(Size(std::max(tools::Long(5), tools::Long(nFreeWidth / 3)), std::max(tools::Long(5), aFrmSize.Height() * 3))); aDrawObj.SetPos(Point(aParaPrtArea.Right() + 1, aParaPrtArea.Bottom() / 2)); aParaPrtArea.SetRight( aDrawObj.Right() ); } |