Improved loplugin:stringconstant (now that GCC 7 supports it): stoc

Change-Id: Id739d5ff815d3bb1db48e9b1c2b3f739e3f11dfd
Reviewed-on: https://gerrit.libreoffice.org/76644
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2019-07-30 17:48:28 +02:00
parent 254eb4186a
commit d15e0ff4fd
22 changed files with 23 additions and 23 deletions

View File

@@ -117,7 +117,7 @@ void IdlReflectionServiceImpl::dispose()
OUString IdlReflectionServiceImpl::getImplementationName()
{
return OUString("com.sun.star.comp.stoc.CoreReflection");
return "com.sun.star.comp.stoc.CoreReflection";
}
sal_Bool IdlReflectionServiceImpl::supportsService( const OUString & rServiceName )

View File

@@ -1050,7 +1050,7 @@ sal_Bool SAL_CALL NestedRegistryImpl::hasElements( )
OUString SAL_CALL NestedRegistryImpl::getImplementationName( )
{
return OUString("com.sun.star.comp.stoc.NestedRegistry");
return "com.sun.star.comp.stoc.NestedRegistry";
}
sal_Bool SAL_CALL NestedRegistryImpl::supportsService( const OUString& ServiceName )

View File

@@ -1115,7 +1115,7 @@ ImplementationRegistration::ImplementationRegistration( const Reference < XCompo
// XServiceInfo
OUString ImplementationRegistration::getImplementationName()
{
return OUString("com.sun.star.comp.stoc.ImplementationRegistration");
return "com.sun.star.comp.stoc.ImplementationRegistration";
}
// XServiceInfo

View File

@@ -1534,7 +1534,7 @@ private:
}
virtual OUString SAL_CALL getImplementationName() override
{ return OUString("com.sun.star.comp.stoc.Introspection"); }
{ return "com.sun.star.comp.stoc.Introspection"; }
virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override
{ return cppu::supportsService(this, ServiceName); }

View File

@@ -72,7 +72,7 @@ static Sequence< OUString > inv_getSupportedServiceNames()
static OUString inv_getImplementationName()
{
return OUString(IMPLNAME);
return IMPLNAME;
}
// TODO: Implement centrally

View File

@@ -65,7 +65,7 @@ static Sequence< OUString > invadp_getSupportedServiceNames()
static OUString invadp_getImplementationName()
{
return OUString(IMPLNAME);
return IMPLNAME;
}
struct hash_ptr

View File

@@ -76,7 +76,7 @@ static Sequence< OUString > loader_getSupportedServiceNames()
static OUString loader_getImplementationName()
{
return OUString( "com.sun.star.comp.stoc.JavaComponentLoader" );
return "com.sun.star.comp.stoc.JavaComponentLoader";
}
class JavaComponentLoader : public WeakImplHelper<XImplementationLoader, XServiceInfo>

View File

@@ -187,7 +187,7 @@ bool SingletonFactory::m_bDisposed = false;
OUString serviceGetImplementationName()
{
return OUString("com.sun.star.comp.stoc.JavaVirtualMachine");
return "com.sun.star.comp.stoc.JavaVirtualMachine";
}
css::uno::Sequence< OUString > serviceGetSupportedServiceNames()

View File

