access maPalette via const BitmapBuffer* when in const method

Change-Id: I7bd1fb312ef7122e25c4d19679773d0c1ccab7be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121916
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/include/vcl/BitmapReadAccess.hxx b/include/vcl/BitmapReadAccess.hxx
index 2659a99..159ff38 100644
--- a/include/vcl/BitmapReadAccess.hxx
+++ b/include/vcl/BitmapReadAccess.hxx
@@ -88,7 +88,10 @@ public:
    BitmapColor GetColor(tools::Long nY, tools::Long nX) const
    {
        if (HasPalette())
            return mpBuffer->maPalette[GetPixelIndex(nY, nX)];
        {
            const BitmapBuffer* pBuffer = mpBuffer;
            return pBuffer->maPalette[GetPixelIndex(nY, nX)];
        }
        else
            return GetPixel(nY, nX);
    }