simplify some getSupportedServiceNames
Change-Id: I81195505d6006b6587f7b98c1545919083f0e588 Reviewed-on: https://gerrit.libreoffice.org/74497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -301,8 +301,7 @@ sal_Bool SAL_CALL AccessibleBrowseBoxBase::supportsService(
|
||||
|
||||
Sequence< OUString > SAL_CALL AccessibleBrowseBoxBase::getSupportedServiceNames()
|
||||
{
|
||||
const OUString aServiceName( "com.sun.star.accessibility.AccessibleContext" );
|
||||
return Sequence< OUString >( &aServiceName, 1 );
|
||||
return { "com.sun.star.accessibility.AccessibleContext" };
|
||||
}
|
||||
|
||||
// other public methods
|
||||
|
||||
@@ -280,7 +280,7 @@ sal_Bool SAL_CALL DataPoint::supportsService( const OUString& rServiceName )
|
||||
|
||||
css::uno::Sequence< OUString > SAL_CALL DataPoint::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence< OUString >{
|
||||
return {
|
||||
"com.sun.star.drawing.FillProperties",
|
||||
"com.sun.star.chart2.DataPoint",
|
||||
"com.sun.star.chart2.DataPointProperties",
|
||||
|
||||
@@ -646,7 +646,7 @@ OUString desktop::splash::getImplementationName() {
|
||||
|
||||
css::uno::Sequence< OUString > desktop::splash::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence< OUString > { "com.sun.star.office.SplashScreen" };
|
||||
return { "com.sun.star.office.SplashScreen" };
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
@@ -288,9 +288,7 @@ sal_Bool SAL_CALL DragSource::supportsService( const OUString& ServiceName )
|
||||
|
||||
Sequence< OUString > SAL_CALL DragSource::getSupportedServiceNames( )
|
||||
{
|
||||
OUString names[1]= {OUString(DNDSOURCE_SERVICE_NAME)};
|
||||
|
||||
return Sequence<OUString>(names, 1);
|
||||
return { DNDSOURCE_SERVICE_NAME };
|
||||
}
|
||||
|
||||
/** This function is called as extra thread from
|
||||
|
||||
@@ -258,8 +258,7 @@ sal_Bool SAL_CALL DropTarget::supportsService( const OUString& ServiceName )
|
||||
|
||||
Sequence< OUString > SAL_CALL DropTarget::getSupportedServiceNames( )
|
||||
{
|
||||
OUString names[1]= {OUString(DNDTARGET_SERVICE_NAME)};
|
||||
return Sequence<OUString>(names, 1);
|
||||
return { DNDTARGET_SERVICE_NAME };
|
||||
}
|
||||
|
||||
// XDropTarget
|
||||
|
||||
@@ -304,8 +304,7 @@ Sequence<OUString> SAL_CALL EventAttacherImpl::getSupportedServiceNames( )
|
||||
|
||||
Sequence<OUString> EventAttacherImpl::getSupportedServiceNames_Static( )
|
||||
{
|
||||
OUString aStr( SERVICENAME );
|
||||
return Sequence< OUString >( &aStr, 1 );
|
||||
return { SERVICENAME };
|
||||
}
|
||||
|
||||
void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments)
|
||||
|
||||
@@ -165,8 +165,7 @@ namespace pcr
|
||||
|
||||
Sequence< OUString > ObjectInspectorModel::getSupportedServiceNames_static( )
|
||||
{
|
||||
OUString sService( "com.sun.star.inspection.ObjectInspectorModel" );
|
||||
return Sequence< OUString >( &sService, 1 );
|
||||
return { "com.sun.star.inspection.ObjectInspectorModel" };
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -328,8 +328,7 @@ Sequence<OUString> SAL_CALL LangGuess_Impl::getSupportedServiceNames( )
|
||||
|
||||
Sequence<OUString> LangGuess_Impl::getSupportedServiceNames_Static( )
|
||||
{
|
||||
OUString aName( SERVICENAME );
|
||||
return Sequence< OUString >( &aName, 1 );
|
||||
return { SERVICENAME };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -170,11 +170,7 @@ Sequence<OUString> SAL_CALL NumberText_Impl::getSupportedServiceNames()
|
||||
return getSupportedServiceNames_Static();
|
||||
}
|
||||
|
||||
Sequence<OUString> NumberText_Impl::getSupportedServiceNames_Static()
|
||||
{
|
||||
OUString aName(SERVICENAME);
|
||||
return Sequence<OUString>(&aName, 1);
|
||||
}
|
||||
Sequence<OUString> NumberText_Impl::getSupportedServiceNames_Static() { return { SERVICENAME }; }
|
||||
|
||||
/**
|
||||
* Function to create a new component instance; is needed by factory helper implementation.
|
||||
|
||||
@@ -668,13 +668,10 @@ sal_Bool SAL_CALL MasterScriptProvider::supportsService( const OUString& service
|
||||
|
||||
Sequence< OUString > SAL_CALL MasterScriptProvider::getSupportedServiceNames( )
|
||||
{
|
||||
OUString names[3];
|
||||
|
||||
names[0] = "com.sun.star.script.provider.MasterScriptProvider";
|
||||
names[1] = "com.sun.star.script.browse.BrowseNode";
|
||||
names[2] = "com.sun.star.script.provider.ScriptProvider";
|
||||
|
||||
return Sequence< OUString >( names, 3 );
|
||||
return {
|
||||
"com.sun.star.script.provider.MasterScriptProvider",
|
||||
"com.sun.star.script.browse.BrowseNode",
|
||||
"com.sun.star.script.provider.ScriptProvider" };
|
||||
}
|
||||
|
||||
} // namespace func_provider
|
||||
|
||||
@@ -1231,8 +1231,7 @@ sal_Bool SAL_CALL SdStyleSheetPool::supportsService( const OUString& ServiceName
|
||||
|
||||
Sequence< OUString > SAL_CALL SdStyleSheetPool::getSupportedServiceNames()
|
||||
{
|
||||
OUString aStr("com.sun.star.style.StyleFamilies");
|
||||
return Sequence< OUString >( &aStr, 1 );
|
||||
return { "com.sun.star.style.StyleFamilies" };
|
||||
}
|
||||
|
||||
// XNameAccess
|
||||
|
||||
@@ -234,8 +234,7 @@ OUString PresenterProtocolHandler::getImplementationName_static()
|
||||
|
||||
Sequence<OUString> PresenterProtocolHandler::getSupportedServiceNames_static()
|
||||
{
|
||||
static const OUString sServiceName("com.sun.star.frame.ProtocolHandler");
|
||||
return Sequence<OUString>(&sServiceName, 1);
|
||||
return { "com.sun.star.frame.ProtocolHandler" };
|
||||
}
|
||||
|
||||
Reference<XInterface> PresenterProtocolHandler::Create (
|
||||
|
||||
@@ -731,7 +731,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::supportsService(
|
||||
|
||||
Sequence< OUString > SAL_CALL SmGraphicAccessible::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence< OUString >{
|
||||
return {
|
||||
"css::accessibility::Accessible",
|
||||
"css::accessibility::AccessibleComponent",
|
||||
"css::accessibility::AccessibleContext",
|
||||
@@ -1774,7 +1774,7 @@ sal_Bool SAL_CALL SmEditAccessible::supportsService(
|
||||
|
||||
Sequence< OUString > SAL_CALL SmEditAccessible::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence< OUString >{
|
||||
return {
|
||||
"css::accessibility::Accessible",
|
||||
"css::accessibility::AccessibleComponent",
|
||||
"css::accessibility::AccessibleContext"
|
||||
|
||||
@@ -136,7 +136,7 @@ sal_Bool SAL_CALL SmFilterDetect::supportsService( const OUString& sServiceName
|
||||
/* XServiceInfo */
|
||||
Sequence< OUString > SAL_CALL SmFilterDetect::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence< OUString >{ "com.sun.star.frame.ExtendedTypeDetection" };
|
||||
return { "com.sun.star.frame.ExtendedTypeDetection" };
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
|
||||
|
||||
@@ -313,7 +313,7 @@ sal_Bool SAL_CALL SvtRulerAccessible::supportsService( const OUString& sServiceN
|
||||
|
||||
Sequence< OUString > SAL_CALL SvtRulerAccessible::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence< OUString > { OUString("com.sun.star.accessibility.AccessibleContext") };
|
||||
return { "com.sun.star.accessibility.AccessibleContext" };
|
||||
}
|
||||
|
||||
//===== XTypeProvider =======================================================
|
||||
|
||||
@@ -660,8 +660,7 @@ sal_Bool SAL_CALL SvUnoImageMap::supportsService( const OUString& ServiceName )
|
||||
|
||||
Sequence< OUString > SAL_CALL SvUnoImageMap::getSupportedServiceNames( )
|
||||
{
|
||||
const OUString aSN( "com.sun.star.image.ImageMap" );
|
||||
return Sequence< OUString >( &aSN, 1 );
|
||||
return { "com.sun.star.image.ImageMap" };
|
||||
}
|
||||
|
||||
void SvUnoImageMap::fillImageMap( ImageMap& rMap ) const
|
||||
|
||||
@@ -1436,8 +1436,7 @@ sal_Bool UnoControl::supportsService( const OUString& rServiceName )
|
||||
|
||||
Sequence< OUString > UnoControl::getSupportedServiceNames( )
|
||||
{
|
||||
OUString sName( "com.sun.star.awt.UnoControl" );
|
||||
return Sequence< OUString >( &sName, 1 );
|
||||
return { "com.sun.star.awt.UnoControl" };
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1050,8 +1050,7 @@ sal_Bool UnoControlModel::supportsService( const OUString& rServiceName )
|
||||
|
||||
css::uno::Sequence< OUString > UnoControlModel::getSupportedServiceNames( )
|
||||
{
|
||||
OUString sName( "com.sun.star.awt.UnoControlModel" );
|
||||
return Sequence< OUString >( &sName, 1 );
|
||||
return { "com.sun.star.awt.UnoControlModel" };
|
||||
}
|
||||
|
||||
sal_Bool UnoControlModel::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nPropId, const Any& rValue )
|
||||
|
||||
@@ -89,8 +89,7 @@ sal_Bool SAL_CALL StarOfficeCalcImportFilter::supportsService(const OUString& rS
|
||||
|
||||
Sequence<OUString> SAL_CALL StarOfficeCalcImportFilter::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence<OUString>{ "com.sun.star.document.ImportFilter",
|
||||
"com.sun.star.document.ExtendedTypeDetection" };
|
||||
return { "com.sun.star.document.ImportFilter", "com.sun.star.document.ExtendedTypeDetection" };
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
|
||||
@@ -52,8 +52,7 @@ sal_Bool SAL_CALL QXPImportFilter::supportsService(const OUString& rServiceName)
|
||||
|
||||
Sequence<OUString> SAL_CALL QXPImportFilter::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence<OUString>{ "com.sun.star.document.ImportFilter",
|
||||
"com.sun.star.document.ExtendedTypeDetection" };
|
||||
return { "com.sun.star.document.ImportFilter", "com.sun.star.document.ExtendedTypeDetection" };
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
|
||||
@@ -91,8 +91,7 @@ sal_Bool SAL_CALL StarOfficeDrawImportFilter::supportsService(const OUString& rS
|
||||
|
||||
Sequence<OUString> SAL_CALL StarOfficeDrawImportFilter::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence<OUString>{ "com.sun.star.document.ImportFilter",
|
||||
"com.sun.star.document.ExtendedTypeDetection" };
|
||||
return { "com.sun.star.document.ImportFilter", "com.sun.star.document.ExtendedTypeDetection" };
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
|
||||
@@ -52,8 +52,7 @@ sal_Bool SAL_CALL ZMFImportFilter::supportsService(const OUString& rServiceName)
|
||||
|
||||
Sequence<OUString> SAL_CALL ZMFImportFilter::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence<OUString>{ "com.sun.star.document.ImportFilter",
|
||||
"com.sun.star.document.ExtendedTypeDetection" };
|
||||
return { "com.sun.star.document.ImportFilter", "com.sun.star.document.ExtendedTypeDetection" };
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
|
||||
@@ -92,8 +92,7 @@ sal_Bool SAL_CALL StarOfficePresentationImportFilter::supportsService(const OUSt
|
||||
|
||||
Sequence<OUString> SAL_CALL StarOfficePresentationImportFilter::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence<OUString>{ "com.sun.star.document.ImportFilter",
|
||||
"com.sun.star.document.ExtendedTypeDetection" };
|
||||
return { "com.sun.star.document.ImportFilter", "com.sun.star.document.ExtendedTypeDetection" };
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
|
||||
@@ -117,8 +117,7 @@ sal_Bool SAL_CALL StarOfficeWriterImportFilter::supportsService(const OUString&
|
||||
|
||||
Sequence<OUString> SAL_CALL StarOfficeWriterImportFilter::getSupportedServiceNames()
|
||||
{
|
||||
return Sequence<OUString>{ "com.sun.star.document.ImportFilter",
|
||||
"com.sun.star.document.ExtendedTypeDetection" };
|
||||
return { "com.sun.star.document.ImportFilter", "com.sun.star.document.ExtendedTypeDetection" };
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
|
||||
Reference in New Issue
Block a user