22#include <osl/diagnose.h>
33 void disambiguateName(
const Reference< XNameAccess >& _rxContainer, OUString& _rElementsName)
35 DBG_ASSERT(_rxContainer.is(),
"::dbp::disambiguateName: invalid container!");
36 if (!_rxContainer.is())
41 OUString sBase(_rElementsName);
42 for (sal_Int32
i=1;
i<0x7FFFFFFF; ++
i)
44 _rElementsName = sBase;
45 _rElementsName += OUString::number(
i);
46 if (!_rxContainer->hasByName(_rElementsName))
50 _rElementsName = sBase;
54 OSL_FAIL(
"::dbp::disambiguateName: something went (strangely) wrong!");
#define DBG_ASSERT(sCon, aError)
void disambiguateName(const Reference< XNameAccess > &_rxContainer, OUString &_rElementsName)