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



Author: kyoshida
Date: Thu Mar  6 04:41:10 2008
New Revision: 11820
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11820&view=rev

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

	* patches/src680/sc-localized-arg-separator.diff: modified the VBA
	interpreter to use Excel A1-style parser now that it's available.


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	Thu Mar  6 04:41:10 2008
@@ -1139,6 +1139,45 @@
  };
  
  /**************************************************************************/
+diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
+index 302b24f..e52ce97 100644
+--- sc/source/ui/vba/vbarange.cxx
++++ sc/source/ui/vba/vbarange.cxx
+@@ -761,10 +761,10 @@ protected:
+ 		double aDblValue;
+ 		if ( aValue >>= sFormula )
+ 		{
+-			// get current convention
+-			ScAddress::Convention eConv = m_pDoc->GetAddressConvention();
+-			// only convert/compile 'real' formulas
+-			if ( eConv != m_eConv && ( sFormula.trim().indexOf('=') == 0 ) )	
++            // convert to CONV_OOO style formula string because XCell::setFormula
++            // always compile it in CONV_OOO style.  Perhaps css.sheet.FormulaParser
++            // should be used in future to directly pass formula tokens.
++            if ( m_eConv != ScAddress::CONV_OOO && ( sFormula.trim().indexOf('=') == 0 ) )	
+ 			{
+ 				uno::Reference< uno::XInterface > xIf( xCell, uno::UNO_QUERY_THROW );
+ 				ScCellRangesBase* pUnoRangesBase = dynamic_cast< ScCellRangesBase* >( xIf.get() );
+@@ -775,7 +775,7 @@ protected:
+ 					// compile the string in the format passed in
+ 					aCompiler.CompileString( sFormula, m_eConv );
+ 					// set desired convention to that of the document
+-					aCompiler.SetRefConvention( eConv );
++					aCompiler.SetRefConvention( ScAddress::CONV_OOO );
+ 					String sConverted;
+ 					aCompiler.CreateStringFromTokenArray(sConverted);
+ 					sFormula = EQUALS + sConverted;
+@@ -1429,8 +1429,8 @@ void
+ ScVbaRange::setFormula(const uno::Any &rFormula ) throw (uno::RuntimeException)
+ {
+ 	// #FIXME converting "=$a$1" e.g. CONV_XL_A1 -> CONV_OOO                        	// results in "=$a$1:a1", temporalily disable conversion
+-	//setFormulaValue( rFormula, ScAddress::CONV_XL_A1 );;
+-	setFormulaValue( rFormula, ScAddress::CONV_OOO );;
++	setFormulaValue( rFormula, ScAddress::CONV_XL_A1 );;
++	//setFormulaValue( rFormula, ScAddress::CONV_OOO );;
+ }
+ 
+ uno::Any
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=officecfg.vpj officecfg.clean/registry/schema/org/openoffice/Office/Calc.xcs officecfg/registry/schema/org/openoffice/Office/Calc.xcs
 --- officecfg.clean/registry/schema/org/openoffice/Office/Calc.xcs	2008-03-03 11:28:58.000000000 -0500
 +++ officecfg/registry/schema/org/openoffice/Office/Calc.xcs	2008-03-03 11:33:35.000000000 -0500



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