Kaydet (Commit) 911c4d84 authored tarafından Caolán McNamara's avatar Caolán McNamara

crashtesting: assert on export of tdf96006-1.odt to rtf

revealed since...

commit 81e3ca4f
Author: Tor Lillqvist <tml@collabora.com>
Date:   Tue Jun 21 10:34:21 2016 +0300

surely here we should ask the palette how many entries are
in it, not assume from the original bitcount that all entries
exist.

presumably the palette can only have <= 1 << BitCount entries in it

Change-Id: Ieb1b98f2f13f702a6a6a20d8cf3d8e9a695141b2
üst 68cf256f
......@@ -623,8 +623,9 @@ bool Bitmap::ImplConvertUp(sal_uInt16 nBitCount, Color* pExtColor)
if (pWriteAcc->HasPalette())
{
const sal_uInt16 nOldCount = 1 << GetBitCount();
const BitmapPalette& rOldPalette = pReadAcc->GetPalette();
const sal_uInt16 nOldCount = rOldPalette.GetEntryCount();
assert(nOldCount <= (1 << GetBitCount()));
aPalette.SetEntryCount(1 << nBitCount);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment