[Open Office] Range impl. ...
michael meeks
michael.meeks at novell.com
Mon Sep 12 03:08:55 EDT 2005
Hi there,
So - playing with the Range impl. it becomes increasingly clear to me
that we simply can't use (re-use) the existing OO.o XCellRange impl. for
this & our impl. needs a re-write.
A couple of reasons here:
+ bounds checking; ActiveSheet.Range("A1").Cells(5,7) is
valid in VBA - evaluating to a cell outside the 'Range':
1 cell A1.
+ relative ranges; it seems 'Cells(N, N)' generates a relative
range by default; thus:
Range offset = ActiveSheet.Cells(1,1)
ActiveSheet.Range("C5:Z20").Range(offset, Cells(3,3))
this just doesn't work - in this case the 'offset' should be
a relative reference (of the form 'A1') into C5:Z20 - but
instead we have some error. Also - clearly the XCellRange
object can't store/distinguish between $A$1 and A1.
So ... I guess we need to represent the range ourselves - preferably
using the internal sc/ representation, and resolve that to an XCellRange
as late as possible, when necessary - against the Sheet's range.
How does that sound ?
Thanks,
Michael.
--
michael.meeks at novell.com <><, Pseudo Engineer, itinerant idiot
More information about the Openoffice
mailing list