diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-10 10:14:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-11 11:25:43 +0100 |
commit | 941f2c866a98ca7caf71a11732853da012cd25e4 (patch) | |
tree | d5879ca5a6c50c8258e62d343f4c90cf9a6127f5 /vcl/source | |
parent | cd3990d1d8f212474dee1c1d989f005e4d9913a4 (diff) |
convert more long -> tools::Long
found by grepping and changed by hand.
Change-Id: I3c720859dba430fde3abc76c6c5cb58269efaf4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105512
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/bitmap/BitmapEmbossGreyFilter.cxx | 4 | ||||
-rw-r--r-- | vcl/source/bitmap/BitmapFastScaleFilter.cxx | 4 | ||||
-rw-r--r-- | vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx | 8 | ||||
-rw-r--r-- | vcl/source/bitmap/BitmapMedianFilter.cxx | 4 | ||||
-rw-r--r-- | vcl/source/bitmap/bitmappaint.cxx | 12 | ||||
-rw-r--r-- | vcl/source/control/imivctl1.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/JpegReader.hxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/impvect.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/metaact.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/salmisc.cxx | 6 | ||||
-rw-r--r-- | vcl/source/outdev/map.cxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/NotebookBarAddonsMerger.cxx | 7 |
16 files changed, 43 insertions, 44 deletions
diff --git a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx index aa8dff8aaa29..9470dfd3acad 100644 --- a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx +++ b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx @@ -47,8 +47,8 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& rBitmapEx) const tools::Long nGrey31, nGrey32, nGrey33; double fAzim = basegfx::deg2rad(mnAzimuthAngle100 * 0.01); double fElev = basegfx::deg2rad(mnElevationAngle100 * 0.01); - std::unique_ptr<long[]> pHMap(new long[nWidth + 2]); - std::unique_ptr<long[]> pVMap(new long[nHeight + 2]); + std::unique_ptr<tools::Long[]> pHMap(new tools::Long[nWidth + 2]); + std::unique_ptr<tools::Long[]> pVMap(new tools::Long[nHeight + 2]); tools::Long nX, nY, nNx, nNy, nDotL; const tools::Long nLx = FRound(cos(fAzim) * cos(fElev) * 255.0); const tools::Long nLy = FRound(sin(fAzim) * cos(fElev) * 255.0); diff --git a/vcl/source/bitmap/BitmapFastScaleFilter.cxx b/vcl/source/bitmap/BitmapFastScaleFilter.cxx index 5b9ff591c953..7c8b63a0f729 100644 --- a/vcl/source/bitmap/BitmapFastScaleFilter.cxx +++ b/vcl/source/bitmap/BitmapFastScaleFilter.cxx @@ -58,8 +58,8 @@ BitmapEx BitmapFastScaleFilter::execute(BitmapEx const& rBitmapEx) const { const double nWidth = pReadAcc->Width(); const double nHeight = pReadAcc->Height(); - std::unique_ptr<long[]> pLutX(new long[nNewWidth]); - std::unique_ptr<long[]> pLutY(new long[nNewHeight]); + std::unique_ptr<tools::Long[]> pLutX(new tools::Long[nNewWidth]); + std::unique_ptr<tools::Long[]> pLutY(new tools::Long[nNewHeight]); for (tools::Long nX = 0; nX < nNewWidth; nX++) { diff --git a/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx b/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx index 1542b34a40c7..eb1d027bb295 100644 --- a/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx +++ b/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx @@ -52,8 +52,8 @@ BitmapEx BitmapInterpolateScaleFilter::execute(BitmapEx const& rBitmapEx) const const tools::Long nWidth1 = pReadAcc->Width() - 1; const double fRevScaleX = static_cast<double>(nWidth1) / nNewWidth1; - std::unique_ptr<long[]> pLutInt(new long[nNewWidth]); - std::unique_ptr<long[]> pLutFrac(new long[nNewWidth]); + std::unique_ptr<tools::Long[]> pLutInt(new tools::Long[nNewWidth]); + std::unique_ptr<tools::Long[]> pLutFrac(new tools::Long[nNewWidth]); for (tools::Long nX = 0, nTemp = nWidth - 2; nX < nNewWidth; nX++) { @@ -148,8 +148,8 @@ BitmapEx BitmapInterpolateScaleFilter::execute(BitmapEx const& rBitmapEx) const const tools::Long nHeight1 = pReadAcc->Height() - 1; const double fRevScaleY = static_cast<double>(nHeight1) / nNewHeight1; - std::unique_ptr<long[]> pLutInt(new long[nNewHeight]); - std::unique_ptr<long[]> pLutFrac(new long[nNewHeight]); + std::unique_ptr<tools::Long[]> pLutInt(new tools::Long[nNewHeight]); + std::unique_ptr<tools::Long[]> pLutFrac(new tools::Long[nNewHeight]); for (tools::Long nY = 0, nTemp = nHeight - 2; nY < nNewHeight; nY++) { diff --git a/vcl/source/bitmap/BitmapMedianFilter.cxx b/vcl/source/bitmap/BitmapMedianFilter.cxx index 4f1c857c0878..91bc75a7d4bd 100644 --- a/vcl/source/bitmap/BitmapMedianFilter.cxx +++ b/vcl/source/bitmap/BitmapMedianFilter.cxx @@ -66,8 +66,8 @@ BitmapEx BitmapMedianFilter::execute(BitmapEx const& rBitmapEx) const { const tools::Long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2; const tools::Long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2; - std::unique_ptr<long[]> pColm(new long[nWidth2]); - std::unique_ptr<long[]> pRows(new long[nHeight2]); + std::unique_ptr<tools::Long[]> pColm(new tools::Long[nWidth2]); + std::unique_ptr<tools::Long[]> pRows(new tools::Long[nHeight2]); std::unique_ptr<BitmapColor[]> pColRow1(new BitmapColor[nWidth2]); std::unique_ptr<BitmapColor[]> pColRow2(new BitmapColor[nWidth2]); std::unique_ptr<BitmapColor[]> pColRow3(new BitmapColor[nWidth2]); diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx index f1c849bd5787..dd9eb1a5999b 100644 --- a/vcl/source/bitmap/bitmappaint.cxx +++ b/vcl/source/bitmap/bitmappaint.cxx @@ -926,12 +926,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const Color* pReplaceColors, sa if (pAcc) { - std::unique_ptr<long[]> pMinR(new long[nColorCount]); - std::unique_ptr<long[]> pMaxR(new long[nColorCount]); - std::unique_ptr<long[]> pMinG(new long[nColorCount]); - std::unique_ptr<long[]> pMaxG(new long[nColorCount]); - std::unique_ptr<long[]> pMinB(new long[nColorCount]); - std::unique_ptr<long[]> pMaxB(new long[nColorCount]); + std::unique_ptr<tools::Long[]> pMinR(new tools::Long[nColorCount]); + std::unique_ptr<tools::Long[]> pMaxR(new tools::Long[nColorCount]); + std::unique_ptr<tools::Long[]> pMinG(new tools::Long[nColorCount]); + std::unique_ptr<tools::Long[]> pMaxG(new tools::Long[nColorCount]); + std::unique_ptr<tools::Long[]> pMinB(new tools::Long[nColorCount]); + std::unique_ptr<tools::Long[]> pMaxB(new tools::Long[nColorCount]); if (pTols) { diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index bcef44294468..24d64bdd7e41 100644 --- a/vcl/source/control/imivctl1.cxx +++ b/vcl/source/control/imivctl1.cxx @@ -502,7 +502,7 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const too rRenderContext.DrawLine(aStart, aEnd); } - for (long nDX = nGridDX; nDX <= aXSize.Width(); nDX += nGridDX) + for (tools::Long nDX = nGridDX; nDX <= aXSize.Width(); nDX += nGridDX) { Point aStart( nDX+LROFFS_WINBORDER, 0 ); Point aEnd( nDX+LROFFS_WINBORDER, aXSize.Height()); @@ -510,7 +510,7 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const too aEnd -= aOffs; rRenderContext.DrawLine(aStart, aEnd); } - for (long nDY = nGridDY; nDY <= aXSize.Height(); nDY += nGridDY) + for (tools::Long nDY = nGridDY; nDY <= aXSize.Height(); nDY += nGridDY) { Point aStart(0, nDY + TBOFFS_WINBORDER); Point aEnd(aXSize.Width(), nDY + TBOFFS_WINBORDER); diff --git a/vcl/source/filter/jpeg/JpegReader.hxx b/vcl/source/filter/jpeg/JpegReader.hxx index 3dc78ce50e32..c9bf90806ade 100644 --- a/vcl/source/filter/jpeg/JpegReader.hxx +++ b/vcl/source/filter/jpeg/JpegReader.hxx @@ -36,11 +36,11 @@ enum ReadState struct JPEGCreateBitmapParam { - unsigned long nWidth; - unsigned long nHeight; - unsigned long density_unit; - unsigned long X_density; - unsigned long Y_density; + tools::ULong nWidth; + tools::ULong nHeight; + tools::ULong density_unit; + tools::ULong X_density; + tools::ULong Y_density; bool bGray; }; diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 39203304e2dd..c846d0a3a60c 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -862,7 +862,7 @@ bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_uL const tools::Long nRead = aCodec.Read(*pMemStm, aData.data() + nDataPos, sal_uInt32(nToRead)); if (nRead > 0) { - nDataPos += static_cast<unsigned long>(nRead); + nDataPos += static_cast<tools::ULong>(nRead); // we haven't read everything yet: resize buffer and continue if (nDataPos < nUncodedSize) aData.resize(aData.size() + nSizeInc); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 5fdcac0b3255..454363c6d88c 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2799,9 +2799,9 @@ bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, BmpConversion eColorConve // determine size that has the same aspect ratio as image size and // fits into the rectangle determined by nMaximumExtent if ( aSizePix.Width() && aSizePix.Height() - && ( sal::static_int_cast< unsigned long >(aSizePix.Width()) > + && ( sal::static_int_cast< tools::ULong >(aSizePix.Width()) > nMaximumExtent || - sal::static_int_cast< unsigned long >(aSizePix.Height()) > + sal::static_int_cast< tools::ULong >(aSizePix.Height()) > nMaximumExtent ) ) { const Size aOldSizePix( aSizePix ); diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index f64d5c437c26..1b340780aa8f 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -40,7 +40,7 @@ #define VECT_POLY_OUTLINE_INNER 4UL #define VECT_POLY_OUTLINE_OUTER 8UL -static void VECT_MAP( const std::unique_ptr<long []> & pMapIn, const std::unique_ptr<long []>& pMapOut, tools::Long nVal ) +static void VECT_MAP( const std::unique_ptr<tools::Long []> & pMapIn, const std::unique_ptr<tools::Long []>& pMapOut, tools::Long nVal ) { pMapIn[nVal] = (nVal * 4) + 1; pMapOut[nVal] = pMapIn[nVal] + 5; @@ -788,8 +788,8 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor ) const tools::Long nNewWidth = ( nOldWidth << 2 ) + 4; const tools::Long nNewHeight = ( nOldHeight << 2 ) + 4; const BitmapColor aTest( pRAcc->GetBestMatchingColor( rColor ) ); - std::unique_ptr<long[]> pMapIn(new long[ std::max( nOldWidth, nOldHeight ) ]); - std::unique_ptr<long[]> pMapOut(new long[ std::max( nOldWidth, nOldHeight ) ]); + std::unique_ptr<tools::Long[]> pMapIn(new tools::Long[ std::max( nOldWidth, nOldHeight ) ]); + std::unique_ptr<tools::Long[]> pMapOut(new tools::Long[ std::max( nOldWidth, nOldHeight ) ]); tools::Long nX, nY, nTmpX, nTmpY; pMap = new ImplVectMap( nNewWidth, nNewHeight ); diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 2a1bb8562438..c966a68309e9 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -1092,7 +1092,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) : if( rAction.mpDXAry ) { mpDXAry.reset( new tools::Long[ mnLen ] ); - memcpy( mpDXAry.get(), rAction.mpDXAry.get(), mnLen * sizeof( long ) ); + memcpy( mpDXAry.get(), rAction.mpDXAry.get(), mnLen * sizeof( tools::Long ) ); } } @@ -1112,7 +1112,7 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt, if (nAryLen > 0) { mpDXAry.reset( new tools::Long[ nAryLen ] ); - memcpy( mpDXAry.get(), pDXAry, nAryLen * sizeof(long) ); + memcpy( mpDXAry.get(), pDXAry, nAryLen * sizeof(tools::Long) ); } } diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 756752275b51..48338a879ea5 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -728,8 +728,8 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, // do painting const tools::Long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight(); tools::Long nX, nY; //, nWorkX, nWorkY, nWorkWidth, nWorkHeight; - std::unique_ptr<long[]> pMapX( new long[ nSrcWidth + 1 ] ); - std::unique_ptr<long[]> pMapY( new long[ nSrcHeight + 1 ] ); + std::unique_ptr<tools::Long[]> pMapX( new tools::Long[ nSrcWidth + 1 ] ); + std::unique_ptr<tools::Long[]> pMapY( new tools::Long[ nSrcHeight + 1 ] ); GDIMetaFile* pOldMetaFile = mpMetaFile; const bool bOldMap = mbMap; diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx index a077e50be4d6..14af546fca67 100644 --- a/vcl/source/gdi/salmisc.cxx +++ b/vcl/source/gdi/salmisc.cxx @@ -53,9 +53,9 @@ static tools::Long ImplIndexFromColor( const BitmapColor& rCol ) #elif TC_TO_PAL_COLORS == 32768 - return( ( ( (long) rCol.GetBlue() >> 3) << 10 ) | - ( ( (long) rCol.GetGreen() >> 3 ) << 5 ) | - ( (long) rCol.GetRed() >> 3 ) ); + return( ( ( (tools::Long) rCol.GetBlue() >> 3) << 10 ) | + ( ( (tools::Long) rCol.GetGreen() >> 3 ) << 5 ) | + ( (tools::Long) rCol.GetRed() >> 3 ) ); #endif } diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index a2134bd468d5..aba22cb4ef1f 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -37,9 +37,9 @@ // we don't actually handle units beyond, hence the zeros in the arrays const MapUnit s_MaxValidUnit = MapUnit::MapPixel; -const o3tl::enumarray<MapUnit,long> aImplNumeratorAry = +const o3tl::enumarray<MapUnit,tools::Long> aImplNumeratorAry = { 1, 1, 5, 50, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 }; -const o3tl::enumarray<MapUnit,long> aImplDenominatorAry = +const o3tl::enumarray<MapUnit,tools::Long> aImplDenominatorAry = { 2540, 254, 127, 127, 1000, 100, 10, 1, 72, 1440, 1, 0, 0, 0 }; /* diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 58242661a2ac..55423fdb6385 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -168,8 +168,8 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask // do painting const tools::Long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight(); tools::Long nX, nY; // , nWorkX, nWorkY, nWorkWidth, nWorkHeight; - std::unique_ptr<long[]> pMapX(new long[ nSrcWidth + 1 ]); - std::unique_ptr<long[]> pMapY(new long[ nSrcHeight + 1 ]); + std::unique_ptr<tools::Long[]> pMapX(new tools::Long[ nSrcWidth + 1 ]); + std::unique_ptr<tools::Long[]> pMapY(new tools::Long[ nSrcHeight + 1 ]); const bool bOldMap = mbMap; mbMap = false; diff --git a/vcl/source/window/NotebookBarAddonsMerger.cxx b/vcl/source/window/NotebookBarAddonsMerger.cxx index 1d8d5a7e7aec..1bbbc66b9452 100644 --- a/vcl/source/window/NotebookBarAddonsMerger.cxx +++ b/vcl/source/window/NotebookBarAddonsMerger.cxx @@ -64,8 +64,7 @@ static void GetAddonNotebookBarItem(const css::uno::Sequence<css::beans::Propert static void CreateNotebookBarToolBox(vcl::Window* pNotebookbarToolBox, const css::uno::Reference<css::frame::XFrame>& m_xFrame, const AddonNotebookBarItem& aAddonNotebookBarItem, - const std::vector<Image>& aImageVec, - const unsigned long& nIter) + const std::vector<Image>& aImageVec, const tools::ULong& nIter) { sal_uInt16 nItemId = 0; ToolBox* pToolbox = dynamic_cast<ToolBox*>(pNotebookbarToolBox); @@ -111,7 +110,7 @@ void MergeNotebookBarAddons(vcl::Window* pParent, const VclBuilder::customMakeWi VclBuilder::stringmap& rMap) { std::vector<Image> aImageVec = aNotebookBarAddonsItem.aImageValues; - unsigned long nIter = 0; + tools::ULong nIter = 0; sal_uInt16 nPriorityIdx = aImageVec.size(); css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>> aExtension; for (std::size_t nIdx = 0; nIdx < aNotebookBarAddonsItem.aAddonValues.size(); nIdx++) @@ -147,7 +146,7 @@ void MergeNotebookBarMenuAddons(Menu* pPopupMenu, sal_Int16 nItemId, const OStri NotebookBarAddonsItem& aNotebookBarAddonsItem) { std::vector<Image> aImageVec = aNotebookBarAddonsItem.aImageValues; - unsigned long nIter = 0; + tools::ULong nIter = 0; css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>> aExtension; for (std::size_t nIdx = 0; nIdx < aNotebookBarAddonsItem.aAddonValues.size(); nIdx++) { |