[Libreoffice-commits] core.git: sc/qa slideshow/test svx/qa vcl/qa writerperfect/qa

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 13 10:17:15 UTC 2020


 sc/qa/unit/helper/qahelper.cxx                |    4 +--
 sc/qa/unit/ucalc_pivottable.cxx               |    8 +++----
 slideshow/test/slidetest.cxx                  |   16 +++++++-------
 svx/qa/unit/customshapes.cxx                  |    4 +--
 vcl/qa/cppunit/BitmapFilterTest.cxx           |   28 +++++++++++++-------------
 vcl/qa/cppunit/GraphicDescriptorTest.cxx      |   12 +++++------
 vcl/qa/cppunit/GraphicTest.cxx                |   20 +++++++++---------
 vcl/qa/cppunit/complextext.cxx                |    6 ++---
 vcl/qa/cppunit/fontmetric.cxx                 |   28 +++++++++++++-------------
 vcl/qa/cppunit/graphicfilter/filters-test.cxx |    4 +--
 vcl/qa/cppunit/jpeg/JpegReaderTest.cxx        |   12 +++++------
 vcl/qa/cppunit/png/PngFilterTest.cxx          |   16 +++++++-------
 writerperfect/qa/unit/WPXSvStreamTest.cxx     |    6 ++---
 13 files changed, 82 insertions(+), 82 deletions(-)

New commits:
commit f2dfa6bec9895892b58e22682ecdc5865fc249a3
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Nov 13 09:04:59 2020 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Nov 13 11:16:08 2020 +0100

    Fix (some of) fallouts from tools::Long change to 64 bit on _WIN64
    
    Change-Id: I297d43c594c5d8c3378e8b7f29ad798e89e4ebaf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105776
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index db5efcea77e7..2ba82ae91944 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -189,11 +189,11 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat)
     const ScPatternAttr* pPattern = pDoc->GetPattern(0, 0, 1);
     vcl::Font aFont;
     pPattern->GetFont(aFont,SC_AUTOCOL_RAW);
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 10", 200l, aFont.GetFontSize().getHeight());
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 10", tools::Long(200), aFont.GetFontSize().getHeight());
     CPPUNIT_ASSERT_EQUAL_MESSAGE("font color should be black", COL_AUTO, aFont.GetColor());
     pPattern = pDoc->GetPattern(0,1,1);
     pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", 240l, aFont.GetFontSize().getHeight());
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", tools::Long(240), aFont.GetFontSize().getHeight());
     pPattern = pDoc->GetPattern(0,2,1);
     pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be italic", ITALIC_NORMAL, aFont.GetItalic());
diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx
index 50c21b672a7b..54a4e85d6dcf 100644
--- a/sc/qa/unit/ucalc_pivottable.cxx
+++ b/sc/qa/unit/ucalc_pivottable.cxx
@@ -776,7 +776,7 @@ void Test::testPivotTableCache()
     ScDPCache aCache(*m_pDoc);
     aCache.InitFromDoc(*m_pDoc, aDataRange);
     tools::Long nDimCount = aCache.GetColumnCount();
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension count.", 3L, nDimCount);
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension count.", tools::Long(3), nDimCount);
     OUString aDimName = aCache.GetDimensionName(0);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension name", OUString("F1"), aDimName);
     aDimName = aCache.GetDimensionName(1);
@@ -791,7 +791,7 @@ void Test::testPivotTableCache()
 
     // Dimension 0 - a mix of strings and values.
     tools::Long nMemCount = aCache.GetDimMemberCount(0);
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 6L, nMemCount);
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", tools::Long(6), nMemCount);
     const ScDPItemData* pItem = aCache.GetItemDataById(0, 0);
     CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
                            pItem->GetType() == ScDPItemData::Value &&
@@ -821,7 +821,7 @@ void Test::testPivotTableCache()
 
     // Dimension 1 - duplicate values in source.
     nMemCount = aCache.GetDimMemberCount(1);
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 3L, nMemCount);
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", tools::Long(3), nMemCount);
     pItem = aCache.GetItemDataById(1, 0);
     CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
                            pItem->GetType() == ScDPItemData::String &&
@@ -839,7 +839,7 @@ void Test::testPivotTableCache()
 
     // Dimension 2 - values only.
     nMemCount = aCache.GetDimMemberCount(2);
