Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM ***** BASIC *****
- ' Based on: http://vb.wikia.com/wiki/SHA-1.bas
- 'Option Explicit
- Function TextHash(strText as String, strAlgorithm As String)
- Dim objDecrypt As Object
- Set objDecrypt = CreateUnoService("org.openoffice.Cryptographic.CryptographicService")
- TextHash = objDecrypt.GetTextHash(strText, strAlgorithm)
- End Function
- Function Hash(strText as String)
- Hash = TextHash(strText, "md5")
- End Function
- Function did()
- oSheet=thiscomponent.getcurrentcontroller.activesheet
- oCell = ThisComponent.getCurrentSelection()
- 'oCell.SetString("oops")
- 'oCell.CharColor = RGB(100,100,100)
- if oCell.getImplementationName() = "ScCellRangeObj" then
- srow = oCell.RangeAddress.StartRow + 1
- erow = oCell.RangeAddress.EndRow + 1
- oRange = oSheet.getCellRangeByName("B"+srow+":J"+erow)
- oRange.CharColor = RGB(160,160,160)
- else
- oCellAddress = oCell.getCellAddress()
- row =oCellAddress.Row + 1
- oRange = oSheet.getCellRangeByName("B"+row+":J"+row)
- oRange.CharColor = RGB(160,160,160)
- endif
- 'msgbox row
- 'msgbox oCell.Type
- 'i = 0
- 'while i <8
- ' i = i+1
- ' cell = oSheet.getCellByPosition(i,row)
- ' cell.CharColor = RGB(100,100,100)
- 'wend
- 'msgbox "B"+row+":J"+row
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement