diff options
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 4 | ||||
-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 | ||||
-rw-r--r-- | svx/source/gallery2/gallerybinaryengine.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galobj.cxx | 4 |
6 files changed, 22 insertions, 22 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index e6e1f428bd7c..23790a4438e1 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -312,7 +312,7 @@ static void GetTextAreaOutline( const SvxCharScaleWidthItem& rCharScaleWidthItem = rSdrObjCustomShape.GetMergedItem( EE_CHAR_FONTWIDTH ); sal_uInt16 nCharScaleWidth = rCharScaleWidthItem.GetValue(); - std::unique_ptr<long[]> pDXArry; + std::unique_ptr<tools::Long[]> pDXArry; sal_Int32 nWidth = 0; // VERTICAL @@ -365,7 +365,7 @@ static void GetTextAreaOutline( { if ( ( nCharScaleWidth != 100 ) && nCharScaleWidth ) { // applying character spacing - pDXArry.reset(new long[ rText.getLength() ]); + pDXArry.reset(new tools::Long[ rText.getLength() ]); pVirDev->GetTextArray( rText, pDXArry.get()); FontMetric aFontMetric( pVirDev->GetFontMetric() ); aFont.SetAverageFontWidth( static_cast<sal_Int32>( static_cast<double>(aFontMetric.GetAverageFontWidth()) * ( double(100) / static_cast<double>(nCharScaleWidth) ) ) ); 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() ); } diff --git a/svx/source/gallery2/gallerybinaryengine.cxx b/svx/source/gallery2/gallerybinaryengine.cxx index a4a18f0ebe6d..b79aec7f12d6 100644 --- a/svx/source/gallery2/gallerybinaryengine.cxx +++ b/svx/source/gallery2/gallerybinaryengine.cxx @@ -781,7 +781,7 @@ SvStream& GalleryBinaryEngine::writeGalleryTheme(SvStream& rOStm, const GalleryT // Fill the rest of the buffer. const tools::Long nRest - = std::max(512L - (static_cast<tools::Long>(rOStm.Tell()) - nReservePos), 0L); + = std::max(tools::Long(512 - (rOStm.Tell() - nReservePos)), tools::Long(0)); if (nRest) { diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index 53bacec4709c..de1d5e147ee4 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -135,8 +135,8 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic ) else { const float fFactor = static_cast<float>(aBmpSize.Width()) / aBmpSize.Height(); - const Size aNewSize( std::max( static_cast<tools::Long>(fFactor < 1. ? S_THUMB * fFactor : S_THUMB), 8L ), - std::max( static_cast<tools::Long>(fFactor < 1. ? S_THUMB : S_THUMB / fFactor), 8L ) ); + const Size aNewSize( std::max( tools::Long(fFactor < 1. ? S_THUMB * fFactor : S_THUMB), tools::Long(8) ), + std::max( tools::Long(fFactor < 1. ? S_THUMB : S_THUMB / fFactor), tools::Long(8) ) ); if(aThumbBmp.Scale( static_cast<double>(aNewSize.Width()) / aBmpSize.Width(), static_cast<double>(aNewSize.Height()) / aBmpSize.Height(), |