https://bugs.documentfoundation.org/show_bug.cgi?id=124605

            Bug ID: 124605
           Summary: The variables type Variant works by division wrong
           Product: LibreOffice
           Version: 6.2.2.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
I have macros. The macros becomes variable typed as Variant. If the macro makes
a division with the variable then
if X as Variant  is emty  then X/100 is 100.
if X as Variant  ix 0 (null) then X/100 is 0.

If a emty Variant divided by a Number, the output is the divisor.

I upgraded my LibreOffice from 5.2.2 to 6.2.2. The 5.2.2 worked fine. An empty
Variant divided by a Number was always 0.



Steps to Reproduce:
1. write a basic macro like this
Public Function FuncA1( X ) as Double
        FuncA1 = X / 100
End Function

2. Call the Function on a Cell (write "=FuncA1(C1)" in to the Cell C2)
3. write 0 in to the input cell, then delete it ...

Actual Results:
If the input cell (C1) is empty, you get the divisor 100.
If the input cell is 0, you get the correct result 0.

Expected Results:
The macro should give always the correct result 0.


Reproducible: Always


User Profile Reset: No



Additional Info:

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to