sw content controls: fix getString() and setString() on SwXContentControl
The setter was broken, it inserted the new content at the start, but
didn't delete the old content. The getter was also broken, it returned
an empty string, even if the content control had a non-empty content.
This was always a problem since
c4268efef25129b162884312b15527f1e5c3bcb0
(sw content controls: add UNO API to insert this, 2022-03-31) introduced
SwXContentControl.
Fix the problem by extending SwXTextCursor, so in case m_eType is
CursorType::ContentControl, then it keeps the cursor's range inside the
boundaries of the content control.
This also allows changing the data binding code added in
b5c616d10bff3213840d4893d13b4493de71fa56 (tdf#104823: support for sdt
plain text fields, 2021-11-24) to use content controls, in a follow-up
commit.
Change-Id: Ic3ae47a4b26af090539d61035372f1784c8ffe3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140040
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins