summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/SignatureLineDialog.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/dialogs/SignatureLineDialog.cxx')
-rw-r--r--cui/source/dialogs/SignatureLineDialog.cxx4
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;
}