summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/geometrycontrolmodel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/source/controls/geometrycontrolmodel.cxx')
-rw-r--r--toolkit/source/controls/geometrycontrolmodel.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx
index 1a24fd417bc4..ad738a24c00c 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -155,8 +155,8 @@ constexpr OUStringLiteral GCM_PROPERTY_RESOURCERESOLVER = u"ResourceResolver";
sal_Int32 nOldSize = aTypes.getLength();
aTypes.realloc( nOldSize + aAggTypes.getLength() );
::std::copy(
- aAggTypes.begin(),
- aAggTypes.end(),
+ std::cbegin(aAggTypes),
+ std::cend(aAggTypes),
aTypes.getArray() + nOldSize
);
}
@@ -522,9 +522,10 @@ constexpr OUStringLiteral GCM_PROPERTY_RESOURCERESOLVER = u"ResourceResolver";
// look for duplicates, and remember them
IntArrayArray::value_type& rDuplicateIds = gAmbiguousPropertyIds[ _nId ];
// for this, sort the aggregate properties
+ auto [begin, end] = toNonConstRange(aAggregateProps);
::std::sort(
- aAggregateProps.begin(),
- aAggregateProps.end(),
+ begin,
+ end,
PropertyNameLess()
);
@@ -532,11 +533,11 @@ constexpr OUStringLiteral GCM_PROPERTY_RESOURCERESOLVER = u"ResourceResolver";
for ( const Property& rProp : std::as_const(aProps) )
{
// look for the current property in the properties of our aggregate
- const Property* pAggPropPos = ::std::find_if( aAggregateProps.begin(), aAggregateProps.end(), PropertyNameEqual( rProp.Name ) );
- if ( pAggPropPos != aAggregateProps.end() )
+ const Property* pAggPropPos = ::std::find_if( std::cbegin(aAggregateProps), std::cend(aAggregateProps), PropertyNameEqual( rProp.Name ) );
+ if ( pAggPropPos != std::cend(aAggregateProps) )
{ // found a duplicate
// -> remove from the aggregate property sequence
- ::comphelper::removeElementAt( aAggregateProps, pAggPropPos - aAggregateProps.begin() );
+ ::comphelper::removeElementAt( aAggregateProps, pAggPropPos - std::cbegin(aAggregateProps) );
// and additionally, remember the id of this property
rDuplicateIds.push_back( rProp.Handle );