You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by teresa <te...@hotmail.com> on 2015/08/18 11:14:38 UTC

Re: [ANNOUNCE] Apache POI 3.13-beta1 released

Hi Andi

Thanks for your email.

I enclose an example PPT file
6_contingency_tables.ppt
<http://apache-poi.1045710.n5.nabble.com/file/n5719837/6_contingency_tables.ppt>  

What I like to do is to extract texts from a textshape and if a text is
bullet style, I'd like to add a bullet with a proper nested indentation. For
example, on slide 2 in the enclosed ppt file,

I'd like to output two paragraphs as below: 

contingency tables show frequencies produced by cross-classifying
observations 
e.g., pottery described simultaneously according to vessel form & surface
decoration

However, using the following codes, I don't know how to get these two
paragraphs.

TextShape sh = slide.getShapes();
TextRun textrun = sh.getTextRun();	
RichTextRun[] rt = textrun.getRichTextRuns(); 

for(int m = 0; m < rt.length; m++) {
   System.out.println("m:" + m +"," + rt[m].isBullet() + "," +
rt[m].getText() + "," + rt[m].getIndentLevel() + "," +
rt[m].getBulletChar());
}


Output is           
m:0,true,contingency tables show frequencies produced by cross-classifying
observations,0,•
m:1,true, 
,0,•
m:2,true,e.g., pottery described ,0,•
m:3,true,simultaneously,0,•
m:4,true, according to vessel form & surface decoration,0,•

Could you advise me how to get bullet styles and paragraphs?

Thanks
T.



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/ANNOUNCE-Apache-POI-3-13-beta1-released-tp5719469p5719837.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: extract texts from a textshape with bullets

Posted by teresa <te...@hotmail.com>.
Hi Andi

Many thanks.

I downloaded the trunk branch (2015-09-03 version) and used ant to create
jar files.

Yes, it works for me - now using HSLFTextParagraph, I am able to output
texts with styles and bullets correctly.

Thanks
T.



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/ANNOUNCE-Apache-POI-3-13-beta1-released-tp5719469p5720010.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


extract texts from a textshape with bullets

Posted by Andreas Beeker <ki...@apache.org>.
Hello Teressa,

> What I like to do is to extract texts from a textshape and if a text is
> bullet style, I'd like to add a bullet with a proper nested indentation. For
> example, on slide 2 in the enclosed ppt file,

have a look at [1] ... is this was you are looking for?

As I've changed a few generics definitions tonight, the sample assumes that you are using the trunk.
There are quite a lot of empty lines, because of empty shapes, but I guess you can ignore/trim them in
your output.

Best wishes,
Andi


[1] http://pastebin.com/pAX8tzPU


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org