Bug 54272 - Lack of Picture insertion implementation
Summary: Lack of Picture insertion implementation
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: HWPF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2012-12-10 07:41 UTC by Zachary1234
Modified: 2017-09-11 19:39 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Zachary1234 2012-12-10 07:41:12 UTC
The following can't be done directly using the java lib calls.

For an HWPFDocument successfully instantiated from a Word document, it is possible to get the PicturesTable object for that document,
and to obtain a LinkedList of Picture objects for all the embedded images in that word document.

#What isn't possible is to insert an entirely new Picture object into the HWPFDocument (which was successfully instantiated from, say, a .bmp File from a specified, directory) at a particular location, be it within a Paragraph's CharacterRun/Rangle or by using the TextPieceTable/TextPiece/PropertyNode approach. 

Whichever way it is fixed, needs to be updated so that the next call for getPicturesTable() is automatically updated, and so that PicturesTable.hasPicture(characterun) will behave too.

#It isn't possible to use something analogous to 

@Internal void replaceText(oldText,newText,index);

to inserted a Picture at a particular cursor location.
It certainly isn't directly possible to insert a picture which floats (in some 
sort of layer) over the text in any position.  Perhaps the only thing that needs to be particularly done is that the PicturesTable class needs to be updated to add a Picture to the table, either as static at an index.

Naturally getters need to be implemented too to get character position index int values.