[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jul 25 20:03:56 UTC 2018
cui/source/dialogs/SignatureLineDialog.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 8a4f07b367284e898898b1840fc22f357099aba9
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Jul 25 13:14:30 2018 +0200
Commit: Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Wed Jul 25 22:03:31 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>
(cherry picked from commit 7213a583f5c1d42c05dc4f19b4d4d2f9dded7733)
Reviewed-on: https://gerrit.libreoffice.org/57978
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
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);
}
}
More information about the Libreoffice-commits
mailing list