Issue 112171 - The syntax: Range("A1")(2, 2) does not work well
Summary: The syntax: Range("A1")(2, 2) does not work well
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: vba (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact: noel.power
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-07 06:04 UTC by lihuiibm
Modified: 2017-05-20 11:29 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Test case for this issue (52.50 KB, text/plain)
2010-06-07 06:05 UTC, lihuiibm
no flags Details
Fix patch for this issue (625 bytes, patch)
2010-06-07 06:06 UTC, lihuiibm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description lihuiibm 2010-06-07 06:04:04 UTC
The syntax: Range("A1")(2, 2) does not work well.
Range("A1")(2, 2) should return the value of cell "B2", but it return the value
of "A1".
Comment 1 lihuiibm 2010-06-07 06:05:18 UTC
Created attachment 69844 [details]
Test case for this issue
Comment 2 lihuiibm 2010-06-07 06:06:32 UTC
Created attachment 69845 [details]
Fix patch for this issue
Comment 3 noel.power 2010-06-29 11:22:09 UTC
that change looks a little dangerous ( or at least it makes me quite nervous )
CheckArray is called from a couple of places, the change there in vba mode lets
everything fall through into the 'Index' processing leg. But.. it seems to me
that the intention there is to ensure Methods/Properties never get in there (
because they can get modified I guess ) 
I would in this case instead create a temporary object in StepARRAYACCESS e.g.
something like in the untested code below 

SbiRuntime::StepARRAYACCESS()
{
...
    if ( bVBAEnabled && ( refVar->ISA(SbxMethod) || refVar->ISA(SbxProperty) )
    {
            SbxVariable* pNew = new SbxVariable( *((SbxVariable*)refVar) ); 
            refVar = pNew;
    } 
    refVar->SetParameters( refArgv );
    PopArgv();
    PushVar( CheckArray( refVar ) );
}

andreas, any thoughts?
Comment 4 Pedro Giffuni 2013-01-23 19:03:20 UTC
Perhaps also a [From Symphony] issue?
Comment 5 Marcus 2017-05-20 11:29:21 UTC
Reset assigne to the default "issues@openoffice.apache.org".