diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-21 16:07:55 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-23 16:41:59 +0200 |
commit | 7607320e8e68cfeb2ef8933d8a5a7d06f74f16fd (patch) | |
tree | b4b4ae5ea6bd6ec2ce1d252442351a8e2ad2d52f /cui | |
parent | 88897b74118fa6d269ce325aca6a4ac3ac1ae3de (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
(cherry picked from commit cd8dd48bf89d800c012afb04b16281ed8b261de9)
Reviewed-on: https://gerrit.libreoffice.org/59416
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-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 8f06c8051fec..7516e6689adf 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> @@ -73,7 +74,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(); |