diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-03 12:07:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-04 07:01:53 +0100 |
commit | 8d84a0dc8d83cc7dbe77dec0bb4e2f6b9768e1d9 (patch) | |
tree | 28dda47bfa85f8e255bd18ac3f2ce2992a2de9ca /forms | |
parent | 60e8941fd581bb06cbf6be62edb8c387e7c07812 (diff) |
some std::set->o3tl::sorted_vector
which is much better cache-wise
Change-Id: Iacec0df48f043bcdd761ed30c1b1513850a00152
Reviewed-on: https://gerrit.libreoffice.org/84311
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/Columns.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index a911e3ff2f86..23674e1fafe5 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -39,6 +39,7 @@ #include <services.hxx> #include <strings.hrc> #include <tools/debug.hxx> +#include <o3tl/sorted_vector.hxx> namespace frm @@ -292,7 +293,7 @@ void OGridColumn::disposing() void OGridColumn::clearAggregateProperties( Sequence< Property >& _rProps, bool bAllowDropDown ) { // some properties are not to be exposed to the outer world - ::std::set< OUString > aForbiddenProperties { + static const o3tl::sorted_vector< OUString > aForbiddenProperties { PROPERTY_ALIGN, PROPERTY_AUTOCOMPLETE, PROPERTY_BACKGROUNDCOLOR, @@ -331,8 +332,6 @@ void OGridColumn::clearAggregateProperties( Sequence< Property >& _rProps, bool PROPERTY_IMAGE_POSITION, PROPERTY_ENABLEVISIBLE }; - if ( !bAllowDropDown ) - aForbiddenProperties.insert( PROPERTY_DROPDOWN ); Sequence< Property > aNewProps( _rProps.getLength() ); Property* pNewProps = aNewProps.getArray(); @@ -341,7 +340,8 @@ void OGridColumn::clearAggregateProperties( Sequence< Property >& _rProps, bool const Property* pPropsEnd = pProps + _rProps.getLength(); for ( ; pProps != pPropsEnd; ++pProps ) { - if ( aForbiddenProperties.find( pProps->Name ) == aForbiddenProperties.end() ) + if ( aForbiddenProperties.find( pProps->Name ) == aForbiddenProperties.end() + && (bAllowDropDown || pProps->Name != PROPERTY_DROPDOWN)) *pNewProps++ = *pProps; } |