-    CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 6L, nMemCount);
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", tools::Long(6), nMemCount);
     pItem = aCache.GetItemDataById(2, 0);
     CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
                            pItem->GetType() == ScDPItemData::Value &&
diff --git a/slideshow/test/slidetest.cxx b/slideshow/test/slidetest.cxx
index 469ed059260d..b5e0cd687f56 100644
--- a/slideshow/test/slidetest.cxx
+++ b/slideshow/test/slidetest.cxx
@@ -317,13 +317,13 @@ public:
         mpLayerManager->removeShape(pShape4);
 
         CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 1 must have refcount of 1",
-                                      tools::Long(1), mpTestShape.use_count() );
+                                      1L, mpTestShape.use_count() );
         CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 2 must have refcount of ",
-                                      tools::Long(1), pShape2.use_count() );
+                                      1L, pShape2.use_count() );
         CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 3 must have refcount of 1",
-                                      tools::Long(1), pShape3.use_count() );
+                                      1L, pShape3.use_count() );
         CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 4 must have refcount of",
-                                      tools::Long(1), pShape4.use_count() );
+                                      1L, pShape4.use_count() );
 
 
         mpLayerManager->addShape(mpTestShape);
@@ -340,13 +340,13 @@ public:
         mpLayerManager->removeShape(pShape4);
 
         CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 1 must have refcount of 1",
-                                      tools::Long(1), mpTestShape.use_count() );
+                                      1L, mpTestShape.use_count() );
         CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 2 must have refcount of ",
-                                      tools::Long(1), pShape2.use_count() );
+                                      1L, pShape2.use_count() );
         CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 3 must have refcount of 1",
-                                      tools::Long(1), pShape3.use_count() );
+                                      1L, pShape3.use_count() );
         CPPUNIT_ASSERT_EQUAL_MESSAGE( "Shape 4 must have refcount of 1",
-                                      tools::Long(1), pShape4.use_count() );
+                                      1L, pShape4.use_count() );
     }
 
     // hook up the test
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 9117183acd29..3007806c61af 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -104,7 +104,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testViewBoxLeftTop)
     awt::Rectangle aBoundRectLR;
     xShapeLRProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectLR;
     // difference should be zero, but allow some rounding errors
-    CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(3), labs(aFrameRectLR.X - aBoundRectLR.X));
+    CPPUNIT_ASSERT_LESS(3L, labs(aFrameRectLR.X - aBoundRectLR.X));
 
     // Get the shape "topbottom". Error was, that the identifier "top" was always set to zero, thus
     // the path was outside the frame rectangle for a viewBox having a positive "top" value.
@@ -116,7 +116,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testViewBoxLeftTop)
     awt::Rectangle aBoundRectTB;
     xShapeTBProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectTB;
     // difference should be zero, but allow some rounding errors
-    CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(3), labs(aFrameRectTB.Y - aBoundRectTB.Y));
+    CPPUNIT_ASSERT_LESS(3L, labs(aFrameRectTB.Y - aBoundRectTB.Y));
 }
 
 CPPUNIT_TEST_FIXTURE(CustomshapesTest, testAccuracyCommandX)
diff --git a/vcl/qa/cppunit/BitmapFilterTest.cxx b/vcl/qa/cppunit/BitmapFilterTest.cxx
index 4c878960474b..1f9e14d2ef94 100644
--- a/vcl/qa/cppunit/BitmapFilterTest.cxx
+++ b/vcl/qa/cppunit/BitmapFilterTest.cxx
@@ -228,20 +228,20 @@ void BitmapFilterTest::testGenerateStripRanges()
 
         CPPUNIT_ASSERT_EQUAL(size_t(4), aRanges.size());
 
-        CPPUNIT_ASSERT_EQUAL(0L, std::get<0>(aRanges[0]));
-        CPPUNIT_ASSERT_EQUAL(31L, std::get<1>(aRanges[0]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(0), std::get<0>(aRanges[0]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(31), std::get<1>(aRanges[0]));
         CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[0]));
 
-        CPPUNIT_ASSERT_EQUAL(32L, std::get<0>(aRanges[1]));
-        CPPUNIT_ASSERT_EQUAL(63L, std::get<1>(aRanges[1]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(32), std::get<0>(aRanges[1]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(63), std::get<1>(aRanges[1]));
         CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[1]));
 
