[Libreoffice] [PUSHED][PATCH] tests for named ranges in vba
Noel Power
nopower at suse.com
Fri Oct 28 05:16:01 PDT 2011
On 27/10/11 20:31, August Sodora wrote:
> Hello all,
>
> I have been trying to add support for assigning to named ranges in
> VBA. There are a couple of ways VBA does this but for now I'm focusing
> on something like:
>
> Range("A1:H8").Name = "TestRange"
>
> Currently the Name property on [X/ScVba]Range is readonly. I've
> attached a patch which is my first attempt to try and add a setter
the patch looks perfect, committed and pushed. There are some issues
though that I feel are exposed but not directly caused by your patch (
see below )
> but
> it was suggested that I also attach an xls with a test macro. I know
> there is some changing going on with regards to VBA tests; is there a
> place I should stick this to execute for now?
have a look at sc/qa/unit/macros-test.cxx
you could add a test to sc/qa/unit/data/xls/TestAddress.xls, or I
suppose you could add a new test ( just add a new entry into the
testInfo array in macros-test.cxx. However at the moment any valuable
test will probably fail
e.g.
Range("A1:H8").Name = "TestRange"
results in an incorrect range being associated with the Name, if you
look at the Insert | Names | Manage dialog the range associate with
"TestRange" is $Sheet1.$B$16
also if you try and use that range with something like
msgbox Range("A1:H8").Address
we currently get an error.
Would you be interested in debugging this behaviour further ? I can help
you with that if you are interested
regards,
Noel
sub foo
Range("A1:H8").Name = "TestRange"
msgbox Range("TestRange").Address
end sub
More information about the LibreOffice
mailing list