https://bugs.documentfoundation.org/show_bug.cgi?id=96492
Joanmarie Diggs <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |UNCONFIRMED Ever confirmed|1 |0 --- Comment #2 from Joanmarie Diggs <[email protected]> --- (In reply to Buovjaga from comment #1) > (In reply to Joanmarie Diggs from comment #0) > > 2. Use Accerciser or an pyatspi script to get the last child of the > > document. (Result: "Paragraph 2") > > Quit Accerciser if it is running, create the document first with only page 1 showing, then launch Accerciser. In the pane on the left you should find two children of the document accessible. You can verify which paragraphs they are by expanding Text (Editable) in the Interface Viewer. > > 3. Get the flows-to target of that child (Result: "Paragraph 3") You can examine relations in the interface viewer (expand Accessible). But to do the subsequent tasks, iPython console is probably better. So.... Select paragraph 2 in the pane on the left and switch to the iPython console. Type the following: r = acc.getRelationSet() flowsToRelations = [x for x in r if x.getRelationType() == RELATION_FLOWS_TO] target = flowsToRelations[0].getTarget(0) target.queryText().getText(0,-1) The result I get is 'Paragraph 3'. So target is the third paragraph. With this in mind.... > > 4. Get the parent of "Paragraph 3" (Result: The accessible document which > > contains "Paragraph 1" and "Paragraph 2") Still in the iPython console: parent = target.parent children = [x.queryText().getText(0,-1) for x in parent] children The result I get is ['Paragraph 1', 'Paragraph 2']. So the parent of 'Paragraph 3' has two children, neither of which is 'Paragraph 3'. HTH. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
