LibreOffice Module cui (master)  1
securityoptions.cxx
Go to the documentation of this file.
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 <tools/debug.hxx>
22 #include "securityoptions.hxx"
23 
24 namespace
25 {
26  bool enableAndSet(SvtSecurityOptions::EOption eOption,
27  weld::CheckButton& rCheckBox, weld::Widget& rFixedImage)
28  {
29  bool bEnable = !SvtSecurityOptions::IsReadOnly(eOption);
30  rCheckBox.set_sensitive(bEnable);
31  rFixedImage.set_visible(!bEnable);
32  rCheckBox.set_active(SvtSecurityOptions::IsOptionSet(eOption));
33  return bEnable;
34  }
35 }
36 
37 namespace svx
38 {
39 
41  : GenericDialogController(pParent, "cui/ui/securityoptionsdialog.ui", "SecurityOptionsDialog")
42  , m_xSaveOrSendDocsCB(m_xBuilder->weld_check_button("savesenddocs"))
43  , m_xSaveOrSendDocsImg(m_xBuilder->weld_widget("locksavesenddocs"))
44  , m_xSignDocsCB(m_xBuilder->weld_check_button("whensigning"))
45  , m_xSignDocsImg(m_xBuilder->weld_widget("lockwhensigning"))
46  , m_xPrintDocsCB(m_xBuilder->weld_check_button("whenprinting"))
47  , m_xPrintDocsImg(m_xBuilder->weld_widget("lockwhenprinting"))
48  , m_xCreatePdfCB(m_xBuilder->weld_check_button("whenpdf"))
49  , m_xCreatePdfImg(m_xBuilder->weld_widget("lockwhenpdf"))
50  , m_xRemovePersInfoCB(m_xBuilder->weld_check_button("removepersonal"))
51  , m_xRemovePersInfoImg(m_xBuilder->weld_widget("lockremovepersonal"))
52  , m_xRecommPasswdCB(m_xBuilder->weld_check_button("password"))
53  , m_xRecommPasswdImg(m_xBuilder->weld_widget("lockpassword"))
54  , m_xCtrlHyperlinkCB(m_xBuilder->weld_check_button("ctrlclick"))
55  , m_xCtrlHyperlinkImg(m_xBuilder->weld_widget("lockctrlclick"))
56  , m_xBlockUntrustedRefererLinksCB(m_xBuilder->weld_check_button("blockuntrusted"))
57  , m_xBlockUntrustedRefererLinksImg(m_xBuilder->weld_widget("lockblockuntrusted"))
58 {
75 }
76 
77 }
78 
79 
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::CheckButton > m_xSaveOrSendDocsCB
bool IsOptionSet(EOption eOption)
std::unique_ptr< weld::Widget > m_xSaveOrSendDocsImg
std::unique_ptr< weld::Widget > m_xPrintDocsImg
std::unique_ptr< weld::CheckButton > m_xRemovePersInfoCB
std::unique_ptr< weld::CheckButton > m_xPrintDocsCB
bool IsReadOnly(EOption eOption)
SecurityOptionsDialog(weld::Window *pParent)
std::unique_ptr< weld::Widget > m_xSignDocsImg
std::unique_ptr< weld::CheckButton > m_xRecommPasswdCB
std::unique_ptr< weld::Widget > m_xRecommPasswdImg
std::unique_ptr< weld::CheckButton > m_xCtrlHyperlinkCB
virtual void set_active(bool active)=0
std::unique_ptr< weld::CheckButton > m_xCreatePdfCB
std::unique_ptr< weld::Widget > m_xBlockUntrustedRefererLinksImg
std::unique_ptr< weld::CheckButton > m_xSignDocsCB
std::unique_ptr< weld::Widget > m_xCtrlHyperlinkImg
std::unique_ptr< weld::Widget > m_xCreatePdfImg
virtual void set_visible(bool visible)
virtual void set_sensitive(bool sensitive)=0
std::unique_ptr< weld::Widget > m_xRemovePersInfoImg
std::unique_ptr< weld::CheckButton > m_xBlockUntrustedRefererLinksCB