Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.5
-
None
-
qtbase self-compiled from the dev branch as of commit 0131dbd2f95449c09758208d8b190c9238a5c46a,
LibreOffice master as of commit 1df81daa83a213086e4ca928834ae093a0f16f48, self-compiled with the qt6 VCL plugin enabled (--enable-qt6 autogen option)
-
-
45121669f5 (qt/qtbase/dev) 45121669f5 (qt/tqtc-qtbase/dev)
Description
Since commit https://gitlab.gnome.org/GNOME/at-spi2-core/-/commit/11c1a655ab4a9670dfc8ace9b5a9d6b722054980, the AT-SPI text interface has a method called "ScrollSubstringTo" that can be used to scroll the view so that the specified text portion becomes visible on screen.
Doc: https://lazka.github.io/pgi-docs/Atspi-2.0/classes/Text.html#Atspi.Text.scroll_substring_to
However, Qt currently doesn't support it.
Sample steps to reproduce with the Qt 6 based UI variant of LibreOffice:
1) open attached document "lorem2.odt" in the Qt 6 based variant of LibreOffice Writer
2) run the attached pyatspi script "pyatspi-script-scrolltosubstring.py" that calls the "ScrollSubstringTo" method on the paragraph's a11y object to scroll to the end of the paragraph:
$ python3 pyatspi-script-scrolltosubstring.py
Actual result:
The script prints an error message:
Traceback (most recent call last): File "/home/michi/git/computer-doc/TODO/misc/pyatspi-script-scrolltosubstring.py", line 39, in <module> text_iface.scrollSubstringTo(text_iface.get_characterCount() - 5, text_iface.get_characterCount(), pyatspi.component.SCROLL_ANYWHERE) File "/usr/lib/python3/dist-packages/pyatspi/text.py", line 599, in scrollSubstringTo return Atspi.Text.scroll_substring_to(self.obj, startOffset, endOffset, scroll_type) gi.repository.GLib.GError: atspi_error: No such object path '/org/a11y/atspi/accessible/2147484542' (1)
The LibreOffice view remains unchanged.
Expected result:
The view should be scrolled so that the end of the paragraph becomes visible.