You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Erez Eisenstein <EE...@axismobile.com> on 2006/10/09 18:00:42 UTC

Numbering formats of lines of text in PPT files

Hi Nick, I'm having the following problem:

After extracting several lines of text from a TextBox, if the lines were
numbered, with also sub-numbered, I can't tell which line is which.

Example:

1. first line
	a.	first sub-line
 	b.	second sub-line
2.	second line
3.	third line

will come out looking like this:

*	first line
*	first sub-line
*	second sub-line
*	second line
*	third line

All of these lines appear in the same TextRun instance, I got by
invoking the getTextRun() method of TextBox class. I can't tell from
each line's attribute (color, font, size, etc.) which line is a sub-line
of which.

Is there a solution to this I'm over looking?

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: Numbering formats of lines of text in PPT files

Posted by Yegor Kozlov <ye...@dinom.ru>.
Hi,

Recently we added RuchTextRun.getIndentLevel() which returns the
indentation level of a line.

In your example it should return 0 for "first line", "second line", "third line"
and 1 for sub-lines:

1. first line  //indent=0
        a.      first sub-line      //indent=1
        b.      second sub-line     //indent=1
2.      second line //indent=0
3.      third line  //indent=0


Regards, Yegor

EE> Hi Nick, I'm having the following problem:

EE> After extracting several lines of text from a TextBox, if the lines were
EE> numbered, with also sub-numbered, I can't tell which line is which.

EE> Example:

EE> 1. first line
EE>         a.      first sub-line
EE>         b.      second sub-line
EE> 2.      second line
EE> 3.      third line

EE> will come out looking like this:

EE> *       first line
EE> *       first sub-line
EE> *       second sub-line
EE> *       second line
EE> *       third line

EE> All of these lines appear in the same TextRun instance, I got by
EE> invoking the getTextRun() method of TextBox class. I can't tell from
EE> each line's attribute (color, font, size, etc.) which line is a sub-line
EE> of which.

EE> Is there a solution to this I'm over looking?

EE> Thanks

EE> ---------------------------------------------------------------------
EE> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
EE> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
EE> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/