incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 118645] New: OOBasic function with array parameter and array return value only works once
Date Fri, 25 Nov 2011 23:08:46 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=118645

             Bug #: 118645
        Issue Type: DEFECT
           Summary: OOBasic function with array parameter and array return
                    value only works once
    Classification: Application
           Product: Spreadsheet
           Version: OOo 3.3
          Platform: PC
        OS/Version: Windows 7
            Status: UNCONFIRMED
          Severity: major
          Priority: P5
         Component: programming
        AssignedTo: spreadsheet@openoffice.org
        ReportedBy: fs876@gmx.de
                CC: ooo-issues@incubator.apache.org


Hello, 

the attached file contains a functions "reverse_Array".
Steps to repro the issue:
- select D14:F14
- F2
- enter: =REVERSE_ARRAY(A14:C14)
- Ctrl+Shift+Enter

==> Okay so far, works as expected.

- Select D14:F16
- In Menu: Edit -> Fill -> Down

Shows:
a    b    c            
1    2    3    3    2    1
4    5    6    3    2    1
7    8    9    3    2    1

The array formla is correctly filled down, but not executed.

Code:
function reverse_Array(x as Array) as Array
    Dim i as Integer, k as Integer
    Dim Result()

    i = LBound(x,2)
    k = UBound(x,2)
    ReDim Result(i to k)

    k = UBound(x,2)
    for i = LBound(x,2) to UBound(x,2)
      Result(i) = x(1,k)
      k = k-1
    next
    reverse_Array = Result
end function

The other function in the file, which returns n^2, n^3, n^4 in an array, works.
Here we do not have an array as input parameter, only as return value.

-- 
Configure bugmail: https://issues.apache.org/ooo/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Mime
View raw message