ooo-build r11532 - in trunk: . patches/src680 patches/test
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11532 - in trunk: . patches/src680 patches/test
- Date: Fri, 8 Feb 2008 01:53:12 +0000 (GMT)
Author: kyoshida
Date: Fri Feb 8 01:53:12 2008
New Revision: 11532
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11532&view=rev
Log:
2008-02-07 Kohei Yoshida <kyoshida novell com>
* patches/src680/sc-localized-arg-separator.diff: made the formula
syntax a configuration option, but it still won't get saved to disk so
the option value gets reset in the next launch. :-(
* patches/test/sc-localized-arg-separator.diff: removed obsolete test
patch.
Removed:
trunk/patches/test/sc-localized-arg-separator.diff
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 Feb 8 01:53:12 2008
@@ -70,6 +70,51 @@
ScToken* CreateStringFromToken( String& rFormula, ScToken* pToken,
BOOL bAllowArrAdvance = FALSE );
+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-02-05 11:16:54.000000000 -0500
++++ sc/inc/docoptio.hxx 2008-02-07 11:21:22.000000000 -0500
+@@ -69,6 +69,7 @@ class SC_DLLPUBLIC ScDocOptions
+ BOOL bDoAutoSpell; // Auto-Spelling
+ BOOL bLookUpColRowNames; // Spalten-/Zeilenbeschriftungen automagisch suchen
+ BOOL bFormulaRegexEnabled; // regular expressions in formulas enabled
++ bool bUseXLFormulaSyntax;
+
+ public:
+ ScDocOptions();
+@@ -117,6 +118,9 @@ public:
+
+ void SetFormulaRegexEnabled( BOOL bVal ) { bFormulaRegexEnabled = bVal; }
+ BOOL IsFormulaRegexEnabled() const { return bFormulaRegexEnabled; }
++
++ void SetXLFormulaSyntax( bool bVal ) { bUseXLFormulaSyntax = bVal; }
++ bool IsXLFormulaSyntax() const { return bUseXLFormulaSyntax; }
+ };
+
+
+@@ -137,6 +141,7 @@ inline void ScDocOptions::CopyTo(ScDocOp
+ rOpt.bDoAutoSpell = bDoAutoSpell;
+ rOpt.bLookUpColRowNames = bLookUpColRowNames;
+ rOpt.bFormulaRegexEnabled = bFormulaRegexEnabled;
++ rOpt.bUseXLFormulaSyntax = bUseXLFormulaSyntax;
+ }
+
+ inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
+@@ -156,6 +161,7 @@ inline const ScDocOptions& ScDocOptions:
+ bDoAutoSpell = rCpy.bDoAutoSpell;
+ bLookUpColRowNames = rCpy.bLookUpColRowNames;
+ bFormulaRegexEnabled= rCpy.bFormulaRegexEnabled;
++ bUseXLFormulaSyntax = rCpy.bUseXLFormulaSyntax;
+
+ return *this;
+ }
+@@ -178,6 +184,7 @@ inline int ScDocOptions::operator==( con
+ && rOpt.bDoAutoSpell == bDoAutoSpell
+ && rOpt.bLookUpColRowNames == bLookUpColRowNames
+ && rOpt.bFormulaRegexEnabled == bFormulaRegexEnabled
++ && rOpt.bUseXLFormulaSyntax == bUseXLFormulaSyntax
+ );
+ }
+
diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/inc/global.hxx sc/inc/global.hxx
--- sc.clean/inc/global.hxx 2008-02-05 11:16:54.000000000 -0500
+++ sc/inc/global.hxx 2008-02-06 19:27:01.000000000 -0500
@@ -130,10 +175,24 @@
//==================================================================
Only in sc: sc.diff
+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-02-05 11:16:59.000000000 -0500
++++ sc/source/core/data/documen3.cxx 2008-02-07 12:03:28.000000000 -0500
+@@ -1757,6 +1757,10 @@ void ScDocument::SetDocOptions( const Sc
+ pFormatter->ChangeNullDate( d,m,y );
+ pFormatter->ChangeStandardPrec( (USHORT)rOpt.GetStdPrecision() );
+ pFormatter->SetYear2000( rOpt.GetYear2000() );
++ if (rOpt.IsXLFormulaSyntax())
++ SetAddressConvention(ScAddress::CONV_XL_A1);
++ else
++ SetAddressConvention(ScAddress::CONV_OOO);
+ }
+
+ const ScViewOptions& ScDocument::GetViewOptions() const
diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/data/global.cxx sc/source/core/data/global.cxx
--- sc.clean/source/core/data/global.cxx 2008-02-05 11:16:59.000000000 -0500
-+++ sc/source/core/data/global.cxx 2008-02-06 19:52:06.000000000 -0500
-@@ -1061,22 +1061,23 @@ const ScFuncDesc* ScFormulaUtil::GetDefa
++++ sc/source/core/data/global.cxx 2008-02-07 19:48:18.000000000 -0500
+@@ -1061,6 +1061,7 @@ const ScFuncDesc* ScFormulaUtil::GetDefa
BOOL ScFormulaUtil::GetNextFunc( const String& rFormula,
BOOL bBack,
@@ -141,10 +200,7 @@
xub_StrLen& rFStart, // Ein- und Ausgabe
xub_StrLen* pFEnd, // = NULL
const ScFuncDesc** ppFDesc, // = NULL
-- String*** pppArgs ) // = NULL
-+ String*** pppArgs ) // = NULL
- {
- BOOL bFound = FALSE;
+@@ -1070,13 +1071,13 @@ BOOL ScFormulaUtil::GetNextFunc( const S
xub_StrLen nOldStart = rFStart;
String aFname;
@@ -179,7 +235,7 @@
{
if ( !aArgArr ) return;
-@@ -1115,22 +1117,22 @@ void ScFormulaUtil::FillArgStrings( cons
+@@ -1115,11 +1117,11 @@ void ScFormulaUtil::FillArgStrings( cons
for ( i=0; i<nArgs && !bLast; i++ )
{
@@ -192,21 +248,16 @@
+ nEnd = GetArgStart( rFormula, nFuncPos, i+1, eConv );
if ( nEnd != nStart )
-- aArgArr[i] = new String( rFormula.Copy( nStart, nEnd-1-nStart ) );
-+ aArgArr[i] = new String( rFormula.Copy( nStart, nEnd-1-nStart ) );
- else
- aArgArr[i] = new String, bLast = TRUE;
+ aArgArr[i] = new String( rFormula.Copy( nStart, nEnd-1-nStart ) );
+@@ -1128,7 +1130,7 @@ void ScFormulaUtil::FillArgStrings( cons
}
else
{
- nEnd = GetFunctionEnd( rFormula, nFuncPos )-1;
+ nEnd = GetFunctionEnd( rFormula, nFuncPos, eConv )-1;
if ( nStart < nEnd )
-- aArgArr[i] = new String( rFormula.Copy( nStart, nEnd-nStart ) );
-+ aArgArr[i] = new String( rFormula.Copy( nStart, nEnd-nStart ) );
+ aArgArr[i] = new String( rFormula.Copy( nStart, nEnd-nStart ) );
else
- aArgArr[i] = new String;
- }
@@ -1145,13 +1147,14 @@ void ScFormulaUtil::FillArgStrings( cons
String** ScFormulaUtil::GetArgStrings( const String& rFormula,
@@ -361,7 +412,7 @@
}
diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/tool/compiler.cxx sc/source/core/tool/compiler.cxx
--- sc.clean/source/core/tool/compiler.cxx 2008-02-05 11:16:59.000000000 -0500
-+++ sc/source/core/tool/compiler.cxx 2008-02-06 19:53:12.000000000 -0500
++++ sc/source/core/tool/compiler.cxx 2008-02-07 19:49:34.000000000 -0500
@@ -439,6 +439,7 @@ void ScCompiler::SetCompileEnglish( BOOL
if (!pCharClassEnglish)
InitCharClassEnglish();
@@ -492,35 +543,7 @@
};
static const ConventionXL_R1C1 ConvXL_R1C1;
-@@ -1539,7 +1618,12 @@ ScCompiler::ScCompiler( ScDocument* pDoc
- if (NULL != pDoc)
- SetRefConvention( pDoc->GetAddressConvention() );
- else
-- SetRefConvention( pConvOOO_A1 );
-+ {
-+ if ( ScGlobal::pLocale->Language.equalsAscii("en") && ScGlobal::pLocale->Country.equalsAscii("US") )
-+ SetRefConvention( pConvXL_A1 );
-+ else
-+ SetRefConvention( pConvOOO_A1 );
-+ }
-
- nMaxTab = pDoc ? pDoc->GetTableCount() - 1 : 0;
- pStack = NULL;
-@@ -1570,7 +1654,12 @@ ScCompiler::ScCompiler(ScDocument* pDocu
- if (NULL != pDoc)
- SetRefConvention( pDoc->GetAddressConvention() );
- else
-- SetRefConvention( pConvOOO_A1 );
-+ {
-+ if ( ScGlobal::pLocale->Language.equalsAscii("en") && ScGlobal::pLocale->Country.equalsAscii("US") )
-+ SetRefConvention( pConvXL_A1 );
-+ else
-+ SetRefConvention( pConvOOO_A1 );
-+ }
-
- nMaxTab = pDoc ? pDoc->GetTableCount() - 1 : 0;
- pStack = NULL;
-@@ -1970,13 +2059,14 @@ xub_StrLen ScCompiler::NextSymbol()
+@@ -1970,13 +2049,14 @@ xub_StrLen ScCompiler::NextSymbol()
BOOL ScCompiler::IsOpCode( const String& rName )
{
@@ -539,7 +562,7 @@
}
else
{
-@@ -5001,9 +5091,17 @@ ScRangeData* ScCompiler::UpdateMoveTab(
+@@ -5001,9 +5081,17 @@ ScRangeData* ScCompiler::UpdateMoveTab(
}
@@ -559,7 +582,7 @@
}
ScToken* ScCompiler::CreateStringFromToken( String& rFormula, ScToken* pTokenP,
-@@ -5046,7 +5144,7 @@ ScToken* ScCompiler::CreateStringFromTok
+@@ -5046,7 +5134,7 @@ ScToken* ScCompiler::CreateStringFromTok
else if( eOp >= ocInternalBegin && eOp <= ocInternalEnd )
rBuffer.appendAscii( pInternal[ eOp - ocInternalBegin ] );
else if( (USHORT) eOp < mxSymbolsNative->getSymbolCount()) // Keyword:
@@ -568,6 +591,80 @@
else
{
DBG_ERROR("Unbekannter OpCode");
+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-02-05 11:16:59.000000000 -0500
++++ sc/source/core/tool/docoptio.cxx 2008-02-07 19:51:19.000000000 -0500
+@@ -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 ),
++ bUseXLFormulaSyntax( rCpy.bUseXLFormulaSyntax )
+ {
+ }
+
+@@ -212,6 +214,11 @@ void ScDocOptions::ResetDocOptions()
+ bDoAutoSpell = FALSE;
+ bLookUpColRowNames = TRUE;
+ bFormulaRegexEnabled= TRUE;
++ if (ScGlobal::pLocale->Language.equalsAscii("en") && ScGlobal::pLocale->Country.equalsAscii("US"))
++ // turn this on by default for the English language (for now).
++ bUseXLFormulaSyntax = true;
++ else
++ bUseXLFormulaSyntax = false;
+ }
+
+ //========================================================================
+@@ -287,7 +294,8 @@ SfxPoolItem* __EXPORT ScTpCalcItem::Clon
+ #define SCCALCOPT_SEARCHCRIT 9
+ #define SCCALCOPT_FINDLABEL 10
+ #define SCCALCOPT_REGEX 11
+-#define SCCALCOPT_COUNT 12
++#define SCCALCOPT_XL_FORMULA 12
++#define SCCALCOPT_COUNT 13
+
+ #define CFGPATH_DOCLAYOUT "Office.Calc/Layout/Other"
+
+@@ -310,7 +318,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/ExcelFormula" // SCCALCOPT_XL_FORMULA
+ };
+ Sequence<OUString> aNames(SCCALCOPT_COUNT);
+ OUString* pNames = aNames.getArray();
+@@ -403,6 +412,9 @@ ScDocCfg::ScDocCfg() :
+ case SCCALCOPT_REGEX :
+ SetFormulaRegexEnabled( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
+ break;
++ case SCCALCOPT_XL_FORMULA:
++ SetXLFormulaSyntax( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
++ break;
+ }
+ }
+ }
+@@ -486,6 +498,10 @@ IMPL_LINK( ScDocCfg, CalcCommitHdl, void
+ break;
+ case SCCALCOPT_REGEX :
+ ScUnoHelpFunctions::SetBoolInAny( pValues[nProp], IsFormulaRegexEnabled() );
++ break;
++ case SCCALCOPT_XL_FORMULA:
++ ScUnoHelpFunctions::SetBoolInAny( pValues[nProp], IsXLFormulaSyntax() );
++ break;
+ }
+ }
+ aCalcItem.PutProperties(aNames, aValues);
diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/filter/inc/fdumper.hxx sc/source/filter/inc/fdumper.hxx
--- sc.clean/source/filter/inc/fdumper.hxx 2008-02-05 11:16:59.000000000 -0500
+++ sc/source/filter/inc/fdumper.hxx 2008-02-05 16:47:29.000000000 -0500
@@ -580,20 +677,17 @@
#if SCF_INCL_DUMPER
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/docshell/docsh.cxx sc/source/ui/docshell/docsh.cxx
---- sc.clean/source/ui/docshell/docsh.cxx 2008-02-05 11:16:58.000000000 -0500
-+++ sc/source/ui/docshell/docsh.cxx 2008-02-06 17:44:49.000000000 -0500
-@@ -2198,6 +2198,10 @@ ScDocShell::ScDocShell( SfxObjectCreateM
- : SfxObjectShell( eMode ),
- __SCDOCSHELL_INIT
- {
-+ // Set appropriate address convention.
-+ if (ScGlobal::pLocale->Language.equalsAscii("en") && ScGlobal::pLocale->Country.equalsAscii("US"))
-+ aDocument.SetAddressConvention(ScAddress::CONV_XL_A1);
-+
- RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::ScDocShell" );
-
- SetPool( &SC_MOD()->GetPool() );
+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-02-05 11:16:55.000000000 -0500
++++ sc/source/ui/app/scmod.cxx 2008-02-07 19:51:55.000000000 -0500
+@@ -1253,6 +1253,7 @@ void ScModule::ModifyOptions( const SfxI
+ || rOldOpt.IsMatchWholeCell() != rNewOpt.IsMatchWholeCell()
+ || rOldOpt.GetYear2000() != rNewOpt.GetYear2000()
+ || rOldOpt.IsFormulaRegexEnabled() != rNewOpt.IsFormulaRegexEnabled()
++ || rOldOpt.IsXLFormulaSyntax() != rNewOpt.IsXLFormulaSyntax()
+ );
+ pDoc->SetDocOptions( rNewOpt );
+ pDocSh->SetDocumentModified();
diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/formdlg/formula.cxx sc/source/ui/formdlg/formula.cxx
--- sc.clean/source/ui/formdlg/formula.cxx 2008-02-05 11:16:58.000000000 -0500
+++ sc/source/ui/formdlg/formula.cxx 2008-02-06 19:56:24.000000000 -0500
@@ -794,3 +888,69 @@
if(pDesc->pFuncName)
aFtHeadLine.SetText( *(pDesc->pFuncName) );
else
+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-02-05 11:16:55.000000000 -0500
++++ sc/source/ui/inc/optdlg.hrc 2008-02-07 10:36:44.000000000 -0500
+@@ -78,6 +78,7 @@
+ #define BTN_MATCH 18
+ #define BTN_LOOKUP 19
+ #define BTN_REGEX 20
++#define BTN_XL_FORMULA 21
+
+ // TP_VIEW:
+ #define BTN_VSCROLL 1
+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-02-05 11:16:55.000000000 -0500
++++ sc/source/ui/inc/tpcalc.hxx 2008-02-07 10:47:59.000000000 -0500
+@@ -101,6 +101,7 @@ private:
+ CheckBox aBtnMatch;
+ CheckBox aBtnRegex;
+ CheckBox aBtnLookUp;
++ CheckBox aBtnXLFormula;
+
+ FixedText aFtPrec;
+ NumericField aEdPrec;
+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-02-05 11:16:58.000000000 -0500
++++ sc/source/ui/optdlg/tpcalc.cxx 2008-02-07 11:23:53.000000000 -0500
+@@ -96,6 +96,7 @@ ScTpCalcOptions::ScTpCalcOptions( Window
+ aBtnMatch ( this, ScResId( BTN_MATCH ) ),
+ aBtnRegex ( this, ScResId( BTN_REGEX ) ),
+ aBtnLookUp ( this, ScResId( BTN_LOOKUP ) ),
++ aBtnXLFormula ( this, ScResId( BTN_XL_FORMULA ) ),
+ aFtPrec ( this, ScResId( FT_PREC ) ),
+ aEdPrec ( this, ScResId( ED_PREC ) ),
+ pOldOptions ( new ScDocOptions(
+@@ -156,6 +157,7 @@ void __EXPORT ScTpCalcOptions::Reset( co
+ aBtnMatch .Check( pLocalOptions->IsMatchWholeCell() );
+ aBtnRegex .Check( pLocalOptions->IsFormulaRegexEnabled() );
+ aBtnLookUp .Check( pLocalOptions->IsLookUpColRowNames() );
++ aBtnXLFormula.Check( pLocalOptions->IsXLFormulaSyntax() );
+ aBtnIterate.Check( pLocalOptions->IsIter() );
+ aEdSteps .SetValue( pLocalOptions->GetIterCount() );
+ aEdPrec .SetValue( pLocalOptions->GetStdPrecision() );
+@@ -192,6 +194,7 @@ BOOL __EXPORT ScTpCalcOptions::FillItemS
+ pLocalOptions->SetMatchWholeCell( aBtnMatch.IsChecked() );
+ pLocalOptions->SetFormulaRegexEnabled( aBtnRegex.IsChecked() );
+ pLocalOptions->SetLookUpColRowNames( aBtnLookUp.IsChecked() );
++ pLocalOptions->SetXLFormulaSyntax( aBtnXLFormula.IsChecked() );
+
+ if ( *pLocalOptions != *pOldOptions )
+ {
+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-02-05 11:16:55.000000000 -0500
++++ sc/source/ui/src/optdlg.src 2008-02-07 19:55:18.000000000 -0500
+@@ -173,6 +173,13 @@ TabPage RID_SCPAGE_CALC
+ Size = MAP_APPFONT ( 239 , 10 ) ;
+ Text [ en-US ] = "~Automatically find column and row labels " ;
+ };
++
++ CheckBox BTN_XL_FORMULA
++ {
++ Pos = MAP_APPFONT ( 12, 147 ) ;
++ Size = MAP_APPFONT ( 239, 10 ) ;
++ Text [ en-US ] = "Use E~xcel style formula syntax" ;
++ };
+ };
+
+ /**************************************************************************/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]