[Libreoffice-commits] core.git: cui/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jul 25 12:40:32 UTC 2018
cui/source/dialogs/SignatureLineDialog.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 7213a583f5c1d42c05dc4f19b4d4d2f9dded7733
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Jul 25 13:14:30 2018 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Jul 25 14:40:07 2018 +0200
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 at cib.de>
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;
}
More information about the Libreoffice-commits
mailing list