summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-10 10:14:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-11 11:25:43 +0100
commit941f2c866a98ca7caf71a11732853da012cd25e4 (patch)
treed5879ca5a6c50c8258e62d343f4c90cf9a6127f5 /vcl/source/gdi
parentcd3990d1d8f212474dee1c1d989f005e4d9913a4 (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/gdi')
-rw-r--r--vcl/source/gdi/dibtools.cxx2
-rw-r--r--vcl/source/gdi/gdimtf.cxx4
-rw-r--r--vcl/source/gdi/impvect.cxx6
-rw-r--r--vcl/source/gdi/metaact.cxx4
-rw-r--r--vcl/source/gdi/print.cxx4
-rw-r--r--vcl/source/gdi/salmisc.cxx6
6 files changed, 13 insertions, 13 deletions
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
}