diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-10-30 00:20:42 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-11-07 09:58:27 +0100 |
commit | 30bb64dc2deb53409c72bc8d4c083bbc3fd99a7d (patch) | |
tree | 20ad8754d2de51113a94a57eda395d73c9bef140 | |
parent | 977ccf4b0fffc178ad550bda47421db5bc4c82fd (diff) |
lok: send signature status on document load
Change-Id: If164d0edc9343b1db5ee96a2da46c9436ddbc73f
Reviewed-on: https://gerrit.libreoffice.org/62776
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | desktop/source/lib/init.cxx | 6 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitEnums.h | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index faf1dfa40936..baa87e12ca97 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1515,8 +1515,10 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, return nullptr; } - return new LibLODocument_Impl(xComponent); - + LibLODocument_Impl* pDocument = new LibLODocument_Impl(xComponent); + int nState = doc_getSignatureState(pDocument); + pLib->mpCallback(LOK_CALLBACK_SIGNATURE_STATUS, OString::number(nState).getStr(), pLib->mpCallbackData); + return pDocument; } catch (const uno::Exception& exception) { diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index e34efb3576ca..cb9091711acc 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -603,6 +603,11 @@ typedef enum * Eg. com.sun.star.presentation.PresentationDocument TextObject */ LOK_CALLBACK_CONTEXT_CHANGED = 39, + + /** + * On-load notification of the document signature status. + */ + LOK_CALLBACK_SIGNATURE_STATUS = 40, } LibreOfficeKitCallbackType; |