diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-07-30 17:57:47 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-07-31 13:00:27 +0200 |
commit | 8b6c64513d6e3e2161f06c38fc093e47216dabb1 (patch) | |
tree | 664ca36207e125d4eb03a7cdb026d851987271fe /comphelper | |
parent | 6c145a826f4ecebcc387b0bd1dac018980b90bf9 (diff) |
Improved loplugin:stringconstant (now that GCC 7 supports it): comphelper
Change-Id: Ie0d3604b8742aed139131d523f6c7371bc02b7c3
Reviewed-on: https://gerrit.libreoffice.org/76691
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'comphelper')
17 files changed, 29 insertions, 29 deletions
diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx index 928456bd79f3..a912bb62e156 100644 --- a/comphelper/source/compare/AnyCompareFactory.cxx +++ b/comphelper/source/compare/AnyCompareFactory.cxx @@ -108,7 +108,7 @@ void SAL_CALL AnyCompareFactory::initialize( const Sequence< Any >& aArguments ) OUString SAL_CALL AnyCompareFactory::getImplementationName( ) { - return OUString( "AnyCompareFactory" ); + return "AnyCompareFactory"; } sal_Bool SAL_CALL AnyCompareFactory::supportsService( const OUString& ServiceName ) diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx index dc7d43448b8b..7455831214ca 100644 --- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx +++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx @@ -133,7 +133,7 @@ sal_Bool SAL_CALL IndexedPropertyValuesContainer::hasElements( ) //XServiceInfo OUString SAL_CALL IndexedPropertyValuesContainer::getImplementationName( ) { - return OUString( "IndexedPropertyValuesContainer" ); + return "IndexedPropertyValuesContainer"; } sal_Bool SAL_CALL IndexedPropertyValuesContainer::supportsService( const OUString& ServiceName ) diff --git a/comphelper/source/container/NamedPropertyValuesContainer.cxx b/comphelper/source/container/NamedPropertyValuesContainer.cxx index 654ed8ecefda..5cc30b1cf954 100644 --- a/comphelper/source/container/NamedPropertyValuesContainer.cxx +++ b/comphelper/source/container/NamedPropertyValuesContainer.cxx @@ -141,7 +141,7 @@ sal_Bool SAL_CALL NamedPropertyValuesContainer::hasElements( ) //XServiceInfo OUString SAL_CALL NamedPropertyValuesContainer::getImplementationName( ) { - return OUString( "NamedPropertyValuesContainer" ); + return "NamedPropertyValuesContainer"; } sal_Bool SAL_CALL NamedPropertyValuesContainer::supportsService( const OUString& ServiceName ) diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index fef9a74f90b5..f003fe0e02ee 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -648,7 +648,7 @@ namespace comphelper OUString EnumerableMap::getImplementationName_static( ) { - return OUString( "org.openoffice.comp.comphelper.EnumerableMap" ); + return "org.openoffice.comp.comphelper.EnumerableMap"; } diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index 182384cad3e7..209d0ac6deb6 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -629,7 +629,7 @@ void SAL_CALL ImplEventAttacherManager::removeScriptListener(const Reference< XS // Methods of XPersistObject OUString SAL_CALL ImplEventAttacherManager::getServiceName() { - return OUString( "com.sun.star.uno.script.EventAttacherManager" ); + return "com.sun.star.uno.script.EventAttacherManager"; } void SAL_CALL ImplEventAttacherManager::write(const Reference< XObjectOutputStream >& OutStream) diff --git a/comphelper/source/misc/graphicmimetype.cxx b/comphelper/source/misc/graphicmimetype.cxx index 78e216a941ae..4286c92f7a96 100644 --- a/comphelper/source/misc/graphicmimetype.cxx +++ b/comphelper/source/misc/graphicmimetype.cxx @@ -72,7 +72,7 @@ OUString GraphicMimeTypeHelper::GetMimeTypeForXGraphic(const Reference<XGraphic> { return aSourceMimeType; } - return OUString(""); + return ""; } OUString @@ -94,29 +94,29 @@ OUString GraphicMimeTypeHelper::GetMimeTypeForConvertDataFormat(ConvertDataForma switch (convertDataFormat) { case ConvertDataFormat::BMP: - return OUString("image/bmp"); + return "image/bmp"; case ConvertDataFormat::GIF: - return OUString("image/gif"); + return "image/gif"; case ConvertDataFormat::JPG: - return OUString("image/jpeg"); + return "image/jpeg"; case ConvertDataFormat::PCT: - return OUString("image/x-pict"); + return "image/x-pict"; case ConvertDataFormat::PNG: - return OUString("image/png"); + return "image/png"; case ConvertDataFormat::SVM: - return OUString("image/x-svm"); + return "image/x-svm"; case ConvertDataFormat::TIF: - return OUString("image/tiff"); + return "image/tiff"; case ConvertDataFormat::WMF: - return OUString("image/x-wmf"); + return "image/x-wmf"; case ConvertDataFormat::EMF: - return OUString("image/x-emf"); + return "image/x-emf"; case ConvertDataFormat::SVG: - return OUString("image/svg+xml"); + return "image/svg+xml"; case ConvertDataFormat::MET: // What is this? case ConvertDataFormat::Unknown: default: - return OUString(""); + return ""; } } } diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx index 21b165fe1d8a..31e55c20a6e0 100644 --- a/comphelper/source/misc/instancelocker.cxx +++ b/comphelper/source/misc/instancelocker.cxx @@ -176,7 +176,7 @@ void SAL_CALL OInstanceLocker::initialize( const uno::Sequence< uno::Any >& aArg // XServiceInfo OUString SAL_CALL OInstanceLocker::getImplementationName( ) { - return OUString( "com.sun.star.comp.embed.InstanceLocker" ); + return "com.sun.star.comp.embed.InstanceLocker"; } sal_Bool SAL_CALL OInstanceLocker::supportsService( const OUString& ServiceName ) diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index 24e5626e4593..21126c4867ec 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -499,7 +499,7 @@ OUString MimeConfigurationHelper::GetFactoryNameByStringClassID( const OUString& { uno::Sequence< sal_Int8 > aClassID = GetSequenceClassIDRepresentation( aStringClassID ); if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_DUMMY_CLASSID ) ) ) - return OUString( "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory" ); + return "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory"; } } diff --git a/comphelper/source/misc/officerestartmanager.cxx b/comphelper/source/misc/officerestartmanager.cxx index b2997c9fa867..f56486858522 100644 --- a/comphelper/source/misc/officerestartmanager.cxx +++ b/comphelper/source/misc/officerestartmanager.cxx @@ -131,7 +131,7 @@ void SAL_CALL OOfficeRestartManager::notify( const uno::Any& /* aData */ ) OUString SAL_CALL OOfficeRestartManager::getImplementationName() { - return OUString("com.sun.star.comp.task.OfficeRestartManager"); + return "com.sun.star.comp.task.OfficeRestartManager"; } sal_Bool SAL_CALL OOfficeRestartManager::supportsService( const OUString& aServiceName ) diff --git a/comphelper/source/misc/xmlsechelper.cxx b/comphelper/source/misc/xmlsechelper.cxx index 9b3b19249803..d0b4b3074ca9 100644 --- a/comphelper/source/misc/xmlsechelper.cxx +++ b/comphelper/source/misc/xmlsechelper.cxx @@ -35,9 +35,9 @@ namespace xmlsec switch (rKind) { case css::security::CertificateKind_X509: - return OUString("X.509"); + return "X.509"; case css::security::CertificateKind_OPENPGP: - return OUString("OpenPGP"); + return "OpenPGP"; default: return OUString(); } diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx index fae3d7c4f059..dec66895e940 100644 --- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx +++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx @@ -189,7 +189,7 @@ OfficeInstallationDirectories::makeAbsoluteURL( const OUString& URL ) OUString SAL_CALL OfficeInstallationDirectories::getImplementationName() { - return OUString("com.sun.star.comp.util.OfficeInstallationDirectories"); + return "com.sun.star.comp.util.OfficeInstallationDirectories"; } // virtual diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx index 5ce75e30323a..b5414b5c52d8 100644 --- a/comphelper/source/property/genericpropertyset.cxx +++ b/comphelper/source/property/genericpropertyset.cxx @@ -235,7 +235,7 @@ sal_Bool SAL_CALL GenericPropertySet::supportsService( const OUString& ServiceN OUString SAL_CALL GenericPropertySet::getImplementationName() { - return OUString( "com.sun.star.comp.comphelper.GenericPropertySet" ); + return "com.sun.star.comp.comphelper.GenericPropertySet"; } Sequence< OUString > SAL_CALL GenericPropertySet::getSupportedServiceNames( ) diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx index 9232b1c07f32..5c6cd013d70c 100644 --- a/comphelper/source/property/opropertybag.cxx +++ b/comphelper/source/property/opropertybag.cxx @@ -113,7 +113,7 @@ namespace comphelper OUString SAL_CALL OPropertyBag::getImplementationName() { - return OUString( "com.sun.star.comp.comphelper.OPropertyBag" ); + return "com.sun.star.comp.comphelper.OPropertyBag"; } sal_Bool SAL_CALL OPropertyBag::supportsService( const OUString& rServiceName ) diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx index 741c4346d310..8d120989eec6 100644 --- a/comphelper/source/streaming/memorystream.cxx +++ b/comphelper/source/streaming/memorystream.cxx @@ -92,7 +92,7 @@ UNOMemoryStream::UNOMemoryStream() // XServiceInfo OUString SAL_CALL UNOMemoryStream::getImplementationName() { - return OUString("com.sun.star.comp.MemoryStream"); + return "com.sun.star.comp.MemoryStream"; } sal_Bool SAL_CALL UNOMemoryStream::supportsService(const OUString& ServiceName) diff --git a/comphelper/source/streaming/seqinputstreamserv.cxx b/comphelper/source/streaming/seqinputstreamserv.cxx index da7eec387239..bdf6a6e19d34 100644 --- a/comphelper/source/streaming/seqinputstreamserv.cxx +++ b/comphelper/source/streaming/seqinputstreamserv.cxx @@ -86,7 +86,7 @@ SequenceInputStreamService::SequenceInputStreamService() // com.sun.star.uno.XServiceInfo: OUString SAL_CALL SequenceInputStreamService::getImplementationName() { - return OUString ( "com.sun.star.comp.SequenceInputStreamService" ); + return "com.sun.star.comp.SequenceInputStreamService"; } sal_Bool SAL_CALL SequenceInputStreamService::supportsService( OUString const & serviceName ) diff --git a/comphelper/source/streaming/seqoutputstreamserv.cxx b/comphelper/source/streaming/seqoutputstreamserv.cxx index 4098a0aa226f..5f679a914abf 100644 --- a/comphelper/source/streaming/seqoutputstreamserv.cxx +++ b/comphelper/source/streaming/seqoutputstreamserv.cxx @@ -73,7 +73,7 @@ SequenceOutputStreamService::SequenceOutputStreamService() // com.sun.star.uno.XServiceInfo: OUString SAL_CALL SequenceOutputStreamService::getImplementationName() { - return OUString("com.sun.star.comp.SequenceOutputStreamService"); + return "com.sun.star.comp.SequenceOutputStreamService"; } sal_Bool SAL_CALL SequenceOutputStreamService::supportsService( OUString const & serviceName ) diff --git a/comphelper/source/xml/xmltools.cxx b/comphelper/source/xml/xmltools.cxx index c8f8863a4db9..948ed64e370e 100644 --- a/comphelper/source/xml/xmltools.cxx +++ b/comphelper/source/xml/xmltools.cxx @@ -102,7 +102,7 @@ namespace comphelper aSeq[0], aSeq[1], aSeq[2], aSeq[3], aSeq[4], aSeq[5], aSeq[6], aSeq[7], aSeq[8], aSeq[9], aSeq[10], aSeq[11], aSeq[12], aSeq[13], aSeq[14], aSeq[15]); - return OString(str); + return str; } } } |