Files
odfstudio/offapi
Michael Stahl 7ab349296d sw: fix copying and deleting of section content via API
The problem happens if a section starts or ends with a table:

SwXTextSection::getAnchor() may return a SwXTextRange with one position
in a table cell and another position in a different table cell, or
outside the table, neither of which is valid to set the cursor via
SwXTextViewCurosor::gotoRange().

Introduce a new special mode for SwXTextRange, RANGE_IS_SECTION,
analogous to RANGE_IS_TABLE but actually working.

Only SwXTextView can be used to create XTransferables, and it requires
selecting first via either the SwXTextViewCursor or select().

It's currently not possible to select the content of a section in the
ViewShell in these problematic cases, and would be some effort to add.

So add a new interface XTransferableTextSupplier that can be used to
create XTransferable from the SwXTextRange with RANGE_IS_SECTION.

The core CopyRange() and DeleteRange() functions can deal with SwPaMs
that start or end in non-text-nodes, so pass the whole section content to
these in SwXTextRange::setString() and in
SwXTextView::getTransferableFromTextRange().

Change-Id: If7e3210e8a26f5618317c294f2b2f3ed5c217f1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106293
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-11-24 12:09:23 +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.