Files
odfstudio/offapi
Miklos Vajna 8e7dc248f2 sw: add UNO API to find the closest doc model position based on pixel position
The use-case is drag&drop: if an UNO API client registers its drag&drop
listener, then it gets a DropTargetDropEvent and has to decide if it
wants to handle that event or allow Writer to handle it. In case it
decides to handle the event, it would be good to able to e.g. insert a
string at the point where the Writer UI indicates it to the user. But
DropTargetDropEvent only exposes a pixel position and Writer requires
you to have an XTextRange when inserting content.

Fix the problem by introducing a new createTextRangeByPixelPosition()
which first does a pixel -> logic coordinate conversion (this is
window-specific, in case you have multiple windows), then picks the doc
model position which is the closest to a logic coordinate.

Change-Id: I6a8e69e3c39b9d99209342469653c0e0bd99bf53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112201
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2021-03-09 20:12:24 +01:00
..
…
2019-06-20 13:09:57 +02:00

Contains all of the IDL files except those in [[udkapi]]

i.e. the interfaces that are specific to the LibreOffice application.
An artificial (?) separation.

The reference offapi/type_reference/offapi.idl and
udkapi/type_reference/udkapi.idl (formerly combined into a single
offapi/type_reference/types.rdb) are used to detect inadvertent incompatible
changes.  They are plain-text .idl files (not strictly lexicographically sorted,
though, so they satisfy the .idl file requirements for no forward dependencies),
so in cases where we deliberately /do/ become incompatible they can be modified
manually.

Old such cases of deliberately becoming incompatible are listed in
offapi/type_reference/typelibrary_history.txt, newer such cases are recorded in
the git logs of (now superseded) offapi/type_reference/types.rdb,
offapi/type_reference/offapi.rdb, and udkapi/type_reference/udkapi.rdb, new such
cases are recorded in the git logs of offapi/type_reference/offapi.idl and
udkapi/type_reference/udkapi.idl.