summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2024-09-06 09:47:25 +0200
committerMiklos Vajna <vmiklos@collabora.com>2024-09-12 11:29:20 +0200
commit11af9233ab7b2ff40eaa45922f38fe65b14ff881 (patch)
treeb7917048c8f2680af482f9b5a2f81999c16b3626 /include
parente8e7ba59e6f90dbdc9b660d72132293b78bc48a7 (diff)
cool#9992 lok doc sign: make SfxMedium::SignContents_Impl() async
Currently SfxObjectShell::CheckIsReadonly() has a hack for the LOK case to show the signatures dialog read-only, as only that is async. The next step to get rid of this hack is to make SfxMedium::SignContents_Impl() async, now that SfxObjectShell::SignDocumentContent() is async. This requires all callers of SfxMedium::SignContents_Impl() to be async, most notably SfxObjectShell::SignScriptingContent() has to be converted as well. Note that no lifecycle problem is expected here for the callback, since the object shell and its medium is typically around for as long as the document is loaded. (cherry picked from commit de0bc0a2c30a76144b47e9abb17770043813133c) Change-Id: I57f2c747f8448b9adc0398f874ede36211fed817 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173062 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/docfile.hxx3
-rw-r--r--include/sfx2/objsh.hxx2
2 files changed, 3 insertions, 2 deletions
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index fb8039f6b8f1..01046aa66789 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -270,9 +270,10 @@ public:
const INetURLObject& aDest,
const css::uno::Reference< css::ucb::XCommandEnvironment >& xComEnv );
- SAL_DLLPRIVATE bool
+ SAL_DLLPRIVATE void
SignContents_Impl(weld::Window* pDialogParent,
bool bSignScriptingContent, bool bHasValidDocumentSignature,
+ const std::function<void(bool)>& rCallback,
const OUString& aSignatureLineId = OUString(),
const css::uno::Reference<css::security::XCertificate>& xCert
= css::uno::Reference<css::security::XCertificate>(),
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index b3b55286b349..0b9a456b0b0c 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -375,7 +375,7 @@ public:
const css::uno::Reference<css::graphic::XGraphic>& xInvalidGraphic,
const OUString& aComment);
SignatureState GetScriptingSignatureState();
- bool SignScriptingContent(weld::Window* pDialogParent);
+ void SignScriptingContent(weld::Window* pDialogParent, const std::function<void(bool)>& rCallback);
DECL_DLLPRIVATE_LINK(SignDocumentHandler, weld::Button&, void);
virtual std::shared_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet& rItemSet);