-        CPPUNIT_ASSERT_EQUAL(64L, std::get<0>(aRanges[2]));
-        CPPUNIT_ASSERT_EQUAL(95L, std::get<1>(aRanges[2]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(64), std::get<0>(aRanges[2]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(95), std::get<1>(aRanges[2]));
         CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[2]));
 
-        CPPUNIT_ASSERT_EQUAL(96L, std::get<0>(aRanges[3]));
-        CPPUNIT_ASSERT_EQUAL(100L, std::get<1>(aRanges[3]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(96), std::get<0>(aRanges[3]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(100), std::get<1>(aRanges[3]));
         CPPUNIT_ASSERT_EQUAL(true, std::get<2>(aRanges[3]));
     }
 
@@ -260,16 +260,16 @@ void BitmapFilterTest::testGenerateStripRanges()
 
         CPPUNIT_ASSERT_EQUAL(size_t(3), aRanges.size());
 
-        CPPUNIT_ASSERT_EQUAL(0L, std::get<0>(aRanges[0]));
-        CPPUNIT_ASSERT_EQUAL(31L, std::get<1>(aRanges[0]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(0), std::get<0>(aRanges[0]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(31), std::get<1>(aRanges[0]));
         CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[0]));
 
-        CPPUNIT_ASSERT_EQUAL(32L, std::get<0>(aRanges[1]));
-        CPPUNIT_ASSERT_EQUAL(63L, std::get<1>(aRanges[1]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(32), std::get<0>(aRanges[1]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(63), std::get<1>(aRanges[1]));
         CPPUNIT_ASSERT_EQUAL(false, std::get<2>(aRanges[1]));
 
-        CPPUNIT_ASSERT_EQUAL(64L, std::get<0>(aRanges[2]));
-        CPPUNIT_ASSERT_EQUAL(95L, std::get<1>(aRanges[2]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(64), std::get<0>(aRanges[2]));
+        CPPUNIT_ASSERT_EQUAL(tools::Long(95), std::get<1>(aRanges[2]));
         CPPUNIT_ASSERT_EQUAL(true, std::get<2>(aRanges[2]));
     }
 }
diff --git a/vcl/qa/cppunit/GraphicDescriptorTest.cxx b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
index 4ee5e96ed40d..eec8f49f94f0 100644
--- a/vcl/qa/cppunit/GraphicDescriptorTest.cxx
+++ b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
@@ -64,8 +64,8 @@ void GraphicDescriptorTest::testDetectPNG()
 
     CPPUNIT_ASSERT_EQUAL(GraphicFileFormat::PNG, aDescriptor.GetFileFormat());
 
-    CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Width());
-    CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Height());
 }
 
 void GraphicDescriptorTest::testDetectJPG()
@@ -78,8 +78,8 @@ void GraphicDescriptorTest::testDetectJPG()
 
     CPPUNIT_ASSERT_EQUAL(GraphicFileFormat::JPG, aDescriptor.GetFileFormat());
 
-    CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Width());
-    CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Height());
 }
 
 void GraphicDescriptorTest::testDetectGIF()
@@ -92,8 +92,8 @@ void GraphicDescriptorTest::testDetectGIF()
 
     CPPUNIT_ASSERT_EQUAL(GraphicFileFormat::GIF, aDescriptor.GetFileFormat());
 
-    CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Width());
-    CPPUNIT_ASSERT_EQUAL(100L, aDescriptor.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aDescriptor.GetSizePixel().Height());
 }
 
 } // namespace
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index 353f195eac43..fd669c4d347a 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -195,13 +195,13 @@ void GraphicTest::testUnloadedGraphic()
     // check GetSizePixel doesn't load graphic
     aGraphic = makeUnloadedGraphic("png");
     CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
