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-08 16:10:55 +0100 |
commit | 779e530db0e5d5f37ad037596defe044f6d0db25 (patch) | |
tree | 82ebb5b169865435a63e7ae41fe868f30261510f | |
parent | b97f3988183dab39b2b0231d9fd0e55d078ac0b5 (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>
(cherry picked from commit 30bb64dc2deb53409c72bc8d4c083bbc3fd99a7d)
-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 c471b89a4381..2db450c19acf 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1522,8 +1522,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 f91b33886195..bf987a81c2c3 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; |