Hi Niklas While not involved with reference parsing, I do know that for say the example range like "Sheet1!A1" currently code that Jody popped into the vba interop api to help me ( for various range XL/R1C1 support ) expects SCA_VALID to be set on return
>From your comments below it would seem you imply SC_VALID getting set for a single reference is not VALID ( pardon the pun ), and that causes subsequent problems correct? The parsing code ( or at least the call to the parse code ) that Jody added for me always seems to expect SCA_VALID to be set ( and indeed it's also passed as the mask ) e.g. USHORT nMask = SCA_VALID; rResFlags = rCellRanges.Parse( sAddress, pDoc, nMask, eConv, 0 ); if ( rResFlags & SCA_VALID ) return true; return false; So with respect to the SCA_VALID flag, I can live with a different return value that can indicate success. But I would worry though that SC_VALID is indeed required in a non obvious way ( there are many strange xl addressing edge cases ), care would be required I think changing this. I could test any changes against my current ( not exhaustive but better than nothing ) addressing tests ( that at least exercise this code a little ) p.s. this week is not good though For the other scenario you mention nothing immediately comes to mind. Noel On Mon, 2007-06-25 at 18:45 +0200, Niklas Nebel wrote: > Hi everyone who's involved with reference parsing, > > When parsing references with CONV_XL_A1 convention, the return values > from ScRange::Parse are different from those for CONV_OOO and don't > match what ScCompiler::IsReference expects. > > - For a single reference (Sheet1!A1), the bit SCA_VALID is set, which > causes a ScDoubleRefToken to be generated. > > - For a range reference like "Sheet1!A1:A2" (with only one sheet name), > SCA_VALID_TAB2 isn't set, which leads to an invalid reference. > > Is there any specific reason for this difference? Is it needed somewhere > (some code not using ScCompiler, or some private changes to it)? > Otherwise, I'm going to change it, returning no SCA_VALID bit in the > first case, and SCA_VALID_TAB2 (but not SCA_TAB2_3D) in the second case. > > Niklas > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Noel Power OpenOffice Developer Novell Ireland Software Limited Corrig Court, Corrig Road Sandyford Business Estate, Sandyford Dublin 18 [EMAIL PROTECTED] Novell, Inc. Software for the Open Enterprise www.novell.com/open SUSEĀ® Linux Enterprise 10 Your Linux is ready www.novell.com/linux Registered No: 223694 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]