ooo-build r12169 - in branches/sled-10-sp1-ooo-build-2-4: . patches/vba



Author: noelpwer
Date: Tue Apr 15 17:08:09 2008
New Revision: 12169
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12169&view=rev

Log:
2008-04-15  Noel Power <noel power novell com>

        * patches/vba/vba-fixup-singlerange-sheetref.diff: fix for
        * n#309981
        regression. ( note: not enabled in apply yet, awaiting local
testing )




Added:
   branches/sled-10-sp1-ooo-build-2-4/patches/vba/vba-fixup-singlerange-sheetref.diff
Modified:
   branches/sled-10-sp1-ooo-build-2-4/ChangeLog

Added: branches/sled-10-sp1-ooo-build-2-4/patches/vba/vba-fixup-singlerange-sheetref.diff
==============================================================================
--- (empty file)
+++ branches/sled-10-sp1-ooo-build-2-4/patches/vba/vba-fixup-singlerange-sheetref.diff	Tue Apr 15 17:08:09 2008
@@ -0,0 +1,62 @@
+Index: sc/inc/address.hxx
+===================================================================
+RCS file: /cvs/sc/sc/inc/address.hxx,v
+retrieving revision 1.14
+diff -u -p -u -p -r1.14 address.hxx
+--- sc/inc/address.hxx	27 Sep 2007 13:51:08 -0000	1.14
++++ sc/inc/address.hxx	15 Apr 2008 11:48:23 -0000
+@@ -221,6 +221,9 @@ inline bool ValidColRowTab( SCCOL nCol, 
+ #define SCA_VALID_ROW       0x0100
+ #define SCA_VALID_COL       0x0200
+ #define SCA_VALID_TAB       0x0400
++// SCA_BITS is a convience for 
++// (SCA_VALID_TAB | SCA_VALID_COL | SCA_VALID_ROW | SCA_TAB_3D | SCA_TAB_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_COL_ABSOLUTE)
++#define SCA_BITS            0x070F
+ // somewhat cheesy kludge to force the display of the document name even for
+ // local references.  Requires TAB_3D to be valid
+ #define SCA_FORCE_DOC       0x0800
+Index: sc/source/core/tool/rangelst.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/core/tool/rangelst.cxx,v
+retrieving revision 1.10
+diff -u -p -u -p -r1.10 rangelst.cxx
+--- sc/source/core/tool/rangelst.cxx	27 Feb 2007 12:18:02 -0000	1.10
++++ sc/source/core/tool/rangelst.cxx	15 Apr 2008 11:48:41 -0000
+@@ -109,15 +109,18 @@ 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 nTmp1 = ( nRes & SCA_BITS );
++			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 && ( nTmp2 != nEndRangeBits ) )
++					nRes |= ( nTmp1 << 4 );
++	
+ 			if ( (nRes & nMask) == nMask )
+ 				Append( aRange );
+ 			nResult &= nRes;		// alle gemeinsamen Bits bleiben erhalten
+--- sc/source/core/tool/address.cxx	18 Jan 2008 14:33:24 -0000	1.9.248.1
++++ sc/source/core/tool/address.cxx	15 Apr 2008 11:49:25 -0000
+@@ -1027,7 +1098,7 @@ lcl_ScRange_Parse_OOo( ScRange &aRange, 
+     }
+     nRes1 = ( ( nRes1 | nRes2 ) & SCA_VALID )
+           | nRes1
+-          | ( ( nRes2 & 0x070F ) << 4 );
++          | ( ( nRes2 & SCA_BITS ) << 4 );
+     return nRes1;
+ }
+ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]