summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/options/optinet2.cxx22
-rw-r--r--cui/source/options/securityoptions.cxx16
-rw-r--r--include/unotools/securityoptions.hxx33
-rw-r--r--sc/source/core/data/global.cxx2
-rw-r--r--sc/source/ui/view/gridwin5.cxx2
-rw-r--r--sfx2/source/appl/appcfg.cxx10
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx2
-rw-r--r--sfx2/source/doc/objcont.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx8
-rw-r--r--sw/source/core/draw/dpage.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx6
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx2
-rw-r--r--unotools/source/config/securityoptions.cxx51
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx6
15 files changed, 82 insertions, 86 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 34a5be87667d..3d45153fd836 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -798,9 +798,9 @@ void SvxSecurityTabPage::InitControls()
// @@@ Better would be to query the dialog whether it is 'useful' or not. Exposing
// macro security dialog implementations here, which is bad.
if ( mpSecOptions->IsMacroDisabled()
- || ( mpSecOptions->IsReadOnly( SvtSecurityOptions::E_MACRO_SECLEVEL )
- && mpSecOptions->IsReadOnly( SvtSecurityOptions::E_MACRO_TRUSTEDAUTHORS )
- && mpSecOptions->IsReadOnly( SvtSecurityOptions::E_SECUREURLS ) ) )
+ || ( mpSecOptions->IsReadOnly( SvtSecurityOptions::EOption::MacroSecLevel )
+ && mpSecOptions->IsReadOnly( SvtSecurityOptions::EOption::MacroTrustedAuthors )
+ && mpSecOptions->IsReadOnly( SvtSecurityOptions::EOption::SecureUrls ) ) )
{
//Hide these
m_pMacroSecFrame->Hide();
@@ -885,14 +885,14 @@ bool SvxSecurityTabPage::FillItemSet( SfxItemSet* )
if ( mpSecOptDlg )
{
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_DOCWARN_SAVEORSEND, mpSecOptDlg->IsSaveOrSendDocsChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_DOCWARN_SIGNING, mpSecOptDlg->IsSignDocsChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_DOCWARN_PRINT, mpSecOptDlg->IsPrintDocsChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_DOCWARN_CREATEPDF, mpSecOptDlg->IsCreatePdfChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO, mpSecOptDlg->IsRemovePersInfoChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD, mpSecOptDlg->IsRecommPasswdChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_CTRLCLICK_HYPERLINK, mpSecOptDlg->IsCtrlHyperlinkChecked(), bModified );
- CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_BLOCKUNTRUSTEDREFERERLINKS, mpSecOptDlg->IsBlockUntrustedRefererLinksChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnSaveOrSend, mpSecOptDlg->IsSaveOrSendDocsChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnSigning, mpSecOptDlg->IsSignDocsChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnPrint, mpSecOptDlg->IsPrintDocsChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnCreatePdf, mpSecOptDlg->IsCreatePdfChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo, mpSecOptDlg->IsRemovePersInfoChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::DocWarnRecommendPassword, mpSecOptDlg->IsRecommPasswdChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::CtrlClickHyperlink, mpSecOptDlg->IsCtrlHyperlinkChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, mpSecOptDlg->IsBlockUntrustedRefererLinksChecked(), bModified );
}
return bModified;
diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx
index 30452a9ac7b7..d849d3e77056 100644
--- a/cui/source/options/securityoptions.cxx
+++ b/cui/source/options/securityoptions.cxx
@@ -46,28 +46,28 @@ SecurityOptionsDialog::SecurityOptionsDialog(vcl::Window* pParent, SvtSecurityOp
{
DBG_ASSERT( pOptions, "SecurityOptionsDialog::SecurityOptionsDialog(): invalid SvtSecurityOptions" );
get(m_pSaveOrSendDocsCB, "savesenddocs");
- enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_SAVEORSEND, *m_pSaveOrSendDocsCB,
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnSaveOrSend, *m_pSaveOrSendDocsCB,
*get<FixedImage>("locksavesenddocs"));
get(m_pSignDocsCB, "whensigning");
- enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_SIGNING, *m_pSignDocsCB,
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnSigning, *m_pSignDocsCB,
*get<FixedImage>("lockwhensigning"));
get(m_pPrintDocsCB, "whenprinting");
- enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_PRINT, *m_pPrintDocsCB,
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnPrint, *m_pPrintDocsCB,
*get<FixedImage>("lockwhenprinting"));
get(m_pCreatePdfCB, "whenpdf");
- enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_CREATEPDF, *m_pCreatePdfCB,
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnCreatePdf, *m_pCreatePdfCB,
*get<FixedImage>("lockwhenpdf"));
get(m_pRemovePersInfoCB, "removepersonal");
- enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO, *m_pRemovePersInfoCB,
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo, *m_pRemovePersInfoCB,
*get<FixedImage>("lockremovepersonal"));
get(m_pRecommPasswdCB, "password");
- enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD, *m_pRecommPasswdCB,
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::DocWarnRecommendPassword, *m_pRecommPasswdCB,
*get<FixedImage>("lockpassword"));
get(m_pCtrlHyperlinkCB, "ctrlclick");
- enableAndSet(*pOptions, SvtSecurityOptions::E_CTRLCLICK_HYPERLINK, *m_pCtrlHyperlinkCB,
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::CtrlClickHyperlink, *m_pCtrlHyperlinkCB,
*get<FixedImage>("lockctrlclick"));
get(m_pBlockUntrustedRefererLinksCB, "blockuntrusted");
- enableAndSet(*pOptions, SvtSecurityOptions::E_BLOCKUNTRUSTEDREFERERLINKS, *m_pBlockUntrustedRefererLinksCB,
+ enableAndSet(*pOptions, SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, *m_pBlockUntrustedRefererLinksCB,
*get<FixedImage>("lockblockuntrusted"));
}
diff --git a/include/unotools/securityoptions.hxx b/include/unotools/securityoptions.hxx
index f3c6426117af..405e2fcf502b 100644
--- a/include/unotools/securityoptions.hxx
+++ b/include/unotools/securityoptions.hxx
@@ -59,24 +59,23 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtSecurityOptions : public utl::detail
{
public:
- enum EOption
+ enum class EOption
{
- E_SECUREURLS,
- E_BASICMODE, // xmlsec05 deprecated
- E_EXECUTEPLUGINS, // xmlsec05 deprecated
- E_WARNING, // xmlsec05 deprecated
- E_CONFIRMATION, // xmlsec05 deprecated
- E_DOCWARN_SAVEORSEND,
- E_DOCWARN_SIGNING,
- E_DOCWARN_PRINT,
- E_DOCWARN_CREATEPDF,
- E_DOCWARN_REMOVEPERSONALINFO,
- E_DOCWARN_RECOMMENDPASSWORD,
- E_MACRO_SECLEVEL,
- E_MACRO_TRUSTEDAUTHORS,
- E_MACRO_DISABLE,
- E_CTRLCLICK_HYPERLINK,
- E_BLOCKUNTRUSTEDREFERERLINKS
+ SecureUrls,
+ BasicMode, // xmlsec05 deprecated
+ ExecutePlugins, // xmlsec05 deprecated
+ Warning, // xmlsec05 deprecated
+ Confirmation, // xmlsec05 deprecated
+ DocWarnSaveOrSend,
+ DocWarnSigning,
+ DocWarnPrint,
+ DocWarnCreatePdf,
+ DocWarnRemovePersonalInfo,
+ DocWarnRecommendPassword,
+ MacroSecLevel,
+ MacroTrustedAuthors,
+ CtrlClickHyperlink,
+ BlockUntrustedRefererLinks
};
typedef css::uno::Sequence< OUString > Certificate;
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 0e175d17ebfe..6963bed8db9f 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -859,7 +859,7 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget)
// SvtSecurityOptions to access Libreoffice global security parameters
SvtSecurityOptions aSecOpt;
bool bCtrlClickHappened = (nScClickMouseModifier & KEY_MOD1);
- bool bCtrlClickSecOption = aSecOpt.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ bool bCtrlClickSecOption = aSecOpt.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink );
if( bCtrlClickHappened && !( bCtrlClickSecOption ) )
{
// return since ctrl+click happened when the
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 00b81b8d0db9..928c98d8c486 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -241,7 +241,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
//To know whether to prefix STR_CTRLCLICKHYERLINK or STR_CLICKHYPERLINK
//to hyperlink tooltips/help text
SvtSecurityOptions aSecOpt;
- bool bCtrlClickHlink = aSecOpt.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ bool bCtrlClickHlink = aSecOpt.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink );
//Global string STR_CTRLCLICKHYPERLINK i.e,
// "ctrl-click to follow link:" for not MacOS
// "⌘-click to follow link:" for MacOs
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index e17dcac6fb3b..61593bb95f52 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -300,7 +300,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_BASIC_ENABLED :
{
bRet = true;
- if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_BASICMODE))
+ if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::EOption::BasicMode))
{
if ( !rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_BASIC_ENABLED ), sal::static_int_cast< sal_uInt16 >(aSecurityOptions.GetBasicMode()))))
bRet = false;
@@ -310,7 +310,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_INET_EXE_PLUGIN :
{
bRet = true;
- if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_EXECUTEPLUGINS))
+ if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::EOption::ExecutePlugins))
{
if ( !rSet.Put( SfxBoolItem( SID_INET_EXE_PLUGIN, aSecurityOptions.IsExecutePlugins() ) ) )
bRet = false;
@@ -320,7 +320,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_MACRO_WARNING :
{
bRet = true;
- if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_WARNING))
+ if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::EOption::Warning))
{
if ( !rSet.Put( SfxBoolItem( SID_MACRO_WARNING, aSecurityOptions.IsWarningEnabled() ) ) )
bRet = false;
@@ -330,7 +330,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_MACRO_CONFIRMATION :
{
bRet = true;
- if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_CONFIRMATION))
+ if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::EOption::Confirmation))
{
if ( !rSet.Put( SfxBoolItem( SID_MACRO_CONFIRMATION, aSecurityOptions.IsConfirmationEnabled() ) ) )
bRet = false;
@@ -340,7 +340,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_SECURE_URL :
{
bRet = true;
- if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_SECUREURLS))
+ if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::EOption::SecureUrls))
{
css::uno::Sequence< OUString > seqURLs = aSecurityOptions.GetSecureURLs();
std::vector<OUString> aList;
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 8cdbd19691a7..647759ca36d2 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1409,7 +1409,7 @@ ErrCode FileDialogHelper_Impl::execute( std::vector<OUString>& rpURLList,
{
SvtSecurityOptions aSecOpt;
mbPwdCheckBoxState = (
- aSecOpt.IsOptionSet( SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD ) );
+ aSecOpt.IsOptionSet( SvtSecurityOptions::EOption::DocWarnRecommendPassword ) );
}
rpURLList.clear();
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 859036e6015e..b301545dba1a 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -181,7 +181,7 @@ void SfxObjectShell::UpdateDocInfoForSave()
// clear user data if recommend (see 'Tools - Options - Open/StarOffice - Security')
if ( SvtSecurityOptions().IsOptionSet(
- SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO ) )
+ SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo ) )
{
xDocProps->resetUserData( OUString() );
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 4468b963c240..92ad92347f1e 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2914,25 +2914,25 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, vcl::
case HiddenWarningFact::WhenSaving :
{
nResId = STR_HIDDENINFO_CONTINUE_SAVING;
- eOption = SvtSecurityOptions::E_DOCWARN_SAVEORSEND;
+ eOption = SvtSecurityOptions::EOption::DocWarnSaveOrSend;
break;
}
case HiddenWarningFact::WhenPrinting :
{
nResId = STR_HIDDENINFO_CONTINUE_PRINTING;
- eOption = SvtSecurityOptions::E_DOCWARN_PRINT;
+ eOption = SvtSecurityOptions::EOption::DocWarnPrint;
break;
}
case HiddenWarningFact::WhenSigning :
{
nResId = STR_HIDDENINFO_CONTINUE_SIGNING;
- eOption = SvtSecurityOptions::E_DOCWARN_SIGNING;
+ eOption = SvtSecurityOptions::EOption::DocWarnSigning;
break;
}
case HiddenWarningFact::WhenCreatingPDF :
{
nResId = STR_HIDDENINFO_CONTINUE_CREATEPDF;
- eOption = SvtSecurityOptions::E_DOCWARN_CREATEPDF;
+ eOption = SvtSecurityOptions::EOption::DocWarnCreatePdf;
break;
}
default:
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 8163b2606a31..b1a2190bf2ba 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -227,7 +227,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- bExecHyperlinks = !aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ bExecHyperlinks = !aSecOpts.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink );
if ( !bExecHyperlinks )
sText = SwViewShell::GetShellRes()->aLinkCtrlClick + ": " + sText;
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index 8609b540ce9f..efdd971f5da2 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -310,7 +310,7 @@ void SidebarTextControl::MouseMove( const MouseEvent& rMEvt )
{
OUString sURL( pURL->GetURL() );
SvtSecurityOptions aSecOpts;
- if ( aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK) )
+ if ( aSecOpts.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink) )
sURL = SwViewShell::GetShellRes()->aLinkCtrlClick + ": " + sURL;
else
sURL = SwViewShell::GetShellRes()->aLinkClick + ": " + sURL;
@@ -325,7 +325,7 @@ void SidebarTextControl::MouseButtonDown( const MouseEvent& rMEvt )
if ( GetTextView() )
{
SvtSecurityOptions aSecOpts;
- bool bExecuteMod = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK);
+ bool bExecuteMod = aSecOpts.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink);
if ( !bExecuteMod || (rMEvt.GetModifier() == KEY_MOD1))
{
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 37c171297c4c..eb846808e745 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -422,7 +422,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink );
if ( ( bSecureOption && nModifier == KEY_MOD1 ) ||
( !bSecureOption && nModifier != KEY_MOD1 ) )
bExecHyperlinks = true;
@@ -3154,7 +3154,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink );
if ( ( bSecureOption && rMEvt.GetModifier() == KEY_MOD1 ) ||
( !bSecureOption && rMEvt.GetModifier() != KEY_MOD1 ) )
bExecHyperlinks = true;
@@ -4612,7 +4612,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink );
if ( ( bSecureOption && rMEvt.GetModifier() == KEY_MOD1 ) ||
( !bSecureOption && rMEvt.GetModifier() != KEY_MOD1 ) )
bExecHyperlinks = true;
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index ea84cdd7fd8c..14e031b610c8 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -220,7 +220,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- bExecHyperlinks = !aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ bExecHyperlinks = !aSecOpts.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink );
sText = ": " + sText;
if ( !bExecHyperlinks )
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index 43cbebedee44..f2b57ed701dd 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -506,35 +506,35 @@ bool SvtSecurityOptions_Impl::GetOption( SvtSecurityOptions::EOption eOption, bo
{
switch( eOption )
{
- case SvtSecurityOptions::E_DOCWARN_SAVEORSEND:
+ case SvtSecurityOptions::EOption::DocWarnSaveOrSend:
rpValue = &m_bSaveOrSend;
rpRO = &m_bROSaveOrSend;
break;
- case SvtSecurityOptions::E_DOCWARN_SIGNING:
+ case SvtSecurityOptions::EOption::DocWarnSigning:
rpValue = &m_bSigning;
rpRO = &m_bROSigning;
break;
- case SvtSecurityOptions::E_DOCWARN_PRINT:
+ case SvtSecurityOptions::EOption::DocWarnPrint:
rpValue = &m_bPrint;
rpRO = &m_bROPrint;
break;
- case SvtSecurityOptions::E_DOCWARN_CREATEPDF:
+ case SvtSecurityOptions::EOption::DocWarnCreatePdf:
rpValue = &m_bCreatePDF;
rpRO = &m_bROCreatePDF;
break;
- case SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO:
+ case SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo:
rpValue = &m_bRemoveInfo;
rpRO = &m_bRORemoveInfo;
break;
- case SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD:
+ case SvtSecurityOptions::EOption::DocWarnRecommendPassword:
rpValue = &m_bRecommendPwd;
rpRO = &m_bRORecommendPwd;
break;
- case SvtSecurityOptions::E_CTRLCLICK_HYPERLINK:
+ case SvtSecurityOptions::EOption::CtrlClickHyperlink:
rpValue = &m_bCtrlClickHyperlink;
rpRO = &m_bROCtrlClickHyperlink;
break;
- case SvtSecurityOptions::E_BLOCKUNTRUSTEDREFERERLINKS:
+ case SvtSecurityOptions::EOption::BlockUntrustedRefererLinks:
rpValue = &m_bBlockUntrustedRefererLinks;
rpRO = &m_bROBlockUntrustedRefererLinks;
break;
@@ -760,54 +760,51 @@ bool SvtSecurityOptions_Impl::IsReadOnly( SvtSecurityOptions::EOption eOption )
bool bReadonly;
switch(eOption)
{
- case SvtSecurityOptions::E_SECUREURLS :
+ case SvtSecurityOptions::EOption::SecureUrls :
bReadonly = m_bROSecureURLs;
break;
- case SvtSecurityOptions::E_DOCWARN_SAVEORSEND:
+ case SvtSecurityOptions::EOption::DocWarnSaveOrSend:
bReadonly = m_bROSaveOrSend;
break;
- case SvtSecurityOptions::E_DOCWARN_SIGNING:
+ case SvtSecurityOptions::EOption::DocWarnSigning:
bReadonly = m_bROSigning;
break;
- case SvtSecurityOptions::E_DOCWARN_PRINT:
+ case SvtSecurityOptions::EOption::DocWarnPrint:
bReadonly = m_bROPrint;
break;
- case SvtSecurityOptions::E_DOCWARN_CREATEPDF:
+ case SvtSecurityOptions::EOption::DocWarnCreatePdf:
bReadonly = m_bROCreatePDF;
break;
- case SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO:
+ case SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo:
bReadonly = m_bRORemoveInfo;
break;
- case SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD:
+ case SvtSecurityOptions::EOption::DocWarnRecommendPassword:
bReadonly = m_bRORecommendPwd;
break;
- case SvtSecurityOptions::E_MACRO_SECLEVEL:
+ case SvtSecurityOptions::EOption::MacroSecLevel:
bReadonly = m_bROSecLevel;
break;
- case SvtSecurityOptions::E_MACRO_TRUSTEDAUTHORS:
+ case SvtSecurityOptions::EOption::MacroTrustedAuthors:
bReadonly = m_bROTrustedAuthors;
break;
- case SvtSecurityOptions::E_MACRO_DISABLE:
- bReadonly = m_bRODisableMacros;
- break;
- case SvtSecurityOptions::E_CTRLCLICK_HYPERLINK:
+ case SvtSecurityOptions::EOption::CtrlClickHyperlink:
bReadonly = m_bROCtrlClickHyperlink;
break;
- case SvtSecurityOptions::E_BLOCKUNTRUSTEDREFERERLINKS:
+ case SvtSecurityOptions::EOption::BlockUntrustedRefererLinks:
bReadonly = m_bROBlockUntrustedRefererLinks;
break;
// xmlsec05 deprecated
- case SvtSecurityOptions::E_BASICMODE:
+ case SvtSecurityOptions::EOption::BasicMode:
bReadonly = m_bROBasicMode;
break;
- case SvtSecurityOptions::E_EXECUTEPLUGINS:
+ case SvtSecurityOptions::EOption::ExecutePlugins:
bReadonly = m_bROExecutePlugins;
break;
- case SvtSecurityOptions::E_WARNING:
+ case SvtSecurityOptions::EOption::Warning:
bReadonly = m_bROWarning;
break;
- case SvtSecurityOptions::E_CONFIRMATION:
+ case SvtSecurityOptions::EOption::Confirmation:
bReadonly = m_bROConfirmation;
break;
// xmlsec05 deprecated
@@ -998,7 +995,7 @@ bool SvtSecurityOptions::isSecureMacroUri(
bool SvtSecurityOptions::isUntrustedReferer(OUString const & referer) const {
MutexGuard g(GetInitMutex());
- return m_pImpl->IsOptionSet(E_BLOCKUNTRUSTEDREFERERLINKS)
+ return m_pImpl->IsOptionSet(EOption::BlockUntrustedRefererLinks)
&& !(referer.isEmpty() || referer.startsWithIgnoreAsciiCase("private:")
|| isTrustedLocationUri(referer));
}
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 01d188049996..c284ebabb51e 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -129,7 +129,7 @@ MacroSecurityLevelTP::MacroSecurityLevelTP(vcl::Window* _pParent, MacroSecurity*
m_pVeryHighRB->SetClickHdl( LINK( this, MacroSecurityLevelTP, RadioButtonHdl ) );
mnCurLevel = (sal_uInt16) mpDlg->maSecOptions.GetMacroSecurityLevel();
- bool bReadonly = mpDlg->maSecOptions.IsReadOnly( SvtSecurityOptions::E_MACRO_SECLEVEL );
+ bool bReadonly = mpDlg->maSecOptions.IsReadOnly( SvtSecurityOptions::EOption::MacroSecLevel );
RadioButton* pCheck = nullptr;
FixedImage* pImage = nullptr;
@@ -394,14 +394,14 @@ MacroSecurityTrustedSourcesTP::MacroSecurityTrustedSourcesTP(vcl::Window* _pPare
m_pRemoveLocPB->Disable();
maTrustedAuthors = mpDlg->maSecOptions.GetTrustedAuthors();
- mbAuthorsReadonly = mpDlg->maSecOptions.IsReadOnly( SvtSecurityOptions::E_MACRO_TRUSTEDAUTHORS );
+ mbAuthorsReadonly = mpDlg->maSecOptions.IsReadOnly( SvtSecurityOptions::EOption::MacroTrustedAuthors );
m_pTrustCertROFI->Show( mbAuthorsReadonly );
mbAuthorsReadonly ? m_pTrustCertLB->DisableTable() : m_pTrustCertLB->EnableTable();
FillCertLB();
css::uno::Sequence< OUString > aSecureURLs = mpDlg->maSecOptions.GetSecureURLs();
- mbURLsReadonly = mpDlg->maSecOptions.IsReadOnly( SvtSecurityOptions::E_SECUREURLS );
+ mbURLsReadonly = mpDlg->maSecOptions.IsReadOnly( SvtSecurityOptions::EOption::SecureUrls );
m_pTrustFileROFI->Show( mbURLsReadonly );
m_pTrustFileLocLB->Enable( !mbURLsReadonly );
m_pAddLocPB->Enable( !mbURLsReadonly );