Bug 56194

Summary: [PATCH] Retrieve properly Clipbard format tag for thumbnail
Product: POI Reporter: thaichat04 <hong-thai.nguyen>
Component: HPSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.10-FINAL   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: thumbnail get tag patch
sample file test

Description thaichat04 2014-02-27 13:29:35 UTC
Created attachment 31351 [details]
thumbnail get tag patch

As described in http://poi.apache.org/hpsf/thumbnails.html
tag value must be -1, -2 ,-3 or 0l

bu on lines 205 and 237 of org.apache.poi.hpsf.Thumbnail :
long clipboardFormatTag = LittleEndian.getUInt(getThumbnail(),

Must be LittleEndian.getInt()
FF FF FF FF will be intepreted as -1 as expected, not ‘4294967295’.
Comment 1 Nick Burch 2014-04-29 09:01:27 UTC
Your patch seems to be missing the file test-data/hpsf/TestThumbnail.xls - we have the metadata of it, but not the contents...

Any chance you could attach that file? We can then apply the patch!
Comment 2 thaichat04 2014-04-29 12:13:47 UTC
Created attachment 31571 [details]
sample file test

Here's TestThumbnail.xls
Comment 3 Nick Burch 2014-07-24 19:34:58 UTC
Thanks for the patch and file, applied (with minor tweaks) in r1613256.