summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-21 12:34:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-25 10:00:23 +0200
commit0351bec874f7e83c437e485e8d61a41f32718e25 (patch)
tree463fa37a7d8a9c990edb80e8f9cf726002c8aa4d /editeng/source
parent9700c1b2170ad04453a361ed5647937833ac3c18 (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 'editeng/source')
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx1
-rw-r--r--editeng/source/uno/unofield.cxx14
-rw-r--r--editeng/source/uno/unoipset.cxx2
-rw-r--r--editeng/source/uno/unotext.cxx6
-rw-r--r--editeng/source/xml/xmltxtexp.cxx1
-rw-r--r--editeng/source/xml/xmltxtimp.cxx1
6 files changed, 4 insertions, 21 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index df32457ecd5c..5d4d833a19a0 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -94,7 +94,6 @@ namespace accessibility
SVX_UNOEDIT_NUMBERING_PROPERTY,
{ u"TextUserDefinedAttributes", EE_CHAR_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
- { u"", 0, css::uno::Type(), 0, 0 }
};
static SvxItemPropertySet aPropSet( aPropMap, EditEngine::GetGlobalItemPool() );
return &aPropSet;
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index c3317f6c9287..022386fe3f0b 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -81,40 +81,31 @@ static const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
{ UNO_TC_PROP_IS_FIXED, WID_BOOL1, cppu::UnoType<bool>::get(), 0, 0 },
{ UNO_TC_PROP_IS_DATE, WID_BOOL2, cppu::UnoType<bool>::get(), 0, 0 },
{ UNO_TC_PROP_NUMFORMAT, WID_INT32, ::cppu::UnoType<sal_Int32>::get(), 0, 0 },
- { u"", 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aExDateTimeFieldPropertySet_Impl(aExDateTimeFieldPropertyMap_Impl);
static const SfxItemPropertyMapEntry aDateTimeFieldPropertyMap_Impl[] =
{
{ UNO_TC_PROP_IS_DATE, WID_BOOL2, cppu::UnoType<bool>::get(), 0, 0 },
- { u"", 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aDateTimeFieldPropertySet_Impl(aDateTimeFieldPropertyMap_Impl);
static const SfxItemPropertyMapEntry aUrlFieldPropertyMap_Impl[] =
{
-
{ UNO_TC_PROP_URL_FORMAT, WID_INT16, ::cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ UNO_TC_PROP_URL_REPRESENTATION, WID_STRING1, ::cppu::UnoType<OUString>::get(), 0, 0 },
{ UNO_TC_PROP_URL_TARGET, WID_STRING2, ::cppu::UnoType<OUString>::get(), 0, 0 },
{ UNO_TC_PROP_URL, WID_STRING3, ::cppu::UnoType<OUString>::get(), 0, 0 },
- { u"", 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aUrlFieldPropertySet_Impl(aUrlFieldPropertyMap_Impl);
- static const SfxItemPropertyMapEntry aEmptyPropertyMap_Impl[] =
- {
- { u"", 0, css::uno::Type(), 0, 0 }
- };
- static const SfxItemPropertySet aEmptyPropertySet_Impl(aEmptyPropertyMap_Impl);
+ static const SfxItemPropertySet aEmptyPropertySet_Impl({});
static const SfxItemPropertyMapEntry aExtFileFieldPropertyMap_Impl[] =
{
{ UNO_TC_PROP_IS_FIXED, WID_BOOL1, cppu::UnoType<bool>::get(), 0, 0 },
{ UNO_TC_PROP_FILE_FORMAT, WID_INT16, ::cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ UNO_TC_PROP_CURRENT_PRESENTATION, WID_STRING1, ::cppu::UnoType<OUString>::get(), 0, 0 },
- { u"", 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aExtFileFieldPropertySet_Impl(aExtFileFieldPropertyMap_Impl);
@@ -125,14 +116,12 @@ static const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
{ UNO_TC_PROP_AUTHOR_CONTENT, WID_STRING2,::cppu::UnoType<OUString>::get(), 0, 0 },
{ UNO_TC_PROP_AUTHOR_FORMAT, WID_INT16, ::cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ UNO_TC_PROP_AUTHOR_FULLNAME, WID_BOOL2, cppu::UnoType<bool>::get(), 0, 0 },
- { u"", 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aAuthorFieldPropertySet_Impl(aAuthorFieldPropertyMap_Impl);
static const SfxItemPropertyMapEntry aMeasureFieldPropertyMap_Impl[] =
{
{ UNO_TC_PROP_MEASURE_KIND, WID_INT16, ::cppu::UnoType<sal_Int16>::get(), 0, 0 },
- { u"", 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aMeasureFieldPropertySet_Impl(aMeasureFieldPropertyMap_Impl);
@@ -143,7 +132,6 @@ static const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
{ UNO_TC_PROP_IS_FIXED, WID_BOOL1, cppu::UnoType<bool>::get(), 0, 0 },
{ UNO_TC_PROP_NUMFORMAT, WID_INT32, cppu::UnoType<sal_Int32>::get(), 0, 0 },
{ UNO_TC_PROP_IS_FIXED_LANGUAGE, WID_BOOL2, cppu::UnoType<bool>::get(), 0, 0 },
- { u"", 0, css::uno::Type(), 0, 0 }
};
static const SfxItemPropertySet aDocInfoCustomFieldPropertySet_Impl(aDocInfoCustomFieldPropertyMap_Impl);
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 2aa7e5746cbc..5ac72ee1ca6a 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -31,7 +31,7 @@
using namespace ::com::sun::star;
-SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMapEntry* pMap, SfxItemPool& rItemPool )
+SvxItemPropertySet::SvxItemPropertySet( o3tl::span<const SfxItemPropertyMapEntry> pMap, SfxItemPool& rItemPool )
: m_aPropertyMap( pMap ),
mrItemPool( rItemPool )
{
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 14a7c9f9ef04..e0ca965c5d3f 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -79,7 +79,7 @@ const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet()
return &aTextCursorSvxPropertySet;
}
-const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap()
+o3tl::span<const SfxItemPropertyMapEntry> ImplGetSvxTextPortionPropertyMap()
{
// Propertymap for an Outliner Text
static const SfxItemPropertyMapEntry aSvxTextPortionPropertyMap[] =
@@ -92,7 +92,6 @@ const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap()
{ u"TextPortionType", WID_PORTIONTYPE, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 },
{ u"TextUserDefinedAttributes", EE_CHAR_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
- { u"", 0, css::uno::Type(), 0, 0 }
};
return aSvxTextPortionPropertyMap;
}
@@ -108,7 +107,7 @@ static const SfxItemPropertySet* ImplGetSvxTextPortionSfxPropertySet()
return &aSvxTextPortionSfxPropertySet;
}
-const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap()
+o3tl::span<const SfxItemPropertyMapEntry> ImplGetSvxUnoOutlinerTextCursorPropertyMap()
{
// Propertymap for an Outliner Text
static const SfxItemPropertyMapEntry aSvxUnoOutlinerTextCursorPropertyMap[] =
@@ -119,7 +118,6 @@ const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap()
SVX_UNOEDIT_PARA_PROPERTIES,
{ u"TextUserDefinedAttributes", EE_CHAR_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
- { u"", 0, css::uno::Type(), 0, 0 }
};
return aSvxUnoOutlinerTextCursorPropertyMap;
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index ae57bd84ce55..89d5b49cbaa9 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -279,7 +279,6 @@ SvxXMLTextExportComponent::SvxXMLTextExportComponent(
{ UNO_NAME_NUMBERING, EE_PARA_BULLETSTATE,cppu::UnoType<bool>::get(), 0, 0 },
{ UNO_NAME_NUMBERING_LEVEL, EE_PARA_OUTLLEVEL, ::cppu::UnoType<sal_Int16>::get(), 0, 0 },
SVX_UNOEDIT_PARA_PROPERTIES,
- { u"", 0, css::uno::Type(), 0, 0 }
};
static SvxItemPropertySet aSvxXMLTextExportComponentPropertySet( SvxXMLTextExportComponentPropertyMap, EditEngine::GetGlobalItemPool() );
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index 1122ea473b6f..d04e37a822bf 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -142,7 +142,6 @@ EditPaM SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection
{ UNO_NAME_NUMBERING, EE_PARA_BULLETSTATE,cppu::UnoType<bool>::get(), 0, 0 },
{ UNO_NAME_NUMBERING_LEVEL, EE_PARA_OUTLLEVEL, ::cppu::UnoType<sal_Int16>::get(), 0, 0 },
SVX_UNOEDIT_PARA_PROPERTIES,
- { u"", 0, css::uno::Type(), 0, 0 }
};
static SvxItemPropertySet aSvxXMLTextImportComponentPropertySet( SvxXMLTextImportComponentPropertyMap, EditEngine::GetGlobalItemPool() );