poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Denny <keith.g.de...@gmail.com>
Subject Re: POI 3.10.1 XWPFRun getText() Does Not Return Full Line of Text
Date Fri, 05 Sep 2014 18:42:26 GMT
With a Run, I can set the text of the acquired Run.  But, I don't see where
I can reset the text of the Paragraph if I get all the Paragraph text from
either getParagraphText or just getText.   It would definitely be preferred
if I could do it with a setter such as setParagraphText or setText.  Am I
overlooking a method like that?


On Fri, Sep 5, 2014 at 2:20 PM, Nick Burch <apache@gagravarr.org> wrote:

> On Fri, 5 Sep 2014, Keith Denny wrote:
>
>> Thank you for confirming the functionality.  Basically, I'll have to
>> assemble the Paragraph lines from all the Runs and then inspect the
>> assembled Paragraph full text for my translation/substitution routine.
>>
>
> The paragraph object itself can give you the overall paragraph text, why
> not use that?
>
>  In essence, I think I will have to remove all the Runs after assembling
>> them at runtime, translate/make substitutions, and then add a single Run
>> back to the Paragraph with the whole text that was assembled.  Is there a
>> limit to the size of a given Run?
>>
>
> Nope, runs are created by word to handle adjacent blocks of text that need
> different formatting, and sometimes when it thinks there's a risk that they
> might later / might once have... If the paragraph is supposed to all be the
> same, there's something to be said for squashing it down to just one run,
> then modifying the text in that!
>
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

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