To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=97957
------- Additional comments from [email protected] Mon Jan 19 00:38:31 +0000 2009 ------- The macro: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Sub createNumberingStyle Dim oStyles as Object, OStyle as Object Dim oNumRules, mSetOfRules Dim mArgArray oStyles = thisComponent.styleFamilies.getByName("NumberingStyles") mArgArray(0) = "LeftMargin" mArgArray(1) = 600 mArgArray(2) = "NumberingType" mArgArray(3) = 6 If Not oStyles.hasByName("myBullet") Then oStyle = thisComponent.createInstance("com.sun.star.style.NumberingStyle") oStyles.insertByName("myBullet", oStyle) oNumRules = oStyle.NumberingRules For i = 0 To 3 Step 2 For j = 0 To (oNumRules.getCount - 1 ) Set mSetOfRules = oNumRules.getByIndex(i) nRuleIndex = fnFindPropertyIndex(mSetOfRules, mArgArray(i)) If nRuleIndex = -1 Then Exit Sub End If mSetOfRules(nRuleIndex).value = mArgArray(i + 1) oNumRules.replaceByIndex(j, mSetOfRules) 'this either gives the error or not setting the properties at all Next Next 'xray oNumRules.getByIndex(0) oStyle.NumberingRules = oNumRules msgbox "style created" Else oStyles.removeByName("myBullet") end If End Sub Function fnFindPropertyIndex(aArrayOfProperties, cPropName As String) As Long For i = LBound(aArrayOfProperties) To UBound(aArrayOfProperties) oProp = aArrayOfProperties(i) If oProp.Name = cPropName Then fnFindPropertyIndex() = i Exit Function End If Next End Function >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
