diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-21 12:34:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-25 10:00:23 +0200 |
commit | 0351bec874f7e83c437e485e8d61a41f32718e25 (patch) | |
tree | 463fa37a7d8a9c990edb80e8f9cf726002c8aa4d /sc/source/ui/unoobj/afmtuno.cxx | |
parent | 9700c1b2170ad04453a361ed5647937833ac3c18 (diff) |
use more o3tl::span
which means we can reserve precisely the right number of entries when
building maps
Change-Id: I580414699289369de4730caae09829bbd8759e82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137292
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/unoobj/afmtuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/afmtuno.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index ce0300628ae4..3dc34bc259e0 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -48,7 +48,7 @@ using namespace ::com::sun::star; // AutoFormat map only for PropertySetInfo without Which-IDs -static const SfxItemPropertyMapEntry* lcl_GetAutoFormatMap() +static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetAutoFormatMap() { static const SfxItemPropertyMapEntry aAutoFormatMap_Impl[] = { @@ -58,7 +58,6 @@ static const SfxItemPropertyMapEntry* lcl_GetAutoFormatMap() { SC_UNONAME_INCJUST, 0, cppu::UnoType<bool>::get(), 0, 0 }, { SC_UNONAME_INCNUM, 0, cppu::UnoType<bool>::get(), 0, 0 }, { SC_UNONAME_INCWIDTH, 0, cppu::UnoType<bool>::get(), 0, 0 }, - { u"", 0, css::uno::Type(), 0, 0 } }; return aAutoFormatMap_Impl; } @@ -66,7 +65,7 @@ static const SfxItemPropertyMapEntry* lcl_GetAutoFormatMap() //! number format (String/Language) ??? (in XNumberFormat only ReadOnly) //! table::TableBorder ??!? -static const SfxItemPropertyMapEntry* lcl_GetAutoFieldMap() +static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetAutoFieldMap() { static const SfxItemPropertyMapEntry aAutoFieldMap_Impl[] = { @@ -117,7 +116,6 @@ static const SfxItemPropertyMapEntry* lcl_GetAutoFieldMap() { SC_UNONAME_ROTREF, ATTR_ROTATE_MODE, ::cppu::UnoType<sal_Int32>::get(), 0, 0 }, { SC_UNONAME_CELLVJUS, ATTR_VER_JUSTIFY, ::cppu::UnoType<sal_Int32>::get(), 0, 0 }, { SC_UNONAME_CELLVJUS_METHOD, ATTR_VER_JUSTIFY_METHOD, ::cppu::UnoType<sal_Int32>::get(), 0, 0 }, - { u"", 0, css::uno::Type(), 0, 0 } }; return aAutoFieldMap_Impl; } |