Advertisement
ngonhan2k5

Libre office monthly report help

Sep 5th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REM  *****  BASIC  *****
  2. ' Based on: http://vb.wikia.com/wiki/SHA-1.bas
  3. 'Option Explicit
  4.  
  5. Function TextHash(strText as String, strAlgorithm As String)
  6. Dim objDecrypt As Object
  7. Set objDecrypt = CreateUnoService("org.openoffice.Cryptographic.CryptographicService")
  8. TextHash = objDecrypt.GetTextHash(strText, strAlgorithm)
  9. End Function
  10.  
  11. Function Hash(strText as String)
  12. Hash = TextHash(strText, "md5")
  13. End Function
  14.  
  15. Function did()
  16.  
  17.     oSheet=thiscomponent.getcurrentcontroller.activesheet
  18.     oCell = ThisComponent.getCurrentSelection()
  19.     'oCell.SetString("oops")
  20.     'oCell.CharColor = RGB(100,100,100)
  21.    
  22.     if oCell.getImplementationName() = "ScCellRangeObj" then
  23.         srow = oCell.RangeAddress.StartRow + 1
  24.         erow = oCell.RangeAddress.EndRow + 1
  25.        
  26.         oRange = oSheet.getCellRangeByName("B"+srow+":J"+erow)
  27.         oRange.CharColor = RGB(160,160,160)
  28.  
  29.     else
  30.         oCellAddress = oCell.getCellAddress()
  31.         row =oCellAddress.Row + 1
  32.         oRange = oSheet.getCellRangeByName("B"+row+":J"+row)
  33.         oRange.CharColor = RGB(160,160,160)
  34.     endif
  35.     'msgbox row
  36.     'msgbox oCell.Type
  37.  
  38.  
  39.     'i = 0
  40.     'while i <8
  41.     '    i = i+1
  42.     '   cell = oSheet.getCellByPosition(i,row)
  43.     '   cell.CharColor = RGB(100,100,100)
  44.     'wend
  45.    
  46.    
  47.     'msgbox "B"+row+":J"+row
  48.  
  49.    
  50. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement