[Libreoffice-bugs] [Bug 119282] Area tab: Pattern color change results in pattern shown in Bitmap tab page

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Aug 16 06:53:18 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=119282

--- Comment #2 from Jim Raykowski <raykowj at gmail.com> ---
Here is my take on this:

Bitmap createHistorical8x8FromArray in svx/source/xoutdev/xattrbmp.cxx had

BitmapPalette aPalette(2);

aPalette[0] = BitmapColor(aColorBack);
aPalette[1] = BitmapColor(aColorPix);

These stored the foreground and background colors. They were removed in the
commit below leaving no way to tell from the raw bitmap what is the foreground
and background colors. 

I tried to patch by passing BitmapPalette to the Bitmap created in the
CreateFromData function as follows:

vcl::bitmap::CreateFromData(std::move(aBitmap), &aPalette)   

BitmapEx CreateFromData( RawBitmap&& rawBitmap, const BitmapPalette* pPal )
{
    auto nBitCount = rawBitmap.GetBitCount();
    assert( nBitCount == 24 || nBitCount == 32);
    Bitmap aBmp( rawBitmap.maSize, nBitCount, pPal );
...
}

Didn't work...

commit ccd316d1cb310734848bd20244f509024b549b8c
Author: Noel Grandin <noel.grandin at collabora.co.uk>, Fri Feb 16 14:26:14 2018
+0200 (6 months ago)
Committer: Noel Grandin <noel.grandin at collabora.co.uk>, Mon Feb 19 07:12:56
2018 +0100 (6 months ago)
Follows: libreoffice-6-0-branch-point
Precedes: libreoffice-6-1-branch-point
Branches: <Expand>

use VirtualDevice in createHistorical8x8FromArray

part of making BitmapWriteAccess an internal detail of vcl/

Change-Id: I8b3aa2fdd3c26db0e48b228640cd31b0bd31543c
Reviewed-on: https://gerrit.libreoffice.org/49937
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180816/101b544d/attachment.html>


More information about the Libreoffice-bugs mailing list