[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - vcl/source
Caolán McNamara
caolanm at redhat.com
Mon Mar 2 05:44:15 PST 2015
vcl/source/filter/wmf/emfwr.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit bf4150f1c5211c6ceb8221cb020beba2bd796d5d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Feb 26 13:47:58 2015 +0000
in BITFIELDS mode (3) there are *3* pal entries not 12
There are 12 *bytes*, which presumably is the thinko there. But this nPalCount
gets multiplied by 4 to convert it to bytes later.
This is the source of the bad mask values found after "Use the cairo-compatible
basebmp surface for headless" etc. Arbitrary values ended up being read as mask
values.
Change-Id: If5d93f74b1c58d3ecdb5186f93cb0215a556586a
(cherry picked from commit 5e5b90c12862b522a4553337fbf6309bb8278b8c)
Reviewed-on: https://gerrit.libreoffice.org/14659
Tested-by: Michael Stahl <mstahl at redhat.com>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index d0c3588..99bff37 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -857,7 +857,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
aMemStm.ReadUInt32( nColsUsed );
nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (sal_uInt32) nBitCount ) ) :
- ( ( 3 == nCompression ) ? 12 : 0 );
+ ( ( 3 == nCompression ) ? 3 : 0 );
m_rStm.Write( aMemStm.GetData(), nDIBSize );
More information about the Libreoffice-commits
mailing list