diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-07-25 13:14:30 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-07-27 08:22:51 +0200 |
commit | 63543c44f2ce1af3b8a1cb350f9d03bc75a54f7d (patch) | |
tree | 36ac9dfb35275a8b8f638e4f2712425485ca822e | |
parent | forcepoint#53 restrict to expected index range (diff) | |
download | core-63543c44f2ce1af3b8a1cb350f9d03bc75a54f7d.tar.gz core-63543c44f2ce1af3b8a1cb350f9d03bc75a54f7d.zip |
tdf#118777 cui: use right XText in SignatureLineDialog
Writer has multiple nested XText and we have to call insertTextContent
on the one that corresponds to the xCursor, so use the convenient
getText() instead of hard-coding the body text.
Change-Id: I86bce48e97730917aa8c4b093bb74c03e3f0dd36
Reviewed-on: https://gerrit.libreoffice.org/57969
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit 7213a583f5c1d42c05dc4f19b4d4d2f9dded7733)
Reviewed-on: https://gerrit.libreoffice.org/57978
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
(cherry picked from commit 8a4f07b367284e898898b1840fc22f357099aba9)
Reviewed-on: https://gerrit.libreoffice.org/58050
Reviewed-by: Eike Rathke <erack@redhat.com>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | cui/source/dialogs/SignatureLineDialog.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cui/source/dialogs/SignatureLineDialog.cxx b/cui/source/dialogs/SignatureLineDialog.cxx index f2a5ec06d26e..60e8491cbff0 100644 --- a/cui/source/dialogs/SignatureLineDialog.cxx +++ b/cui/source/dialogs/SignatureLineDialog.cxx @@ -165,11 +165,13 @@ void SignatureLineDialog::Apply() // Insert into document const Reference<XTextDocument> xTextDocument(m_xModel, UNO_QUERY); - Reference<XText> xText = xTextDocument->getText(); Reference<XTextContent> xTextContent(xShape, UNO_QUERY_THROW); Reference<XTextViewCursorSupplier> xViewCursorSupplier(m_xModel->getCurrentController(), UNO_QUERY_THROW); Reference<XTextViewCursor> xCursor = xViewCursorSupplier->getViewCursor(); + // use cursor's XText - it might be in table cell, frame, ... + Reference<XText> const xText(xCursor->getText()); + assert(xText.is()); xText->insertTextContent(xCursor, xTextContent, true); } } |