Kaydet (Commit) 7213a583 authored tarafından Michael Stahl's avatar Michael Stahl

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: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 549b718b
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment