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 : #ifndef INCLUDED_CUI_SOURCE_OPTIONS_OPTINET2_HXX
20 : #define INCLUDED_CUI_SOURCE_OPTIONS_OPTINET2_HXX
21 :
22 : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
23 : #include <vcl/field.hxx>
24 : #include <vcl/group.hxx>
25 : #include <vcl/layout.hxx>
26 : #include <vcl/lstbox.hxx>
27 : #include <svtools/stdctrl.hxx>
28 : #include <svtools/svtabbx.hxx>
29 : #include <sfx2/tabdlg.hxx>
30 : #include <unotools/configitem.hxx>
31 :
32 : #include <svtools/headbar.hxx>
33 :
34 : namespace svx {
35 : class SecurityOptionsDialog;
36 : }
37 :
38 :
39 : // class SvxNoSpaceEdit --------------------------------------------------
40 :
41 0 : class SvxNoSpaceEdit : public Edit
42 : {
43 : private:
44 : bool bOnlyNumeric;
45 : public:
46 0 : SvxNoSpaceEdit(vcl::Window* pParent, WinBits nStyle)
47 : : Edit(pParent, nStyle)
48 0 : , bOnlyNumeric(false)
49 0 : {}
50 : virtual void KeyInput(const KeyEvent& rKEvent) SAL_OVERRIDE;
51 : virtual void Modify() SAL_OVERRIDE;
52 : virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
53 : };
54 :
55 : // class SvxProxyTabPage -------------------------------------------------
56 :
57 : class SvxProxyTabPage : public SfxTabPage
58 : {
59 : private:
60 :
61 : VclPtr<ListBox> m_pProxyModeLB;
62 :
63 : VclPtr<FixedText> m_pHttpProxyFT;
64 : VclPtr<SvxNoSpaceEdit> m_pHttpProxyED;
65 : VclPtr<FixedText> m_pHttpPortFT;
66 : VclPtr<SvxNoSpaceEdit> m_pHttpPortED;
67 :
68 : VclPtr<FixedText> m_pHttpsProxyFT;
69 : VclPtr<SvxNoSpaceEdit> m_pHttpsProxyED;
70 : VclPtr<FixedText> m_pHttpsPortFT;
71 : VclPtr<SvxNoSpaceEdit> m_pHttpsPortED;
72 :
73 : VclPtr<FixedText> m_pFtpProxyFT;
74 : VclPtr<SvxNoSpaceEdit> m_pFtpProxyED;
75 : VclPtr<FixedText> m_pFtpPortFT;
76 : VclPtr<SvxNoSpaceEdit> m_pFtpPortED;
77 :
78 : VclPtr<FixedText> m_pNoProxyForFT;
79 : VclPtr<Edit> m_pNoProxyForED;
80 : VclPtr<FixedText> m_pNoProxyDescFT;
81 :
82 : const OUString aProxyModePN;
83 : const OUString aHttpProxyPN;
84 : const OUString aHttpPortPN;
85 : const OUString aHttpsProxyPN;
86 : const OUString aHttpsPortPN;
87 : const OUString aFtpProxyPN;
88 : const OUString aFtpPortPN;
89 : const OUString aNoProxyDescPN;
90 :
91 : css::uno::Reference< css::uno::XInterface > m_xConfigurationUpdateAccess;
92 :
93 : void EnableControls_Impl(bool bEnable);
94 : void ReadConfigData_Impl();
95 : void ReadConfigDefaults_Impl();
96 : void RestoreConfigDefaults_Impl();
97 :
98 : DECL_LINK( ProxyHdl_Impl, ListBox * );
99 : DECL_STATIC_LINK( SvxProxyTabPage, LoseFocusHdl_Impl, Edit * );
100 :
101 : public:
102 : SvxProxyTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
103 : virtual ~SvxProxyTabPage();
104 : virtual void dispose() SAL_OVERRIDE;
105 : static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
106 : virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
107 : virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
108 : };
109 :
110 : // #98647# class SvxScriptExecListBox ------------------------------------
111 0 : class SvxScriptExecListBox : public ListBox
112 : { // for adding tooltips to ListBox
113 : public:
114 : SvxScriptExecListBox( vcl::Window* pParent, WinBits nStyle = WB_BORDER )
115 : :ListBox(pParent, nStyle) {}
116 : SvxScriptExecListBox( vcl::Window* pParent, const ResId& rResId )
117 : :ListBox(pParent, rResId) {}
118 :
119 : protected:
120 : virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
121 : };
122 :
123 : // class SvxSecurityTabPage ---------------------------------------------
124 :
125 : class SvtSecurityOptions;
126 : class CertPathDialog;
127 : class SvxSecurityTabPage : public SfxTabPage
128 : {
129 : using TabPage::ActivatePage;
130 : using TabPage::DeactivatePage;
131 : friend class VclPtr<SvxSecurityTabPage>;
132 : private:
133 : VclPtr<PushButton> m_pSecurityOptionsPB;
134 :
135 : VclPtr<CheckBox> m_pSavePasswordsCB;
136 : VclPtr<PushButton> m_pShowConnectionsPB;
137 :
138 : VclPtr<CheckBox> m_pMasterPasswordCB;
139 : VclPtr<FixedText> m_pMasterPasswordFT;
140 : VclPtr<PushButton> m_pMasterPasswordPB;
141 :
142 : VclPtr<VclContainer> m_pMacroSecFrame;
143 : VclPtr<PushButton> m_pMacroSecPB;
144 :
145 : VclPtr<VclContainer> m_pCertFrame;
146 : VclPtr<PushButton> m_pCertPathPB;
147 :
148 : VclPtr<VclContainer> m_pTSAURLsFrame;
149 : VclPtr<PushButton> m_pTSAURLsPB;
150 :
151 : SvtSecurityOptions* mpSecOptions;
152 : VclPtr<svx::SecurityOptionsDialog> mpSecOptDlg;
153 :
154 : VclPtr<CertPathDialog> mpCertPathDlg;
155 :
156 : OUString m_sPasswordStoringDeactivateStr;
157 :
158 : DECL_LINK(SecurityOptionsHdl, void *);
159 : DECL_LINK(SavePasswordHdl, void* );
160 : DECL_STATIC_LINK(SvxSecurityTabPage, MasterPasswordHdl, void *);
161 : DECL_LINK(MasterPasswordCBHdl, void* );
162 : DECL_LINK(ShowPasswordsHdl, void *);
163 : DECL_STATIC_LINK(SvxSecurityTabPage, MacroSecPBHdl, void* );
164 : DECL_LINK(CertPathPBHdl, void* );
165 : DECL_LINK(TSAURLsPBHdl, void* );
166 :
167 : void InitControls();
168 :
169 : SvxSecurityTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
170 : virtual ~SvxSecurityTabPage();
171 : virtual void dispose() SAL_OVERRIDE;
172 :
173 : protected:
174 : virtual void ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
175 : virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
176 :
177 : public:
178 : static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
179 : virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
180 : virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
181 : };
182 :
183 : struct SvxEMailTabPage_Impl;
184 : class SvxEMailTabPage : public SfxTabPage
185 : {
186 : VclPtr<VclContainer> m_pMailContainer;
187 : VclPtr<FixedImage> m_pMailerURLFI;
188 : VclPtr<Edit> m_pMailerURLED;
189 : VclPtr<PushButton> m_pMailerURLPB;
190 : VclPtr<VclContainer> m_pSuppressHiddenContainer;
191 : VclPtr<FixedImage> m_pSuppressHiddenFI;
192 : VclPtr<CheckBox> m_pSuppressHidden;
193 :
194 : OUString m_sDefaultFilterName;
195 :
196 : SvxEMailTabPage_Impl* pImpl;
197 :
198 : DECL_LINK( FileDialogHdl_Impl, PushButton* ) ;
199 :
200 : public:
201 : SvxEMailTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
202 : virtual ~SvxEMailTabPage();
203 : virtual void dispose() SAL_OVERRIDE;
204 :
205 : static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
206 :
207 : virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
208 : virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
209 : };
210 :
211 : #endif // INCLUDED_CUI_SOURCE_OPTIONS_OPTINET2_HXX
212 :
213 :
214 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|