diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-01-25 12:29:16 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-01-25 12:31:39 +0100 |
commit | 2b63e576a5cf06f4af877d63403ad7955ac71b72 (patch) | |
tree | 228f05257af1a116e65ba4040ce606489526c512 /libreofficekit | |
parent | f3f305b6a5f515fbff35b3b551a953307be47216 (diff) |
libreofficekit: ask for password when loading encrypted documents
Change-Id: I3b3b0c0e64965280c24842b0cf70a21b8abb4dfb
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/source/gtk/lokdocview.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index 73f27bc9fe0d..2b61e76d6136 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -809,6 +809,14 @@ globalCallback (gpointer pData) g_signal_emit (pCallback->m_pDocView, doc_view_signals[LOAD_CHANGED], 0, 1.0); } break; + case LOK_CALLBACK_DOCUMENT_PASSWORD: + case LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY: + { + char const*const pURL(pCallback->m_aPayload.c_str()); + // TODO maybe allow more passwords + priv->m_pOffice->pClass->setDocumentPassword(priv->m_pOffice, pURL, "1"); + } + break; default: g_assert(false); break; |