summaryrefslogtreecommitdiff
path: root/xmlsecurity/inc/digitalsignaturesdialog.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2024-09-26 09:07:41 +0200
committerMiklos Vajna <vmiklos@collabora.com>2024-09-26 11:06:06 +0200
commitc57434559cf5ffd82c3c72e8a0884d4874885dca (patch)
tree2189a287f7f455044b39de95866f4801fe7012c1 /xmlsecurity/inc/digitalsignaturesdialog.hxx
parent2b68729253437600db43f5c24838677b963a8c2f (diff)
cool#9992 lok doc sign: conditionally show the add button in the sign dialog
Open the sign dialog, the Add button is hidden, even if the LOK clients initializes the view with a working signing certificate. SfxMedium::SignContents_Impl() knows the correct view, but by the time the execution arrives to the DigitalSignaturesDialog ctor, this info is lost, so we don't know what is the current view. Fix the problem by looking up the view of the object shell at UNO command dispatch time, and passing that around, so the signature dialog can also access it. If the view has a signing certificate configured, then allow signing. The certificate chooser triggered by this button still needs fixing. Change-Id: I1fae63cea27ea1e68e938879f4507f53ade484f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173964 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'xmlsecurity/inc/digitalsignaturesdialog.hxx')
-rw-r--r--xmlsecurity/inc/digitalsignaturesdialog.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx b/xmlsecurity/inc/digitalsignaturesdialog.hxx
index a821d1487d0c..11331ff7db36 100644
--- a/xmlsecurity/inc/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx
@@ -34,6 +34,7 @@ namespace com::sun::star {
class HeaderBar;
class CertificateViewer;
+class SfxViewShell;
class DigitalSignaturesDialog final : public weld::GenericDialogController
{
@@ -99,7 +100,8 @@ private:
public:
DigitalSignaturesDialog(weld::Window* pParent, const css::uno::Reference<
css::uno::XComponentContext >& rxCtx, DocumentSignatureMode eMode,
- bool bReadOnly, OUString sODFVersion, bool bHasDocumentSignature);
+ bool bReadOnly, OUString sODFVersion, bool bHasDocumentSignature,
+ SfxViewShell* pViewShell);
virtual ~DigitalSignaturesDialog() override;
// Initialize the dialog and the security environment, returns TRUE on success