summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-10-30 19:15:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-31 10:03:42 +0100
commitb3fe9d6206a5e25fe18c20314960599db05c53ee (patch)
treeac4aa3407d072cf45e088e415720f73f328ce1ed
parentf0e8fa40f2620a1deeb7eff1c14a3256ab24a574 (diff)
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.grandin@collabora.co.uk>
-rw-r--r--vcl/source/bitmap/bitmap.cxx19
1 files changed, 9 insertions, 10 deletions
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));