summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-21 15:31:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-23 08:48:52 +0200
commit0d79d216886a71436e705c93829ed66a33270a9c (patch)
treeef29702266bca9df9f39b442505479b013891517 /sd/qa
parente8205f38c611cfc97ca0e32c911b3d373a94d230 (diff)
long->tools::Long in pyuno..sd
Change-Id: I67c1218d225f49ea9ce789433283ab85275e39a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104627 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx4
-rw-r--r--sd/qa/unit/import-tests.cxx16
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx8
3 files changed, 14 insertions, 14 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 1213936f42c7..135cfb5b8b78 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -2693,14 +2693,14 @@ void SdOOXMLExportTest2::testTdf1225573_FontWorkScaleX()
awt::Rectangle aBoundRectArch;
xShapeArchProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectArch;
// difference should be zero, but allow some range for stroke thickness
- CPPUNIT_ASSERT_LESS(static_cast<long>(50), labs(aBoundRectArch.Width - 13081));
+ CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(50), labs(aBoundRectArch.Width - 13081));
// Error was, that text in shapes of category "Warp" was not scaled to the path.
uno::Reference<beans::XPropertySet> xShapeWaveProps(getShapeFromPage(0, 1, xDocShRef));
awt::Rectangle aBoundRectWave;
xShapeWaveProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectWave;
// difference should be zero, but allow some range for stroke thickness
- CPPUNIT_ASSERT_LESS(static_cast<long>(50), labs(aBoundRectWave.Width - 11514));
+ CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(50), labs(aBoundRectWave.Width - 11514));
xDocShRef->DoClose();
}
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 6c163db17296..11cbbb4f98b7 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1598,9 +1598,9 @@ void SdImportTest::testTdf93124()
Bitmap::ScopedReadAccess pReadAccess(aBMP);
int nNonWhiteCount = 0;
// The word "Top" should be in rectangle 34,4 - 76,30. If text alignment is wrong, the rectangle will be white.
- for (long nY = 4; nY < (4 + 26); ++nY)
+ for (tools::Long nY = 4; nY < (4 + 26); ++nY)
{
- for (long nX = 34; nX < (34 + 43); ++nX)
+ for (tools::Long nX = 34; nX < (34 + 43); ++nX)
{
const Color aColor = pReadAccess->GetColor(nY, nX);
if ((aColor.GetRed() != 0xff) || (aColor.GetGreen() != 0xff) || (aColor.GetBlue() != 0xff))
@@ -1657,9 +1657,9 @@ void SdImportTest::testTdf99729()
BitmapEx aBMPEx = aPNGReader.Read();
Bitmap aBMP = aBMPEx.GetBitmap();
Bitmap::ScopedReadAccess pRead(aBMP);
- for (long nX = 154; nX < (154 + 12); ++nX)
+ for (tools::Long nX = 154; nX < (154 + 12); ++nX)
{
- for (long nY = 16; nY < (16 + 96); ++nY)
+ for (tools::Long nY = 16; nY < (16 + 96); ++nY)
{
const Color aColor = pRead->GetColor(nY, nX);
if ((aColor.GetRed() != 0xff) || (aColor.GetGreen() != 0xff) || (aColor.GetBlue() != 0xff))
@@ -2169,10 +2169,10 @@ bool checkPatternValues(std::vector<sal_uInt8>& rExpected, Bitmap& rBitmap)
const Color aBGColor(0xFFFFFF);
Bitmap::ScopedReadAccess pAccess(rBitmap);
- for (long y = 0; y < pAccess->Height(); ++y)
+ for (tools::Long y = 0; y < pAccess->Height(); ++y)
{
Scanline pScanline = pAccess->GetScanline( y );
- for (long x = 0; x < pAccess->Width(); ++x)
+ for (tools::Long x = 0; x < pAccess->Width(); ++x)
{
Color aColor = pAccess->GetPixelFromData(pScanline, x);
sal_uInt8 aValue = rExpected[y*8+x];
@@ -2619,7 +2619,7 @@ void SdImportTest::testTdf90626()
{
const SvxNumBulletItem *pNumFmt = aEdit.GetParaAttribs(i).GetItem(EE_PARA_NUMBULLET);
CPPUNIT_ASSERT(pNumFmt);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(long(371), pNumFmt->GetNumRule()->GetLevel(0).GetGraphicSize().getHeight(), long(1));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(tools::Long(371), pNumFmt->GetNumRule()->GetLevel(0).GetGraphicSize().getHeight(), tools::Long(1));
}
xDocShRef->DoClose();
@@ -2664,7 +2664,7 @@ void SdImportTest::testTdf114913()
CPPUNIT_ASSERT_MESSAGE("No text object", pTxtObj != nullptr);
const SvxNumBulletItem *pItem = pTxtObj->GetOutlinerParaObject()->GetTextObject().GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET);
CPPUNIT_ASSERT(pItem);
- CPPUNIT_ASSERT_EQUAL(long(691), pItem->GetNumRule()->GetLevel(0).GetGraphicSize().getHeight());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(691), pItem->GetNumRule()->GetLevel(0).GetGraphicSize().getHeight());
xDocShRef->DoClose();
}
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 6f790eac0a55..22e2b4bfe2a4 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2283,14 +2283,14 @@ void SdTiledRenderingTest::testPasteTextOnSlide()
if (aPos.getX() < 10000)
{
// We get this with 'make CppunitTest_sd_tiledrendering'
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(6739), aPos.getX(), 100);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(6822), aPos.getY(), 100);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(6739), aPos.getX(), 100);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(6822), aPos.getY(), 100);
}
else
{
// We get this with 'make check'
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(12990), aPos.getX(), 100);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(7393), aPos.getY(), 100);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(12990), aPos.getX(), 100);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(7393), aPos.getY(), 100);
}
}