summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-26 13:47:58 +0000
committerAndras Timar <andras.timar@collabora.com>2015-03-04 03:16:45 -0800
commit581ab9d281ce6f4b1c457d4866f1983acdabc442 (patch)
tree1d8583caef055bf80bf82f789a1c4dcd2e3fc3f1 /vcl
parent8fecaca12b9a2e8ddb9457e520b1c1c8ebb1e83f (diff)
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/14660 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit f20197a5e6da7ab0b550bce7ef2e07b7f7b401d5)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index b25bb20ee72d..cf715ab4195c 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -856,7 +856,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 );