summaryrefslogtreecommitdiff
path: root/vcl/qa
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-19 15:12:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-19 21:34:46 +0200
commit3aef606f2758172a27718a06fea0ff9080e4d80f (patch)
treead323c90301d80bbb3b68163d8b87e5402b687ed /vcl/qa
parent5afba3e12c8d4eb1ebb8e087134eb87593bb017a (diff)
use tools::Long in vcl
Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/qa')
-rw-r--r--vcl/qa/cppunit/BitmapFilterTest.cxx32
-rw-r--r--vcl/qa/cppunit/BitmapScaleTest.cxx40
-rw-r--r--vcl/qa/cppunit/BitmapTest.cxx32
-rw-r--r--vcl/qa/cppunit/GraphicTest.cxx4
-rw-r--r--vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx12
-rw-r--r--vcl/qa/cppunit/complextext.cxx2
-rw-r--r--vcl/qa/cppunit/jpeg/JpegReaderTest.cxx18
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx2
-rw-r--r--vcl/qa/cppunit/svm/svmtest.cxx2
9 files changed, 73 insertions, 71 deletions
diff --git a/vcl/qa/cppunit/BitmapFilterTest.cxx b/vcl/qa/cppunit/BitmapFilterTest.cxx
index 12b32bc316f7..4c878960474b 100644
--- a/vcl/qa/cppunit/BitmapFilterTest.cxx
+++ b/vcl/qa/cppunit/BitmapFilterTest.cxx
@@ -83,8 +83,8 @@ void BitmapFilterTest::testBlurCorrectness()
sal_uInt16 nBPP = aBitmap24Bit.GetBitCount();
{
- long aMargin1 = 1;
- long aMargin2 = 3;
+ tools::Long aMargin1 = 1;
+ tools::Long aMargin2 = 3;
BitmapScopedWriteAccess aWriteAccess(aBitmap24Bit);
scanlineFormat = aWriteAccess->GetScanlineFormat();
aWriteAccess->Erase(COL_WHITE);
@@ -121,8 +121,8 @@ void BitmapFilterTest::testBlurCorrectness()
}
// Check blurred bitmap parameters
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(41), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(31), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(41), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(31), aBitmap24Bit.GetSizePixel().Height());
CPPUNIT_ASSERT_EQUAL(nBPP, aBitmap24Bit.GetBitCount());
@@ -174,7 +174,7 @@ void BitmapFilterTest::testPerformance()
// Prepare bitmap
Bitmap aBigBitmap(aSize, 24);
{
- long aMargin = 500;
+ tools::Long aMargin = 500;
BitmapScopedWriteAccess aWriteAccess(aBigBitmap);
aWriteAccess->Erase(COL_WHITE);
aWriteAccess->SetLineColor(COL_BLACK);
@@ -214,14 +214,15 @@ void BitmapFilterTest::testPerformance()
void BitmapFilterTest::testGenerateStripRanges()
{
{
- constexpr long nFirstIndex = 0;
- constexpr long nLastIndex = 100;
- constexpr long nStripSize = 32;
+ constexpr tools::Long nFirstIndex = 0;
+ constexpr tools::Long nLastIndex = 100;
+ constexpr tools::Long nStripSize = 32;
- std::vector<std::tuple<long, long, bool>> aRanges;
+ std::vector<std::tuple<tools::Long, tools::Long, bool>> aRanges;
vcl::bitmap::generateStripRanges<nStripSize>(
- nFirstIndex, nLastIndex, [&](long const nStart, long const nEnd, bool const bLast) {
+ nFirstIndex, nLastIndex,
+ [&](tools::Long const nStart, tools::Long const nEnd, bool const bLast) {
aRanges.emplace_back(nStart, nEnd, bLast);
});
@@ -245,14 +246,15 @@ void BitmapFilterTest::testGenerateStripRanges()
}
{
- constexpr long nFirstIndex = 0;
- constexpr long nLastIndex = 95;
- constexpr long nStripSize = 32;
+ constexpr tools::Long nFirstIndex = 0;
+ constexpr tools::Long nLastIndex = 95;
+ constexpr tools::Long nStripSize = 32;
- std::vector<std::tuple<long, long, bool>> aRanges;
+ std::vector<std::tuple<tools::Long, tools::Long, bool>> aRanges;
vcl::bitmap::generateStripRanges<nStripSize>(
- nFirstIndex, nLastIndex, [&](long const nStart, long const nEnd, bool const bLast) {
+ nFirstIndex, nLastIndex,
+ [&](tools::Long const nStart, tools::Long const nEnd, bool const bLast) {
aRanges.emplace_back(nStart, nEnd, bLast);
});
diff --git a/vcl/qa/cppunit/BitmapScaleTest.cxx b/vcl/qa/cppunit/BitmapScaleTest.cxx
index 277e42adbe1b..7de2f7d8678d 100644
--- a/vcl/qa/cppunit/BitmapScaleTest.cxx
+++ b/vcl/qa/cppunit/BitmapScaleTest.cxx
@@ -40,12 +40,12 @@ bool checkBitmapColor(Bitmap const& rBitmap, Color const& rExpectedColor)
bool bResult = true;
Bitmap aBitmap(rBitmap);
Bitmap::ScopedReadAccess pReadAccess(aBitmap);
- long nHeight = pReadAccess->Height();
- long nWidth = pReadAccess->Width();
- for (long y = 0; y < nHeight; ++y)
+ tools::Long nHeight = pReadAccess->Height();
+ tools::Long nWidth = pReadAccess->Width();
+ for (tools::Long y = 0; y < nHeight; ++y)
{
Scanline pScanlineRead = pReadAccess->GetScanline(y);
- for (long x = 0; x < nWidth; ++x)
+ for (tools::Long x = 0; x < nWidth; ++x)
{
Color aColor = pReadAccess->GetPixelFromData(pScanlineRead, x);
if (aColor != rExpectedColor)
@@ -219,8 +219,8 @@ void BitmapScaleTest::testScale2()
}
// Scale - 65x65
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Height());
Bitmap aScaledBitmap = aBitmap24Bit;
aScaledBitmap.Scale(Size(65, 65));
@@ -231,13 +231,13 @@ void BitmapScaleTest::testScale2()
rFilter.compressAsPNG(BitmapEx(aScaledBitmap), aStream);
}
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(65), aScaledBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(65), aScaledBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(65), aScaledBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(65), aScaledBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT(checkBitmapColor(aScaledBitmap, aBitmapColor));
// Scale - 64x64
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Height());
aScaledBitmap = aBitmap24Bit;
aScaledBitmap.Scale(Size(64, 64));
@@ -248,13 +248,13 @@ void BitmapScaleTest::testScale2()
rFilter.compressAsPNG(BitmapEx(aScaledBitmap), aStream);
}
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(64), aScaledBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(64), aScaledBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(64), aScaledBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(64), aScaledBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT(checkBitmapColor(aScaledBitmap, aBitmapColor));
// Scale - 63x63
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(4096), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4096), aBitmap24Bit.GetSizePixel().Height());
aScaledBitmap = aBitmap24Bit;
aScaledBitmap.Scale(Size(63, 63));
@@ -265,8 +265,8 @@ void BitmapScaleTest::testScale2()
rFilter.compressAsPNG(BitmapEx(aScaledBitmap), aStream);
}
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(63), aScaledBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(63), aScaledBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(63), aScaledBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(63), aScaledBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT(checkBitmapColor(aScaledBitmap, aBitmapColor));
}
@@ -287,8 +287,8 @@ void BitmapScaleTest::testScaleSymmetry()
BitmapSymmetryCheck aBitmapSymmetryCheck;
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(10), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(10), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(10), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(10), aBitmap24Bit.GetSizePixel().Height());
// Check symmetry of the bitmap
CPPUNIT_ASSERT(BitmapSymmetryCheck::check(aBitmap24Bit));
@@ -302,8 +302,8 @@ void BitmapScaleTest::testScaleSymmetry()
aBitmap24Bit.Scale(2, 2, BmpScaleFlag::Fast);
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(20), aBitmap24Bit.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(static_cast<long>(20), aBitmap24Bit.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(20), aBitmap24Bit.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(20), aBitmap24Bit.GetSizePixel().Height());
// After scaling the bitmap should still be symmetrical. This check guarantees that
// scaling doesn't misalign the bitmap.
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index 02d9fdf2cd56..490a2d3ce8c7 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -88,8 +88,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp;
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(0), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(0), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(0), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(0), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Not empty", aBmp.IsEmpty());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", static_cast<sal_uInt16>(0),
@@ -102,8 +102,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp(Size(10, 10), 1);
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(10), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(10), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(10), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", static_cast<sal_uInt16>(1),
@@ -116,8 +116,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp(Size(10, 10), 4);
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(10), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(10), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(10), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", static_cast<sal_uInt16>(4),
@@ -130,8 +130,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp(Size(10, 10), 8);
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(10), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(10), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(10), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", static_cast<sal_uInt16>(8),
@@ -144,8 +144,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp(Size(10, 10), 24);
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(10), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(10), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(10), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", static_cast<sal_uInt16>(24),
@@ -163,8 +163,8 @@ void BitmapTest::testCreation()
{
Bitmap aBmp(Size(10, 10), 32);
Size aSize = aBmp.GetSizePixel();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(10), aSize.Height());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<tools::Long>(10), aSize.Width());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<tools::Long>(10), aSize.Height());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
@@ -611,9 +611,9 @@ void BitmapTest::testOctree()
Bitmap aBitmap(aSize, 24);
{
BitmapScopedWriteAccess pWriteAccess(aBitmap);
- for (long y = 0; y < aSize.Height(); ++y)
+ for (tools::Long y = 0; y < aSize.Height(); ++y)
{
- for (long x = 0; x < aSize.Width(); ++x)
+ for (tools::Long x = 0; x < aSize.Width(); ++x)
{
double fPercent = double(x) / double(aSize.Width());
pWriteAccess->SetPixel(y, x,
@@ -657,8 +657,8 @@ void BitmapTest::testEmptyAccess()
{
Bitmap empty;
BitmapInfoAccess access(empty);
- CPPUNIT_ASSERT_EQUAL(long(0), access.Width());
- CPPUNIT_ASSERT_EQUAL(long(0), access.Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(0), access.Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(0), access.Height());
}
} // namespace
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index 04a0559473ea..353f195eac43 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -153,9 +153,9 @@ bool checkBitmap(Graphic& rGraphic)
Bitmap aBitmap(rGraphic.GetBitmapEx().GetBitmap());
{
Bitmap::ScopedReadAccess pReadAccess(aBitmap);
- for (long y = 0; y < rGraphic.GetSizePixel().Height(); y++)
+ for (tools::Long y = 0; y < rGraphic.GetSizePixel().Height(); y++)
{
- for (long x = 0; x < rGraphic.GetSizePixel().Width(); x++)
+ for (tools::Long x = 0; x < rGraphic.GetSizePixel().Width(); x++)
{
if (pReadAccess->HasPalette())
{
diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
index b6bd724910b8..dd10d508e243 100644
--- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
+++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
@@ -178,8 +178,8 @@ void BitmapRenderTest::testAlphaVirtualDevice()
// Get a BitmapEx from the VirDev -> Colors should have alpha
BitmapEx aBitmap = pAlphaVirtualDevice->GetBitmapEx(Point(), Size(4, 4));
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
Color aColor = aBitmap.GetPixelColor(1, 1);
CPPUNIT_ASSERT_EQUAL(Color(0xffffffff), aColor);
@@ -196,8 +196,8 @@ void BitmapRenderTest::testAlphaVirtualDevice()
// Read back the BitmapEx and check the opaque pixel
aBitmap = pAlphaVirtualDevice->GetBitmapEx(Point(), Size(4, 4));
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
aColor = aBitmap.GetPixelColor(1, 1);
#if defined _WIN32
@@ -219,8 +219,8 @@ void BitmapRenderTest::testAlphaVirtualDevice()
// Read back the BitmapEx and check the semi-transparent pixel
aBitmap = pAlphaVirtualDevice->GetBitmapEx(Point(), Size(4, 4));
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
aColor = aBitmap.GetPixelColor(0, 0);
#if defined _WIN32
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index 8cbe9b6c748e..887f8d187fb1 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -78,7 +78,7 @@ void VclComplexTextTest::testArabic()
std::vector<long> aRefCharWidths {6, 9, 16, 16, 22, 22, 26, 29, 32, 32,
36, 40, 49, 53, 56, 63, 63, 66, 72, 72};
std::vector<long> aCharWidths(aOneTwoThree.getLength(), 0);
- long nTextWidth = pOutDev->GetTextArray(aOneTwoThree, aCharWidths.data());
+ tools::Long nTextWidth = pOutDev->GetTextArray(aOneTwoThree, aCharWidths.data());
CPPUNIT_ASSERT_EQUAL(aRefCharWidths, aCharWidths);
// this sporadically returns 75 or 74 on some of the windows tinderboxes eg. tb73
diff --git a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
index 65f5f8047bb6..6931b42e8677 100644
--- a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
+++ b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
@@ -45,22 +45,22 @@ static int deltaColor(BitmapColor aColor1, BitmapColor aColor2)
return std::max(std::max(deltaR, deltaG), deltaB);
}
-static bool checkRect(Bitmap& rBitmap, int aLayerNumber, long nAreaHeight, long nAreaWidth, Color aExpectedColor, int nMaxDelta)
+static bool checkRect(Bitmap& rBitmap, int aLayerNumber, tools::Long nAreaHeight, tools::Long nAreaWidth, Color aExpectedColor, int nMaxDelta)
{
BitmapScopedWriteAccess pAccess(rBitmap);
- long nWidth = std::min(nAreaWidth, pAccess->Width());
- long nHeight = std::min(nAreaHeight, pAccess->Height());
+ tools::Long nWidth = std::min(nAreaWidth, pAccess->Width());
+ tools::Long nHeight = std::min(nAreaHeight, pAccess->Height());
- long firstX = 0 + aLayerNumber;
- long firstY = 0 + aLayerNumber;
+ tools::Long firstX = 0 + aLayerNumber;
+ tools::Long firstY = 0 + aLayerNumber;
- long lastX = nWidth - 1 - aLayerNumber;
- long lastY = nHeight - 1 - aLayerNumber;
+ tools::Long lastX = nWidth - 1 - aLayerNumber;
+ tools::Long lastY = nHeight - 1 - aLayerNumber;
int delta;
- for (long y = firstY; y <= lastY; y++)
+ for (tools::Long y = firstY; y <= lastY; y++)
{
Color aColorFirst = pAccess->GetPixel(y, firstX);
delta = deltaColor(aColorFirst, aExpectedColor);
@@ -72,7 +72,7 @@ static bool checkRect(Bitmap& rBitmap, int aLayerNumber, long nAreaHeight, long
if (delta > nMaxDelta)
return false;
}
- for (long x = firstX; x <= lastX; x++)
+ for (tools::Long x = firstX; x <= lastX; x++)
{
Color aColorFirst = pAccess->GetPixel(firstY, x);
delta = deltaColor(aColorFirst, aExpectedColor);
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 47799ec81b3d..c06745b32efc 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1424,7 +1424,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf105954)
Size aMeta = pPageObject->getImageSize(*pPdfPage);
// This was 2000, i.e. the 'reduce to 300 DPI' request was ignored.
// This is now around 238 (228 on macOS).
- CPPUNIT_ASSERT_LESS(static_cast<long>(250), aMeta.getWidth());
+ CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(250), aMeta.getWidth());
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf128630)
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index 8960f727ea81..17878c0656e6 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -840,7 +840,7 @@ void SvmTest::testTextArray()
GDIMetaFile aGDIMetaFile;
ScopedVclPtrInstance<VirtualDevice> pVirtualDev;
setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile);
- long const aDX[] = { 10, 15, 20, 25, 30, 35 };
+ tools::Long const aDX[] = { 10, 15, 20, 25, 30, 35 };
pVirtualDev->DrawTextArray(Point(4,6), "123456", aDX, 1, 4);
checkTextArray(writeAndReadStream(aGDIMetaFile));