ooo-build r12288 - in trunk: . patches/dev300 patches/src680
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12288 - in trunk: . patches/dev300 patches/src680
- Date: Tue, 22 Apr 2008 17:37:00 +0100 (BST)
Author: kyoshida
Date: Tue Apr 22 16:37:00 2008
New Revision: 12288
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12288&view=rev
Log:
2008-04-22 Kohei Yoshida <kyoshida novell com>
* patches/dev300/sc-formula-syntax-ui.diff: add the 'Formula Syntax'
option list box in the Options dialog to support variable formula
syntax conventions.
* patches/src680/sc-fix-range-ref-window.diff,
* patches/src680/sc-formula-syntax.diff: removed as they are only good
for 2.4.
* patches/dev300/apply: made the above adjustment.
Added:
trunk/patches/dev300/sc-formula-syntax-ui.diff
Removed:
trunk/patches/src680/sc-fix-range-ref-window.diff
trunk/patches/src680/sc-formula-syntax.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Tue Apr 22 16:37:00 2008
@@ -1557,13 +1557,8 @@
# Support several different formula syntax, and add a formula syntax
# configuration option in the Options page.
-# The patch depends on the cws-xmlfilter03 stuff
-#FIXME dev300: sc-formula-syntax.diff, n#358558, kohei
sc-formula-syntax-core.diff, n#358558, kohei
-
-# fix the cell range reference window so that it draws current selection
-# for XL_A1 and XL_R1C1. This is part of the formula syntax support.
-#FIXME dev300: sc-fix-range-ref-window.diff, n#358558, kohei
+sc-formula-syntax-ui.diff, n#358558, kohei
# Toggle gridline display per sheet.
sc-sheet-gridline-toggle.diff, i#14893, kohei
Added: trunk/patches/dev300/sc-formula-syntax-ui.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/sc-formula-syntax-ui.diff Tue Apr 22 16:37:00 2008
@@ -0,0 +1,309 @@
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/inc/docoptio.hxx sc/inc/docoptio.hxx
+--- sc.clean/inc/docoptio.hxx 2008-04-21 18:06:00.000000000 -0400
++++ sc/inc/docoptio.hxx 2008-04-22 12:32:23.000000000 -0400
+@@ -52,6 +52,8 @@
+ #include "optutil.hxx"
+ #endif
+
++#include "grammar.hxx"
++
+ class SC_DLLPUBLIC ScDocOptions
+ {
+ double fIterEps; // Epsilon-Wert dazu
+@@ -69,6 +71,7 @@ class SC_DLLPUBLIC ScDocOptions
+ BOOL bDoAutoSpell; // Auto-Spelling
+ BOOL bLookUpColRowNames; // Spalten-/Zeilenbeschriftungen automagisch suchen
+ BOOL bFormulaRegexEnabled; // regular expressions in formulas enabled
++ ScGrammar::Grammar eFormulaGrammar; // formula grammar used to switch different formula syntax
+
+ public:
+ ScDocOptions();
+@@ -117,6 +120,9 @@ public:
+
+ void SetFormulaRegexEnabled( BOOL bVal ) { bFormulaRegexEnabled = bVal; }
+ BOOL IsFormulaRegexEnabled() const { return bFormulaRegexEnabled; }
++
++ void SetFormulaSyntax( ScGrammar::Grammar eGram ) { eFormulaGrammar = eGram; }
++ ScGrammar::Grammar GetFormulaSyntax() const { return eFormulaGrammar; }
+ };
+
+
+@@ -137,6 +143,7 @@ inline void ScDocOptions::CopyTo(ScDocOp
+ rOpt.bDoAutoSpell = bDoAutoSpell;
+ rOpt.bLookUpColRowNames = bLookUpColRowNames;
+ rOpt.bFormulaRegexEnabled = bFormulaRegexEnabled;
++ rOpt.eFormulaGrammar = eFormulaGrammar;
+ }
+
+ inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
+@@ -156,6 +163,7 @@ inline const ScDocOptions& ScDocOptions:
+ bDoAutoSpell = rCpy.bDoAutoSpell;
+ bLookUpColRowNames = rCpy.bLookUpColRowNames;
+ bFormulaRegexEnabled= rCpy.bFormulaRegexEnabled;
++ eFormulaGrammar = rCpy.eFormulaGrammar;
+
+ return *this;
+ }
+@@ -178,6 +186,7 @@ inline int ScDocOptions::operator==( con
+ && rOpt.bDoAutoSpell == bDoAutoSpell
+ && rOpt.bLookUpColRowNames == bLookUpColRowNames
+ && rOpt.bFormulaRegexEnabled == bFormulaRegexEnabled
++ && rOpt.eFormulaGrammar == eFormulaGrammar
+ );
+ }
+
+Only in sc/inc: docoptio.hxx.~1.6.~
+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-04-21 18:06:05.000000000 -0400
++++ sc/source/core/data/documen3.cxx 2008-04-22 12:26:11.000000000 -0400
+@@ -1762,6 +1762,7 @@ void ScDocument::SetDocOptions( const Sc
+ pFormatter->ChangeNullDate( d,m,y );
+ pFormatter->ChangeStandardPrec( (USHORT)rOpt.GetStdPrecision() );
+ pFormatter->SetYear2000( rOpt.GetYear2000() );
++ SetGrammar( rOpt.GetFormulaSyntax() );
+ }
+
+ const ScViewOptions& ScDocument::GetViewOptions() const
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/tool/docoptio.cxx sc/source/core/tool/docoptio.cxx
+--- sc.clean/source/core/tool/docoptio.cxx 2008-04-21 18:06:06.000000000 -0400
++++ sc/source/core/tool/docoptio.cxx 2008-04-22 12:26:21.000000000 -0400
+@@ -50,6 +50,7 @@
+ #include "scresid.hxx"
+ #include "sc.hrc"
+ #include "miscuno.hxx"
++#include "global.hxx"
+
+ using namespace utl;
+ using namespace rtl;
+@@ -105,7 +106,8 @@ ScDocOptions::ScDocOptions( const ScDocO
+ bMatchWholeCell( rCpy.bMatchWholeCell ),
+ bDoAutoSpell( rCpy.bDoAutoSpell ),
+ bLookUpColRowNames( rCpy.bLookUpColRowNames ),
+- bFormulaRegexEnabled( rCpy.bFormulaRegexEnabled )
++ bFormulaRegexEnabled( rCpy.bFormulaRegexEnabled ),
++ eFormulaGrammar( rCpy.eFormulaGrammar )
+ {
+ }
+
+@@ -212,6 +214,7 @@ void ScDocOptions::ResetDocOptions()
+ bDoAutoSpell = FALSE;
+ bLookUpColRowNames = TRUE;
+ bFormulaRegexEnabled= TRUE;
++ eFormulaGrammar = ScGrammar::GRAM_DEFAULT;
+ }
+
+ //========================================================================
+@@ -287,7 +290,8 @@ SfxPoolItem* __EXPORT ScTpCalcItem::Clon
+ #define SCCALCOPT_SEARCHCRIT 9
+ #define SCCALCOPT_FINDLABEL 10
+ #define SCCALCOPT_REGEX 11
+-#define SCCALCOPT_COUNT 12
++#define SCCALCOPT_FORMULA_SYNTAX 12
++#define SCCALCOPT_COUNT 13
+
+ #define CFGPATH_DOCLAYOUT "Office.Calc/Layout/Other"
+
+@@ -310,7 +314,8 @@ Sequence<OUString> ScDocCfg::GetCalcProp
+ "Other/Precision", // SCCALCOPT_PRECISION
+ "Other/SearchCriteria", // SCCALCOPT_SEARCHCRIT
+ "Other/FindLabel", // SCCALCOPT_FINDLABEL
+- "Other/RegularExpressions" // SCCALCOPT_REGEX
++ "Other/RegularExpressions", // SCCALCOPT_REGEX
++ "Other/FormulaSyntax" // SCCALCOPT_FORMULA_SYNTAX
+ };
+ Sequence<OUString> aNames(SCCALCOPT_COUNT);
+ OUString* pNames = aNames.getArray();
+@@ -403,6 +408,33 @@ ScDocCfg::ScDocCfg() :
+ case SCCALCOPT_REGEX :
+ SetFormulaRegexEnabled( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
+ break;
++ case SCCALCOPT_FORMULA_SYNTAX:
++ {
++ ScGrammar::Grammar eGram = ScGrammar::GRAM_DEFAULT;
++
++ do
++ {
++ if (!(pValues[nProp] >>= nIntVal))
++ // extractino failed.
++ break;
++
++ switch (nIntVal)
++ {
++ case 0: // Calc A1
++ eGram = ScGrammar::GRAM_NATIVE;
++ break;
++ case 1: // Excel A1
++ eGram = ScGrammar::GRAM_NATIVE_XL_A1;
++ break;
++ case 2: // Excel R1C1
++ eGram = ScGrammar::GRAM_NATIVE_XL_R1C1;
++ break;
++ }
++ }
++ while (false);
++ SetFormulaSyntax(eGram);
++ }
++ break;
+ }
+ }
+ }
+Only in sc/source/core/tool: docoptio.cxx.~1.8.~
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/inc/optdlg.hrc sc/source/ui/inc/optdlg.hrc
+--- sc.clean/source/ui/inc/optdlg.hrc 2008-04-21 18:06:00.000000000 -0400
++++ sc/source/ui/inc/optdlg.hrc 2008-04-21 19:57:20.000000000 -0400
+@@ -78,6 +78,8 @@
+ #define BTN_MATCH 18
+ #define BTN_LOOKUP 19
+ #define BTN_REGEX 20
++#define FT_FORMULA_SYNTAX 21
++#define LB_FORMULA_SYNTAX 22
+
+ // TP_VIEW:
+ #define BTN_VSCROLL 1
+Only in sc/source/ui/inc: optdlg.hrc.~1.9.~
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/inc/tpcalc.hxx sc/source/ui/inc/tpcalc.hxx
+--- sc.clean/source/ui/inc/tpcalc.hxx 2008-04-21 18:06:00.000000000 -0400
++++ sc/source/ui/inc/tpcalc.hxx 2008-04-21 19:57:45.000000000 -0400
+@@ -61,6 +61,8 @@
+ #include "editfield.hxx"
+ #endif
+
++#include "vcl/lstbox.hxx"
++
+ //===================================================================
+
+ class ScDocOptions;
+@@ -101,6 +103,8 @@ private:
+ CheckBox aBtnMatch;
+ CheckBox aBtnRegex;
+ CheckBox aBtnLookUp;
++ FixedText aFtFormulaSyntax;
++ ListBox aLBFormulaSyntax;
+
+ FixedText aFtPrec;
+ NumericField aEdPrec;
+Only in sc/source/ui/inc: tpcalc.hxx.~1.8.~
+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-04-21 18:06:04.000000000 -0400
++++ sc/source/ui/optdlg/tpcalc.cxx 2008-04-22 12:09:00.000000000 -0400
+@@ -96,6 +96,8 @@ ScTpCalcOptions::ScTpCalcOptions( Window
+ aBtnMatch ( this, ScResId( BTN_MATCH ) ),
+ aBtnRegex ( this, ScResId( BTN_REGEX ) ),
+ aBtnLookUp ( this, ScResId( BTN_LOOKUP ) ),
++ aFtFormulaSyntax( this, ScResId( FT_FORMULA_SYNTAX ) ),
++ aLBFormulaSyntax( this, ScResId( LB_FORMULA_SYNTAX ) ),
+ aFtPrec ( this, ScResId( FT_PREC ) ),
+ aEdPrec ( this, ScResId( ED_PREC ) ),
+ pOldOptions ( new ScDocOptions(
+@@ -161,6 +163,22 @@ void __EXPORT ScTpCalcOptions::Reset( co
+ aEdPrec .SetValue( pLocalOptions->GetStdPrecision() );
+ aEdEps .SetValue( pLocalOptions->GetIterEps(), 6 );
+
++ ScGrammar::Grammar eGram = pLocalOptions->GetFormulaSyntax();
++ switch (eGram)
++ {
++ case ScGrammar::GRAM_NATIVE:
++ aLBFormulaSyntax.SelectEntryPos(0);
++ break;
++ case ScGrammar::GRAM_NATIVE_XL_A1:
++ aLBFormulaSyntax.SelectEntryPos(1);
++ break;
++ case ScGrammar::GRAM_NATIVE_XL_R1C1:
++ aLBFormulaSyntax.SelectEntryPos(2);
++ break;
++ default:
++ aLBFormulaSyntax.SelectEntryPos(0);
++ }
++
+ pLocalOptions->GetDate( d, m, y );
+
+ switch ( y )
+@@ -192,6 +210,20 @@ BOOL __EXPORT ScTpCalcOptions::FillItemS
+ pLocalOptions->SetMatchWholeCell( aBtnMatch.IsChecked() );
+ pLocalOptions->SetFormulaRegexEnabled( aBtnRegex.IsChecked() );
+ pLocalOptions->SetLookUpColRowNames( aBtnLookUp.IsChecked() );
++ ScGrammar::Grammar eGram = ScGrammar::GRAM_DEFAULT;
++ switch (aLBFormulaSyntax.GetSelectEntryPos())
++ {
++ case 0:
++ eGram = ScGrammar::GRAM_NATIVE;
++ break;
++ case 1:
++ eGram = ScGrammar::GRAM_NATIVE_XL_A1;
++ break;
++ case 2:
++ eGram = ScGrammar::GRAM_NATIVE_XL_R1C1;
++ break;
++ }
++ pLocalOptions->SetFormulaSyntax(eGram);
+
+ if ( *pLocalOptions != *pOldOptions )
+ {
+Only in sc/source/ui/optdlg: tpcalc.cxx.~1.16.~
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/src/optdlg.src sc/source/ui/src/optdlg.src
+--- sc.clean/source/ui/src/optdlg.src 2008-04-21 18:06:01.000000000 -0400
++++ sc/source/ui/src/optdlg.src 2008-04-21 19:59:09.000000000 -0400
+@@ -173,6 +173,27 @@ TabPage RID_SCPAGE_CALC
+ Size = MAP_APPFONT ( 239 , 10 ) ;
+ Text [ en-US ] = "~Automatically find column and row labels " ;
+ };
++
++ FixedText FT_FORMULA_SYNTAX
++ {
++ Pos = MAP_APPFONT ( 21, 147 ) ;
++ Size = MAP_APPFONT ( 80, 8 ) ;
++ Text [ en-US ] = "~Formula syntax" ;
++ };
++
++ ListBox LB_FORMULA_SYNTAX
++ {
++ Border = TRUE ;
++ Pos = MAP_APPFONT ( 85, 145 ) ;
++ Size = MAP_APPFONT ( 60, 46 ) ;
++ DropDown = TRUE ;
++ StringList [ en-US ] =
++ {
++ < "Calc A1" ; Default ; > ;
++ < "Excel A1" ; Default ; > ;
++ < "Excel R1C1" ; Default ; > ;
++ };
++ };
+ };
+
+ /**************************************************************************/
+Only in sc/source/ui/src: optdlg.src.~1.67.~
+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-04-21 19:49:20.000000000 -0400
++++ officecfg/registry/schema/org/openoffice/Office/Calc.xcs 2008-04-21 19:50:15.000000000 -0400
+@@ -1134,6 +1134,30 @@
+ </info>
+ <value>true</value>
+ </prop>
++ <prop oor:name="FormulaSyntax" oor:type="xs:int">
++ <!-- UIHints: Tools - Options Spreadsheet Calculate -->
++ <info>
++ <author>kyoshida</author>
++ <desc>Specifies what formula syntax type to use.</desc>
++ </info>
++ <constraints>
++ <enumeration oor:value="0">
++ <info>
++ <desc>Calc A1</desc>
++ </info>
++ </enumeration>
++ <enumeration oor:value="1">
++ <info>
++ <desc>Excel A1</desc>
++ </info>
++ </enumeration>
++ <enumeration oor:value="2">
++ <info>
++ <desc>Excel R1C1</desc>
++ </info>
++ </enumeration>
++ </constraints>
++ </prop>
+ <node-ref oor:name="Date" oor:node-type="Date">
+ <info>
+ <desc>Specifies the date that is represented by the number 0.</desc>
+Only in officecfg/registry/schema/org/openoffice/Office: Calc.xcs.~1.21.~
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]