vcl/source/bitmap/bitmap.cxx |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit b3fe9d6206a5e25fe18c20314960599db05c53ee
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat Oct 30 19:15:52 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Oct 31 10:03:42 2021 +0100

    tools::Long->sal_Int32 in Bitmap::Dither
    
    Change-Id: I8cc4d6d964946e1f5fce4ae5b0bdc08b98ce8e43
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124504
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx
index 07f2c7bf8219..8d966e2446e0 100644
--- a/vcl/source/bitmap/bitmap.cxx
+++ b/vcl/source/bitmap/bitmap.cxx
@@ -1485,11 +1485,11 @@ void Bitmap::AdaptBitCount(Bitmap& rNew) const
     }
 }
 
-static tools::Long* shiftColor(tools::Long* pColorArray, BitmapColor const& 
rColor)
+static sal_Int32* shiftColor(sal_Int32* pColorArray, BitmapColor const& rColor)
 {
-    *pColorArray++ = static_cast<tools::Long>(rColor.GetBlue()) << 12;
-    *pColorArray++ = static_cast<tools::Long>(rColor.GetGreen()) << 12;
-    *pColorArray++ = static_cast<tools::Long>(rColor.GetRed()) << 12;
+    *pColorArray++ = static_cast<sal_Int32>(rColor.GetBlue()) << 12;
+    *pColorArray++ = static_cast<sal_Int32>(rColor.GetGreen()) << 12;
+    *pColorArray++ = static_cast<sal_Int32>(rColor.GetRed()) << 12;
     return pColorArray;
 }
 static BitmapColor getColor(const BitmapReadAccess *pReadAcc, tools::Long nZ)
@@ -1519,12 +1519,11 @@ bool Bitmap::Dither()
             tools::Long nHeight = pReadAcc->Height();
             tools::Long nW = nWidth * 3;
             tools::Long nW2 = nW - 3;
-            std::unique_ptr<tools::Long[]> p1(new tools::Long[ nW ]);
-            std::unique_ptr<tools::Long[]> p2(new tools::Long[ nW ]);
-            tools::Long* p1T = p1.get();
-            tools::Long* p2T = p2.get();
-            tools::Long* pTmp;
-            pTmp = p2T;
+            std::unique_ptr<sal_Int32[]> p1(new sal_Int32[ nW ]);
+            std::unique_ptr<sal_Int32[]> p2(new sal_Int32[ nW ]);
+            sal_Int32* p1T = p1.get();
+            sal_Int32* p2T = p2.get();
+            sal_Int32* pTmp = p2T;
             for (tools::Long nZ = 0; nZ < nWidth; nZ++)
             {
                 pTmp = shiftColor(pTmp, getColor(pReadAcc.get(), nZ));

Reply via email to