Kaydet (Commit) b25e2451 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

simplify construction of Sequence

and don't bother with mutex when returning static data

Change-Id: I92bb53cf4e9ae8996b25a1d83cb5ffa4a8d4aed5
Reviewed-on: https://gerrit.libreoffice.org/61948
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 8b1a6e68
...@@ -94,33 +94,13 @@ namespace rptui ...@@ -94,33 +94,13 @@ namespace rptui
Sequence< Any > SAL_CALL DefaultComponentInspectorModel::getHandlerFactories() Sequence< Any > SAL_CALL DefaultComponentInspectorModel::getHandlerFactories()
{ {
::osl::MutexGuard aGuard( m_aMutex );
// service names for all our handlers // service names for all our handlers
static const struct return Sequence<Any> {
{ Any(OUString( "com.sun.star.report.inspection.ReportComponentHandler")),
const sal_Char* serviceName; Any(OUString( "com.sun.star.form.inspection.EditPropertyHandler")),
} aFactories[] = { Any(OUString( "com.sun.star.report.inspection.DataProviderHandler")),
Any(OUString( "com.sun.star.report.inspection.GeometryHandler"))
{ "com.sun.star.report.inspection.ReportComponentHandler"},
{ "com.sun.star.form.inspection.EditPropertyHandler"},
{ "com.sun.star.report.inspection.DataProviderHandler"},
{ "com.sun.star.report.inspection.GeometryHandler"}
// generic virtual edit properties
}; };
const size_t nFactories = SAL_N_ELEMENTS( aFactories );
Sequence< Any > aReturn( nFactories );
Any* pReturn = aReturn.getArray();
for (const auto& rFactory : aFactories)
{
*pReturn++ <<= OUString::createFromAscii( rFactory.serviceName );
}
return aReturn;
} }
sal_Bool SAL_CALL DefaultComponentInspectorModel::getHasHelpSection() sal_Bool SAL_CALL DefaultComponentInspectorModel::getHasHelpSection()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment