summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/dialogs
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-25 21:35:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-26 14:25:35 +0200
commit6ed8c5a0f19901ab413c6610649326b2475c3a8c (patch)
tree948037d1a61f9e88547b88e107ba6e8a306c3833 /xmlsecurity/source/dialogs
parenta23b44fd9f0119f7ea3523e32875f55c1a07c1cd (diff)
use officecfg for security options
Change-Id: I9d91fd5b260b82e05aac6567143386742953ecf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119486 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity/source/dialogs')
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 2cb08df9cd9f..dbfa41e96d58 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -126,8 +126,8 @@ MacroSecurityLevelTP::MacroSecurityLevelTP(weld::Container* pParent, MacroSecuri
m_xVeryHighRB->set_size_request(nMaxWidth, -1);
}
- mnCurLevel = static_cast<sal_uInt16>(m_pDlg->m_aSecOptions.GetMacroSecurityLevel());
- bool bReadonly = m_pDlg->m_aSecOptions.IsReadOnly( SvtSecurityOptions::EOption::MacroSecLevel );
+ mnCurLevel = static_cast<sal_uInt16>(SvtSecurityOptions::GetMacroSecurityLevel());
+ bool bReadonly = SvtSecurityOptions::IsReadOnly( SvtSecurityOptions::EOption::MacroSecLevel );
weld::RadioButton* pCheck = nullptr;
weld::Widget* pImage = nullptr;
@@ -185,7 +185,7 @@ IMPL_LINK_NOARG(MacroSecurityLevelTP, RadioButtonHdl, weld::Toggleable&, void)
void MacroSecurityLevelTP::ClosePage()
{
- m_pDlg->m_aSecOptions.SetMacroSecurityLevel( mnCurLevel );
+ SvtSecurityOptions::SetMacroSecurityLevel( mnCurLevel );
}
void MacroSecurityTrustedSourcesTP::ImplCheckButtons()
@@ -392,14 +392,14 @@ MacroSecurityTrustedSourcesTP::MacroSecurityTrustedSourcesTP(weld::Container* pP
m_xRemoveLocPB->connect_clicked( LINK( this, MacroSecurityTrustedSourcesTP, RemoveLocPBHdl ) );
m_xRemoveLocPB->set_sensitive(false);
- m_aTrustedAuthors = m_pDlg->m_aSecOptions.GetTrustedAuthors();
- mbAuthorsReadonly = m_pDlg->m_aSecOptions.IsReadOnly( SvtSecurityOptions::EOption::MacroTrustedAuthors );
+ m_aTrustedAuthors = SvtSecurityOptions::GetTrustedAuthors();
+ mbAuthorsReadonly = SvtSecurityOptions::IsReadOnly( SvtSecurityOptions::EOption::MacroTrustedAuthors );
m_xTrustCertROFI->set_visible(mbAuthorsReadonly);
FillCertLB(true);
- const css::uno::Sequence< OUString > aSecureURLs = m_pDlg->m_aSecOptions.GetSecureURLs();
- mbURLsReadonly = m_pDlg->m_aSecOptions.IsReadOnly( SvtSecurityOptions::EOption::SecureUrls );
+ std::vector< OUString > aSecureURLs = SvtSecurityOptions::GetSecureURLs();
+ mbURLsReadonly = SvtSecurityOptions::IsReadOnly( SvtSecurityOptions::EOption::SecureUrls );
m_xTrustFileROFI->set_visible(mbURLsReadonly);
m_xAddLocPB->set_sensitive(!mbURLsReadonly);
@@ -422,22 +422,22 @@ void MacroSecurityTrustedSourcesTP::ClosePage()
sal_Int32 nEntryCnt = m_xTrustFileLocLB->n_children();
if( nEntryCnt )
{
- css::uno::Sequence< OUString > aSecureURLs( nEntryCnt );
+ std::vector< OUString > aSecureURLs;
for (sal_Int32 i = 0; i < nEntryCnt; ++i)
{
OUString aURL(m_xTrustFileLocLB->get_text(i));
osl::FileBase::getFileURLFromSystemPath( aURL, aURL );
- aSecureURLs[ i ] = aURL;
+ aSecureURLs.push_back(aURL);
}
- m_pDlg->m_aSecOptions.SetSecureURLs( aSecureURLs );
+ SvtSecurityOptions::SetSecureURLs( aSecureURLs );
}
// Trusted Path could not be removed (#i33584#)
// don't forget to remove the old saved SecureURLs
else
- m_pDlg->m_aSecOptions.SetSecureURLs( css::uno::Sequence< OUString >() );
+ SvtSecurityOptions::SetSecureURLs( std::vector< OUString >() );
- m_pDlg->m_aSecOptions.SetTrustedAuthors( m_aTrustedAuthors );
+ SvtSecurityOptions::SetTrustedAuthors( m_aTrustedAuthors );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */