<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail_default">Hi,</div><div dir="ltr" style="font-family:Arial,Helvetica,sans-serif"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Just to update for anyone who might find this useful, I ended up using the XTextRange interface of XCell to call #getText(), which returns an object that properly supports the full Text service and which ended up allowing me to iterate over paragraphs and text portions.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Adomas</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 21 Jun 2019 at 20:19, Andrew Pitonyak <<a href="mailto:andrew@pitonyak.org">andrew@pitonyak.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>In OOME, I do not really discuss this, but, I do in AndrewMacro.odt where I claim (in the section "Enumerating cells in any text table" that you need to first use getCellNames() and then use getCellByName(aName).<br><br>If you want to be even more complete, you may need to worry about things such as sections, floating frames, etc. Annoying, right? I don't think that I have ever written code that attempts to enumerate all of these things to get every XText object. Luckily, some of these things you can simplify by enumerating certain objects independtly; for example, you could enumerate a Single XText object in a single method, and then get all of the text tables using oDoc.getTextTables() and have a method to specifically handle text tables rather than recognizing them as you traverse the text; if you did not need to retain locality or something. <br><br><br><br>On Friday, June 21, 2019 09:56 EDT, Michael Stahl <<a href="mailto:mst@libreoffice.org" target="_blank">mst@libreoffice.org</a>> wrote:<br> <blockquote type="cite" cite="http://096bb928-fcf3-ce82-5e6b-81fcc43dd7b4@libreoffice.org">On 21.06.19 13:22, Adomas Venčkauskas wrote:<br>> Hello,<br>><br>> I need my Java extension to iterate over all hyperlinks in a Writer<br>> document. This is fine with Paragraph TextPortion enumeration, but no<br>> portion enumeration is available in TextTables. What would be the best<br>> way to enumerate all hyperlinks in TextTables?<br><br>you first need to enumerate the cells in the table, then the cells<br>implement XText so you can enumerate the paragraphs in the cells like<br>the paragraphs in the top-level body text.<br><br>to enumerate the cells i guess you can use getCellNames().<br>_______________________________________________<br>LibreOffice mailing list<br><a href="mailto:LibreOffice@lists.freedesktop.org" target="_blank">LibreOffice@lists.freedesktop.org</a><br><a href="https://lists.freedesktop.org/mailman/listinfo/libreoffice" target="_blank">https://lists.freedesktop.org/mailman/listinfo/libreoffice</a></blockquote><br><br><br>
</blockquote></div>