summaryrefslogtreecommitdiff
path: root/stoc/source/implementationregistration/implreg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/implementationregistration/implreg.cxx')
-rw-r--r--stoc/source/implementationregistration/implreg.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index bfd19ccd07e4..912ed434d29e 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -291,17 +291,19 @@ void createUniqueSubEntry(const Reference < XRegistryKey > & xSuperKey,
if (bReady)
{
Sequence<OUString> implEntriesNew(length);
- implEntriesNew.getArray()[0] = value;
+ auto it = implEntriesNew.getArray();
+ *it = value;
- std::copy_if(implEntries.begin(), implEntries.end(), std::next(implEntriesNew.begin()),
+ std::copy_if(implEntries.begin(), implEntries.end(), std::next(it),
[&value](const OUString& rEntry) { return rEntry != value; });
xSuperKey->setAsciiListValue(implEntriesNew);
} else
{
Sequence<OUString> implEntriesNew(length+1);
- implEntriesNew.getArray()[0] = value;
+ auto it = implEntriesNew.getArray();
+ *it = value;
- std::copy(implEntries.begin(), implEntries.end(), std::next(implEntriesNew.begin()));
+ std::copy(implEntries.begin(), implEntries.end(), std::next(it));
xSuperKey->setAsciiListValue(implEntriesNew);
}
} else
@@ -332,7 +334,7 @@ bool deleteSubEntry(const Reference < XRegistryKey >& xSuperKey, const OUString&
{
Sequence<OUString> implEntriesNew(length - equals);
- std::copy_if(implEntries.begin(), implEntries.end(), implEntriesNew.begin(),
+ std::copy_if(implEntries.begin(), implEntries.end(), implEntriesNew.getArray(),
[&value](const OUString& rEntry) { return rEntry != value; });
xSuperKey->setAsciiListValue(implEntriesNew);
}
@@ -741,7 +743,7 @@ void deleteAllServiceEntries( const Reference < XSimpleRegistry >& xReg,
{
Sequence<OUString> implEntriesNew(length-equals);
- std::copy_if(implEntries.begin(), implEntries.end(), implEntriesNew.begin(),
+ std::copy_if(implEntries.begin(), implEntries.end(), implEntriesNew.getArray(),
[&implName](const OUString& rEntry) { return rEntry != implName; });
xServiceKey->setAsciiListValue(implEntriesNew);