update dev300-m57
[ooovba.git] / applied_patches / 0310-vba-fixup-singlerange-sheetref.diff
blob374b705f66fee3e430e5a9566a72ea0a2b29eee0
1 Index: sc/inc/address.hxx
2 ===================================================================
3 RCS file: /cvs/sc/sc/inc/address.hxx,v
4 retrieving revision 1.14
5 diff -u -p -u -p -r1.14 address.hxx
6 --- sc/inc/address.hxx 27 Sep 2007 13:51:08 -0000 1.14
7 +++ sc/inc/address.hxx 15 Apr 2008 11:48:23 -0000
8 @@ -221,6 +221,9 @@ inline bool ValidColRowTab( SCCOL nCol,
9 #define SCA_VALID_ROW 0x0100
10 #define SCA_VALID_COL 0x0200
11 #define SCA_VALID_TAB 0x0400
12 +// SCA_BITS is a convience for
13 +// (SCA_VALID_TAB | SCA_VALID_COL | SCA_VALID_ROW | SCA_TAB_3D | SCA_TAB_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_COL_ABSOLUTE)
14 +#define SCA_BITS 0x070F
15 // somewhat cheesy kludge to force the display of the document name even for
16 // local references. Requires TAB_3D to be valid
17 #define SCA_FORCE_DOC 0x0800
18 Index: sc/source/core/tool/rangelst.cxx
19 ===================================================================
20 RCS file: /cvs/sc/sc/source/core/tool/rangelst.cxx,v
21 retrieving revision 1.10
22 diff -u -p -u -p -r1.10 rangelst.cxx
23 --- sc/source/core/tool/rangelst.cxx 27 Feb 2007 12:18:02 -0000 1.10
24 +++ sc/source/core/tool/rangelst.cxx 15 Apr 2008 11:48:41 -0000
25 @@ -109,15 +109,18 @@ USHORT ScRangeList::Parse( const String&
26 for ( USHORT i=0; i<nTCount; i++ )
28 aOne = rStr.GetToken( i, cDelimiter );
29 - // FIXME : broken for Lotus
30 - if ( aOne.Search( ':' ) == STRING_NOTFOUND )
31 - { // Range muss es sein
32 - String aStrTmp( aOne );
33 - aOne += ':';
34 - aOne += aStrTmp;
35 - }
36 aRange.aStart.SetTab( nTab ); // Default Tab wenn nicht angegeben
37 - USHORT nRes = aRange.Parse( aOne, pDoc, eConv );
38 + USHORT nRes = aRange.ParseAny( aOne, pDoc, eConv );
39 + USHORT nEndRangeBits = SCA_VALID_COL2 | SCA_VALID_ROW2 |
40 +SCA_VALID_TAB2;
41 + USHORT nTmp1 = ( nRes & SCA_BITS );
42 + USHORT nTmp2 = ( nRes & nEndRangeBits );
43 + // If we have a valid single range with
44 + // any of the address bits we are interested in
45 + // set - set the equiv end range bits
46 + if ( (nRes & SCA_VALID ) && nTmp1 && ( nTmp2 != nEndRangeBits ) )
47 + nRes |= ( nTmp1 << 4 );
49 if ( (nRes & nMask) == nMask )
50 Append( aRange );
51 nResult &= nRes; // alle gemeinsamen Bits bleiben erhalten
52 --- sc/source/core/tool/address.cxx 18 Jan 2008 14:33:24 -0000 1.9.248.1
53 +++ sc/source/core/tool/address.cxx 15 Apr 2008 11:49:25 -0000
54 @@ -1027,7 +1098,7 @@ lcl_ScRange_Parse_OOo( ScRange &aRange,
56 nRes1 = ( ( nRes1 | nRes2 ) & SCA_VALID )
57 | nRes1
58 - | ( ( nRes2 & 0x070F ) << 4 );
59 + | ( ( nRes2 & SCA_BITS ) << 4 );
60 return nRes1;