diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-07-25 13:14:30 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-07-25 14:40:07 +0200 |
commit | 7213a583f5c1d42c05dc4f19b4d4d2f9dded7733 (patch) | |
tree | 587ce5346125f689027ec97a85fd9bc1de10ebc6 /cui | |
parent | 549b718b7dc5ff11990f6c922e467752b65d6945 (diff) |
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>
Diffstat (limited to 'cui')
-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 7cf512d83265..335a33fd7395 100644 --- a/cui/source/dialogs/SignatureLineDialog.cxx +++ b/cui/source/dialogs/SignatureLineDialog.cxx @@ -176,11 +176,13 @@ void SignatureLineDialog::Apply() const Reference<XTextDocument> xTextDocument(m_xModel, UNO_QUERY); if (xTextDocument.is()) { - 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); return; } |