|Summary:||Deprecate xslf.usermodel.Drawing* - was: Can't change text of DrawingParagraph|
|Component:||XSLF||Assignee:||POI Developers List <dev>|
Description NadavB 2016-08-28 16:04:58 UTC
With DrawingParagraph, obtained by DrawingTextBody->getParagraphs() It's possible to do getText() to obtain the text, but there is no way how to change the text. We need a way to change text in a given presentation.
Comment 1 Javen O'Neal 2016-09-10 23:53:53 UTC
Patches with corresponding unit tests are greatly appreciated! Resources to get your started: How to build POI: https://poi.apache.org/howtobuild.html Submitting patches: https://poi.apache.org/guidelines.html XSLF quick guide: https://poi.apache.org/slideshow/xslf-cookbook.html#Text POI FAQ: https://poi.apache.org/faq.html Here's the DrawingParagraph source code https://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingParagraph.java?view=markup A paragraph is constructed of multiple text runs (the formatting of each text run is the same--analogous to rich text strings). You probably want a method that will return a list of text runs within a DrawingParagraph. Then you can set the text on each run. CTRegularTextRun any any other CT* class are generated by the OOXML schema descriptors, but you can attach the interface to Eclipse to make it easier to develop these features. You can also rename a .pptx file to .zip, unzip it, and examine the XML files inside (helpful to have an XML pretty printer).