Hi Eike

thanks for the info :-) 

On Tue, 2007-10-23 at 14:59 +0200, Eike Rathke wrote:
> Hi Noel,
> 
> On Tuesday, 2007-10-23 12:32:25 +0100, Noel Power wrote:
> 
> > yes you are right, I am just passing SCA_VALID as the nMask so I didn't
> > see this. Given if we change this there is a possibility that someone
> > somewhere depends on the full set of range flags being set
> > do you mean either
> >     a) the client of ScRangeList::Parse must take care of this OR 
> >     b) ScRangeList::Parse should detect the single range was parsed by
> > ScRange::ParseAny and it should apply the remaining flags (
> > SCA_VALID_COL2 | SCA_VALID_ROW2 | SCA_VALID_TAB2 ) OR
> 
> Yes, that's what I meant. Of course apply them only if the corresponding
> bit is set for the single address as well.
how about 

--- sc/source/core/tool/rangelst.cxx    27 Feb 2007 12:18:02 -0000
1.10
+++ sc/source/core/tool/rangelst.cxx    23 Oct 2007 14:14:58 -0000
@@ -109,15 +109,22 @@ USHORT ScRangeList::Parse( const String&
                for ( USHORT i=0; i<nTCount; i++ )
                {
                        aOne = rStr.GetToken( i, cDelimiter );
-                       // FIXME : broken for Lotus
-                       if ( aOne.Search( ':' ) == STRING_NOTFOUND )
-                       {       // Range muss es sein
-                               String aStrTmp( aOne );
-                               aOne += ':';
-                               aOne += aStrTmp;
-                       }
                        aRange.aStart.SetTab( nTab );   // Default Tab
wenn nicht angegeben
-                       USHORT nRes = aRange.Parse( aOne, pDoc, eConv );
+                       USHORT nRes = aRange.ParseAny( aOne, pDoc,
eConv );
+
+                       USHORT nEndRangeBits = SCA_VALID_COL2 |
SCA_VALID_ROW2 | SCA_VALID_TAB2;
+                       USHORT nStartRangeBits =   SCA_VALID_COL |
SCA_VALID_ROW | SCA_VALID_TAB;
+                       USHORT nTmp1 = ( nRes & nStartRangeBits );
+                       USHORT nTmp2 = ( nRes & nEndRangeBits );
+                       // If we have a valid single range with
+                       // any of the address bits we are interested in
+                       // set - set the equiv end range bits
+                       if ( (nRes & SCA_VALID ) && ( nTmp1 ==
nStartRangeBits )  )
+                       {
+                               if ( nTmp2 != nEndRangeBits )
+                                       nRes |= ( nTmp1 << 4 );
+                       }
+
                        if ( (nRes & nMask) == nMask )
                                Append( aRange );
                        nResult &= nRes;                // alle
gemeinsamen Bits bleiben erhalten

> 
is that something like you had in mind?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to