summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-23 13:30:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-24 14:02:09 +0200
commit912b8fa62f897fb6fdfd760108d87c4dd468b8ee (patch)
tree963e227f85d29c6cbddff0a1920ad767a8cdeb8c /filter
parentec062c472ad58eafbb4392241119d5b53760120c (diff)
modernize and improve PropertySetInfo
(*) use o3tl::span for the array param, which means we don't need a null entry to terminate the array (*) use std::unordered_map to speed things up (*) mark the array as static at a few more call sites Change-Id: I05b6cae7552f44459e183ec05cb94e60edb3bfe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134832 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index f31907519890..93c6c892f589 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -80,13 +80,12 @@ bool XmlFilterAdaptor::importImpl( const Sequence< css::beans::PropertyValue >&
}
// create an XProperty set to configure the exporter for pretty printing
- PropertyMapEntry aImportInfoMap[] =
+ static const PropertyMapEntry aImportInfoMap[] =
{
{ OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0},
{ OUString("BuildId"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0 },
{ OUString("DefaultDocumentSettings"), 0,
::cppu::UnoType<Sequence<PropertyValue>>::get(), PropertyAttribute::MAYBEVOID, 0 },
- { OUString(), 0, css::uno::Type(), 0, 0 }
};
Reference< XPropertySet > xInfoSet(
@@ -280,12 +279,11 @@ bool XmlFilterAdaptor::exportImpl( const Sequence< css::beans::PropertyValue >&
}
// create an XProperty set to configure the exporter for pretty printing
- PropertyMapEntry aImportInfoMap[] =
+ static const PropertyMapEntry aImportInfoMap[] =
{
{ OUString("UsePrettyPrinting"), 0, cppu::UnoType<sal_Bool>::get(), PropertyAttribute::MAYBEVOID, 0},
{ OUString("ExportTextNumberElement"), 0, cppu::UnoType<sal_Bool>::get(), PropertyAttribute::MAYBEVOID, 0},
{ OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0},
- { OUString(), 0, css::uno::Type(), 0, 0 }
};
Reference< XPropertySet > xInfoSet(