ooo-build r15200 - in trunk: . patches/dev300
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15200 - in trunk: . patches/dev300
- Date: Wed, 28 Jan 2009 05:55:55 +0000 (UTC)
Author: kyoshida
Date: Wed Jan 28 05:55:55 2009
New Revision: 15200
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15200&view=rev
Log:
2009-01-28 Kohei Yoshida <kyoshida novell com>
* patches/dev300/calc-formula-variable-separators-sc-m39.diff:
* patches/dev300/calc-formula-variable-separators-sc.diff:
* patches/dev300/apply: adjusted for dev300-m40. Parts of the code
have been moved to formula::FormulaCompiler.
Added:
trunk/patches/dev300/calc-formula-variable-separators-sc-m39.diff (props changed)
- copied unchanged from r15189, /trunk/patches/dev300/calc-formula-variable-separators-sc.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/dev300/calc-formula-variable-separators-sc.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Wed Jan 28 05:55:55 2009
@@ -2211,7 +2211,14 @@
# Make the formula separators changeable per locale setting, and add new
# configuration page for formula syntax and separators.
+
+[ CalcFixes <= dev300-m39 ]
+calc-formula-variable-separators-sc-m39.diff, n#447164, i#92056, kohei
+
+[ CalcFixes > dev300-m39 ]
calc-formula-variable-separators-sc.diff, n#447164, i#92056, kohei
+
+[ CalcFixes ]
calc-formula-variable-separators-svx.diff, n#447164, i#92056, kohei
calc-formula-variable-separators-officecfg.diff, n#447164, i#92056, kohei
Modified: trunk/patches/dev300/calc-formula-variable-separators-sc.diff
==============================================================================
--- trunk/patches/dev300/calc-formula-variable-separators-sc.diff (original)
+++ trunk/patches/dev300/calc-formula-variable-separators-sc.diff Wed Jan 28 05:55:55 2009
@@ -1,37 +1,37 @@
-diff --git sc/inc/compiler.hxx sc/inc/compiler.hxx
-index a4d5d16..333d4e2 100644
---- sc/inc/compiler.hxx
-+++ sc/inc/compiler.hxx
-@@ -457,7 +457,7 @@ private:
- bool mbExtendedErrorDetection;
-
- BOOL GetToken();
-- BOOL NextNewToken(bool bAllowBooleans = false);
-+ BOOL NextNewToken(bool bInArray = false);
- OpCode NextToken();
- void PutCode( ScTokenRef& );
- void Factor();
-@@ -475,9 +475,9 @@ private:
- OpCode Expression();
-
- void SetError(USHORT nError);
-- xub_StrLen NextSymbol();
-+ xub_StrLen NextSymbol(bool bInArray);
- BOOL IsValue( const String& );
-- BOOL IsOpCode( const String& );
-+ BOOL IsOpCode( const String&, bool bInArray );
- BOOL IsOpCode2( const String& );
- BOOL IsString();
- BOOL IsReference( const String& );
-@@ -517,6 +517,8 @@ public:
+diff --git formula/inc/formula/FormulaCompiler.hxx formula/inc/formula/FormulaCompiler.hxx
+index 7da03fd..6df4898 100644
+--- formula/inc/formula/FormulaCompiler.hxx
++++ formula/inc/formula/FormulaCompiler.hxx
+@@ -237,6 +237,8 @@ public:
+ including an address reference convention. */
+ inline FormulaGrammar::Grammar GetGrammar() const { return meGrammar; }
+
++ static void UpdateSeparatorsNative( const rtl::OUString& rSep, const rtl::OUString& rArrayColSep, const rtl::OUString& rArrayRowSep );
++
+ protected:
+ virtual String FindAddInFunction( const String& rUpperName, BOOL bLocalFirst ) const;
+ virtual void fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) const;
+diff --git formula/source/core/api/FormulaCompiler.cxx formula/source/core/api/FormulaCompiler.cxx
+index d031c9a..5834e9e 100644
+--- formula/source/core/api/FormulaCompiler.cxx
++++ formula/source/core/api/FormulaCompiler.cxx
+@@ -1681,6 +1681,16 @@ void FormulaCompiler::AppendString( rtl::OUStringBuffer& rBuffer, const String &
+ rBuffer.append(sal_Unicode('"'));
}
- static void InitSymbolsNative(); /// only SymbolsNative, on first document creation
- static void InitSymbolsEnglish(); /// only SymbolsEnglish, maybe later
+ }
++
++void FormulaCompiler::UpdateSeparatorsNative(
++ const rtl::OUString& rSep, const rtl::OUString& rArrayColSep, const rtl::OUString& rArrayRowSep )
++{
++ InitSymbolsNative();
++ mxSymbolsNative->putOpCode(rSep, ocSep);
++ mxSymbolsNative->putOpCode(rArrayColSep, ocArrayColSep);
++ mxSymbolsNative->putOpCode(rArrayRowSep, ocArrayRowSep);
++}
+
-+ static void UpdateSeparatorsNative( const String& rSep, const String& rArrayColSep, const String& rArrayRowSep );
- private:
- static void InitSymbolsPODF(); /// only SymbolsPODF, on demand
- static void InitSymbolsODFF(); /// only SymbolsODFF, on demand
+ // -----------------------------------------------------------------------------
+ OpCode FormulaCompiler::NextToken()
+ {
diff --git sc/inc/docoptio.hxx sc/inc/docoptio.hxx
index 51a6405..bbd92e8 100644
--- sc/inc/docoptio.hxx
@@ -128,10 +128,10 @@
public:
diff --git sc/inc/sc.hrc sc/inc/sc.hrc
-index 3260a26..d17a59c 100644
+index 7301766..2eba0d8 100644
--- sc/inc/sc.hrc
+++ sc/inc/sc.hrc
-@@ -1658,7 +1658,9 @@
+@@ -1660,7 +1660,9 @@
// Autoformat for DataPilot
#define SID_PIVOT_AFMT (SC_OOO_BUILD_START + 4)
@@ -143,7 +143,7 @@
#endif
diff --git sc/source/core/data/documen3.cxx sc/source/core/data/documen3.cxx
-index 484ed97..c092c9c 100644
+index ec6c46c..27f9d36 100644
--- sc/source/core/data/documen3.cxx
+++ sc/source/core/data/documen3.cxx
@@ -54,6 +54,7 @@
@@ -154,7 +154,7 @@
#include "refupdat.hxx"
#include "docoptio.hxx"
#include "viewopti.hxx"
-@@ -1808,6 +1809,11 @@ void ScDocument::SetDocOptions( const ScDocOptions& rOpt )
+@@ -1771,6 +1772,11 @@ void ScDocument::SetDocOptions( const ScDocOptions& rOpt )
pFormatter->ChangeNullDate( d,m,y );
pFormatter->ChangeStandardPrec( (USHORT)rOpt.GetStdPrecision() );
pFormatter->SetYear2000( rOpt.GetYear2000() );
@@ -166,105 +166,6 @@
}
const ScViewOptions& ScDocument::GetViewOptions() const
-diff --git sc/source/core/tool/compiler.cxx sc/source/core/tool/compiler.cxx
-index 44cd1b8..b552a85 100644
---- sc/source/core/tool/compiler.cxx
-+++ sc/source/core/tool/compiler.cxx
-@@ -428,6 +428,16 @@ void ScCompiler::InitSymbolsEnglish()
- }
-
- // static
-+void ScCompiler::UpdateSeparatorsNative(
-+ const String& rSep, const String& rArrayColSep, const String& rArrayRowSep )
-+{
-+ InitSymbolsNative();
-+ mxSymbolsNative->putOpCode(rSep, ocSep);
-+ mxSymbolsNative->putOpCode(rArrayColSep, ocArrayColSep);
-+ mxSymbolsNative->putOpCode(rArrayRowSep, ocArrayRowSep);
-+}
-+
-+// static
- void ScCompiler::InitSymbolsPODF()
- {
- if (mxSymbolsPODF.get())
-@@ -2565,7 +2575,7 @@ sal_Unicode* lcl_UnicodeStrNCpy( sal_Unicode* pDst, const sal_Unicode* pSrc, xub
- // | Sonst | Symbol=Symbol+Zeichen | GetString
- //---------------+-------------------+-----------------------+---------------
-
--xub_StrLen ScCompiler::NextSymbol()
-+xub_StrLen ScCompiler::NextSymbol(bool bInArray)
- {
- cSymbol[MAXSTRLEN-1] = 0; // Stopper
- sal_Unicode* pSym = cSymbol;
-@@ -2578,6 +2588,8 @@ xub_StrLen ScCompiler::NextSymbol()
- ScanState eState = ssGetChar;
- xub_StrLen nSpaces = 0;
- sal_Unicode cSep = mxSymbols->getSymbol( ocSep).GetChar(0);
-+ sal_Unicode cArrayColSep = mxSymbols->getSymbol( ocArrayColSep).GetChar(0);
-+ sal_Unicode cArrayRowSep = mxSymbols->getSymbol( ocArrayRowSep).GetChar(0);
- sal_Unicode cDecSep = (mxSymbols->isEnglish() ? '.' :
- ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0));
-
-@@ -2594,9 +2606,9 @@ xub_StrLen ScCompiler::NextSymbol()
- {
- pSrc++;
- ULONG nMask = GetCharTableFlags( c );
-- // The parameter separator ends things unconditionally if not in
-- // string or reference.
-- if (c == cSep)
-+ // The parameter separator and the array column and row separators end
-+ // things unconditionally if not in string or reference.
-+ if (c == cSep || (bInArray && (c == cArrayColSep || c == cArrayRowSep)))
- {
- switch (eState)
- {
-@@ -2994,14 +3006,22 @@ Label_MaskStateMachine:
- // Convert symbol to token
- //---------------------------------------------------------------------------
-
--BOOL ScCompiler::IsOpCode( const String& rName )
-+BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
- {
- ScOpCodeHashMap::const_iterator iLook( mxSymbols->getHashMap()->find( rName));
- BOOL bFound = (iLook != mxSymbols->getHashMap()->end());
- if (bFound)
- {
- ScRawToken aToken;
-- aToken.SetOpCode( (*iLook).second );
-+ OpCode eOp = iLook->second;
-+ if (bInArray)
-+ {
-+ if (rName.Equals(mxSymbols->getSymbol(ocArrayColSep)))
-+ eOp = ocArrayColSep;
-+ else if (rName.Equals(mxSymbols->getSymbol(ocArrayRowSep)))
-+ eOp = ocArrayRowSep;
-+ }
-+ aToken.SetOpCode(eOp);
- pRawToken = aToken.Clone();
- }
- else
-@@ -3917,9 +3937,10 @@ void ScCompiler::AutoCorrectParsedSymbol()
- }
- }
-
--BOOL ScCompiler::NextNewToken( bool bAllowBooleans )
-+BOOL ScCompiler::NextNewToken( bool bInArray )
- {
-- xub_StrLen nSpaces = NextSymbol();
-+ bool bAllowBooleans = bInArray;
-+ xub_StrLen nSpaces = NextSymbol(bInArray);
-
- #if 0
- fprintf( stderr, "NextNewToken '%s' (spaces = %d)\n",
-@@ -4000,7 +4021,7 @@ BOOL ScCompiler::NextNewToken( bool bAllowBooleans )
- // IsReference().
- // IsBoolean before isValue to catch inline bools without the kludge
- // for inline arrays.
-- if ( !(bMayBeFuncName && IsOpCode( aUpper ))
-+ if ( !(bMayBeFuncName && IsOpCode( aUpper, bInArray ))
- && !IsReference( aOrg )
- && !(bAllowBooleans && IsBoolean( aUpper ))
- && !IsValue( aUpper )
diff --git sc/source/core/tool/docoptio.cxx sc/source/core/tool/docoptio.cxx
index ffbb2d9..4338af6 100644
--- sc/source/core/tool/docoptio.cxx
@@ -551,10 +452,10 @@
}
diff --git sc/source/ui/app/scmod.cxx sc/source/ui/app/scmod.cxx
-index 12776dd..52e87b4 100644
+index bc0a91f..2362c23 100644
--- sc/source/ui/app/scmod.cxx
+++ sc/source/ui/app/scmod.cxx
-@@ -2207,6 +2207,13 @@ SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItem
+@@ -2134,6 +2134,13 @@ SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItem
pRet = (*ScTpCalcOptionsCreate)(pParent, rSet);
}
break;
@@ -742,7 +643,7 @@
diff --git sc/source/ui/optdlg/tpformula.cxx sc/source/ui/optdlg/tpformula.cxx
new file mode 100644
-index 0000000..1eb4aac
+index 0000000..a27d5a7
--- /dev/null
+++ sc/source/ui/optdlg/tpformula.cxx
@@ -0,0 +1,289 @@
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]