LCOV - code coverage report
Current view: top level - xmlsecurity/inc/xmlsecurity - macrosecurity.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 6 0.0 %
Date: 2012-08-25 Functions: 0 7 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 46 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_MACROSECURITY_HXX
      21                 :            : #define _XMLSECURITY_MACROSECURITY_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 <unotools/securityoptions.hxx>
      32                 :            : 
      33                 :            : namespace com {
      34                 :            : namespace sun {
      35                 :            : namespace star {
      36                 :            : namespace xml { namespace crypto {
      37                 :            :     class XSecurityEnvironment; }}
      38                 :            : }}}
      39                 :            : 
      40                 :            : namespace css = com::sun::star;
      41                 :            : namespace cssu = com::sun::star::uno;
      42                 :            : namespace dcss = ::com::sun::star;
      43                 :            : 
      44                 :            : class MacroSecurityTP;
      45                 :            : 
      46                 :            : class ReadOnlyImage : public FixedImage
      47                 :            : {
      48                 :            : public:
      49                 :            :     ReadOnlyImage(Window* pParent, const ResId rResId);
      50                 :            :     ~ReadOnlyImage();
      51                 :            : 
      52                 :            :     virtual void        RequestHelp( const HelpEvent& rHEvt );
      53                 :            :     static const String& GetHelpTip();
      54                 :            : };
      55                 :            : 
      56                 :            : class MacroSecurity : public TabDialog
      57                 :            : {
      58                 :            : private:
      59                 :            :     friend class MacroSecurityLevelTP;
      60                 :            :     friend class MacroSecurityTrustedSourcesTP;
      61                 :            : 
      62                 :            :     TabControl          maTabCtrl;
      63                 :            :     OKButton            maOkBtn;
      64                 :            :     CancelButton        maCancelBtn;
      65                 :            :     HelpButton          maHelpBtn;
      66                 :            :     PushButton          maResetBtn;
      67                 :            : 
      68                 :            :     cssu::Reference< cssu::XComponentContext >  mxCtx;
      69                 :            :     cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >  mxSecurityEnvironment;
      70                 :            :     SvtSecurityOptions                                          maSecOptions;
      71                 :            : 
      72                 :            :     MacroSecurityTP*    mpLevelTP;
      73                 :            :     MacroSecurityTP*    mpTrustSrcTP;
      74                 :            : 
      75                 :            :     DECL_LINK(          OkBtnHdl, void* );
      76                 :            : public:
      77                 :            :     MacroSecurity( Window* pParent, const cssu::Reference< cssu::XComponentContext>& rxCtx, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment );
      78                 :            :     virtual             ~MacroSecurity();
      79                 :            : 
      80                 :            :     inline void     EnableReset( bool _bEnable = true );
      81                 :            : };
      82                 :            : 
      83                 :          0 : inline void MacroSecurity::EnableReset( bool _bEnable )
      84                 :            : {
      85                 :          0 :     maResetBtn.Enable ( _bEnable );
      86                 :          0 : }
      87                 :            : 
      88         [ #  # ]:          0 : class MacroSecurityTP : public TabPage
      89                 :            : {
      90                 :            : protected:
      91                 :            :     MacroSecurity*      mpDlg;
      92                 :            : public:
      93                 :            :                         MacroSecurityTP( Window* _pParent, const ResId& _rResId, MacroSecurity* _pDlg );
      94                 :            :     inline void         SetTabDlg( MacroSecurity* pTabDlg );
      95                 :            : 
      96                 :            :     virtual void        ClosePage( void ) = 0;
      97                 :            : };
      98                 :            : 
      99                 :            : inline void MacroSecurityTP::SetTabDlg( MacroSecurity* _pTabDlg )
     100                 :            : {
     101                 :            :     mpDlg = _pTabDlg;
     102                 :            : }
     103                 :            : 
     104                 :            : 
     105 [ #  # ][ #  # ]:          0 : class MacroSecurityLevelTP : public MacroSecurityTP
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     106                 :            : {
     107                 :            : private:
     108                 :            :     FixedLine           maSecLevelFL;
     109                 :            :     ReadOnlyImage       maSecReadonlyFI;
     110                 :            :     RadioButton         maVeryHighRB;
     111                 :            :     RadioButton         maHighRB;
     112                 :            :     RadioButton         maMediumRB;
     113                 :            :     RadioButton         maLowRB;
     114                 :            : 
     115                 :            :     sal_uInt16              mnCurLevel;
     116                 :            : 
     117                 :            : protected:
     118                 :            :     DECL_LINK(RadioButtonHdl, void *);
     119                 :            : 
     120                 :            : public:
     121                 :            :                         MacroSecurityLevelTP( Window* pParent, MacroSecurity* _pDlg );
     122                 :            : 
     123                 :            :     virtual void        ClosePage( void );
     124                 :            : };
     125                 :            : 
     126                 :            : 
     127 [ #  # ][ #  # ]:          0 : class MacroSecurityTrustedSourcesTP : public MacroSecurityTP
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     128                 :            : {
     129                 :            : private:
     130                 :            :     FixedLine           maTrustCertFL;
     131                 :            :     ReadOnlyImage       maTrustCertROFI;
     132                 :            :     SvxSimpleTableContainer m_aTrustCertLBContainer;
     133                 :            :     SvxSimpleTable      maTrustCertLB;
     134                 :            :     PushButton          maAddCertPB;
     135                 :            :     PushButton          maViewCertPB;
     136                 :            :     PushButton          maRemoveCertPB;
     137                 :            :     FixedLine           maTrustFileLocFL;
     138                 :            :     ReadOnlyImage       maTrustFileROFI;
     139                 :            :     FixedInfo           maTrustFileLocFI;
     140                 :            :     ListBox             maTrustFileLocLB;
     141                 :            :     PushButton          maAddLocPB;
     142                 :            :     PushButton          maRemoveLocPB;
     143                 :            : 
     144                 :            :     cssu::Sequence< SvtSecurityOptions::Certificate > maTrustedAuthors;
     145                 :            : 
     146                 :            :     sal_Bool            mbAuthorsReadonly;
     147                 :            :     sal_Bool            mbURLsReadonly;
     148                 :            : 
     149                 :            :     DECL_LINK(          ViewCertPBHdl, void* );
     150                 :            :     DECL_LINK(          RemoveCertPBHdl, void* );
     151                 :            :     DECL_LINK(          AddLocPBHdl, void* );
     152                 :            :     DECL_LINK(          RemoveLocPBHdl, void* );
     153                 :            :     DECL_LINK(          TrustCertLBSelectHdl, void* );
     154                 :            :     DECL_LINK(          TrustFileLocLBSelectHdl, void* );
     155                 :            : 
     156                 :            :     void                FillCertLB( void );
     157                 :            :     void                ImplCheckButtons();
     158                 :            : 
     159                 :            : public:
     160                 :            :                         MacroSecurityTrustedSourcesTP( Window* pParent, MacroSecurity* _pDlg );
     161                 :            : 
     162                 :            :     virtual void        ActivatePage();
     163                 :            :     virtual void        ClosePage( void );
     164                 :            : };
     165                 :            : 
     166                 :            : 
     167                 :            : #endif // _XMLSECURITY_MACROSECURITY_HXX
     168                 :            : 
     169                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10