Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub EditStyle
  2.     dim curs as Object
  3.     dim ret as Object
  4.     dim proceed as Boolean
  5.     dim i as Integer
  6.    
  7.     proceed = True
  8.     curs = ThisComponent.Text.createTextCursor()
  9.    
  10.     Do     
  11.         curs.goRight(1, true)
  12.         curs.CharPosture = com.sun.star.awt.FontSlant.ITALIC
  13.         curs.CharColor = RGB(255, 0, 0)
  14.        
  15.         i = 3
  16.         while( not curs.isEndOfParagraph() And i <> 0)
  17.             curs.goRight(1, false)
  18.             i = i - 1
  19.         Wend
  20.         if(i = 0) Then         
  21.             curs.goRight(1, true)
  22.    
  23.             curs.CharPosture = com.sun.star.awt.FontSlant.ITALIC
  24.             curs.CharColor = RGB(255, 0, 0)
  25.         endif
  26.                
  27.     loop while curs.gotoNextParagraph(False)
  28.    
  29. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement