tdf#158807 Call UpdatePaletteForNewColor with rReplaceColor parameter
Change-Id: Id9d55600c69e84f7d7ffdd9cfbf4e1b3985b79c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161260
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Patrick Luby <plubius@libreoffice.org>
(cherry picked from commit 0e788111f13992f8323d691f2daf98e43cc7bdf8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161224
diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx
index fa1e8486..cc3674a 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -919,8 +919,8 @@ bool Bitmap::ReplaceMask(const AlphaMask& rMask, const Color& rReplaceColor)
const sal_uInt16 nActColors = pAcc->GetPaletteEntryCount();
const sal_uInt16 nMaxColors = 1 << pAcc->GetBitCount();
aReplace
= UpdatePaletteForNewColor(pAcc, nActColors, nMaxColors, nHeight, nWidth, aReplace);
aReplace = UpdatePaletteForNewColor(pAcc, nActColors, nMaxColors, nHeight, nWidth,
BitmapColor(rReplaceColor));
}
else
aReplace = rReplaceColor;