Hi Noel,

On Tuesday, 2007-10-23 17:31:44 +0100, Noel Power wrote:

> the latest version of the patch is here
> http://svn.gnome.org/viewvc/ooo-build/trunk/patches/ooxml/xmlfilter-fixup-singlerange-sheetref.diff
> > +                       if ( (nRes & SCA_VALID ) && ( nTmp1 ==
> > nStartRangeBits )  )
> > +                       {
> > +                               if ( nTmp2 != nEndRangeBits )
> > +                                       nRes |= ( nTmp1 << 4 );
> > +                       }
> which changed the lines above to 
> +                     if ( (nRes & SCA_VALID ) && nTmp1 && ( nTmp2 != 
> nEndRangeBits ) ) 
> +                                     nRes |= ( nTmp1 << 4 );
> 
> let me know what you think

I think it should instead be

    if ((nRes & SCA_VALID ) && nTmp1 && !nTmp2)
        nRes |= ((nRes & 0x070f) << 4);

This because we only want to modify the result if ParseAny did not
return any SCA_VALID_...2 bit for the range end, and the result returned
may or may not include bits for absolute reference that have to be
included in the range end as well. The (nRes & 0x070f) effectively is

    (nRes & (SCA_VALID_TAB | SCA_VALID_COL | SCA_VALID_ROW |
        SCA_TAB_3D | SCA_TAB_ABSOLUTE | SCA_ROW_ABSOLUTE
        | SCA_COL_ABSOLUTE))

See defines in address.hxx and in address.cxx lcl_ScRange_Parse_OOo() at
the end of the function. Might be convenient to have a SCA_BITS define
now that we have this 0x070f at two places.

  Eike

-- 
 OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer.
 SunSign   0x87F8D412 : 2F58 5236 DB02 F335 8304  7D6C 65C9 F9B5 87F8 D412
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
 Please don't send personal mail to this [EMAIL PROTECTED] account, which I use 
for
 mailing lists only and don't read from outside Sun. Use [EMAIL PROTECTED] 
Thanks.

Attachment: pgpPDKjLKWO28.pgp
Description: PGP signature

Reply via email to