[Libreoffice-commits] core.git: vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Dec 27 16:52:08 UTC 2018
vcl/source/gdi/pngread.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 408b25c8d49f92cb608d0de9b1f19c6c19b33dab
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Dec 27 18:02:42 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Dec 27 18:04:24 2018 +0200
Make two private PNGReaderImpl fields const
Change-Id: I54a21a239b41aade0b7745c2bae232dade4b6ce2
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index ba9d9afc5507..2436c1cd3c57 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -124,8 +124,8 @@ private:
sal_uInt8 mnCompressionType;
sal_uInt8 mnFilterType;
sal_uInt8 mnInterlaceType;
- BitmapColor mcTranspColor; // transparency mask's transparency "color"
- BitmapColor mcOpaqueColor; // transparency mask's opaque "color"
+ const BitmapColor mcTranspColor; // transparency mask's transparency "color"
+ const BitmapColor mcOpaqueColor; // transparency mask's opaque "color"
bool mbTransparent : 1; // graphic includes an tRNS Chunk or an alpha Channel
bool mbAlphaChannel : 1; // is true for ColorType 4 and 6
bool mbRGBTriple : 1;
@@ -204,6 +204,8 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
mnCompressionType( 0 ),
mnFilterType ( 0 ),
mnInterlaceType ( 0 ),
+ mcOpaqueColor ( BitmapColor( 0x00 )),
+ mcTranspColor ( BitmapColor( 0xFF )),
mbTransparent( false ),
mbAlphaChannel( false ),
mbRGBTriple( false ),
@@ -800,8 +802,6 @@ bool PNGReaderImpl::ImplReadTransparent()
mbTransparent = (mpMaskAcc != nullptr);
if( !mbTransparent )
return false;
- mcOpaqueColor = BitmapColor( 0x00 );
- mcTranspColor = BitmapColor( 0xFF );
mpMaskAcc->Erase( Color(0,0,0) );
}
More information about the Libreoffice-commits
mailing list