0

I have installed the plug-in (old version) and tried creating class but facing runtime error. http://ssaapp.di.uminho.pt/twiki/bin/view/Main/Software This is the website link.

Sub btn_add_class_click
  Dim oDoc As Object
  oDoc = ThisComponent
  Dim oRange As Object
  oRange = GetSelectedRange(oDoc)
  If (Not IsNull(oRange)) Then
    Dim MDSheetService As Object
    MDSheetService = createUnoService("MDSheet.ClassSheet")
    'MDSheetService.modelAddColumn(0,oRange.RangeAddress.StartColumn)
    'MsgBox "Cell (" & oRange.RangeAddress.StartColumn & "," & oRange.RangeAddress.StartRow & ")"
    Dim oResult As Object
    oResult = ShowAddClassDialog(oDoc)
    If (Not IsNull(oResult)) Then
      Dim oAddr As Object
      oAddr = oRange.RangeAddress
      If (oResult(2) = 0) Then ' no expansion
        **MDSheetService.modelAddClass(oResult(0),oResult(1), _**
            oAddr.StartColumn, oAddr.StartRow, _
            oAddr.EndColumn, oAddr.EndRow)
      Else ' expansion
        MDSheetService.modelAddExpClass(oResult(0),oResult(1), _
            oAddr.StartColumn, oAddr.StartRow, _
            oAddr.EndColumn, oAddr.EndRow, _
            oResult(2) - 1)
      End If
    End If
  Else
    MsgBox "No valid selection."
  End If
End Sub

The error is marked with **.

I am using this add-on in linux ubuntu 14.04 and openoffice version 4.1.1

Please throw some suggestion how I can debug this error?

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112

1 Answers1

0

Well, xray is a good debugging tool, although it sounds like you may be running into a problem with the MDSheet library. Please post the runtime error message.

The page you linked says that MDSheet was only made available for demonstration purposes. Perhaps there is a missing library dependency. The only way to find out may be to ask the author, as recommended on the web page.

Jim K
  • 12,824
  • 2
  • 22
  • 51