@@ -76,7 +76,7 @@ DllComponentLoader::DllComponentLoader( const Reference<XComponentContext> & xCt
OUString SAL_CALL DllComponentLoader::getImplementationName( )
{
return OUString("com.sun.star.comp.stoc.DLLComponentLoader");
return "com.sun.star.comp.stoc.DLLComponentLoader";
}
sal_Bool SAL_CALL DllComponentLoader::supportsService( const OUString& ServiceName )

View File

@@ -52,7 +52,7 @@ static Sequence< OUString > ns_getSupportedServiceNames()
static OUString ns_getImplementationName()
{
return OUString(IMPLNAME);
return IMPLNAME;
}
typedef std::unordered_map< OUString, Reference<XInterface > > HashMap_OWString_Interface;

View File

@@ -51,7 +51,7 @@ namespace
OUString proxyfac_getImplementationName()
{
return OUString(IMPL_NAME);
return IMPL_NAME;
}
Sequence< OUString > proxyfac_getSupportedServiceNames()

View File

@@ -838,7 +838,7 @@ Reference< security::XAccessControlContext > AccessController::getContext()
OUString AccessController::getImplementationName()
{
return OUString("com.sun.star.security.comp.stoc.AccessController");
return "com.sun.star.security.comp.stoc.AccessController";
}
sal_Bool AccessController::supportsService( OUString const & serviceName )

View File

@@ -472,7 +472,7 @@ void FilePolicy::refresh()
OUString FilePolicy::getImplementationName()
{
return OUString(IMPL_NAME);
return IMPL_NAME;
}
sal_Bool FilePolicy::supportsService( OUString const & serviceName )

View File

@@ -450,7 +450,7 @@ bool AllPermission::implies( Permission const & ) const
OUString AllPermission::toString() const
{
return OUString("com.sun.star.security.AllPermission");
return "com.sun.star.security.AllPermission";
}

View File

@@ -894,7 +894,7 @@ void OServiceManager::initialize( Sequence< Any > const & )
// XServiceInfo
OUString OServiceManager::getImplementationName()
{
return OUString("com.sun.star.comp.stoc.OServiceManager");
return "com.sun.star.comp.stoc.OServiceManager";
}
// XServiceInfo
@@ -1153,7 +1153,7 @@ public:
// XServiceInfo
OUString SAL_CALL getImplementationName() override
{ return OUString("com.sun.star.comp.stoc.ORegistryServiceManager"); }
{ return "com.sun.star.comp.stoc.ORegistryServiceManager"; }
Sequence< OUString > SAL_CALL getSupportedServiceNames() override;

View File

@@ -83,7 +83,7 @@ private:
OUString const & aKeyName, OUString const & aUrl) override;
virtual OUString SAL_CALL getImplementationName() override
{ return OUString("com.sun.star.comp.stoc.SimpleRegistry"); }
{ return "com.sun.star.comp.stoc.SimpleRegistry"; }
virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override
{ return cppu::supportsService(this, ServiceName); }

View File

@@ -264,7 +264,7 @@ TypeConverter_Impl::TypeConverter_Impl() {}
// XServiceInfo
OUString TypeConverter_Impl::getImplementationName()
{
return OUString("com.sun.star.comp.stoc.TypeConverter");
return "com.sun.star.comp.stoc.TypeConverter";
}
// XServiceInfo

View File

@@ -70,7 +70,7 @@ private:
OUString Translator::getImplementationName()
{
return OUString("com.sun.star.comp.uri.ExternalUriReferenceTranslator");
return "com.sun.star.comp.uri.ExternalUriReferenceTranslator";
}
sal_Bool Translator::supportsService(OUString const & serviceName)

View File

@@ -287,7 +287,7 @@ private:
OUString Factory::getImplementationName()
{
return OUString("com.sun.star.comp.uri.UriReferenceFactory");
return "com.sun.star.comp.uri.UriReferenceFactory";
}
sal_Bool Factory::supportsService(OUString const & serviceName)

View File

@@ -161,7 +161,7 @@ private:
OUString Parser::getImplementationName()
{
return OUString("com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand");
return "com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand";
}
sal_Bool Parser::supportsService(OUString const & serviceName)

View File

@@ -375,7 +375,7 @@ private:
OUString Parser::getImplementationName()
{
return OUString("com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript");
return "com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript";
}
sal_Bool Parser::supportsService(OUString const & serviceName)

View File

@@ -70,7 +70,7 @@ private:
OUString Factory::getImplementationName()
{
return OUString("com.sun.star.comp.uri.VndSunStarPkgUrlReferenceFactory");
return "com.sun.star.comp.uri.VndSunStarPkgUrlReferenceFactory";
}
sal_Bool Factory::supportsService(OUString const & serviceName)