From 6ed8c5a0f19901ab413c6610649326b2475c3a8c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 25 Jul 2021 21:35:05 +0200 Subject: use officecfg for security options Change-Id: I9d91fd5b260b82e05aac6567143386742953ecf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119486 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmlsecurity/source/dialogs/macrosecurity.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'xmlsecurity/source/dialogs/macrosecurity.cxx') 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(m_pDlg->m_aSecOptions.GetMacroSecurityLevel()); - bool bReadonly = m_pDlg->m_aSecOptions.IsReadOnly( SvtSecurityOptions::EOption::MacroSecLevel ); + mnCurLevel = static_cast(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: */ -- cgit