LCOV - code coverage report
Current view: top level - cui/source/options - securityoptions.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 27 0.0 %
Date: 2014-04-14 Functions: 0 4 0.0 %
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 <unotools/securityoptions.hxx>
      21             : #include <svtools/stdctrl.hxx>
      22             : #include <dialmgr.hxx>
      23             : #include <cuires.hrc>
      24             : #include "securityoptions.hxx"
      25             : 
      26             : namespace
      27             : {
      28           0 :     bool enableAndSet( const SvtSecurityOptions& rOptions,
      29             :                        SvtSecurityOptions::EOption eOption,
      30             :                        CheckBox& rCheckBox, FixedImage& rFixedImage )
      31             :     {
      32           0 :         bool bEnable = rOptions.IsOptionEnabled( eOption );
      33           0 :         rCheckBox.Enable( bEnable );
      34           0 :         rFixedImage.Show( !bEnable );
      35           0 :         rCheckBox.Check( rOptions.IsOptionSet( eOption ) );
      36           0 :         return bEnable;
      37             :     }
      38             : }
      39             : 
      40             : 
      41             : namespace svx
      42             : {
      43             : 
      44             : 
      45           0 : SecurityOptionsDialog::SecurityOptionsDialog(Window* pParent, SvtSecurityOptions* pOptions)
      46           0 :     : ModalDialog(pParent, "SecurityOptionsDialog", "cui/ui/securityoptionsdialog.ui")
      47             : {
      48             :     DBG_ASSERT( pOptions, "SecurityOptionsDialog::SecurityOptionsDialog(): invalid SvtSecurityOptions" );
      49           0 :     get(m_pSaveOrSendDocsCB, "savesenddocs");
      50             :     enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_SAVEORSEND, *m_pSaveOrSendDocsCB,
      51           0 :         *get<FixedImage>("locksavesenddocs"));
      52           0 :     get(m_pSignDocsCB, "whensigning");
      53             :     enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_SIGNING, *m_pSignDocsCB,
      54           0 :         *get<FixedImage>("lockwhensigning"));
      55           0 :     get(m_pPrintDocsCB, "whenprinting");
      56             :     enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_PRINT, *m_pPrintDocsCB,
      57           0 :         *get<FixedImage>("lockwhenprinting"));
      58           0 :     get(m_pCreatePdfCB, "whenpdf");
      59             :     enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_CREATEPDF, *m_pCreatePdfCB,
      60           0 :         *get<FixedImage>("lockwhenpdf"));
      61           0 :     get(m_pRemovePersInfoCB, "removepersonal");
      62             :     enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO, *m_pRemovePersInfoCB,
      63           0 :         *get<FixedImage>("lockremovepersonal"));
      64           0 :     get(m_pRecommPasswdCB, "password");
      65             :     enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD, *m_pRecommPasswdCB,
      66           0 :         *get<FixedImage>("lockpassword"));
      67           0 :     get(m_pCtrlHyperlinkCB, "ctrlclick");
      68             :     enableAndSet(*pOptions, SvtSecurityOptions::E_CTRLCLICK_HYPERLINK, *m_pCtrlHyperlinkCB,
      69           0 :         *get<FixedImage>("lockctrlclick"));
      70           0 :     get(m_pBlockUntrustedRefererLinksCB, "blockuntrusted");
      71             :     enableAndSet(*pOptions, SvtSecurityOptions::E_BLOCKUNTRUSTEDREFERERLINKS, *m_pBlockUntrustedRefererLinksCB,
      72           0 :         *get<FixedImage>("lockblockuntrusted"));
      73           0 : }
      74             : 
      75           0 : SecurityOptionsDialog::~SecurityOptionsDialog()
      76             : {
      77           0 : }
      78             : 
      79             : 
      80             : }   // namespace svx
      81             : 
      82             : 
      83             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10