[Open Office] VBA: review ...
Shilpa Sreeramalu
sshilpa at novell.com
Tue Sep 13 02:12:24 EDT 2005
On Tue, 2005-09-06 at 16:43 +0100, michael meeks wrote:
> So,
>
> I just did a little hacking on the VBA code - and came up with some
> feedback:
>
> * This code looks like it's been involved in a nasty crash,
> + inconsistant / ugly formatting
> + broken tab-stops (should be 4stop tabs)
> + cut/paste party
>
> We need to fix the above - this code needs to look like it's been
> loved, groomed, had it's nails painted, taken out for a ball, and
> massaged until it squeaks.
>
> So - in addition to the above cosmetic cleanup - I looked at
> 'vbarows.?xx' and 'vbacolumns.?xx' the 'Item' method being a
> particularly egregious case of cut/paste.
The current implementation of Rows() and Columns() functionality was
just a temporary work around. The use of XColumnRowRange interface was
manly to implement the count property, because the Range.Count returns
the number of cells in the range. So If we directly return a range
object then,
Range("A1:A2").Rows(1).Count would return 2 instead of 1.
>
> After considering that - I noticed that in fact 'Columns' and 'Rows'
> themselves are 'Ranges' - just 1 dimensional ones - and that really, our
> Columns/Rows methods on 'Range' should just shrink the range in that
> way. Ideally - that combined with Jody's R1C1 work will allow us to do
> things like:
>
> Range("A1:Z256").Rows("3:7")
> or
> Range("A1:Z256").Rows().Font.Bold = True
>
> As some of the sample VBA out there tends to do ;-)
>
> Any chance we can get Rows / Columns re-factored away - it badly needs
> to die ;-) ?
Will do that.
Regards
Shilpa
More information about the Openoffice
mailing list