Advertisement
siedlerchr

Check Cell Border Style in LO Calc

Aug 17th, 2015
1,094
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub CheckCellBorderStyles(tableBorder As TableBorder2)
  2.  
  3.  
  4. 'debug purpose
  5.     msgbox "cell Border TopLine style " & tableBorder.TopLine.LineStyle
  6.     msgbox "cell Border Horizontal style " & tableBorder.HorizontalLine.LineStyle
  7.     msgbox "cell Border VerticalLine style " & tableBorder.VerticalLine.LineStyle
  8.     msgbox "cell Border LeftLine style " & tableBorder.LeftLine.LineStyle
  9.     msgbox "cell Border RightLine style " & tableBorder.RightLine.LineStyle
  10.    
  11.  
  12.     GetLineStyleConstant(tableBorder.TopLine.LineStyle)
  13.     GetLineStyleConstant(tableBorder.BottomLine.LineStyle)
  14.     GetLineStyleConstant(tableBorder.HorizontalLine.LineStyle)
  15.     GetLineStyleConstant(tableBorder.VerticalLine.LineStyle)
  16.     GetLineStyleConstant(tableBorder.LeftLine.LineStyle)
  17.     GetLineStyleConstant(tableBorder.RightLine.LineStyle)
  18. End sub
  19.  
  20. Sub GetLineStyleConstant(myStyle)
  21.  
  22. styleConstant =   com.sun.star.table.BorderLineStyle
  23. 'see http://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1table_1_1BorderLineStyle.html
  24.  
  25. Select Case myStyle
  26. Case styleConstant.SOLID
  27.             msgbox "solid"
  28. Case styleConstant.NONE
  29.             msgbox "border none"
  30. Case styleConstant.DOUBLE
  31.             msgbox "double"
  32.            
  33. Case Else  
  34.             msgbox "else"
  35.        
  36. End Select
  37.  
  38. End sub
Advertisement
RAW Paste Data Copied
Advertisement