On Fri, 20 May 2011, Pavan Apache wrote:
Then, i found that XWPFParagraph doesnt implement equals method.

What would you want this equals method to check?

And i am doing it in a wrong way, please correct me.

I don't believe you can just clone the xml of the paragraph and be done with it - there are references to other bits of the file (even other xml streams) that go in there too. Things like pictures, styles and so on

What we do for HSSF/XSSF is to have high level usermodel wrappers around all the styling parts, and the ability to clone a style from one workbook to another (with all the hard work around copying bits done internally). You can then fairly easily copy things over.

So, I'd suggest that the first step would be to beef up the XWPF style stuff, then look at something to clone a style from one document to another. Then at that point cloning paragraphs (without pictures) ought to be fairly easy to do. Sorry it's not a simple step though... Please do send in patches if you get any of it working!

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to