summaryrefslogtreecommitdiff
path: root/unotools/source/config/securityoptions.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-18 10:39:48 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-01-18 12:50:09 +0000
commita7f6efc68ba97db98ebab9ebc473bffb8ded757f (patch)
treebad37ce9ee1c9f61f1c8541a9689ecdea8c84c08 /unotools/source/config/securityoptions.cxx
parenta08745551370a052bfb6b91335956ababf435791 (diff)
loplugin: unused return values
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af Reviewed-on: https://gerrit.libreoffice.org/21571 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'unotools/source/config/securityoptions.cxx')
-rw-r--r--unotools/source/config/securityoptions.cxx20
1 files changed, 5 insertions, 15 deletions
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index 8de1a0c2c69d..5660442b0d0e 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -142,7 +142,7 @@ class SvtSecurityOptions_Impl : public ConfigItem
void SetTrustedAuthors ( const Sequence< SvtSecurityOptions::Certificate >& rAuthors );
bool IsOptionSet ( SvtSecurityOptions::EOption eOption ) const;
- bool SetOption ( SvtSecurityOptions::EOption eOption, bool bValue );
+ void SetOption ( SvtSecurityOptions::EOption eOption, bool bValue );
bool IsOptionEnabled ( SvtSecurityOptions::EOption eOption ) const;
/*-****************************************************************************************************
@@ -878,26 +878,16 @@ bool SvtSecurityOptions_Impl::IsOptionSet( SvtSecurityOptions::EOption eOption )
return bRet;
}
-bool SvtSecurityOptions_Impl::SetOption( SvtSecurityOptions::EOption eOption, bool bValue )
+void SvtSecurityOptions_Impl::SetOption( SvtSecurityOptions::EOption eOption, bool bValue )
{
bool* pValue;
bool* pRO;
- bool bRet = false;
- if( GetOption( eOption, pValue, pRO ) )
+ if( GetOption( eOption, pValue, pRO ) && !*pRO && *pValue != bValue)
{
- if( !*pRO )
- {
- bRet = true;
- if( *pValue != bValue )
- {
- *pValue = bValue;
- SetModified();
- }
- }
+ *pValue = bValue;
+ SetModified();
}
-
- return bRet;
}
bool SvtSecurityOptions_Impl::IsOptionEnabled( SvtSecurityOptions::EOption eOption ) const