[Open Office] Re: Range impl. ...

Jayant B M mjayant at novell.com
Wed Sep 14 02:35:54 EDT 2005


Hi Michael,

On Mon, 2005-09-12 at 08:08 +0100, michael meeks wrote:
> 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 was b'se of our mis-interpretation of the "function cells" returns
cells within the range.
>  
> 
> 	  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.
Correct.
> 
> 	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 ?

Since we are able to resolve all the issues mentioned above. I will wait
for your comments on the code-rework that we have done for above issues.
Will be updating the scratch today (before EOD, some testing pending). 

> 
> 
> 	Thanks,
> 
> 		Michael.
> 

Regards,
Jayant


More information about the Openoffice mailing list