Kaydet (Commit) 24ada656 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:unusedmethods unused return value in include/unotools

Change-Id: I3b2281dc713bff92eb3d80fddef04a8a39838aa8
Reviewed-on: https://gerrit.libreoffice.org/21484Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst cdaee607
...@@ -51,7 +51,7 @@ class UNOTOOLS_DLLPUBLIC CollatorWrapper ...@@ -51,7 +51,7 @@ class UNOTOOLS_DLLPUBLIC CollatorWrapper
loadDefaultCollator ( loadDefaultCollator (
const css::lang::Locale& rLocale, sal_Int32 nOption); const css::lang::Locale& rLocale, sal_Int32 nOption);
sal_Int32 void
loadCollatorAlgorithm ( loadCollatorAlgorithm (
const OUString& rAlgorithm, const OUString& rAlgorithm,
const css::lang::Locale& rLocale, sal_Int32 nOption); const css::lang::Locale& rLocale, sal_Int32 nOption);
......
...@@ -193,7 +193,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtSecurityOptions : public utl::detail ...@@ -193,7 +193,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtSecurityOptions : public utl::detail
// for bool options only! // for bool options only!
bool IsOptionSet ( EOption eOption ) const; bool IsOptionSet ( EOption eOption ) const;
bool SetOption ( EOption eOption, bool bValue ); void SetOption ( EOption eOption, bool bValue );
bool IsOptionEnabled ( EOption eOption ) const; bool IsOptionEnabled ( EOption eOption ) const;
// xmlsec05 deprecated methods // xmlsec05 deprecated methods
......
...@@ -150,13 +150,9 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtViewOptions : public utl::detail::Op ...@@ -150,13 +150,9 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtViewOptions : public utl::detail::Op
your view will die relay in configuration... your view will die relay in configuration...
@seealso method Exist() @seealso method Exist()
@return True if delete OK, False otherwise.
@onerror We return sal_False.
*//*-*****************************************************************************************************/ *//*-*****************************************************************************************************/
bool Delete(); void Delete();
/*-**************************************************************************************************** /*-****************************************************************************************************
@short use it to set/get the window state of your view @short use it to set/get the window state of your view
......
...@@ -1079,10 +1079,10 @@ bool SvtSecurityOptions::IsOptionSet( EOption eOption ) const ...@@ -1079,10 +1079,10 @@ bool SvtSecurityOptions::IsOptionSet( EOption eOption ) const
return m_pDataContainer->IsOptionSet( eOption ); return m_pDataContainer->IsOptionSet( eOption );
} }
bool SvtSecurityOptions::SetOption( EOption eOption, bool bValue ) void SvtSecurityOptions::SetOption( EOption eOption, bool bValue )
{ {
MutexGuard aGuard( GetInitMutex() ); MutexGuard aGuard( GetInitMutex() );
return m_pDataContainer->SetOption( eOption, bValue ); m_pDataContainer->SetOption( eOption, bValue );
} }
bool SvtSecurityOptions::IsOptionEnabled( EOption eOption ) const bool SvtSecurityOptions::IsOptionEnabled( EOption eOption ) const
......
...@@ -726,32 +726,22 @@ bool SvtViewOptions::Exists() const ...@@ -726,32 +726,22 @@ bool SvtViewOptions::Exists() const
// public method // public method
bool SvtViewOptions::Delete() void SvtViewOptions::Delete()
{ {
// Ready for multithreading // Ready for multithreading
::osl::MutexGuard aGuard( GetOwnStaticMutex() ); ::osl::MutexGuard aGuard( GetOwnStaticMutex() );
bool bState = false;
switch( m_eViewType ) switch( m_eViewType )
{ {
case E_DIALOG : { case E_DIALOG : m_pDataContainer_Dialogs->Delete( m_sViewName );
bState = m_pDataContainer_Dialogs->Delete( m_sViewName );
}
break; break;
case E_TABDIALOG : { case E_TABDIALOG : m_pDataContainer_TabDialogs->Delete( m_sViewName );
bState = m_pDataContainer_TabDialogs->Delete( m_sViewName );
}
break; break;
case E_TABPAGE : { case E_TABPAGE : m_pDataContainer_TabPages->Delete( m_sViewName );
bState = m_pDataContainer_TabPages->Delete( m_sViewName );
}
break; break;
case E_WINDOW : { case E_WINDOW : m_pDataContainer_Windows->Delete( m_sViewName );
bState = m_pDataContainer_Windows->Delete( m_sViewName );
}
break; break;
} }
return bState;
} }
// public method // public method
......
...@@ -82,23 +82,20 @@ CollatorWrapper::loadDefaultCollator (const lang::Locale& rLocale, sal_Int32 nOp ...@@ -82,23 +82,20 @@ CollatorWrapper::loadDefaultCollator (const lang::Locale& rLocale, sal_Int32 nOp
return 0; return 0;
} }
sal_Int32 void
CollatorWrapper::loadCollatorAlgorithm (const OUString& rAlgorithm, CollatorWrapper::loadCollatorAlgorithm (const OUString& rAlgorithm,
const lang::Locale& rLocale, sal_Int32 nOptions) const lang::Locale& rLocale, sal_Int32 nOptions)
{ {
try try
{ {
if (mxInternationalCollator.is()) if (mxInternationalCollator.is())
return mxInternationalCollator->loadCollatorAlgorithm ( mxInternationalCollator->loadCollatorAlgorithm (
rAlgorithm, rLocale, nOptions); rAlgorithm, rLocale, nOptions);
} }
catch (const uno::RuntimeException&) catch (const uno::RuntimeException&)
{ {
SAL_WARN( "unotools.i18n","CollatorWrapper: loadCollatorAlgorithm failed"); SAL_WARN( "unotools.i18n","CollatorWrapper: loadCollatorAlgorithm failed");
} }
return 0;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment