bump product version to 4.1.6.2
[LibreOffice.git] / uui / source / sslwarndlg.cxx
blob312ce82b5c0b9b3e0df9c8109652d9cdf878d8a7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <vcl/msgbox.hxx>
22 #include <ids.hrc>
23 #include <sslwarndlg.hrc>
24 #include <sslwarndlg.hxx>
26 #include <comphelper/processfactory.hxx>
27 #include <com/sun/star/security/DocumentDigitalSignatures.hpp>
29 using namespace css;
31 // -----------------------------------------------------------------------
33 IMPL_LINK_NOARG(SSLWarnDialog, OKHdl_Impl)
35 EndDialog( RET_OK );
36 return 1;
39 // -----------------------------------------------------------------------
41 IMPL_LINK_NOARG(SSLWarnDialog, ViewCertHdl_Impl)
43 uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures;
45 xDocumentDigitalSignatures = ::com::sun::star::security::DocumentDigitalSignatures::createDefault( m_xContext );
47 xDocumentDigitalSignatures.get()->showCertificate(getCert());
49 return 0;
52 // -----------------------------------------------------------------------
54 SSLWarnDialog::SSLWarnDialog
56 Window* pParent,
57 const css::uno::Reference< css::security::XCertificate >& rXCert,
58 const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext,
59 ResMgr* pResMgr
60 ) :
62 ModalDialog( pParent, ResId( DLG_UUI_SSLWARN, *pResMgr ) ),
63 m_aLabel1 ( this, ResId( FT_LABEL_1, *pResMgr ) ),
64 m_aOkButton ( this, ResId( PB_OK, *pResMgr ) ),
65 m_aCancelButton ( this, ResId( PB_CANCEL, *pResMgr ) ),
66 m_aCommandButtonViewCert ( this, ResId( PB_VIEW__CERTIFICATE, *pResMgr ) ),
67 m_aLine ( this, ResId( FL_LINE, *pResMgr ) ),
68 m_aWarnImage ( this, ResId( IMG_WARN, *pResMgr ) ),
69 m_xContext ( xContext ),
70 m_rXCert ( rXCert )
72 FreeResource();
73 m_aWarnImage.SetImage( WarningBox::GetStandardImage() );
74 m_pParent = pParent;
75 m_aCommandButtonViewCert.SetClickHdl( LINK( this, SSLWarnDialog, ViewCertHdl_Impl ) );
76 m_aOkButton.SetClickHdl( LINK( this, SSLWarnDialog, OKHdl_Impl ) );
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */