diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2018-01-21 04:48:50 +1100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-02-05 09:00:54 +0100 |
commit | 01e470f0ab49e458c57b0f28636a517b2bfb1b4a (patch) | |
tree | e153e55125b3d5682e60425b80568c5e03a3695a /svx | |
parent | 79517c0471aff4abf336bd81834bd28732dad67f (diff) |
vcl: remove BitmapColor Color() operator
BitmapColor has a Color() operator. However, this is confusing and
tends to hide that the two classes aren't the same. I have converted this
to GetColor().
Change-Id: I0be2dcb3fc420e7be9c8d04330e7a3fe69a5412a
Reviewed-on: https://gerrit.libreoffice.org/48245
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 3cb0518df7a9..d7f47cc015bc 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -978,31 +978,27 @@ void SvxPixelCtl::LoseFocus() Control::LoseFocus(); } -void SvxPixelCtl::SetXBitmap( const BitmapEx& rBitmapEx ) +void SvxPixelCtl::SetXBitmap(const BitmapEx& rBitmapEx) { BitmapColor aBack; BitmapColor aFront; - if(isHistorical8x8(rBitmapEx, aBack, aFront)) + if (isHistorical8x8(rBitmapEx, aBack, aFront)) { Bitmap aBitmap(rBitmapEx.GetBitmap()); Bitmap::ScopedReadAccess pRead(aBitmap); - aBackgroundColor = aBack; - aPixelColor = aFront; + aBackgroundColor = aBack.GetColor(); + aPixelColor = aFront.GetColor(); for(sal_uInt16 i(0); i < nSquares; i++) { const BitmapColor aColor(pRead->GetColor(i/8, i%8)); - if(aColor == aBack) - { - *( pPixel + i ) = 0; - } + if (aColor == aBack) + *(pPixel + i) = 0; else - { - *( pPixel + i ) = 1; - } + *(pPixel + i) = 1; } } } |