This is how it should be in ideal. Escher is a common abstraction for
all MS Office formats and its high-level object model should be common
as well.
For historical reasons, different parts of POI have their own
implementations of the same drawing model. HSSF introduced support for
Escher in POI 2.5 and with minor modifications this code exists up to
now. HSLF came later and its implementation of shapes is more mature and
should be reusable across other POI modules.
Your idea to refactor HSLF implementation into a common shape model
makes sense. Would you like to contribute? I wrote most of the HSLF
shape stuff and will be happy to give you guidance.
Regards,
Yegor
Looking at the shape-related code in different parts of POI I got the
impression that the translation from EscherRecord objects to Shape objects
could be done the same way regardless where the records come from.
The code from HSLF could be a quite good starting point to implement such a
common shape model, at least it would be better than what exists e.g. in HSSF
and HWPF. I was able to use the model, with some adjustments, to parse
drawings from word. It should be possible to refactor the model to not depend
on the document it is loaded from and use it for all document types.
Are there any plans to implement such a common shape model?
Are there any reasons not to have it (besides that somebody will have to
implement it)?
Best Regards,
Benjamin Engele
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]