LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/uui/source - sslwarndlg.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 16 6.2 %
Date: 2013-07-09 Functions: 2 7 28.6 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #include <vcl/msgbox.hxx>
      21             : 
      22             : #include <ids.hrc>
      23             : #include <sslwarndlg.hrc>
      24             : #include <sslwarndlg.hxx>
      25             : 
      26             : #include <comphelper/processfactory.hxx>
      27             : #include <com/sun/star/security/DocumentDigitalSignatures.hpp>
      28             : 
      29             : using namespace css;
      30             : 
      31             : // -----------------------------------------------------------------------
      32             : 
      33           0 : IMPL_LINK_NOARG(SSLWarnDialog, OKHdl_Impl)
      34             : {
      35           0 :     EndDialog( RET_OK );
      36           0 :     return 1;
      37             : }
      38             : 
      39             : // -----------------------------------------------------------------------
      40             : 
      41           0 : IMPL_LINK_NOARG(SSLWarnDialog, ViewCertHdl_Impl)
      42             : {
      43           0 :     uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures;
      44             : 
      45           0 :     xDocumentDigitalSignatures = ::com::sun::star::security::DocumentDigitalSignatures::createDefault( m_xContext );
      46             : 
      47           0 :     xDocumentDigitalSignatures.get()->showCertificate(getCert());
      48             : 
      49           0 :     return 0;
      50             : }
      51             : 
      52             : // -----------------------------------------------------------------------
      53             : 
      54           0 : SSLWarnDialog::SSLWarnDialog
      55             : (
      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             : ) :
      61             : 
      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           0 :     m_rXCert ( rXCert )
      71             : {
      72           0 :     FreeResource();
      73           0 :     m_aWarnImage.SetImage( WarningBox::GetStandardImage() );
      74           0 :     m_pParent = pParent;
      75           0 :     m_aCommandButtonViewCert.SetClickHdl( LINK( this, SSLWarnDialog, ViewCertHdl_Impl ) );
      76           0 :     m_aOkButton.SetClickHdl( LINK( this, SSLWarnDialog, OKHdl_Impl ) );
      77          36 : };
      78             : 
      79             : 
      80             : 
      81             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10