https://bugs.freedesktop.org/show_bug.cgi?id=87074

            Bug ID: 87074
           Summary: If called NLP Solver macro is interrupted by an error
                    on the line where the set ObjectiveCell.
           Product: LibreOffice
           Version: 4.2.7.2 release
          Hardware: All
                OS: Linux (All)
            Status: NEW
          Severity: major
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: derka.ladis...@gmail.com

Created attachment 110534
  --> https://bugs.freedesktop.org/attachment.cgi?id=110534&action=edit
Call NPL Solver using macros

An operating system and software: Ubuntu 14.04LTS
LibreOffice 4.2.7.2, LibreOffice 4.3.2.2, LibreOffice 4.4.0.0.beta1.

The error is probably on all versions of LibreOffice Series 4, is not affected
by LibreOffice 3 Series and all versions of Apache Open Office.

Reproduction of errors (attachment file .ods):

Sub RunSolveDEPS
    Dim Solver as Object    
    Set Solver =
CreateUnoService("com.sun.star.comp.Calc.NLPSolver.DEPSSolverImpl")
    Solver.Document = ThisComponent

    Dim VariableCells(2) as new com.sun.star.table.CellAddress
    VariableCells(0).Sheet = 0
    VariableCells(0).Row = 1
    VariableCells(0).Column = 1

    VariableCells(1).Sheet = 0
    VariableCells(1).Row = 2
    VariableCells(1).Column = 1

    VariableCells(2).Sheet = 0
    VariableCells(2).Row = 3   
    VariableCells(2).Column = 1

    Solver.Variables = VariableCells

    Dim ObjectiveCell as new com.sun.star.table.CellAddress
    ObjectiveCell.Sheet = 0
    ObjectiveCell.Row = 3
    ObjectiveCell.Column = 3

    Solver.Objective = ObjectiveCell ' <== Error !!!    
    ' Type: com.sun.star.uno.RuntimeException
    ' Message: [jni_uno bridge error] UNO calling Java method Objective:
[map_to_uno():com.sun.star.table.CellAddress] null-ref given!
    ' java stack trace:
    ' .

    Solver.Solve

End Sub

Error message:
"Type: com.sun.star.uno.RuntimeException
Message: [jni_uno bridge error] UNO calling Java method Objective: [map_to_uno
(): com.sun.star.table.CellAddress] null-ref given!
java stack trace:
. "

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to