poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Herve Girod <herve.gi...@gmail.com>
Subject Re: Re: Two questions about XWPF
Date Sat, 16 Nov 2013 13:09:14 GMT
Hello,

I was able to use the CT... objects to set several things about the Table,
thanks. However, I need to have access to the CTTblGrid element to set the
width of the Table columns, but it seems that this class is referenced by
the CTTbl class but not present in the poi-ooxml-schemas jar.

For example:
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblGrid tblGrid =
table.getCTTbl().getTblGrid() does not work because CTTblGrid is not
present in the main package in poi-ooxml-schemas.jar. It's also true for
the last 3.10 Beta 2.

Is it somewhere else in the lib?

Regards,

Herve


2013/11/13 Herve Girod <herve.girod@gmail.com>

> On Sun, 10 Nov 2013, Herve Girod wrote:
>> > I have two things that I would like to do and are surely feasible in XWPF,
>> > but I was not able to do them correctly:
>> > - Having more than one paragraph level in a document. Numbering is using
>> > BigInteger, so it's not possible to set more than one level there just by
>> > using the setNumID on paragraphs.
>> > - Setting the width of columns in a XWPFTable. And setting the table width
>> > only seems not to have any result for me.
>>
>> I don't know the answer to either of these, but I do know how you can
>> discover it for yourself... The X..F formats are all based on a zip of xml
>> files, which makes them much easier when it comes to identifying what goes
>> on in them. For these two cases, your best bet is to create a simple file
>> in word, save it, make a tweak to numbering/columns, and save-as. Unzip
>> the two files, diff the XML, and see what XML corresponds to the change
>>
>> Short term, use the CT... objects to make the same change yourself. Longer
>> term, please write up a nice usermodel patch to wrap that up in friendly
>> functionality, and submit it as a patch :)
>>
>> Nick
>>
>> Hello, Thanks, I did not know that the CT... objects exposed the "raw"
> XML content of the document. Even if it now makes perfect sense ;)
>
> So no problem, I will do as you propose, and if (or rather when, let's be
> optimistic about my OOXML capabilities) I come with a nice solution to
> perform these two things, I will propose a usermodel patch.
>
> BTW I sent patches for Batik WMF => SVG converters a long time ago, I had
> to sign and send something for the patch license. Is it still the case, and
> would I need to sign another for POI in that case? However, this is not an
> urgent question, I still have to add this feature and propose the patch
> itself ;)
>
> Herve
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message