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 /cui/source/tabpages/tppattern.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 'cui/source/tabpages/tppattern.cxx')
-rw-r--r-- | cui/source/tabpages/tppattern.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 7d864da0326f..a696204da30e 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -29,6 +29,7 @@ #include <svx/colorbox.hxx> #include <svx/dialmgr.hxx> #include <vcl/bitmapaccess.hxx> +#include <vcl/BitmapTools.hxx> #include <vcl/settings.hxx> #include <vcl/weld.hxx> #include <svx/dialogs.hrc> @@ -74,7 +75,7 @@ public: { if (!pBmpArray) return BitmapEx(); - return createHistorical8x8FromArray(*pBmpArray, aPixelColor, aBackgroundColor); + return vcl::bitmap::createHistorical8x8FromArray(*pBmpArray, aPixelColor, aBackgroundColor); } void SetBmpArray( std::array<sal_uInt8,64> const & pPixel ) { pBmpArray = &pPixel; } @@ -296,7 +297,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, ValueSet*, void) { BitmapColor aBack; BitmapColor aFront; - bool bIs8x8(isHistorical8x8(pGraphicObject->GetGraphic().GetBitmapEx(), aBack, aFront)); + bool bIs8x8(vcl::bitmap::isHistorical8x8(pGraphicObject->GetGraphic().GetBitmapEx(), aBack, aFront)); m_pLbColor->SetNoSelection(); m_pLbBackgroundColor->SetNoSelection(); |