poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41933] PicturesTable#getAlllPictures() sometimes loses images
Date Wed, 08 Apr 2009 01:58:03 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=41933





--- Comment #11 from Trejkaz <trejkaz@trypticon.org>  2009-04-07 18:58:03 PST ---
Test case:

    @Test
    public void testLostEmbeddedImage() throws Exception
    {
        File file = new File("hwpf-embedded-image-in-header.doc");
        HWPFDocument doc = new HWPFDocument(new POIFSFileSystem(new
FileInputStream(file)));

        List<?> pics = doc.getPicturesTable().getAllPictures();
        assertEquals("Should be 1 picture", 1, pics.size());

        // In case POI happens to have a utility like this:
        //Picture pic = (Picture) pics.get(0);
        //assertDigestEquals("Wrong content",
"0f36cd9f60222d978b205d891008f4a8", pic.getContent());
    }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message