inline some constants

these are only used in a single place

Change-Id: I9aae2331bc22e7ac842870a6b27030fc57c01b08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186591
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
This commit is contained in:
Noel Grandin
2025-06-15 20:17:39 +02:00
parent a8990ec839
commit f78f6f790c
5 changed files with 8 additions and 26 deletions

View File

@ -45,12 +45,12 @@ ChartTypeUnoDlg::~ChartTypeUnoDlg()
// lang::XServiceInfo
OUString SAL_CALL ChartTypeUnoDlg::getImplementationName()
{
return CHART_TYPE_DIALOG_SERVICE_IMPLEMENTATION_NAME;
return u"com.sun.star.comp.chart2.ChartTypeDialog"_ustr;
}
css::uno::Sequence<OUString> SAL_CALL ChartTypeUnoDlg::getSupportedServiceNames()
{
return { CHART_TYPE_DIALOG_SERVICE_NAME };
return { u"com.sun.star.chart2.ChartTypeDialog"_ustr };
}
uno::Sequence< sal_Int8 > SAL_CALL ChartTypeUnoDlg::getImplementationId()
{

View File

@ -57,7 +57,7 @@ CreationWizardUnoDlg::~CreationWizardUnoDlg()
// lang::XServiceInfo
OUString SAL_CALL CreationWizardUnoDlg::getImplementationName()
{
return CHART_WIZARD_DIALOG_SERVICE_IMPLEMENTATION_NAME;
return u"com.sun.star.comp.chart2.WizardDialog"_ustr;
}
sal_Bool SAL_CALL CreationWizardUnoDlg::supportsService( const OUString& rServiceName )
@ -67,7 +67,7 @@ sal_Bool SAL_CALL CreationWizardUnoDlg::supportsService( const OUString& rServic
css::uno::Sequence< OUString > SAL_CALL CreationWizardUnoDlg::getSupportedServiceNames()
{
return { CHART_WIZARD_DIALOG_SERVICE_NAME };
return { u"com.sun.star.chart2.WizardDialog"_ustr };
}
// XInterface

View File

@ -60,7 +60,7 @@ bool ChartFrameLoader::impl_checkCancel()
OUString SAL_CALL ChartFrameLoader::getImplementationName()
{
return CHART_FRAMELOADER_SERVICE_IMPLEMENTATION_NAME;
return u"com.sun.star.comp.chart2.ChartFrameLoader"_ustr;
}
sal_Bool SAL_CALL ChartFrameLoader::supportsService( const OUString& rServiceName )
@ -70,7 +70,7 @@ sal_Bool SAL_CALL ChartFrameLoader::supportsService( const OUString& rServiceNam
css::uno::Sequence< OUString > SAL_CALL ChartFrameLoader::getSupportedServiceNames()
{
return { CHART_FRAMELOADER_SERVICE_NAME };
return { u"com.sun.star.frame.SynchronousFrameLoader"_ustr };
}
// frame::XFrameLoader

View File

@ -20,28 +20,10 @@
#include <rtl/ustring.hxx>
inline constexpr OUString CHART_MODEL_SERVICE_IMPLEMENTATION_NAME
= u"com.sun.star.comp.chart2.ChartModel"_ustr;
inline constexpr OUString CHART_MODEL_SERVICE_NAME = u"com.sun.star.chart2.ChartDocument"_ustr;
//@todo create your own service containing the service com.sun.star.document.OfficeDocument
inline constexpr OUString CHART_VIEW_SERVICE_IMPLEMENTATION_NAME
= u"com.sun.star.comp.chart2.ChartView"_ustr;
inline constexpr OUString CHART_VIEW_SERVICE_NAME = u"com.sun.star.chart2.ChartView"_ustr;
inline constexpr OUString CHART_FRAMELOADER_SERVICE_IMPLEMENTATION_NAME
= u"com.sun.star.comp.chart2.ChartFrameLoader"_ustr;
inline constexpr OUString CHART_FRAMELOADER_SERVICE_NAME
= u"com.sun.star.frame.SynchronousFrameLoader"_ustr;
inline constexpr OUString CHART_WIZARD_DIALOG_SERVICE_IMPLEMENTATION_NAME
= u"com.sun.star.comp.chart2.WizardDialog"_ustr;
inline constexpr OUString CHART_WIZARD_DIALOG_SERVICE_NAME
= u"com.sun.star.chart2.WizardDialog"_ustr;
inline constexpr OUString CHART_TYPE_DIALOG_SERVICE_IMPLEMENTATION_NAME
= u"com.sun.star.comp.chart2.ChartTypeDialog"_ustr;
inline constexpr OUString CHART_TYPE_DIALOG_SERVICE_NAME
= u"com.sun.star.chart2.ChartTypeDialog"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -332,7 +332,7 @@ void ChartModel::impl_adjustAdditionalShapesPositionAndSize( const awt::Size& aV
OUString SAL_CALL ChartModel::getImplementationName()
{
return CHART_MODEL_SERVICE_IMPLEMENTATION_NAME;
return u"com.sun.star.comp.chart2.ChartModel"_ustr;
}
sal_Bool SAL_CALL ChartModel::supportsService( const OUString& rServiceName )
@ -343,7 +343,7 @@ sal_Bool SAL_CALL ChartModel::supportsService( const OUString& rServiceName )
css::uno::Sequence< OUString > SAL_CALL ChartModel::getSupportedServiceNames()
{
return {
CHART_MODEL_SERVICE_NAME,
u"com.sun.star.chart2.ChartDocument"_ustr,
u"com.sun.star.document.OfficeDocument"_ustr,
u"com.sun.star.chart.ChartDocument"_ustr
};