LCOV - code coverage report
Current view: top level - xmlsecurity/inc/xmlsecurity - certificateviewer.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2012-08-25 Functions: 0 4 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 30 0.0 %

           Branch data     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                 :            : #ifndef _XMLSECURITY_CERTIFICATEVIEWER_HXX
      21                 :            : #define _XMLSECURITY_CERTIFICATEVIEWER_HXX
      22                 :            : 
      23                 :            : #include <vcl/fixed.hxx>
      24                 :            : #include <vcl/button.hxx>
      25                 :            : #include <vcl/lstbox.hxx>
      26                 :            : #include <vcl/tabdlg.hxx>
      27                 :            : #include <vcl/tabctrl.hxx>
      28                 :            : #include <vcl/tabpage.hxx>
      29                 :            : #include <svtools/stdctrl.hxx>
      30                 :            : #include <svx/simptabl.hxx>
      31                 :            : #include <svtools/svmedit.hxx>
      32                 :            : 
      33                 :            : namespace com {
      34                 :            : namespace sun {
      35                 :            : namespace star {
      36                 :            : namespace security {
      37                 :            :     class XCertificate; }
      38                 :            : namespace xml { namespace crypto {
      39                 :            :     class XSecurityEnvironment; }}
      40                 :            : }}}
      41                 :            : 
      42                 :            : namespace css = com::sun::star;
      43                 :            : namespace cssu = com::sun::star::uno;
      44                 :            : namespace dcss = ::com::sun::star;
      45                 :            : 
      46                 :            : class CertificateViewer : public TabDialog
      47                 :            : {
      48                 :            : private:
      49                 :            :     friend class CertificateViewerGeneralTP;
      50                 :            :     friend class CertificateViewerDetailsTP;
      51                 :            :     friend class CertificateViewerCertPathTP;
      52                 :            : 
      53                 :            :     TabControl          maTabCtrl;
      54                 :            :     OKButton            maOkBtn;
      55                 :            :     HelpButton          maHelpBtn;
      56                 :            : 
      57                 :            :     sal_Bool                mbCheckForPrivateKey;
      58                 :            : 
      59                 :            :     cssu::Reference< dcss::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment;
      60                 :            :     cssu::Reference< dcss::security::XCertificate > mxCert;
      61                 :            : public:
      62                 :            :         CertificateViewer( Window* pParent, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, const cssu::Reference< dcss::security::XCertificate >& rXCert, sal_Bool bCheckForPrivateKey );
      63                 :            :     virtual             ~CertificateViewer();
      64                 :            : };
      65                 :            : 
      66                 :            : 
      67         [ #  # ]:          0 : class CertificateViewerTP : public TabPage
      68                 :            : {
      69                 :            : protected:
      70                 :            :     CertificateViewer*  mpDlg;
      71                 :            : public:
      72                 :            :     CertificateViewerTP( Window* _pParent, const ResId& _rResId, CertificateViewer* _pDlg );
      73                 :            :     inline void         SetTabDlg( CertificateViewer* pTabDlg );
      74                 :            : };
      75                 :            : 
      76                 :            : inline void CertificateViewerTP::SetTabDlg( CertificateViewer* _pTabDlg )
      77                 :            : {
      78                 :            :     mpDlg = _pTabDlg;
      79                 :            : }
      80                 :            : 
      81                 :            : 
      82 [ #  # ][ #  # ]:          0 : class CertificateViewerGeneralTP : public CertificateViewerTP
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
      83                 :            : {
      84                 :            : private:
      85                 :            :     Window              maFrameWin;
      86                 :            :     FixedImage          maCertImg;
      87                 :            :     FixedInfo           maCertInfoFI;
      88                 :            :     FixedLine           maSep1FL;
      89                 :            :     FixedInfo           maHintNotTrustedFI;
      90                 :            :     FixedLine           maSep2FL;
      91                 :            :     FixedInfo           maIssuedToLabelFI;
      92                 :            :     FixedInfo           maIssuedToFI;
      93                 :            :     FixedInfo           maIssuedByLabelFI;
      94                 :            :     FixedInfo           maIssuedByFI;
      95                 :            :     FixedInfo           maValidDateFI;
      96                 :            :     FixedImage          maKeyImg;
      97                 :            :     FixedInfo           maHintCorrespPrivKeyFI;
      98                 :            : public:
      99                 :            :                         CertificateViewerGeneralTP( Window* pParent, CertificateViewer* _pDlg );
     100                 :            : 
     101                 :            :     virtual void        ActivatePage();
     102                 :            : };
     103                 :            : 
     104                 :            : 
     105                 :            : class CertificateViewerDetailsTP : public CertificateViewerTP
     106                 :            : {
     107                 :            : private:
     108                 :            :     SvxSimpleTableContainer m_aElementsLBContainer;
     109                 :            :     SvxSimpleTable      maElementsLB;
     110                 :            :     MultiLineEdit       maElementML;
     111                 :            :     Font                maStdFont;
     112                 :            :     Font                maFixedWidthFont;
     113                 :            : 
     114                 :            :     DECL_LINK(          ElementSelectHdl, void* );
     115                 :            :     void                Clear( void );
     116                 :            :     void                InsertElement( const String& _rField, const String& _rValue,
     117                 :            :                                         const String& _rDetails, bool _bFixedWidthFont = false );
     118                 :            : public:
     119                 :            :                         CertificateViewerDetailsTP( Window* pParent, CertificateViewer* _pDlg );
     120                 :            :     virtual             ~CertificateViewerDetailsTP();
     121                 :            : 
     122                 :            :     virtual void        ActivatePage();
     123                 :            : };
     124                 :            : 
     125                 :            : 
     126                 :            : class CertificateViewerCertPathTP : public CertificateViewerTP
     127                 :            : {
     128                 :            : private:
     129                 :            :     FixedText           maCertPathFT;
     130                 :            :     SvTreeListBox       maCertPathLB;
     131                 :            :     PushButton          maViewCertPB;
     132                 :            :     FixedText           maCertStatusFT;
     133                 :            :     MultiLineEdit       maCertStatusML;
     134                 :            : 
     135                 :            :     CertificateViewer*  mpParent;
     136                 :            :     bool                mbFirstActivateDone;
     137                 :            :     Image               maCertImage;
     138                 :            :     Image               maCertNotValidatedImage;
     139                 :            :     String              msCertOK;
     140                 :            :     String              msCertNotValidated;
     141                 :            : 
     142                 :            :     DECL_LINK(          ViewCertHdl, void* );
     143                 :            :     DECL_LINK(          CertSelectHdl, void* );
     144                 :            :     void                Clear( void );
     145                 :            :     SvLBoxEntry*        InsertCert( SvLBoxEntry* _pParent, const String& _rName,
     146                 :            :                                     cssu::Reference< dcss::security::XCertificate > rxCert,
     147                 :            :                                     bool bValid);
     148                 :            : 
     149                 :            : public:
     150                 :            :                         CertificateViewerCertPathTP( Window* pParent, CertificateViewer* _pDlg );
     151                 :            :     virtual             ~CertificateViewerCertPathTP();
     152                 :            : 
     153                 :            :     virtual void        ActivatePage();
     154                 :            : };
     155                 :            : 
     156                 :            : 
     157                 :            : #endif // _XMLSECURITY_CERTIFICATEVIEWER_HXX
     158                 :            : 
     159                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10