compilerplugins/clang/toolslong.cxx        |    2 ++
 sc/qa/unit/subsequent_filters-test.cxx     |    2 +-
 sd/qa/unit/export-tests-ooxml2.cxx         |    4 ++--
 sd/qa/unit/export-tests.cxx                |    8 ++++----
 sd/qa/unit/import-tests.cxx                |   12 ++++++------
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |    8 ++++----
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx  |    4 ++--
 vcl/qa/cppunit/pdfexport/pdfexport.cxx     |    4 ++--
 8 files changed, 23 insertions(+), 21 deletions(-)

New commits:
commit 8182a3e03cf9eb50e43347a288bacefbed98c497
Author:     Noel Grandin <n...@peralex.com>
AuthorDate: Fri Nov 13 15:15:47 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Nov 13 21:01:27 2020 +0100

    fix some tools::Long fallout
    
    Change-Id: I8c15b0ee8400c3b540154bc38c51cbf04b6c3850
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105794
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/compilerplugins/clang/toolslong.cxx 
b/compilerplugins/clang/toolslong.cxx
index 96c2716bd827..26105a2697d8 100644
--- a/compilerplugins/clang/toolslong.cxx
+++ b/compilerplugins/clang/toolslong.cxx
@@ -155,6 +155,8 @@ void ToolsLong::run()
     if (loplugin::isSamePathname(fn,
                                  SRCDIR 
"/writerperfect/source/calc/MSWorksCalcImportFilter.cxx"))
         return;
+    if (loplugin::isSamePathname(fn, SRCDIR 
"/writerperfect/qa/unit/WPXSvStreamTest.cxx"))
+        return;
     if (loplugin::isSamePathname(fn, SRCDIR "/desktop/source/lib/init.cxx"))
         return;
 
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 229d0b3df8fa..74a06737a0c8 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -1875,7 +1875,7 @@ void ScFiltersTest::testChartImportXLS()
     const SdrOle2Obj* pOleObj = getSingleChartObject(rDoc, 0);
     CPPUNIT_ASSERT_MESSAGE("Failed to retrieve a chart object from the 2nd 
sheet.", pOleObj);
 
-    CPPUNIT_ASSERT_EQUAL(11137L, pOleObj->GetLogicRect().getWidth());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(11137), 
pOleObj->GetLogicRect().getWidth());
     CPPUNIT_ASSERT(8640L > pOleObj->GetLogicRect().getHeight());
 
     xDocSh->DoClose();
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index 71f44a0776b6..fba5f93f5499 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -2695,14 +2695,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<tools::Long>(50), 
labs(aBoundRectArch.Width - 13081));
+    CPPUNIT_ASSERT_LESS(50L, 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<tools::Long>(50), 
labs(aBoundRectWave.Width - 11514));
+    CPPUNIT_ASSERT_LESS(50L, labs(aBoundRectWave.Width - 11514));
 
     xDocShRef->DoClose();
 }
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 2a0603456bee..e54e02ddecd5 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1112,13 +1112,13 @@ void SdExportTest::testBulletsAsImage()
 
         if (nExportFormat == ODP || nExportFormat == PPT)
         {
-            CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 16L, 
aGraphic.GetSizePixel().Width());
-            CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 16L, 
aGraphic.GetSizePixel().Height());
+            CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 
tools::Long(16), aGraphic.GetSizePixel().Width());
+            CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 
tools::Long(16), aGraphic.GetSizePixel().Height());
         }
         else // FIXME: what happened here
         {
-            CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 64L, 
aGraphic.GetSizePixel().Width());
-            CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 64L, 
aGraphic.GetSizePixel().Height());
+            CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 
tools::Long(64), aGraphic.GetSizePixel().Width());
+            CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessageBase.getStr(), 
tools::Long(64), aGraphic.GetSizePixel().Height());
         }
 
         // Graphic Size
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 6e6b08d2bad2..acac88729506 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1795,10 +1795,10 @@ void SdImportTest::testTdf103473()
     SdrTextObj *const pObj = dynamic_cast<SdrTextObj *const>(pPage->GetObj(0));
     CPPUNIT_ASSERT(pObj);
     ::tools::Rectangle aRect = pObj->GetGeoRect();
-    CPPUNIT_ASSERT_EQUAL(3629L, aRect.Left());
-    CPPUNIT_ASSERT_EQUAL(4431L, aRect.Top());
-    CPPUNIT_ASSERT_EQUAL(8353L, aRect.Right());
-    CPPUNIT_ASSERT_EQUAL(9155L, aRect.Bottom());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(3629), aRect.Left());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(4431), aRect.Top());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(8353), aRect.Right());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(9155), aRect.Bottom());
 
     xDocShRef->DoClose();
 }
@@ -2226,8 +2226,8 @@ bool SdImportTest::checkPattern(sd::DrawDocShellRef const 
& rDocRef, int nShapeN
             ReadDIB(aBitmap, aBitmapStream, true);
         }
     }
-    CPPUNIT_ASSERT_EQUAL(8L, aBitmap.GetSizePixel().Width());
-    CPPUNIT_ASSERT_EQUAL(8L, aBitmap.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(8), aBitmap.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(8), aBitmap.GetSizePixel().Height());
     return checkPatternValues(rExpected, aBitmap);
 }
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 453b1718d5bf..47307b49789e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -453,8 +453,8 @@ DECLARE_OOXMLEXPORT_TEST(testPictureWithSchemeColor, 
"picture-with-schemecolor.d
     uno::Reference<graphic::XGraphic> xGraphic = 
getProperty<uno::Reference<graphic::XGraphic> >(xImage, "Graphic");
     Graphic aVclGraphic(xGraphic);
     BitmapEx aBitmap(aVclGraphic.GetBitmapEx());
-    CPPUNIT_ASSERT_EQUAL(341L, aBitmap.GetSizePixel().Width());
-    CPPUNIT_ASSERT_EQUAL(181L, aBitmap.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(341), aBitmap.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(181), aBitmap.GetSizePixel().Height());
     Color aColor(aBitmap.GetPixelColor(120, 30));
     CPPUNIT_ASSERT_EQUAL(aColor, Color( 0xb1, 0xc8, 0xdd ));
     aColor = aBitmap.GetPixelColor(260, 130);
@@ -647,8 +647,8 @@ DECLARE_OOXMLEXPORT_TEST(testMsoBrightnessContrast, 
"msobrightnesscontrast.docx"
     imageProperties->getPropertyValue( "Graphic" ) >>= graphic;
     Graphic aVclGraphic(graphic);
     BitmapEx aBitmap(aVclGraphic.GetBitmapEx());
-    CPPUNIT_ASSERT_EQUAL(58L, aBitmap.GetSizePixel().Width());
-    CPPUNIT_ASSERT_EQUAL(320L, aBitmap.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(58), aBitmap.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(320), aBitmap.GetSizePixel().Height());
     Color aColor(aBitmap.GetPixelColor(20, 30));
     CPPUNIT_ASSERT_EQUAL(Color( 0xce, 0xce, 0xce ), aColor);
 }
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index f2ede8360d81..e4287f12e978 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -166,8 +166,8 @@ DECLARE_OOXMLEXPORT_TEST(testTextBoxPictureFill, 
"textbox_picturefill.docx")
     Graphic aGraphic(xGraphic);
     CPPUNIT_ASSERT(!aGraphic.IsNone());
     CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0L);
-    CPPUNIT_ASSERT_EQUAL(447L, aGraphic.GetSizePixel().Width());
-    CPPUNIT_ASSERT_EQUAL(528L, aGraphic.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(447), aGraphic.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(tools::Long(528), aGraphic.GetSizePixel().Height());
 }
 
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO73034, "FDO73034.docx")
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 484e2c355461..c99f12cafd07 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1707,8 +1707,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf121615)
     CPPUNIT_ASSERT( jpegFormat != GRFILTER_FORMAT_NOTFOUND );
     CPPUNIT_ASSERT_EQUAL( jpegFormat, format );
     BitmapEx aBitmap = aGraphic.GetBitmapEx();
-    CPPUNIT_ASSERT_EQUAL( 200L, aBitmap.GetSizePixel().Width());
-    CPPUNIT_ASSERT_EQUAL( 300L, aBitmap.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL( tools::Long(200), aBitmap.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL( tools::Long(300), aBitmap.GetSizePixel().Height());
     CPPUNIT_ASSERT_EQUAL( 8, int(aBitmap.GetBitCount()));
     // tdf#121615 was caused by broken handling of data width with 8bit color,
     // so the test image has some black in the bottomright corner, check it's 
there
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to