Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- edited
- Sub SetIndex
- oSelection = ThisComponent.CurrentController.Selection
- oIndex =ThisComponent.createInstance("com.sun.star.text.ContentIndexMark")
- xEntry.setPropertyValue ( "Level", new Short ( (short) 4 ) )
- for Int1 = 0 to oSelection.Count -1
- oSel1 = oSelection (Int1)
- if HasUnoInterfaces(oSel1,"com.sun.star.text.XTextRange") Then
- ThisComponent.Text.InsertTextContent(oSel1, oIndex, True)
- end If
- Next Int1
- Update_Index 'Call Sub Update_Index
- End Sub
- sub Update_Index
- dim document as object
- dim dispatcher as object
- document = ThisComponent.CurrentController.Frame
- dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
- dispatcher.executeDispatch(document, ".uno:UpdateAllIndexes", "", 0, Array())
- end sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement