ooo-build r11971 - in trunk: . patches/src680



Author: kyoshida
Date: Fri Mar 21 02:30:03 2008
New Revision: 11971
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11971&view=rev

Log:
2008-03-20  Kohei Yoshida  <kyoshida novell com>

	* patches/src680/sc-localized-arg-separator.diff: added formula syntax
	support for defined names, both the dialog and the drop-down name box
	at the top left corner.


Modified:
   trunk/ChangeLog
   trunk/patches/src680/sc-localized-arg-separator.diff

Modified: trunk/patches/src680/sc-localized-arg-separator.diff
==============================================================================
--- trunk/patches/src680/sc-localized-arg-separator.diff	(original)
+++ trunk/patches/src680/sc-localized-arg-separator.diff	Fri Mar 21 02:30:03 2008
@@ -200,9 +200,22 @@
  };
  
  //==================================================================
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/inc/rangenam.hxx sc/inc/rangenam.hxx
+--- sc.clean/inc/rangenam.hxx	2008-03-03 11:24:43.000000000 -0500
++++ sc/inc/rangenam.hxx	2008-03-20 21:29:02.000000000 -0400
+@@ -171,7 +171,8 @@ public:
+ 	BOOL			IsBeyond( SCROW nMaxRow ) const;
+ 
+ 	static void		MakeValidName( String& rName );
+-	SC_DLLPUBLIC static BOOL		IsNameValid( const String& rName, ScDocument* pDoc );
++	SC_DLLPUBLIC static BOOL		IsNameValid( const String& rName, ScDocument* pDoc, 
++                                                 const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
+ };
+ 
+ inline BOOL ScRangeData::HasType( RangeType nType ) const
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/data/documen3.cxx sc/source/core/data/documen3.cxx
 --- sc.clean/source/core/data/documen3.cxx	2008-03-03 11:24:50.000000000 -0500
