Apache OpenOffice (AOO) Bugzilla – Issue 65551
ODMA UCP: Bug in Creating Provider Element Names
Last modified: 2013-01-29 21:59:01 UTC
This defect was detected in OOo 2.0.2 The line aProviderData.insertByName( "Provider" + (UBOUND(xx) - LBOUND(xx) + 2), aContentProviderData ) in the Open Office Basic script for RegisterUcpOdma is based on the assumption that the array xx(LBOUND(xx) to UBOUND(xx)) will have only provider numbers "Provider1" to "Provider"+(UBOUND(xx)-LBOUND(xx)+1). This is an invalid assumption once there have been any deletions of provider entries. On a fresh installation of OO.o 2.0.2, the following 10 values were found in the xx() array: Provider1, Provider10, Provider11, Provider2, Provider3, Provider4, Provider5, Provider6, Provider8, and Provider9 On attempting to add an entry with element identification "Provider11", the procedure failed with message BASIC runtime error. An exception occured Type: com.sun.star.container.ElementExistException Message: Configuration - cannot insert into Set. Element 'Provider11' is already present in Set /org.openoffice.ucb.Configuration/ContentProviders/ContentProvidersDataPrim aryKeys['Local']/SecondaryKeys/ContentProvidersDataSecondaryKeys ["Office"]/ProviderData. WORKAROUND: To overcome the bug, I updated the RegisterUcpOdma script to use a hardwired Element number, 'Provider99', after commenting out the failing operation: ' aProviderData.insertByName( "Provider" + (UBOUND(xx) - LBOUND(xx) + 2), aContentProviderData ) aProviderData.insertByName( "Provider99", aContentProviderData ) I would have used something like "ProviderOCP" but I wasn't sure whether there are other dependencies on the use of numerals in these element names.