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