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 /sd | |
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 'sd')
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsFramePainter.cxx | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 99d00151a8bb..9549076902e4 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -1376,7 +1376,7 @@ void SdImportTest::testTdf93124() { for (long nX = 34; nX < (34 + 43); ++nX) { - const Color aColor = pReadAccess->GetColor(nY, nX); + const Color aColor = pReadAccess->GetColor(nY, nX).GetColor(); if ((aColor.GetRed() != 0xff) || (aColor.GetGreen() != 0xff) || (aColor.GetBlue() != 0xff)) ++nNonWhiteCount; } @@ -1435,7 +1435,7 @@ void SdImportTest::testTdf99729() { for (long nY = 16; nY < (16 + 96); ++nY) { - const Color aColor = pRead->GetColor(nY, nX); + const Color aColor = pRead->GetColor(nY, nX).GetColor(); if ((aColor.GetRed() != 0xff) || (aColor.GetGreen() != 0xff) || (aColor.GetBlue() != 0xff)) ++nonwhitecounts[i]; } @@ -1858,7 +1858,7 @@ bool checkPatternValues(std::vector<sal_uInt8>& rExpected, Bitmap& rBitmap) { for (long x = 0; x < pAccess->Width(); ++x) { - Color aColor = pAccess->GetPixel(y, x); + Color aColor = pAccess->GetPixel(y, x).GetColor(); sal_uInt8 aValue = rExpected[y*8+x]; if (aValue == 1 && aColor != aFGColor) diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx index 05c97f6a6c51..07027c1d1e18 100644 --- a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx @@ -82,7 +82,8 @@ void FramePainter::AdaptColor ( Bitmap::ScopedReadAccess pReadAccess(aBitmap); if (!pReadAccess) return; - const Color aSourceColor = pReadAccess->GetColor(0,0); + const BitmapColor aBmpSourceColor = pReadAccess->GetColor(0,0); + const Color aSourceColor = aBmpSourceColor.GetColor(); pReadAccess.reset(); // Erase the center bitmap. |