1*2ee96f1cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*2ee96f1cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*2ee96f1cSAndrew Rist * or more contributor license agreements. See the NOTICE file
5*2ee96f1cSAndrew Rist * distributed with this work for additional information
6*2ee96f1cSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*2ee96f1cSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*2ee96f1cSAndrew Rist * "License"); you may not use this file except in compliance
9*2ee96f1cSAndrew Rist * with the License. You may obtain a copy of the License at
10*2ee96f1cSAndrew Rist *
11*2ee96f1cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*2ee96f1cSAndrew Rist *
13*2ee96f1cSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*2ee96f1cSAndrew Rist * software distributed under the License is distributed on an
15*2ee96f1cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2ee96f1cSAndrew Rist * KIND, either express or implied. See the License for the
17*2ee96f1cSAndrew Rist * specific language governing permissions and limitations
18*2ee96f1cSAndrew Rist * under the License.
19*2ee96f1cSAndrew Rist *
20*2ee96f1cSAndrew Rist *************************************************************/
21*2ee96f1cSAndrew Rist
22*2ee96f1cSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_cui.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir // include ---------------------------------------------------------------
28cdf0e10cSrcweir
29cdf0e10cSrcweir #include <unotools/securityoptions.hxx>
30cdf0e10cSrcweir #include <svtools/stdctrl.hxx>
31cdf0e10cSrcweir #include <dialmgr.hxx>
32cdf0e10cSrcweir #include <cuires.hrc>
33cdf0e10cSrcweir #include "securityoptions.hxx"
34cdf0e10cSrcweir #include "securityoptions.hrc"
35cdf0e10cSrcweir
36cdf0e10cSrcweir namespace
37cdf0e10cSrcweir {
enableAndSet(const SvtSecurityOptions & rOptions,SvtSecurityOptions::EOption eOption,CheckBox & rCheckBox,FixedImage & rFixedImage)38cdf0e10cSrcweir bool enableAndSet( const SvtSecurityOptions& rOptions,
39cdf0e10cSrcweir SvtSecurityOptions::EOption eOption,
40cdf0e10cSrcweir CheckBox& rCheckBox, FixedImage& rFixedImage )
41cdf0e10cSrcweir {
42cdf0e10cSrcweir bool bEnable = rOptions.IsOptionEnabled( eOption );
43cdf0e10cSrcweir rCheckBox.Enable( bEnable );
44cdf0e10cSrcweir rFixedImage.Show( !bEnable );
45cdf0e10cSrcweir rCheckBox.Check( rOptions.IsOptionSet( eOption ) );
46cdf0e10cSrcweir return bEnable;
47cdf0e10cSrcweir }
48cdf0e10cSrcweir }
49cdf0e10cSrcweir
50cdf0e10cSrcweir //........................................................................
51cdf0e10cSrcweir namespace svx
52cdf0e10cSrcweir {
53cdf0e10cSrcweir //........................................................................
54cdf0e10cSrcweir
SecurityOptionsDialog(Window * pParent,SvtSecurityOptions * pOptions)55cdf0e10cSrcweir SecurityOptionsDialog::SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions ) :
56cdf0e10cSrcweir ModalDialog( pParent, CUI_RES( RID_SVXDLG_SECURITY_OPTIONS ) )
57cdf0e10cSrcweir ,m_aWarningsFL ( this, CUI_RES( FL_WARNINGS ) )
58cdf0e10cSrcweir ,m_aWarningsFI ( this, CUI_RES( FI_WARNINGS ) )
59cdf0e10cSrcweir ,m_aSaveOrSendDocsFI( this, CUI_RES( FI_SAVESENDDOCS ) )
60cdf0e10cSrcweir ,m_aSaveOrSendDocsCB( this, CUI_RES( CB_SAVESENDDOCS ) )
61cdf0e10cSrcweir ,m_aSignDocsFI ( this, CUI_RES( FI_SIGNDOCS ) )
62cdf0e10cSrcweir ,m_aSignDocsCB ( this, CUI_RES( CB_SIGNDOCS ) )
63cdf0e10cSrcweir ,m_aPrintDocsFI ( this, CUI_RES( FI_PRINTDOCS ) )
64cdf0e10cSrcweir ,m_aPrintDocsCB ( this, CUI_RES( CB_PRINTDOCS ) )
65cdf0e10cSrcweir ,m_aCreatePdfFI ( this, CUI_RES( FI_CREATEPDF ) )
66cdf0e10cSrcweir ,m_aCreatePdfCB ( this, CUI_RES( CB_CREATEPDF ) )
67cdf0e10cSrcweir ,m_aOptionsFL ( this, CUI_RES( FL_OPTIONS ) )
68cdf0e10cSrcweir ,m_aRemovePersInfoFI( this, CUI_RES( FI_REMOVEINFO ) )
69cdf0e10cSrcweir ,m_aRemovePersInfoCB( this, CUI_RES( CB_REMOVEINFO ) )
70cdf0e10cSrcweir ,m_aRecommPasswdFI ( this, CUI_RES( FI_RECOMMENDPWD ) )
71cdf0e10cSrcweir ,m_aRecommPasswdCB ( this, CUI_RES( CB_RECOMMENDPWD ) )
72cdf0e10cSrcweir ,m_aCtrlHyperlinkFI ( this, CUI_RES( FI_CTRLHYPERLINK ) )
73cdf0e10cSrcweir ,m_aCtrlHyperlinkCB ( this, CUI_RES( CB_CTRLHYPERLINK ) )
74cdf0e10cSrcweir
75cdf0e10cSrcweir ,m_aButtonsFL ( this, CUI_RES( FL_BUTTONS ) )
76cdf0e10cSrcweir ,m_aOKBtn ( this, CUI_RES( PB_OK ) )
77cdf0e10cSrcweir ,m_aCancelBtn ( this, CUI_RES( PB_CANCEL ) )
78cdf0e10cSrcweir ,m_aHelpBtn ( this, CUI_RES( PB_HELP ) )
79cdf0e10cSrcweir
80cdf0e10cSrcweir {
81cdf0e10cSrcweir FreeResource();
82cdf0e10cSrcweir
83cdf0e10cSrcweir DBG_ASSERT( pOptions, "SecurityOptionsDialog::SecurityOptionsDialog(): invalid SvtSecurityOptions" );
84cdf0e10cSrcweir enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_SAVEORSEND, m_aSaveOrSendDocsCB, m_aSaveOrSendDocsFI );
85cdf0e10cSrcweir enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_SIGNING, m_aSignDocsCB, m_aSignDocsFI );
86cdf0e10cSrcweir enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_PRINT, m_aPrintDocsCB, m_aPrintDocsFI );
87cdf0e10cSrcweir enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_CREATEPDF, m_aCreatePdfCB, m_aCreatePdfFI );
88cdf0e10cSrcweir enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO, m_aRemovePersInfoCB, m_aRemovePersInfoFI );
89cdf0e10cSrcweir enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD, m_aRecommPasswdCB, m_aRecommPasswdFI );
90cdf0e10cSrcweir enableAndSet( *pOptions, SvtSecurityOptions::E_CTRLCLICK_HYPERLINK, m_aCtrlHyperlinkCB, m_aCtrlHyperlinkFI );
91cdf0e10cSrcweir }
92cdf0e10cSrcweir
~SecurityOptionsDialog()93cdf0e10cSrcweir SecurityOptionsDialog::~SecurityOptionsDialog()
94cdf0e10cSrcweir {
95cdf0e10cSrcweir }
96cdf0e10cSrcweir
97cdf0e10cSrcweir //........................................................................
98cdf0e10cSrcweir } // namespace svx
99cdf0e10cSrcweir //........................................................................
100cdf0e10cSrcweir
101