-+++ sc/source/core/data/documen3.cxx	2008-03-19 18:30:50.000000000 -0400
++++ sc/source/core/data/documen3.cxx	2008-03-20 22:19:01.000000000 -0400
 @@ -1757,6 +1757,7 @@ void ScDocument::SetDocOptions( const Sc
  	pFormatter->ChangeNullDate( d,m,y );
  	pFormatter->ChangeStandardPrec( (USHORT)rOpt.GetStdPrecision() );
@@ -899,6 +912,70 @@
  		}
  	}
  	aCalcItem.PutProperties(aNames, aValues);
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/tool/rangenam.cxx sc/source/core/tool/rangenam.cxx
+--- sc.clean/source/core/tool/rangenam.cxx	2008-03-03 11:24:50.000000000 -0500
++++ sc/source/core/tool/rangenam.cxx	2008-03-20 21:29:41.000000000 -0400
+@@ -596,7 +596,7 @@ void ScRangeData::MakeValidName( String&
+ 	}
+ }
+ 
+-BOOL ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc )
++BOOL ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc, const ScAddress::Details& rDetails )
+ {
+     /*  If changed, ScfTools::ConvertToScDefinedName (sc/source/filter/ftools/ftools.cxx)
+         needs to be changed too. */
+@@ -612,12 +612,12 @@ BOOL ScRangeData::IsNameValid( const Str
+ 	// Parse nicht auf VALID pruefen, es reicht, wenn irgendein Bestandteil
+ 	// erkannt wurde
+ 	ScRange aRange;
+-	if( aRange.Parse( rName, pDoc ) )	// THIS IS WRONG
++	if( aRange.Parse( rName, pDoc, rDetails ) )
+ 		return FALSE;
+ 	else
+ 	{
+ 		ScAddress aAddr;
+-		if ( aAddr.Parse( rName, pDoc ) )	// THIS IS WRONG
++		if ( aAddr.Parse( rName, pDoc, rDetails ) )
+ 			return FALSE;
+ 	}
+ 	return TRUE;
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/app/inputwin.cxx sc/source/ui/app/inputwin.cxx
+--- sc.clean/source/ui/app/inputwin.cxx	2008-03-03 11:24:45.000000000 -0500
++++ sc/source/ui/app/inputwin.cxx	2008-03-20 22:13:16.000000000 -0400
+@@ -1561,6 +1561,7 @@ ScNameInputType lcl_GetInputType( const 
+         ScViewData* pViewData = pViewSh->GetViewData();
+         ScDocument* pDoc = pViewData->GetDocument();
+         SCTAB nTab = pViewData->GetTabNo();
++        ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 
+         // test in same order as in SID_CURRENTCELL execute
+ 
+@@ -1570,20 +1571,20 @@ ScNameInputType lcl_GetInputType( const 
+         SCTAB nNameTab;
+         sal_Int32 nNumeric;
+ 
+-        if ( aRange.Parse( rText, pDoc ) & SCA_VALID )
++        if ( aRange.Parse( rText, pDoc, eConv ) & SCA_VALID )
+             eRet = SC_NAME_INPUT_NAMEDRANGE;
+-        else if ( aAddress.Parse( rText, pDoc ) & SCA_VALID )
++        else if ( aAddress.Parse( rText, pDoc, eConv ) & SCA_VALID )
+             eRet = SC_NAME_INPUT_CELL;
+-        else if ( aRangeUtil.MakeRangeFromName( rText, pDoc, nTab, aRange, RUTL_NAMES ) )
++        else if ( aRangeUtil.MakeRangeFromName( rText, pDoc, nTab, aRange, RUTL_NAMES, eConv ) )
+             eRet = SC_NAME_INPUT_NAMEDRANGE;
+-        else if ( aRangeUtil.MakeRangeFromName( rText, pDoc, nTab, aRange, RUTL_DBASE ) )
++        else if ( aRangeUtil.MakeRangeFromName( rText, pDoc, nTab, aRange, RUTL_DBASE, eConv ) )
+             eRet = SC_NAME_INPUT_DATABASE;
+         else if ( ByteString( rText, RTL_TEXTENCODING_ASCII_US ).IsNumericAscii() &&
+                   ( nNumeric = rText.ToInt32() ) > 0 && nNumeric <= MAXROW+1 )
+             eRet = SC_NAME_INPUT_ROW;
+         else if ( pDoc->GetTable( rText, nNameTab ) )
+             eRet = SC_NAME_INPUT_SHEET;
+-        else if ( ScRangeData::IsNameValid( rText, pDoc ) )     // nothing found, create new range?
++        else if ( ScRangeData::IsNameValid( rText, pDoc, eConv ) )     // nothing found, create new range?
+         {
+             if ( pViewData->GetSimpleArea( aRange ) )
+                 eRet = SC_NAME_INPUT_DEFINE;
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/app/scmod.cxx sc/source/ui/app/scmod.cxx
 --- sc.clean/source/ui/app/scmod.cxx	2008-03-03 11:24:45.000000000 -0500
 +++ sc/source/ui/app/scmod.cxx	2008-03-19 17:38:48.000000000 -0400
@@ -1170,6 +1247,27 @@
  
  	FixedText		aFtPrec;
  	NumericField	aEdPrec;
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/namedlg/namedlg.cxx sc/source/ui/namedlg/namedlg.cxx
+--- sc.clean/source/ui/namedlg/namedlg.cxx	2008-03-03 11:24:49.000000000 -0500
++++ sc/source/ui/namedlg/namedlg.cxx	2008-03-20 19:59:06.000000000 -0400
+@@ -208,7 +208,7 @@ void __EXPORT ScNameDlg::Init()
+ 	UpdateNames();
+ 
+ 	pViewData->GetSimpleArea( aRange );
+-	aRange.Format( aAreaStr, ABS_DREF3D, pDoc );
++	aRange.Format( aAreaStr, ABS_DREF3D, pDoc, pDoc->GetAddressConvention() );
+ 
+ 	theCurSel = Selection( 0, SELECTION_MAX );
+ 	aEdAssign.GrabFocus();
+@@ -253,7 +253,7 @@ void ScNameDlg::SetReference( const ScRa
+ 		if ( rRef.aStart != rRef.aEnd )
+ 			RefInputStart(&aEdAssign);
+ 		String aRefStr;
+-        rRef.Format( aRefStr, ABS_DREF3D, pDocP );
++        rRef.Format( aRefStr, ABS_DREF3D, pDocP, pDocP->GetAddressConvention() );
+ 		aEdAssign.SetRefString( aRefStr );
+ 	}
+ }
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/optdlg/tpcalc.cxx sc/source/ui/optdlg/tpcalc.cxx
 --- sc.clean/source/ui/optdlg/tpcalc.cxx	2008-03-03 11:24:49.000000000 -0500
 +++ sc/source/ui/optdlg/tpcalc.cxx	2008-03-19 18:18:38.000000000 -0400
@@ -1241,6 +1339,21 @@
  };
  
  /**************************************************************************/
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/view/tabvwsh3.cxx sc/source/ui/view/tabvwsh3.cxx
+--- sc.clean/source/ui/view/tabvwsh3.cxx	2008-03-03 11:24:49.000000000 -0500
++++ sc/source/ui/view/tabvwsh3.cxx	2008-03-20 22:11:39.000000000 -0400
+@@ -318,8 +318,9 @@ void ScTabViewShell::Execute( SfxRequest
+ 				else
+ 				{
+ 					ScRangeUtil		aRangeUtil;
+-					if(	aRangeUtil.MakeRangeFromName( aAddress, pDoc, nTab, aScRange, RUTL_NAMES ) ||
+-						aRangeUtil.MakeRangeFromName( aAddress, pDoc, nTab, aScRange, RUTL_DBASE ) )
++                    ScAddress::Convention eConv = pDoc->GetAddressConvention();
++					if(	aRangeUtil.MakeRangeFromName( aAddress, pDoc, nTab, aScRange, RUTL_NAMES, eConv ) ||
++						aRangeUtil.MakeRangeFromName( aAddress, pDoc, nTab, aScRange, RUTL_DBASE, eConv ) )
+ 					{
+ 						nResult |= SCA_VALID;
+ 						if( aScRange.aStart.Tab() != nTab )
 Only in sc/source/ui/view: tabvwshf.cxx.~1.13.~
 Only in sc/util: makefile.mk.~1.45.~
 Only in officecfg: officecfg.argsep



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