Hi All
Do the people who've done rich text in excel or word have a suggestion for
how best to handle the model/usermodel side of things for rich text?
If, in powerpoint, we enter a paragraph like
This is normal text
<red><bold>This line is red and bold</bold></red>
<blue><italic>While this one is italic and blue</italic></blue>
This final line is back to normal
Then, in the powerpoint records, we find a text record for
This is normal text
This line is red and bold
While this one is italic and blue
This final line is back to normal
Following that is a styling record, which is something like
paragraph styling info for 115 characters
alignment, line spacing etc for paragraph
for the first 21 characters
no bold, no underline, no italic
for the next 26 characters
bold, no underline, no italic
for the next 34 characters
no bold, no underline, italic
for the rest of the paragraph
no bold, no underline, no italic
(I'm still trying to figure out how the colour bit works)
So, I have one record that contains all the text, and then another that
tells me how to apply styling to bits of text within that.
I was pondering perhaps having the model layer hold the slab of text, and
the character properties, and ensure they are in sync. Then, have the
usermodel layer have one entry for each bit of the text styled differently
(one model, 4 usermodel in the above example). Quite how I allow people to
apply styling to within a block of unstyled text (eg just "normal" from
the first line) I'm not sure
I'm guessing that other bits of POI have already dealt with this? So, can
anyone suggest a good scheme for handling this in the model and usermodel
layers?
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/