diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 09:47:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-24 08:37:51 +0200 |
commit | f31c9f16fefd16ea434cdd68721d45bced9b78e1 (patch) | |
tree | c0c504cb4e4d41e168f7118c1baee6b4091aa51d /unotools | |
parent | 645db9a2643832e29dbdf904e1cf7b323d273f86 (diff) |
clang-tidy performance-unnecessary-copy-init in test..xmlscript
Change-Id: I1ae16467a8e58e8a50f59b7a140e9f8b68bde07e
Reviewed-on: https://gerrit.libreoffice.org/62254
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/fontcfg.cxx | 2 | ||||
-rw-r--r-- | unotools/source/i18n/localedatawrapper.cxx | 2 | ||||
-rw-r--r-- | unotools/source/misc/ZipPackageHelper.cxx | 13 |
3 files changed, 5 insertions, 12 deletions
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index 365cea68450b..89f9ab5094cb 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -292,7 +292,7 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const LanguageTag& rLan } else { - Locale aLocale( aLanguageTag.getLocale()); + const Locale& aLocale( aLanguageTag.getLocale()); if (MsLangId::isTraditionalChinese(aLocale)) return OUString(FALLBACKFONT_UI_SANS_CHINTRD); else if (MsLangId::isSimplifiedChinese(aLocale)) diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index 8b4782730784..b9b4b78a85c2 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -507,7 +507,7 @@ bool LocaleDataWrapper::doesSecondaryCalendarUseEC( const OUString& rName ) cons // Check language tag first to avoid loading all calendars of this locale. LanguageTag aLoaded( getLoadedLanguageTag()); - OUString aBcp47( aLoaded.getBcp47()); + const OUString& aBcp47( aLoaded.getBcp47()); // So far determine only by locale, we know for a few. /* TODO: check date format codes? or add to locale data? */ if ( aBcp47 != "ja-JP" && diff --git a/unotools/source/misc/ZipPackageHelper.cxx b/unotools/source/misc/ZipPackageHelper.cxx index 4d4720417823..21388015a01b 100644 --- a/unotools/source/misc/ZipPackageHelper.cxx +++ b/unotools/source/misc/ZipPackageHelper.cxx @@ -158,19 +158,12 @@ void ZipPackageHelper::addFolderWithContent( Reference< XInterface > const & xRo } void ZipPackageHelper::addFile( css::uno::Reference< css::uno::XInterface > const & xRootFolder, - const OUString& rSourceFile ) + const OUString& rSourceFileURL ) { - OUString aFileURL( rSourceFile ); - - /*if( !aFileURL.matchIgnoreAsciiCase("file://") ) - { - aFileURL = URIHelper::SmartRel2Abs( aFileURL, Link<OUString *, bool>(), false ); - }*/ - - INetURLObject aURL( aFileURL ); + INetURLObject aURL( rSourceFileURL ); OUString aName( aURL.getName() ); - SvFileStream* pStream = new SvFileStream(aFileURL, StreamMode::READ ); + SvFileStream* pStream = new SvFileStream(rSourceFileURL, StreamMode::READ ); Reference< XInputStream > xInput( new utl::OSeekableInputStreamWrapper( pStream, true ) ); Reference< XActiveDataSink > xSink( mxFactory->createInstance(), UNO_QUERY ); Reference< XUnoTunnel > xTunnel( xSink, UNO_QUERY ); |