From 1110346b3b8e57a190366aabebb62e53c6ab6d01 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 26 Feb 2016 14:44:03 +0200 Subject: loplugin:unuseddefaultparam in unotools Change-Id: Icb2dc74263026d90b7998b3fd880fd5d2c67a3b7 --- unotools/source/config/confignode.cxx | 4 ++-- unotools/source/config/fontcfg.cxx | 5 ++--- unotools/source/misc/fontcvt.cxx | 4 ++-- unotools/source/ucbhelper/ucbhelper.cxx | 4 ++-- unotools/source/ucbhelper/ucbstreamhelper.cxx | 15 ++++++--------- 5 files changed, 14 insertions(+), 18 deletions(-) (limited to 'unotools') diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx index e1b31cc0db76..827973221273 100644 --- a/unotools/source/config/confignode.cxx +++ b/unotools/source/config/confignode.cxx @@ -551,13 +551,13 @@ namespace utl } OConfigurationTreeRoot OConfigurationTreeRoot::tryCreateWithComponentContext( const Reference< XComponentContext >& rxContext, - const OUString& _rPath, sal_Int32 _nDepth , CREATION_MODE _eMode , bool _bLazyWrite ) + const OUString& _rPath, sal_Int32 _nDepth , CREATION_MODE _eMode ) { OSL_ENSURE( rxContext.is(), "OConfigurationTreeRoot::tryCreateWithComponentContext: invalid XComponentContext!" ); try { Reference< XMultiServiceFactory > xConfigFactory = theDefaultProvider::get( rxContext ); - return createWithProvider( xConfigFactory, _rPath, _nDepth, _eMode, _bLazyWrite ); + return createWithProvider( xConfigFactory, _rPath, _nDepth, _eMode ); } catch(const Exception&) { diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index 2b5105a26f78..e310b6ae5f88 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -1099,8 +1099,7 @@ void FontSubstConfiguration::readLocaleSubst( const OUString& rBcp47 ) const } } -const FontNameAttr* FontSubstConfiguration::getSubstInfo( const OUString& rFontName, - const LanguageTag& rLanguageTag ) const +const FontNameAttr* FontSubstConfiguration::getSubstInfo( const OUString& rFontName ) const { if( rFontName.isEmpty() ) return nullptr; @@ -1111,7 +1110,7 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const OUString& rFontN FontNameAttr aSearchAttr; aSearchAttr.Name = aSearchFont; - LanguageTag aLanguageTag( rLanguageTag); + LanguageTag aLanguageTag("en"); if( aLanguageTag.isSystemLocale() ) aLanguageTag = SvtSysLocale().GetUILanguageTag(); diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx index f60d285763e2..9188293474d3 100644 --- a/unotools/source/misc/fontcvt.cxx +++ b/unotools/source/misc/fontcvt.cxx @@ -1238,9 +1238,9 @@ OUString StarSymbolToMSMultiFontImpl::ConvertChar(sal_Unicode &rChar) return sRet; } -StarSymbolToMSMultiFont *CreateStarSymbolToMSMultiFont(bool bPerfectOnly) +StarSymbolToMSMultiFont *CreateStarSymbolToMSMultiFont() { - return new StarSymbolToMSMultiFontImpl(bPerfectOnly); + return new StarSymbolToMSMultiFontImpl(false/*bPerfectOnly*/); } sal_Unicode ConvertChar::RecodeChar( sal_Unicode cChar ) const diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx index 5519419f90a9..427cad2ebef6 100644 --- a/unotools/source/ucbhelper/ucbhelper.cxx +++ b/unotools/source/ucbhelper/ucbhelper.cxx @@ -225,7 +225,7 @@ bool utl::UCBContentHelper::Kill(OUString const & url) { bool utl::UCBContentHelper::MakeFolder( ucbhelper::Content & parent, OUString const & title, - ucbhelper::Content & result, bool exclusive) + ucbhelper::Content & result) { bool exists = false; try { @@ -276,7 +276,7 @@ bool utl::UCBContentHelper::MakeFolder( << e.getValueType().getTypeName() << " \"" << e.get().Message << '"'); } - if (exists && !exclusive) { + if (exists) { INetURLObject o(parent.getURL()); o.Append(title); result = content(o); diff --git a/unotools/source/ucbhelper/ucbstreamhelper.cxx b/unotools/source/ucbhelper/ucbstreamhelper.cxx index 4025b7738f16..07421c56368b 100644 --- a/unotools/source/ucbhelper/ucbstreamhelper.cxx +++ b/unotools/source/ucbhelper/ucbstreamhelper.cxx @@ -138,24 +138,21 @@ static SvStream* lcl_CreateStream( const OUString& rFileName, StreamMode eOpenMo return pStream; } -SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode, - UcbLockBytesHandler* pHandler ) +SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode ) { - return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), pHandler, true /* bEnsureFileExists */ ); + return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), nullptr, true /* bEnsureFileExists */ ); } SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode, - Reference < XInteractionHandler > xInteractionHandler, - UcbLockBytesHandler* pHandler ) + Reference < XInteractionHandler > xInteractionHandler ) { - return lcl_CreateStream( rFileName, eOpenMode, xInteractionHandler, pHandler, true /* bEnsureFileExists */ ); + return lcl_CreateStream( rFileName, eOpenMode, xInteractionHandler, nullptr, true /* bEnsureFileExists */ ); } SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode, - bool bFileExists, - UcbLockBytesHandler* pHandler ) + bool bFileExists ) { - return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), pHandler, !bFileExists ); + return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), nullptr, !bFileExists ); } SvStream* UcbStreamHelper::CreateStream( Reference < XInputStream > xStream ) -- cgit v1.2.3