LibreOffice Module cui (master)  1
optinet2.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 <sal/config.h>
21 
22 #include <string_view>
23 
24 #include <officecfg/Inet.hxx>
25 #include <officecfg/Office/Common.hxx>
26 #include <officecfg/Office/Security.hxx>
28 #include <vcl/weld.hxx>
29 #include <sfx2/filedlghelper.hxx>
30 #include <vcl/svapp.hxx>
32 #include <com/sun/star/uno/Sequence.hxx>
33 #include <tools/diagnose_ex.h>
34 
35 #include <dialmgr.hxx>
36 #include "optinet2.hxx"
37 #include <strings.hrc>
38 
39 #include <com/sun/star/security/DocumentDigitalSignatures.hpp>
40 #include <com/sun/star/task/InteractionHandler.hpp>
41 
42 #include <sal/types.h>
43 #include <sal/log.hxx>
44 #include <rtl/ustring.hxx>
45 #include <osl/file.hxx>
46 #include <com/sun/star/configuration/theDefaultProvider.hpp>
47 #include <com/sun/star/container/XNameAccess.hpp>
48 #include <com/sun/star/beans/NamedValue.hpp>
49 #include <com/sun/star/beans/XPropertySet.hpp>
50 #include <com/sun/star/beans/XPropertyState.hpp>
51 #include <com/sun/star/util/XChangesBatch.hpp>
53 #include <comphelper/string.hxx>
54 
55 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
56 #include <com/sun/star/task/PasswordContainer.hpp>
57 #include <com/sun/star/task/XPasswordContainer2.hpp>
58 #include "securityoptions.hxx"
59 #include "webconninfo.hxx"
60 #include "certpath.hxx"
61 #include "tsaurls.hxx"
62 
64 
65 using namespace ::com::sun::star;
66 using namespace ::com::sun::star::uno;
67 using namespace ::sfx2;
68 
69 namespace {
70 
71 bool isValidPort(OUString const & value) {
73  return false;
74  }
75  auto const n = value.toUInt64();
76  if (n > 65535) {
77  return false;
78  }
79  if (n != 0) {
80  return true;
81  }
82  // Overflow in OUString::toUInt64 returns 0, so need to check value contains only zeroes:
83  return std::u16string_view(value).find_first_not_of(u'0') == std::u16string_view::npos;
84 }
85 
86 }
87 
88 IMPL_LINK(SvxProxyTabPage, PortChangedHdl, weld::Entry&, rEdit, void)
89 {
90  if (!isValidPort(rEdit.get_text()))
91  {
92  std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(GetFrameWeld(),
93  VclMessageType::Warning, VclButtonsType::Ok,
94  CuiResId( RID_SVXSTR_OPT_PROXYPORTS)));
95  xErrorBox->run();
96  }
97 }
98 
99 static const char g_aProxyModePN[] = "ooInetProxyType";
100 static const char g_aHttpProxyPN[] = "ooInetHTTPProxyName";
101 static const char g_aHttpPortPN[] = "ooInetHTTPProxyPort";
102 static const char g_aHttpsProxyPN[] = "ooInetHTTPSProxyName";
103 static const char g_aHttpsPortPN[] = "ooInetHTTPSProxyPort";
104 static const char g_aFtpProxyPN[] = "ooInetFTPProxyName";
105 static const char g_aFtpPortPN[] = "ooInetFTPProxyPort";
106 static const char g_aNoProxyDescPN[] = "ooInetNoProxy";
107 
108 IMPL_STATIC_LINK(SvxProxyTabPage, NumberOnlyTextFilterHdl, OUString&, rTest, bool)
109 {
110  OUStringBuffer sAllowed;
111  for (sal_Int32 i = 0, nLen = rTest.getLength(); i < nLen; ++i)
112  {
113  if (rTest[i] >= '0' && rTest[i] <= '9')
114  sAllowed.append(rTest[i]);
115  }
116  rTest = sAllowed.makeStringAndClear();
117  return true;
118 }
119 
120 IMPL_STATIC_LINK(SvxProxyTabPage, NoSpaceTextFilterHdl, OUString&, rTest, bool)
121 {
122  rTest = rTest.replaceAll(" ", "");
123  return true;
124 }
125 
126 /********************************************************************/
127 /* */
128 /* SvxProxyTabPage */
129 /* */
130 /********************************************************************/
132  : SfxTabPage(pPage, pController, "cui/ui/optproxypage.ui", "OptProxyPage", &rSet)
133  , m_xProxyModeLB(m_xBuilder->weld_combo_box("proxymode"))
134  , m_xHttpProxyFT(m_xBuilder->weld_label("httpft"))
135  , m_xHttpProxyED(m_xBuilder->weld_entry("http"))
136  , m_xHttpPortFT(m_xBuilder->weld_label("httpportft"))
137  , m_xHttpPortED(m_xBuilder->weld_entry("httpport"))
138  , m_xHttpsProxyFT(m_xBuilder->weld_label("httpsft"))
139  , m_xHttpsProxyED(m_xBuilder->weld_entry("https"))
140  , m_xHttpsPortFT(m_xBuilder->weld_label("httpsportft"))
141  , m_xHttpsPortED(m_xBuilder->weld_entry("httpsport"))
142  , m_xFtpProxyFT(m_xBuilder->weld_label("ftpft"))
143  , m_xFtpProxyED(m_xBuilder->weld_entry("ftp"))
144  , m_xFtpPortFT(m_xBuilder->weld_label("ftpportft"))
145  , m_xFtpPortED(m_xBuilder->weld_entry("ftpport"))
146  , m_xNoProxyForFT(m_xBuilder->weld_label("noproxyft"))
147  , m_xNoProxyForED(m_xBuilder->weld_entry("noproxy"))
148  , m_xNoProxyDescFT(m_xBuilder->weld_label("noproxydesc"))
149 {
150  m_xHttpProxyED->connect_insert_text(LINK(this, SvxProxyTabPage, NoSpaceTextFilterHdl));
151  m_xHttpPortED->connect_insert_text(LINK(this, SvxProxyTabPage, NumberOnlyTextFilterHdl));
152  m_xHttpPortED->connect_changed(LINK(this, SvxProxyTabPage, PortChangedHdl));
153  m_xHttpsProxyED->connect_insert_text(LINK(this, SvxProxyTabPage, NoSpaceTextFilterHdl));
154  m_xHttpsPortED->connect_insert_text(LINK(this, SvxProxyTabPage, NumberOnlyTextFilterHdl));
155  m_xHttpsPortED->connect_changed(LINK(this, SvxProxyTabPage, PortChangedHdl));
156  m_xFtpProxyED->connect_insert_text(LINK(this, SvxProxyTabPage, NoSpaceTextFilterHdl));
157  m_xFtpPortED->connect_insert_text(LINK(this, SvxProxyTabPage, NumberOnlyTextFilterHdl));
158  m_xFtpPortED->connect_changed(LINK(this, SvxProxyTabPage, PortChangedHdl));
159 
160  Link<weld::Widget&,void> aLink = LINK( this, SvxProxyTabPage, LoseFocusHdl_Impl );
161  m_xHttpPortED->connect_focus_out( aLink );
162  m_xHttpsPortED->connect_focus_out( aLink );
163  m_xFtpPortED->connect_focus_out( aLink );
164 
165  m_xProxyModeLB->connect_changed(LINK( this, SvxProxyTabPage, ProxyHdl_Impl ));
166 
167  Reference< css::lang::XMultiServiceFactory >
168  xConfigurationProvider(
169  configuration::theDefaultProvider::get(
171 
172  beans::NamedValue aProperty;
173  aProperty.Name = "nodepath";
174  aProperty.Value <<= OUString( "org.openoffice.Inet/Settings" );
175 
176  Sequence< Any > aArgumentList( 1 );
177  aArgumentList[0] <<= aProperty;
178 
179  m_xConfigurationUpdateAccess = xConfigurationProvider->createInstanceWithArguments(
180  "com.sun.star.configuration.ConfigurationUpdateAccess",
181  aArgumentList );
182 }
183 
185 {
186 }
187 
188 std::unique_ptr<SfxTabPage> SvxProxyTabPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet )
189 {
190  return std::make_unique<SvxProxyTabPage>(pPage, pController, *rAttrSet);
191 }
192 
194 {
195  try {
197 
198  sal_Int32 nIntValue = 0;
199  OUString aStringValue;
200 
201  if( xNameAccess->getByName(g_aProxyModePN) >>= nIntValue )
202  {
203  m_xProxyModeLB->set_active(nIntValue);
204  }
205 
206  if( xNameAccess->getByName(g_aHttpProxyPN) >>= aStringValue )
207  {
208  m_xHttpProxyED->set_text( aStringValue );
209  }
210 
211  if( xNameAccess->getByName(g_aHttpPortPN) >>= nIntValue )
212  {
213  m_xHttpPortED->set_text( OUString::number( nIntValue ));
214  }
215 
216  if( xNameAccess->getByName(g_aHttpsProxyPN) >>= aStringValue )
217  {
218  m_xHttpsProxyED->set_text( aStringValue );
219  }
220 
221  if( xNameAccess->getByName(g_aHttpsPortPN) >>= nIntValue )
222  {
223  m_xHttpsPortED->set_text( OUString::number( nIntValue ));
224  }
225 
226  if( xNameAccess->getByName(g_aFtpProxyPN) >>= aStringValue )
227  {
228  m_xFtpProxyED->set_text( aStringValue );
229  }
230 
231  if( xNameAccess->getByName(g_aFtpPortPN) >>= nIntValue )
232  {
233  m_xFtpPortED->set_text( OUString::number( nIntValue ));
234  }
235 
236  if( xNameAccess->getByName(g_aNoProxyDescPN) >>= aStringValue )
237  {
238  m_xNoProxyForED->set_text( aStringValue );
239  }
240  }
241  catch (const container::NoSuchElementException&) {
242  SAL_WARN("cui.options", "SvxProxyTabPage::ReadConfigData_Impl: NoSuchElementException caught" );
243  }
244  catch (const css::lang::WrappedTargetException &) {
245  SAL_WARN("cui.options", "SvxProxyTabPage::ReadConfigData_Impl: WrappedTargetException caught" );
246  }
247  catch (const RuntimeException &) {
248  SAL_WARN("cui.options", "SvxProxyTabPage::ReadConfigData_Impl: RuntimeException caught" );
249  }
250 }
251 
253 {
254  try
255  {
256  Reference< beans::XPropertyState > xPropertyState(m_xConfigurationUpdateAccess, UNO_QUERY_THROW);
257 
258  sal_Int32 nIntValue = 0;
259  OUString aStringValue;
260 
261  if( xPropertyState->getPropertyDefault(g_aHttpProxyPN) >>= aStringValue )
262  {
263  m_xHttpProxyED->set_text( aStringValue );
264  }
265 
266  if( xPropertyState->getPropertyDefault(g_aHttpPortPN) >>= nIntValue )
267  {
268  m_xHttpPortED->set_text( OUString::number( nIntValue ));
269  }
270 
271  if( xPropertyState->getPropertyDefault(g_aHttpsProxyPN) >>= aStringValue )
272  {
273  m_xHttpsProxyED->set_text( aStringValue );
274  }
275 
276  if( xPropertyState->getPropertyDefault(g_aHttpsPortPN) >>= nIntValue )
277  {
278  m_xHttpsPortED->set_text( OUString::number( nIntValue ));
279  }
280 
281  if( xPropertyState->getPropertyDefault(g_aFtpProxyPN) >>= aStringValue )
282  {
283  m_xFtpProxyED->set_text( aStringValue );
284  }
285 
286  if( xPropertyState->getPropertyDefault(g_aFtpPortPN) >>= nIntValue )
287  {
288  m_xFtpPortED->set_text( OUString::number( nIntValue ));
289  }
290 
291  if( xPropertyState->getPropertyDefault(g_aNoProxyDescPN) >>= aStringValue )
292  {
293  m_xNoProxyForED->set_text( aStringValue );
294  }
295  }
296  catch (const beans::UnknownPropertyException &)
297  {
298  SAL_WARN("cui.options", "SvxProxyTabPage::ReadConfigDefaults_Impl: UnknownPropertyException caught" );
299  }
300  catch (const css::lang::WrappedTargetException &) {
301  SAL_WARN("cui.options", "SvxProxyTabPage::ReadConfigDefaults_Impl: WrappedTargetException caught" );
302  }
303  catch (const RuntimeException &)
304  {
305  SAL_WARN("cui.options", "SvxProxyTabPage::ReadConfigDefaults_Impl: RuntimeException caught" );
306  }
307 }
308 
310 {
311  try
312  {
313  Reference< beans::XPropertyState > xPropertyState(m_xConfigurationUpdateAccess, UNO_QUERY_THROW);
314 
315  xPropertyState->setPropertyToDefault(g_aProxyModePN);
316  xPropertyState->setPropertyToDefault(g_aHttpProxyPN);
317  xPropertyState->setPropertyToDefault(g_aHttpPortPN);
318  xPropertyState->setPropertyToDefault(g_aHttpsProxyPN);
319  xPropertyState->setPropertyToDefault(g_aHttpsPortPN);
320  xPropertyState->setPropertyToDefault(g_aFtpProxyPN);
321  xPropertyState->setPropertyToDefault(g_aFtpPortPN);
322  xPropertyState->setPropertyToDefault(g_aNoProxyDescPN);
323 
324  Reference< util::XChangesBatch > xChangesBatch(m_xConfigurationUpdateAccess, UNO_QUERY_THROW);
325  xChangesBatch->commitChanges();
326  }
327  catch (const beans::UnknownPropertyException &)
328  {
329  SAL_WARN("cui.options", "SvxProxyTabPage::RestoreConfigDefaults_Impl: UnknownPropertyException caught" );
330  }
331  catch (const css::lang::WrappedTargetException &) {
332  SAL_WARN("cui.options", "SvxProxyTabPage::RestoreConfigDefaults_Impl: WrappedTargetException caught" );
333  }
334  catch (const RuntimeException &)
335  {
336  SAL_WARN("cui.options", "SvxProxyTabPage::RestoreConfigDefaults_Impl: RuntimeException caught" );
337  }
338 }
339 
341 {
343 
344  m_xProxyModeLB->save_value();
345  m_xHttpProxyED->save_value();
346  m_xHttpPortED->save_value();
347  m_xHttpsProxyED->save_value();
348  m_xHttpsPortED->save_value();
349  m_xFtpProxyED->save_value();
350  m_xFtpPortED->save_value();
351  m_xNoProxyForED->save_value();
352 
354 }
355 
357 {
358  bool bModified = false;
359 
360  try {
361  Reference< beans::XPropertySet > xPropertySet(m_xConfigurationUpdateAccess, UNO_QUERY_THROW );
362 
363  sal_Int32 nSelPos = m_xProxyModeLB->get_active();
364  if(m_xProxyModeLB->get_value_changed_from_saved())
365  {
366  if( nSelPos == 1 )
367  {
369  return true;
370  }
371 
372  xPropertySet->setPropertyValue(g_aProxyModePN, Any(nSelPos));
373  bModified = true;
374  }
375 
376  if(m_xHttpProxyED->get_value_changed_from_saved())
377  {
378  xPropertySet->setPropertyValue( g_aHttpProxyPN, Any(m_xHttpProxyED->get_text()));
379  bModified = true;
380  }
381 
382  if ( m_xHttpPortED->get_value_changed_from_saved())
383  {
384  xPropertySet->setPropertyValue( g_aHttpPortPN, Any(m_xHttpPortED->get_text().toInt32()));
385  bModified = true;
386  }
387 
388  if( m_xHttpsProxyED->get_value_changed_from_saved() )
389  {
390  xPropertySet->setPropertyValue( g_aHttpsProxyPN, Any(m_xHttpsProxyED->get_text()) );
391  bModified = true;
392  }
393 
394  if ( m_xHttpsPortED->get_value_changed_from_saved() )
395  {
396  xPropertySet->setPropertyValue( g_aHttpsPortPN, Any(m_xHttpsPortED->get_text().toInt32()) );
397  bModified = true;
398  }
399 
400  if( m_xFtpProxyED->get_value_changed_from_saved())
401  {
402  xPropertySet->setPropertyValue( g_aFtpProxyPN, Any(m_xFtpProxyED->get_text()) );
403  bModified = true;
404  }
405 
406  if ( m_xFtpPortED->get_value_changed_from_saved() )
407  {
408  xPropertySet->setPropertyValue( g_aFtpPortPN, Any(m_xFtpPortED->get_text().toInt32()));
409  bModified = true;
410  }
411 
412  if ( m_xNoProxyForED->get_value_changed_from_saved() )
413  {
414  xPropertySet->setPropertyValue( g_aNoProxyDescPN, Any( m_xNoProxyForED->get_text()));
415  bModified = true;
416  }
417 
418  Reference< util::XChangesBatch > xChangesBatch(m_xConfigurationUpdateAccess, UNO_QUERY_THROW);
419  xChangesBatch->commitChanges();
420  }
421  catch (const css::lang::IllegalArgumentException &) {
422  SAL_WARN("cui.options", "SvxProxyTabPage::FillItemSet: IllegalArgumentException caught" );
423  }
424  catch (const beans::UnknownPropertyException &) {
425  SAL_WARN("cui.options", "SvxProxyTabPage::FillItemSet: UnknownPropertyException caught" );
426  }
427  catch (const beans::PropertyVetoException &) {
428  SAL_WARN("cui.options", "SvxProxyTabPage::FillItemSet: PropertyVetoException caught" );
429  }
430  catch (const css::lang::WrappedTargetException &) {
431  SAL_WARN("cui.options", "SvxProxyTabPage::FillItemSet: WrappedTargetException caught" );
432  }
433  catch (const RuntimeException &) {
434  SAL_WARN("cui.options", "SvxProxyTabPage::FillItemSet: RuntimeException caught" );
435  }
436 
437  return bModified;
438 }
439 
441 {
442  m_xProxyModeLB->set_sensitive(!officecfg::Inet::Settings::ooInetNoProxy::isReadOnly());
443 
444  const bool bManualConfig = m_xProxyModeLB->get_active() == 2;
445 
446  const bool bHTTPProxyNameEnabled = bManualConfig && !officecfg::Inet::Settings::ooInetHTTPProxyName::isReadOnly();
447  const bool bHTTPProxyPortEnabled = bManualConfig && !officecfg::Inet::Settings::ooInetHTTPProxyPort::isReadOnly();
448  m_xHttpProxyFT->set_sensitive(bHTTPProxyNameEnabled);
449  m_xHttpProxyED->set_sensitive(bHTTPProxyNameEnabled);
450  m_xHttpPortFT->set_sensitive(bHTTPProxyPortEnabled);
451  m_xHttpPortED->set_sensitive(bHTTPProxyPortEnabled);
452 
453  const bool bHTTPSProxyNameEnabled = bManualConfig && !officecfg::Inet::Settings::ooInetHTTPSProxyName::isReadOnly();
454  const bool bHTTPSProxyPortEnabled = bManualConfig && !officecfg::Inet::Settings::ooInetHTTPSProxyPort::isReadOnly();
455  m_xHttpsProxyFT->set_sensitive(bHTTPSProxyNameEnabled);
456  m_xHttpsProxyED->set_sensitive(bHTTPSProxyNameEnabled);
457  m_xHttpsPortFT->set_sensitive(bHTTPSProxyPortEnabled);
458  m_xHttpsPortED->set_sensitive(bHTTPSProxyPortEnabled);
459 
460  const bool bFTPProxyNameEnabled = bManualConfig && !officecfg::Inet::Settings::ooInetFTPProxyName::isReadOnly();
461  const bool bFTPProxyPortEnabled = bManualConfig && !officecfg::Inet::Settings::ooInetFTPProxyPort::isReadOnly();
462  m_xFtpProxyFT->set_sensitive(bFTPProxyNameEnabled);
463  m_xFtpProxyED->set_sensitive(bFTPProxyNameEnabled);
464  m_xFtpPortFT->set_sensitive(bFTPProxyPortEnabled);
465  m_xFtpPortED->set_sensitive(bFTPProxyPortEnabled);
466 
467  const bool bInetNoProxyEnabled = bManualConfig && !officecfg::Inet::Settings::ooInetNoProxy::isReadOnly();
468  m_xNoProxyForFT->set_sensitive(bInetNoProxyEnabled);
469  m_xNoProxyForED->set_sensitive(bInetNoProxyEnabled);
470  m_xNoProxyDescFT->set_sensitive(bInetNoProxyEnabled);
471 }
472 
473 IMPL_LINK(SvxProxyTabPage, ProxyHdl_Impl, weld::ComboBox&, rBox, void)
474 {
475  sal_Int32 nPos = rBox.get_active();
476 
477  // Restore original system values
478  if( nPos == 1 )
479  {
480  ReadConfigDefaults_Impl();
481  }
482 
483  EnableControls_Impl();
484 }
485 
486 IMPL_STATIC_LINK(SvxProxyTabPage, LoseFocusHdl_Impl, weld::Widget&, rControl, void)
487 {
488  weld::Entry* pEdit = dynamic_cast<weld::Entry*>(&rControl);
489  if (pEdit && !isValidPort(pEdit->get_text()))
490  pEdit->set_text(OUString('0'));
491 }
492 
493 /********************************************************************/
494 /* */
495 /* SvxSecurityTabPage */
496 /* */
497 /********************************************************************/
499  : SfxTabPage(pPage, pController, "cui/ui/optsecuritypage.ui", "OptSecurityPage", &rSet)
500  , mpSecOptions(new SvtSecurityOptions)
501  , m_xSecurityOptionsPB(m_xBuilder->weld_button("options"))
502  , m_xSavePasswordsCB(m_xBuilder->weld_check_button("savepassword"))
503  , m_xShowConnectionsPB(m_xBuilder->weld_button("connections"))
504  , m_xMasterPasswordCB(m_xBuilder->weld_check_button("usemasterpassword"))
505  , m_xMasterPasswordFT(m_xBuilder->weld_label("masterpasswordtext"))
506  , m_xMasterPasswordPB(m_xBuilder->weld_button("masterpassword"))
507  , m_xMacroSecFrame(m_xBuilder->weld_container("macrosecurity"))
508  , m_xMacroSecPB(m_xBuilder->weld_button("macro"))
509  , m_xCertFrame(m_xBuilder->weld_container("certificatepath"))
510  , m_xCertPathPB(m_xBuilder->weld_button("cert"))
511  , m_xTSAURLsFrame(m_xBuilder->weld_container("tsaurls"))
512  , m_xTSAURLsPB(m_xBuilder->weld_button("tsas"))
513  , m_xNoPasswordSaveFT(m_xBuilder->weld_label("nopasswordsave"))
514 {
515  //fdo#65595, we need height-for-width support here, but for now we can
516  //bodge it
517  Size aPrefSize(m_xSavePasswordsCB->get_preferred_size());
518  int nMaxWidth = m_xSavePasswordsCB->get_approximate_digit_width() * 40;
519  if (aPrefSize.Width() > nMaxWidth)
520  {
521  m_xSavePasswordsCB->set_label_line_wrap(true);
522  m_xSavePasswordsCB->set_size_request(nMaxWidth, -1);
523  }
524 
526 
527  InitControls();
528 
529  m_xSecurityOptionsPB->connect_clicked( LINK( this, SvxSecurityTabPage, SecurityOptionsHdl ) );
530  m_xSavePasswordsCB->connect_clicked( LINK( this, SvxSecurityTabPage, SavePasswordHdl ) );
531  m_xMasterPasswordPB->connect_clicked( LINK( this, SvxSecurityTabPage, MasterPasswordHdl ) );
532  m_xMasterPasswordCB->connect_clicked( LINK( this, SvxSecurityTabPage, MasterPasswordCBHdl ) );
533  m_xShowConnectionsPB->connect_clicked( LINK( this, SvxSecurityTabPage, ShowPasswordsHdl ) );
534  m_xMacroSecPB->connect_clicked( LINK( this, SvxSecurityTabPage, MacroSecPBHdl ) );
535  m_xCertPathPB->connect_clicked( LINK( this, SvxSecurityTabPage, CertPathPBHdl ) );
536  m_xTSAURLsPB->connect_clicked( LINK( this, SvxSecurityTabPage, TSAURLsPBHdl ) );
537 
538  ActivatePage( rSet );
539 }
540 
542 {
543 }
544 
545 IMPL_LINK_NOARG(SvxSecurityTabPage, SecurityOptionsHdl, weld::Button&, void)
546 {
547  if (!m_xSecOptDlg)
548  m_xSecOptDlg.reset(new svx::SecurityOptionsDialog(GetFrameWeld(), mpSecOptions.get()));
549  m_xSecOptDlg->run();
550 }
551 
553 {
554  try
555  {
556  Reference< task::XPasswordContainer2 > xMasterPasswd(
557  task::PasswordContainer::create(comphelper::getProcessComponentContext()));
558 
559  if ( m_xSavePasswordsCB->get_active() )
560  {
561  bool bOldValue = xMasterPasswd->allowPersistentStoring( true );
562  xMasterPasswd->removeMasterPassword();
563 
564  uno::Reference<task::XInteractionHandler> xTmpHandler(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
565  GetDialogController()->getDialog()->GetXWindow()));
566 
567  if ( xMasterPasswd->changeMasterPassword(xTmpHandler) )
568  {
569  m_xMasterPasswordPB->set_sensitive(true);
570  m_xMasterPasswordCB->set_active(true);
571  m_xMasterPasswordCB->set_sensitive(true);
572  m_xMasterPasswordFT->set_sensitive(true);
573  m_xShowConnectionsPB->set_sensitive(true);
574  }
575  else
576  {
577  xMasterPasswd->allowPersistentStoring( bOldValue );
578  m_xSavePasswordsCB->set_active( false );
579  }
580  }
581  else
582  {
583  std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(),
584  VclMessageType::Question, VclButtonsType::YesNo,
585  m_sPasswordStoringDeactivateStr));
586  xQueryBox->set_default_response(RET_NO);
587 
588  sal_uInt16 nRet = xQueryBox->run();
589 
590  if( RET_YES == nRet )
591  {
592  xMasterPasswd->allowPersistentStoring( false );
593  m_xMasterPasswordCB->set_active(true);
594  m_xMasterPasswordPB->set_sensitive( false );
595  m_xMasterPasswordCB->set_sensitive( false );
596  m_xMasterPasswordFT->set_sensitive( false );
597  m_xShowConnectionsPB->set_sensitive( false );
598  }
599  else
600  {
601  m_xSavePasswordsCB->set_active(true);
602  m_xMasterPasswordPB->set_sensitive(true);
603  m_xShowConnectionsPB->set_sensitive(true);
604  }
605  }
606  }
607  catch (const Exception&)
608  {
609  m_xSavePasswordsCB->set_active( !m_xSavePasswordsCB->get_active() );
610  }
611 }
612 
614 {
615  try
616  {
617  Reference< task::XPasswordContainer2 > xMasterPasswd(
618  task::PasswordContainer::create(comphelper::getProcessComponentContext()));
619 
620  if ( xMasterPasswd->isPersistentStoringAllowed() )
621  {
622  uno::Reference<task::XInteractionHandler> xTmpHandler(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
623  GetDialogController()->getDialog()->GetXWindow()));
624  xMasterPasswd->changeMasterPassword(xTmpHandler);
625  }
626  }
627  catch (const Exception&)
628  {}
629 }
630 
631 IMPL_LINK_NOARG(SvxSecurityTabPage, MasterPasswordCBHdl, weld::Button&, void)
632 {
633  try
634  {
635  Reference< task::XPasswordContainer2 > xMasterPasswd(
636  task::PasswordContainer::create(comphelper::getProcessComponentContext()));
637 
638  uno::Reference<task::XInteractionHandler> xTmpHandler(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
639  GetDialogController()->getDialog()->GetXWindow()));
640 
641  if ( m_xMasterPasswordCB->get_active() )
642  {
643  if (xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->changeMasterPassword(xTmpHandler))
644  {
645  m_xMasterPasswordPB->set_sensitive(true);
646  m_xMasterPasswordFT->set_sensitive(true);
647  }
648  else
649  {
650  m_xMasterPasswordCB->set_active( false );
651  m_xMasterPasswordPB->set_sensitive(true);
652  m_xMasterPasswordFT->set_sensitive(true);
653  }
654  }
655  else
656  {
657  if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->useDefaultMasterPassword(xTmpHandler) )
658  {
659  m_xMasterPasswordPB->set_sensitive( false );
660  m_xMasterPasswordFT->set_sensitive( false );
661  }
662  else
663  {
664  m_xMasterPasswordCB->set_active(true);
665  m_xMasterPasswordPB->set_sensitive(true);
666  m_xShowConnectionsPB->set_sensitive(true);
667  }
668  }
669  }
670  catch (const Exception&)
671  {
672  m_xSavePasswordsCB->set_active( !m_xSavePasswordsCB->get_active() );
673  }
674 }
675 
677 {
678  try
679  {
680  Reference< task::XPasswordContainer2 > xMasterPasswd(
681  task::PasswordContainer::create(comphelper::getProcessComponentContext()));
682 
683  uno::Reference<task::XInteractionHandler> xTmpHandler(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
684  GetDialogController()->getDialog()->GetXWindow()));
685 
686  if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->authorizateWithMasterPassword(xTmpHandler) )
687  {
689  aDlg.run();
690  }
691  }
692  catch (const Exception&)
693  {}
694 }
695 
697 {
698  if (!mpCertPathDlg)
699  mpCertPathDlg.reset(new CertPathDialog(GetFrameWeld()));
700 
701  OUString sOrig = mpCertPathDlg->getDirectory();
702  short nRet = mpCertPathDlg->run();
703 
704  if (nRet == RET_OK && sOrig != mpCertPathDlg->getDirectory())
705  {
706  SolarMutexGuard aGuard;
708  GetDialogController()->response(RET_OK);
709  }
710 }
711 
713 {
714  // Unlike the mpCertPathDlg, we *don't* keep the same dialog object around between
715  // invocations. Seems clearer to my little brain that way.
716  TSAURLsDialog aTSAURLsDlg(GetFrameWeld());
717  aTSAURLsDlg.run();
718 }
719 
721 {
722  try
723  {
724  Reference< security::XDocumentDigitalSignatures > xD(
725  security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext() ) );
726  xD->setParentWindow(GetDialogController()->getDialog()->GetXWindow());
727  xD->manageTrustedSources();
728  }
729  catch (const Exception&)
730  {
731  TOOLS_WARN_EXCEPTION( "cui.options", "");
732  }
733 }
734 
736 {
737  // Hide all controls which belong to the macro security button in case the macro
738  // security settings managed by the macro security dialog opened via the button
739  // are all readonly or if the macros are disabled in general.
740  // @@@ Better would be to query the dialog whether it is 'useful' or not. Exposing
741  // macro security dialog implementations here, which is bad.
742  if ( mpSecOptions->IsMacroDisabled()
746  {
747  //Hide these
748  m_xMacroSecFrame->hide();
749  }
750 
751 #ifndef UNX
752  m_xCertFrame->hide();
753 #endif
754 
755  m_xMasterPasswordPB->set_sensitive( false );
756  m_xMasterPasswordCB->set_sensitive( false );
757  m_xMasterPasswordCB->set_active(true);
758  m_xMasterPasswordFT->set_sensitive( false );
759  m_xShowConnectionsPB->set_sensitive( false );
760 
761  // initialize the password saving checkbox
762  try
763  {
764  Reference< task::XPasswordContainer2 > xMasterPasswd(
765  task::PasswordContainer::create(comphelper::getProcessComponentContext()));
766 
767  if ( xMasterPasswd->isPersistentStoringAllowed() )
768  {
769  m_xMasterPasswordCB->set_sensitive(true);
770  m_xShowConnectionsPB->set_sensitive(true);
771  m_xSavePasswordsCB->set_active(true);
772 
773  if ( xMasterPasswd->isDefaultMasterPasswordUsed() )
774  m_xMasterPasswordCB->set_active( false );
775  else
776  {
777  m_xMasterPasswordPB->set_sensitive(true);
778  m_xMasterPasswordCB->set_active(true);
779  m_xMasterPasswordFT->set_sensitive(true);
780  }
781  }
782  }
783  catch (const Exception&)
784  {
785  m_xSavePasswordsCB->set_sensitive( false );
786  }
787 }
788 
789 std::unique_ptr<SfxTabPage> SvxSecurityTabPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet )
790 {
791  return std::make_unique<SvxSecurityTabPage>(pPage, pController, *rAttrSet);
792 }
793 
795 {
796 }
797 
799 {
800  if( _pSet )
801  FillItemSet( _pSet );
802  return DeactivateRC::LeavePage;
803 }
804 
805 namespace
806 {
807  bool CheckAndSave( SvtSecurityOptions& _rOpt, SvtSecurityOptions::EOption _eOpt, const bool _bIsChecked, bool& _rModfied )
808  {
809  bool bModified = false;
810  if ( _rOpt.IsOptionEnabled( _eOpt ) )
811  {
812  bModified = _rOpt.IsOptionSet( _eOpt ) != _bIsChecked;
813  if ( bModified )
814  {
815  _rOpt.SetOption( _eOpt, _bIsChecked );
816  _rModfied = true;
817  }
818  }
819 
820  return bModified;
821  }
822 }
823 
825 {
826  bool bModified = false;
827 
828  if (m_xSecOptDlg)
829  {
830  CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnSaveOrSend, m_xSecOptDlg->IsSaveOrSendDocsChecked(), bModified );
831  CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnSigning, m_xSecOptDlg->IsSignDocsChecked(), bModified );
832  CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnPrint, m_xSecOptDlg->IsPrintDocsChecked(), bModified );
833  CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnCreatePdf, m_xSecOptDlg->IsCreatePdfChecked(), bModified );
834  CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo, m_xSecOptDlg->IsRemovePersInfoChecked(), bModified );
835  CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnRecommendPassword, m_xSecOptDlg->IsRecommPasswdChecked(), bModified );
836  CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::CtrlClickHyperlink, m_xSecOptDlg->IsCtrlHyperlinkChecked(), bModified );
837  CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, m_xSecOptDlg->IsBlockUntrustedRefererLinksChecked(), bModified );
838  }
839 
840  return bModified;
841 }
842 
843 /*--------------------------------------------------------------------*/
844 
846 {
847 }
848 
850 {
852  sProgram(officecfg::Office::Common::ExternalMailer::Program::get()),
853  bROProgram(
854  officecfg::Office::Common::ExternalMailer::Program::isReadOnly()),
855  bHideContent(
856  officecfg::Office::Security::HiddenContent::RemoveHiddenContent::get()),
858  officecfg::Office::Security::HiddenContent::RemoveHiddenContent::isReadOnly())
859  {}
860 
861  OUString sProgram;
865 };
866 
868  : SfxTabPage( pPage, pController, "cui/ui/optemailpage.ui", "OptEmailPage", &rSet)
869  , pImpl(new SvxEMailTabPage_Impl)
870  , m_xMailContainer(m_xBuilder->weld_container("program"))
871  , m_xMailerURLFI(m_xBuilder->weld_image("lockemail"))
872  , m_xMailerURLED(m_xBuilder->weld_entry("url"))
873  , m_xMailerURLPB(m_xBuilder->weld_button("browse"))
874  , m_xSuppressHiddenContainer(m_xBuilder->weld_container("suppressHiddenCont"))
875  , m_xSuppressHiddenFI(m_xBuilder->weld_image("lockSuppressHidden"))
876  , m_xSuppressHidden(m_xBuilder->weld_check_button("suppressHidden"))
877  , m_xDefaultFilterFT(m_xBuilder->weld_label("browsetitle"))
878 {
880  m_xMailerURLPB->connect_clicked( LINK( this, SvxEMailTabPage, FileDialogHdl_Impl ) );
881 }
882 
883 /* -------------------------------------------------------------------------*/
884 
886 {
887 }
888 
889 /* -------------------------------------------------------------------------*/
890 
891 std::unique_ptr<SfxTabPage> SvxEMailTabPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet )
892 {
893  return std::make_unique<SvxEMailTabPage>(pPage, pController, *rAttrSet);
894 }
895 
896 /* -------------------------------------------------------------------------*/
897 
899 {
900  std::shared_ptr<comphelper::ConfigurationChanges> batch(
902  if (!pImpl->bROProgram && m_xMailerURLED->get_value_changed_from_saved())
903  {
904  pImpl->sProgram = m_xMailerURLED->get_text();
905  officecfg::Office::Common::ExternalMailer::Program::set(
906  pImpl->sProgram, batch);
907  }
908  if (!pImpl->bROHideContent
909  && pImpl->bHideContent != m_xSuppressHidden->get_active())
910  {
911  pImpl->bHideContent = m_xSuppressHidden->get_active();
912  officecfg::Office::Security::HiddenContent::RemoveHiddenContent::set(
913  pImpl->bHideContent, batch);
914  }
915  batch->commit();
916  return false;
917 }
918 
919 /* -------------------------------------------------------------------------*/
920 
922 {
923  m_xMailerURLED->set_sensitive(true);
924  m_xMailerURLPB->set_sensitive(true);
925 
926  if (pImpl->bROProgram)
927  m_xMailerURLFI->show();
928 
929  m_xMailerURLED->set_text(pImpl->sProgram);
930  m_xMailerURLED->save_value();
931 
932  m_xMailContainer->set_sensitive(!pImpl->bROProgram);
933 
934  if (pImpl->bROHideContent)
935  m_xSuppressHiddenFI->show();
936 
937  m_xSuppressHidden->set_active(pImpl->bHideContent);
938 
939  m_xSuppressHiddenContainer->set_sensitive(!pImpl->bROHideContent);
940 }
941 
942 /* -------------------------------------------------------------------------*/
943 
944 IMPL_LINK_NOARG(SvxEMailTabPage, FileDialogHdl_Impl, weld::Button&, void)
945 {
946  if (!pImpl->bROProgram)
947  {
948  FileDialogHelper aHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetFrameWeld());
949  OUString sPath = m_xMailerURLED->get_text();
950  if ( sPath.isEmpty() )
951  sPath = "/usr/bin";
952 
953  OUString sUrl;
954  osl::FileBase::getFileURLFromSystemPath(sPath, sUrl);
955  aHelper.SetDisplayDirectory(sUrl);
956  aHelper.AddFilter( m_sDefaultFilterName, "*");
957 
958  if ( ERRCODE_NONE == aHelper.Execute() )
959  {
960  sUrl = aHelper.GetPath();
961  if (osl::FileBase::getSystemPathFromFileURL(sUrl, sPath)
962  != osl::FileBase::E_None)
963  {
964  sPath.clear();
965  }
966  m_xMailerURLED->set_text(sPath);
967  }
968  }
969 }
970 
971 
972 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::Entry > m_xMailerURLED
Definition: optinet2.hxx:142
bool IsOptionSet(EOption eOption) const
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
std::unique_ptr< weld::Label > m_xNoPasswordSaveFT
Definition: optinet2.hxx:108
std::unique_ptr< weld::Button > m_xSecurityOptionsPB
Definition: optinet2.hxx:90
std::unique_ptr< weld::Label > m_xHttpProxyFT
Definition: optinet2.hxx:36
virtual ~SvxEMailTabPage() override
Definition: optinet2.cxx:885
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: optinet2.cxx:798
void ReadConfigData_Impl()
Definition: optinet2.cxx:193
std::unique_ptr< weld::Label > m_xNoProxyForFT
Definition: optinet2.hxx:51
std::unique_ptr< weld::Label > m_xMasterPasswordFT
Definition: optinet2.hxx:96
std::unique_ptr< weld::Entry > m_xFtpPortED
Definition: optinet2.hxx:49
std::unique_ptr< weld::CheckButton > m_xSuppressHidden
Definition: optinet2.hxx:146
std::unique_ptr< SvtSecurityOptions > mpSecOptions
Definition: optinet2.hxx:83
std::unique_ptr< weld::Button > m_xMacroSecPB
Definition: optinet2.hxx:100
SvxEMailTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optinet2.cxx:867
std::unique_ptr< weld::Entry > m_xHttpProxyED
Definition: optinet2.hxx:37
static const char g_aProxyModePN[]
Definition: optinet2.cxx:99
static const char g_aFtpPortPN[]
Definition: optinet2.cxx:105
std::unique_ptr< weld::Button > m_xMasterPasswordPB
Definition: optinet2.hxx:97
std::unique_ptr< weld::Entry > m_xFtpProxyED
Definition: optinet2.hxx:47
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: optinet2.cxx:794
std::unique_ptr< weld::Image > m_xMailerURLFI
Definition: optinet2.hxx:141
std::unique_ptr< weld::Button > m_xCertPathPB
Definition: optinet2.hxx:103
virtual void Reset(const SfxItemSet *rSet) override
Definition: optinet2.cxx:921
std::unique_ptr< weld::Image > m_xSuppressHiddenFI
Definition: optinet2.hxx:145
std::unique_ptr< weld::Label > m_xDefaultFilterFT
Definition: optinet2.hxx:147
virtual void set_text(const OUString &rText)=0
std::unique_ptr< SvxEMailTabPage_Impl > pImpl
Definition: optinet2.hxx:138
std::unique_ptr< weld::Label > m_xNoProxyDescFT
Definition: optinet2.hxx:53
std::unique_ptr< weld::ComboBox > m_xProxyModeLB
Definition: optinet2.hxx:34
RET_NO
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optinet2.cxx:789
RET_YES
void EnableControls_Impl()
Definition: optinet2.cxx:440
std::unique_ptr< weld::Label > m_xFtpProxyFT
Definition: optinet2.hxx:46
std::unique_ptr< weld::Button > m_xShowConnectionsPB
Definition: optinet2.hxx:93
std::unique_ptr< weld::Container > m_xMacroSecFrame
Definition: optinet2.hxx:99
std::unique_ptr< weld::CheckButton > m_xMasterPasswordCB
Definition: optinet2.hxx:95
void SetOption(EOption eOption, bool bValue)
std::unique_ptr< weld::Entry > m_xNoProxyForED
Definition: optinet2.hxx:52
static std::shared_ptr< ConfigurationChanges > create(css::uno::Reference< css::uno::XComponentContext > const &context=comphelper::getProcessComponentContext())
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optinet2.cxx:188
bool isdigitAsciiString(const OString &rString)
std::unique_ptr< weld::Button > m_xTSAURLsPB
Definition: optinet2.hxx:106
static const char g_aHttpPortPN[]
Definition: optinet2.cxx:101
std::unique_ptr< weld::Label > m_xHttpsProxyFT
Definition: optinet2.hxx:41
SVT_DLLPUBLIC bool executeRestartDialog(css::uno::Reference< css::uno::XComponentContext > const &context, weld::Window *parent, RestartReason reason)
static const char g_aFtpProxyPN[]
Definition: optinet2.cxx:104
#define TOOLS_WARN_EXCEPTION(area, stream)
static const char g_aNoProxyDescPN[]
Definition: optinet2.cxx:106
css::uno::Reference< css::uno::XInterface > m_xConfigurationUpdateAccess
Definition: optinet2.hxx:55
SvxProxyTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optinet2.cxx:131
void ReadConfigDefaults_Impl()
Definition: optinet2.cxx:252
std::unique_ptr< weld::CheckButton > m_xSavePasswordsCB
Definition: optinet2.hxx:92
virtual ~SvxProxyTabPage() override
Definition: optinet2.cxx:184
static const char g_aHttpsProxyPN[]
Definition: optinet2.cxx:102
std::unique_ptr< weld::Entry > m_xHttpsPortED
Definition: optinet2.hxx:44
int i
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optinet2.cxx:824
static const char g_aHttpsPortPN[]
Definition: optinet2.cxx:103
OUString CuiResId(const char *pKey)
Definition: cuiresmgr.cxx:23
virtual OUString get_text() const =0
std::unique_ptr< weld::Container > m_xCertFrame
Definition: optinet2.hxx:102
IMPL_LINK_NOARG(SvxSecurityTabPage, SecurityOptionsHdl, weld::Button &, void)
Definition: optinet2.cxx:545
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optinet2.cxx:898
std::unique_ptr< weld::Entry > m_xHttpsProxyED
Definition: optinet2.hxx:42
OUString m_sDefaultFilterName
Definition: optinet2.hxx:136
std::unique_ptr< weld::Container > m_xSuppressHiddenContainer
Definition: optinet2.hxx:144
bool IsOptionEnabled(EOption eOption) const
weld::Entry & rEdit
#define ERRCODE_NONE
SvxSecurityTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optinet2.cxx:498
std::unique_ptr< weld::Label > m_xHttpsPortFT
Definition: optinet2.hxx:43
OUString m_sPasswordStoringDeactivateStr
Definition: optinet2.hxx:88
RET_OK
std::unique_ptr< weld::Label > m_xHttpPortFT
Definition: optinet2.hxx:38
IMPL_STATIC_LINK(SvxProxyTabPage, NumberOnlyTextFilterHdl, OUString &, rTest, bool)
Definition: optinet2.cxx:108
std::unique_ptr< weld::Button > m_xMailerURLPB
Definition: optinet2.hxx:143
virtual short run()
Reference< XComponentContext > getProcessComponentContext()
std::unique_ptr< weld::Entry > m_xHttpPortED
Definition: optinet2.hxx:39
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage)
virtual void Reset(const SfxItemSet *rSet) override
Definition: optinet2.cxx:340
DeactivateRC
std::unique_ptr< svx::SecurityOptionsDialog > m_xSecOptDlg
Definition: optinet2.hxx:84
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optinet2.cxx:891
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optinet2.cxx:356
#define SAL_WARN(area, stream)
virtual void Reset(const SfxItemSet *rSet) override
Definition: optinet2.cxx:845
virtual ~SvxSecurityTabPage() override
Definition: optinet2.cxx:541
std::unique_ptr< weld::Label > m_xFtpPortFT
Definition: optinet2.hxx:48
std::unique_ptr< weld::Container > m_xMailContainer
Definition: optinet2.hxx:140
void RestoreConfigDefaults_Impl()
Definition: optinet2.cxx:309
sal_Int32 nPos
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
static const char g_aHttpProxyPN[]
Definition: optinet2.cxx:100
IMPL_LINK(SvxProxyTabPage, PortChangedHdl, weld::Entry &, rEdit, void)
Definition: optinet2.cxx:88
RESTART_REASON_ADDING_PATH