| Summary: | Area tab: Pattern color change results in pattern shown in Bitmap tab page | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Jim Raykowski <raykowj> |
| Component: | Writer | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | VERIFIED FIXED | ||
| Severity: | normal | CC: | dgp-mail, noelgrandin, raykowj, xiscofauli |
| Priority: | medium | Keywords: | bibisected, bisected, regression |
| Version: | 6.1.0.0.alpha1+ | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=119311 https://bugs.documentfoundation.org/show_bug.cgi?id=119094 |
||
| Whiteboard: | target:6.2.0 target:6.1.1 | ||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 107642 | ||
|
Description
Jim Raykowski
2018-08-15 06:36:00 UTC
I confirm it with Version: 6.2.0.0.alpha0+ (x64) Build ID: 0a1a4ffb4f87adff7fbbbc60202b6a0e42fedd0c CPU threads: 4; OS: Windows 10.0; UI render: GL; TinderBox: Win-x86_64@42, Branch:master, Time: 2018-08-08_23:17:46 Locale: en-US (de_DE); Calc: CL 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@collabora.co.uk>, Fri Feb 16 14:26:14 2018 +0200 (6 months ago)
Committer: Noel Grandin <noel.grandin@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@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Regression introduced by https://cgit.freedesktop.org/libreoffice/core/commit/?id=ccd316d1cb310734848bd20244f509024b549b8c as described in comment 2 Adding Cc: to Noel Grandin Problem with pattern preview displayed on bitmap preview reported in bug 119311 Noel Grandin committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cd8dd48bf89d800c012afb04b16281ed8b261de9 tdf#119282 Area tab, Pattern color change It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Verified in Version: 6.2.0.0.alpha0+ Build ID: 60bc26354763fa3461db49a3e827da552484150d CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: threaded @Noel Grandin, Thanks for fixing this!!! I also verify this is fixed in Version: 6.2.0.0.alpha0+ Build ID: 566050c5f3f3e54bfec115f9dba693404ca91770 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; Locale: en-US (en_US.UTF-8); Calc: threaded Noel Grandin committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7607320e8e68cfeb2ef8933d8a5a7d06f74f16fd&h=libreoffice-6-1 tdf#119282 Area tab, Pattern color change It will be available in 6.1.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. |