-    CPPUNIT_ASSERT_EQUAL(120L, aGraphic.GetSizePixel().Width());
-    CPPUNIT_ASSERT_EQUAL(100L, aGraphic.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
     CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
 
     // check GetPrefSize doesn't load graphic
-    CPPUNIT_ASSERT_EQUAL(6000L, aGraphic.GetPrefSize().Width());
-    CPPUNIT_ASSERT_EQUAL(5000L, aGraphic.GetPrefSize().Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(6000), aGraphic.GetPrefSize().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(5000), aGraphic.GetPrefSize().Height());
     CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
 
     // check GetSizeBytes loads graphic
@@ -228,8 +228,8 @@ void GraphicTest::testUnloadedGraphicLoading()
 
         // check available
         CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
-        CPPUNIT_ASSERT_EQUAL(120L, aGraphic.GetSizePixel().Width());
-        CPPUNIT_ASSERT_EQUAL(100L, aGraphic.GetSizePixel().Height());
+        CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
+        CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
         CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
         CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0);
         CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
@@ -307,8 +307,8 @@ void GraphicTest::testSwapping()
     CPPUNIT_ASSERT_EQUAL(true, aGraphic.makeAvailable());
     CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
 
-    CPPUNIT_ASSERT_EQUAL(120L, aGraphic.GetSizePixel().Width());
-    CPPUNIT_ASSERT_EQUAL(100L, aGraphic.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
 
     BitmapChecksum aChecksumBeforeSwapping = aGraphic.GetChecksum();
 
@@ -357,8 +357,8 @@ void GraphicTest::testSwapping()
     CPPUNIT_ASSERT_EQUAL(false, comphelper::DirectoryHelper::fileExists(rSwapFileURL));
 
     // Check the bitmap
-    CPPUNIT_ASSERT_EQUAL(120L, aGraphic.GetSizePixel().Width());
-    CPPUNIT_ASSERT_EQUAL(100L, aGraphic.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
     CPPUNIT_ASSERT_EQUAL(true, checkBitmap(aGraphic));
     CPPUNIT_ASSERT_EQUAL(true, checkBitmap(aGraphic));
 }
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index bfe3b98523b9..ad8f645b3b6f 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -83,12 +83,12 @@ void VclComplexTextTest::testArabic()
 
     CPPUNIT_ASSERT_EQUAL(aRefCharWidths, aCharWidths);
     // this sporadically returns 75 or 74 on some of the windows tinderboxes eg. tb73
-    CPPUNIT_ASSERT_EQUAL(72L, nTextWidth);
+    CPPUNIT_ASSERT_EQUAL(tools::Long(72), nTextWidth);
     CPPUNIT_ASSERT_EQUAL(nTextWidth, aCharWidths.back());
 
     // text advance width and line height
-    CPPUNIT_ASSERT_EQUAL(72L, pOutDev->GetTextWidth(aOneTwoThree));
-    CPPUNIT_ASSERT_EQUAL(14L, pOutDev->GetTextHeight());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(72), pOutDev->GetTextWidth(aOneTwoThree));
+    CPPUNIT_ASSERT_EQUAL(tools::Long(14), pOutDev->GetTextHeight());
 
     // exact bounding rectangle, not essentially the same as text width/height
     tools::Rectangle aBoundRect, aTestRect( 0, 1, 71, 15 );
diff --git a/vcl/qa/cppunit/fontmetric.cxx b/vcl/qa/cppunit/fontmetric.cxx
index 4a3f476c24a9..8ee42f170a10 100644
--- a/vcl/qa/cppunit/fontmetric.cxx
+++ b/vcl/qa/cppunit/fontmetric.cxx
@@ -49,27 +49,27 @@ void VclFontMetricTest::testSpacings()
     // default constructor should set scalable flag to false
     FontMetric aFontMetric;
 
-    CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetAscent() );
-    CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetDescent() );
-    CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetExternalLeading() );
-    CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetInternalLeading() );
-    CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetLineHeight() );
+    CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetAscent());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetDescent());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetExternalLeading());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetInternalLeading());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetLineHeight());
 
 
     aFontMetric.SetAscent( 100 );
-    CPPUNIT_ASSERT_EQUAL( 100L, aFontMetric.GetAscent() );
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aFontMetric.GetAscent());
 
     aFontMetric.SetDescent( 100 );
-    CPPUNIT_ASSERT_EQUAL( 100L, aFontMetric.GetDescent() );
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aFontMetric.GetDescent());
 
     aFontMetric.SetExternalLeading( 100 );
-    CPPUNIT_ASSERT_EQUAL( 100L, aFontMetric.GetExternalLeading() );
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aFontMetric.GetExternalLeading());
 
     aFontMetric.SetInternalLeading( 100 );
-    CPPUNIT_ASSERT_EQUAL( 100L, aFontMetric.GetInternalLeading() );
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aFontMetric.GetInternalLeading());
 
     aFontMetric.SetLineHeight( 100 );
-    CPPUNIT_ASSERT_EQUAL( 100L, aFontMetric.GetLineHeight() );
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aFontMetric.GetLineHeight());
 }
 
 void VclFontMetricTest::testSlant()
@@ -77,10 +77,10 @@ void VclFontMetricTest::testSlant()
     // default constructor should set scalable flag to false
     FontMetric aFontMetric;
 
-    CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetSlant() );
+    CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetSlant());
 
     aFontMetric.SetSlant( 45 );
-    CPPUNIT_ASSERT_EQUAL( 45L, aFontMetric.GetSlant() );
+    CPPUNIT_ASSERT_EQUAL(tools::Long(45), aFontMetric.GetSlant());
 }
 
 void VclFontMetricTest::testBulletOffset()
@@ -88,10 +88,10 @@ void VclFontMetricTest::testBulletOffset()
     // default constructor should set scalable flag to false
     FontMetric aFontMetric;
 
-    CPPUNIT_ASSERT_EQUAL( 0L, aFontMetric.GetBulletOffset() );
+    CPPUNIT_ASSERT_EQUAL(tools::Long(0), aFontMetric.GetBulletOffset());
 
     aFontMetric.SetBulletOffset( 45 );
-    CPPUNIT_ASSERT_EQUAL(  45L, aFontMetric.GetBulletOffset() );
+    CPPUNIT_ASSERT_EQUAL(tools::Long(45), aFontMetric.GetBulletOffset());
 }
 
 void VclFontMetricTest::testEqualityOperator()
diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
index b8d150b72d31..6c0b4b8dfaf7 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
@@ -128,8 +128,8 @@ void VclFiltersTest::checkExportImport(const OUString& aFilterShortName)
     BitmapEx aLoadedBitmapEx = aLoadedGraphic.GetBitmapEx();
     Size aSize = aLoadedBitmapEx.GetSizePixel();
 
-    CPPUNIT_ASSERT_EQUAL(100L, aSize.Width());
-    CPPUNIT_ASSERT_EQUAL(100L, aSize.Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aSize.Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(100), aSize.Height());
 }
 
 void VclFiltersTest::testExportImport()
diff --git a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
index 6931b42e8677..3dd113a5ccd2 100644
--- a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
+++ b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx
@@ -112,8 +112,8 @@ void JpegReaderTest::testReadRGB()
     Graphic aGraphic = loadJPG(getFullUrl("JPEGTestRGB.jpeg"));
     Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
     Size aSize = aBitmap.GetSizePixel();
-    CPPUNIT_ASSERT_EQUAL(12L, aSize.Width());
-    CPPUNIT_ASSERT_EQUAL(12L, aSize.Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Height());
 
     int nMaxDelta = 1; // still acceptable color error
     CPPUNIT_ASSERT(checkRect(aBitmap, 0, 8, 8, Color(0xff, 0xff, 0xff), nMaxDelta));
@@ -129,8 +129,8 @@ void JpegReaderTest::testReadGray()
     Graphic aGraphic = loadJPG(getFullUrl("JPEGTestGray.jpeg"));
     Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
     Size aSize = aBitmap.GetSizePixel();
-    CPPUNIT_ASSERT_EQUAL(12L, aSize.Width());
-    CPPUNIT_ASSERT_EQUAL(12L, aSize.Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Height());
 
     aBitmap.Convert(BmpConversion::N24Bit); // convert to 24bit so we don't need to deal with palette
 
@@ -148,8 +148,8 @@ void JpegReaderTest::testReadCMYK()
     Graphic aGraphic = loadJPG(getFullUrl("JPEGTestCMYK.jpeg"));
     Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
     Size aSize = aBitmap.GetSizePixel();
-    CPPUNIT_ASSERT_EQUAL(12L, aSize.Width());
-    CPPUNIT_ASSERT_EQUAL(12L, aSize.Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(12), aSize.Height());
 
     int maxDelta = 1;
     CPPUNIT_ASSERT(checkRect(aBitmap, 0, 8, 8, Color(0xff, 0xff, 0xff), maxDelta));
diff --git a/vcl/qa/cppunit/png/PngFilterTest.cxx b/vcl/qa/cppunit/png/PngFilterTest.cxx
index c304ee9d3fca..eda7d830fca4 100644
--- a/vcl/qa/cppunit/png/PngFilterTest.cxx
+++ b/vcl/qa/cppunit/png/PngFilterTest.cxx
@@ -61,8 +61,8 @@ void PngFilterTest::testPng()
         Bitmap aBitmap = aBitmapEx.GetBitmap();
         {
             Bitmap::ScopedReadAccess pAccess(aBitmap);
-            CPPUNIT_ASSERT_EQUAL(4L, pAccess->Width());
-            CPPUNIT_ASSERT_EQUAL(4L, pAccess->Height());
+            CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Width());
+            CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Height());
 
             if (pAccess->GetBitCount() == 24 || pAccess->GetBitCount() == 32)
             {
@@ -94,8 +94,8 @@ void PngFilterTest::testPng()
         Bitmap aBitmap = aBitmapEx.GetBitmap();
         {
             Bitmap::ScopedReadAccess pAccess(aBitmap);
-            CPPUNIT_ASSERT_EQUAL(4L, pAccess->Width());
-            CPPUNIT_ASSERT_EQUAL(4L, pAccess->Height());
+            CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Width());
+            CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Height());
             if (pAccess->GetBitCount() == 24 || pAccess->GetBitCount() == 32)
             {
                 CPPUNIT_ASSERT_EQUAL(BitmapColor(0xFF, 0xFF, 0xFF, 0x00), pAccess->GetPixel(0, 0));
@@ -125,8 +125,8 @@ void PngFilterTest::testPng()
         Bitmap aBitmap = aBitmapEx.GetBitmap();
         {
             Bitmap::ScopedReadAccess pAccess(aBitmap);
-            CPPUNIT_ASSERT_EQUAL(4L, pAccess->Width());
-            CPPUNIT_ASSERT_EQUAL(4L, pAccess->Height());
+            CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Width());
+            CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAccess->Height());
 
             if (pAccess->GetBitCount() == 24)
             {
@@ -144,8 +144,8 @@ void PngFilterTest::testPng()
                 {
                     AlphaMask::ScopedReadAccess pAlphaAccess(aAlpha);
                     CPPUNIT_ASSERT_EQUAL(sal_uInt16(8), pAlphaAccess->GetBitCount());
-                    CPPUNIT_ASSERT_EQUAL(4L, pAlphaAccess->Width());
-                    CPPUNIT_ASSERT_EQUAL(4L, pAlphaAccess->Height());
+                    CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAlphaAccess->Width());
+                    CPPUNIT_ASSERT_EQUAL(tools::Long(4), pAlphaAccess->Height());
 
                     CPPUNIT_ASSERT_EQUAL(BitmapColor(0x00, 0x00, 0x80, 0x00),
                                          pAlphaAccess->GetPixel(0, 0));
diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx
index 75bcd1e60de7..21715229e299 100644
--- a/writerperfect/qa/unit/WPXSvStreamTest.cxx
+++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx
@@ -182,7 +182,7 @@ void WPXSvStreamTest::testRead()
 void WPXSvStreamTest::testSeekSet()
 {
     const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
-    const tools::Long nLen = sizeof aText;
+    const long nLen = sizeof aText;
 
     // check initial state
     CPPUNIT_ASSERT_EQUAL(0L, pInput->tell());
@@ -220,7 +220,7 @@ void WPXSvStreamTest::testSeekSet()
 void WPXSvStreamTest::testSeekCur()
 {
     const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
-    const tools::Long nLen = sizeof aText;
+    const long nLen = sizeof aText;
 
     // check initial state
     CPPUNIT_ASSERT(!pInput->isEnd());
@@ -257,7 +257,7 @@ void WPXSvStreamTest::testSeekCur()
 void WPXSvStreamTest::testSeekEnd()
 {
     const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
-    const tools::Long nLen = sizeof aText;
+    const long nLen = sizeof aText;
 
     // check initial state
     CPPUNIT_ASSERT(!pInput->isEnd());


More information about the Libreoffice-commits mailing list