diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-21 16:07:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-21 21:06:24 +0200 |
commit | cd8dd48bf89d800c012afb04b16281ed8b261de9 (patch) | |
tree | ce1ed337daefe46b0fd4f1e0f54dac629343b85d /svx/source/xoutdev/xtabptrn.cxx | |
parent | f05f4e042ca6ac8ae7f1d1e8e6bfb4cbba17a044 (diff) |
tdf#119282 Area tab, Pattern color change
regression from
commit ccd316d1cb310734848bd20244f509024b549b8c
use VirtualDevice in createHistorical8x8FromArray
Move the code inside vcl so we don't need to expose BitmapWriteAccess.
I tried to detect this thing by counting the number of independent
colors in the bitmap, but that didn't work. It is used from more than
one place, and appears to be very determined that it needs a 2-color
palette to work properly.
Change-Id: Id11dd9ea78e5e522a6083d6a799e801cac81fd5b
Reviewed-on: https://gerrit.libreoffice.org/59331
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'svx/source/xoutdev/xtabptrn.cxx')
-rw-r--r-- | svx/source/xoutdev/xtabptrn.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/svx/source/xoutdev/xtabptrn.cxx b/svx/source/xoutdev/xtabptrn.cxx index 853fd24a819e..d207bb15de4c 100644 --- a/svx/source/xoutdev/xtabptrn.cxx +++ b/svx/source/xoutdev/xtabptrn.cxx @@ -29,6 +29,7 @@ #include <svx/xbtmpit.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> +#include <vcl/BitmapTools.hxx> #include <o3tl/make_unique.hxx> @@ -56,28 +57,28 @@ bool XPatternList::Create() // white/white bitmap aStr.append(" 1"); - aBitmap = createHistorical8x8FromArray(aArray, COL_WHITE, COL_WHITE); + aBitmap = vcl::bitmap::createHistorical8x8FromArray(aArray, COL_WHITE, COL_WHITE); Insert(o3tl::make_unique<XBitmapEntry>(Graphic(aBitmap), aStr.toString())); // black/white bitmap aArray[ 0] = 1; aArray[ 9] = 1; aArray[18] = 1; aArray[27] = 1; aArray[36] = 1; aArray[45] = 1; aArray[54] = 1; aArray[63] = 1; aStr[nLen] = '2'; - aBitmap = createHistorical8x8FromArray(aArray, COL_BLACK, COL_WHITE); + aBitmap = vcl::bitmap::createHistorical8x8FromArray(aArray, COL_BLACK, COL_WHITE); Insert(o3tl::make_unique<XBitmapEntry>(Graphic(aBitmap), aStr.toString())); // lightred/white bitmap aArray[ 7] = 1; aArray[14] = 1; aArray[21] = 1; aArray[28] = 1; aArray[35] = 1; aArray[42] = 1; aArray[49] = 1; aArray[56] = 1; aStr[nLen] = '3'; - aBitmap = createHistorical8x8FromArray(aArray, COL_LIGHTRED, COL_WHITE); + aBitmap = vcl::bitmap::createHistorical8x8FromArray(aArray, COL_LIGHTRED, COL_WHITE); Insert(o3tl::make_unique<XBitmapEntry>(Graphic(aBitmap), aStr.toString())); // lightblue/white bitmap aArray[24] = 1; aArray[25] = 1; aArray[26] = 1; aArray[29] = 1; aArray[30] = 1; aArray[31] = 1; aStr[nLen] = '4'; - aBitmap = createHistorical8x8FromArray(aArray, COL_LIGHTBLUE, COL_WHITE); + aBitmap = vcl::bitmap::createHistorical8x8FromArray(aArray, COL_LIGHTBLUE, COL_WHITE); Insert(o3tl::make_unique<XBitmapEntry>(Graphic(aBitmap), aStr.toString())); return true; |