Resort pProperties when really needed (cppuhelper)
so not when pProperties[i-1].Name == pProperties[i].Name
and call getConstArray() only if there have been a sort
Found when testing tdf#125941 when editing table:
$8 = uno::Sequence of length 29 = {
{Name = "AutoIncrementCreation", Handle = 49, Type = uno::Type "string", Attributes = 0},
{Name = "CatalogName", Handle = 30, Type = uno::Type "string", Attributes = 0},
{Name = "CatalogName", Handle = 30, Type = uno::Type "string", Attributes = 0},
{Name = "DefaultValue", Handle = 20, Type = uno::Type "string", Attributes = 0},
{Name = "DefaultValue", Handle = 20, Type = uno::Type "string", Attributes = 0},
{Name = "Description", Handle = 19, Type = uno::Type "string", Attributes = 0},
{Name = "Description", Handle = 19, Type = uno::Type "string", Attributes = 0},
...
Change-Id: I645f7d24d552222cf520e346f4505f5a14979a30
Reviewed-on: https://gerrit.libreoffice.org/74124
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>