[ooo-build-commit] .: 4 commits - patches/dev300

Fridrich Strba fridrich at kemper.freedesktop.org
Wed Sep 15 12:32:37 PDT 2010


 patches/dev300/apply                                           |   10 
 patches/dev300/calc-formula-variable-separators-officecfg.diff |  108 -
 patches/dev300/calc-formula-variable-separators-sc.diff        | 1070 ----------
 patches/dev300/calc-formula-variable-separators-svx.diff       |   42 
 patches/dev300/sc-sheet-gridline-toggle.diff                   |  344 ---
 5 files changed, 1574 deletions(-)

New commits:
commit 5a2227a196da22f659d94c17bd16169e18308e97
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 21:31:52 2010 +0200

    calc-formula-variable-separators-officecfg.diff: Migrated to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 5d03ed2..7f230b8 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -524,11 +524,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 
 [ CalcFixes ]
 
-# Make the formula separators changeable per locale setting, and add new 
-# configuration page for formula syntax and separators.
-
-calc-formula-variable-separators-officecfg.diff, n#447164, i#92056, kohei
-
 # Squeeze chart's subtitle into the 2nd line of the main title when exporting
 # to xls.
 chart-subtitle-xls-export.diff, i#92357, kohei
diff --git a/patches/dev300/calc-formula-variable-separators-officecfg.diff b/patches/dev300/calc-formula-variable-separators-officecfg.diff
deleted file mode 100644
index bb88a9d..0000000
--- a/patches/dev300/calc-formula-variable-separators-officecfg.diff
+++ /dev/null
@@ -1,108 +0,0 @@
----
- .../registry/schema/org/openoffice/Office/Calc.xcs |   83 ++++++++++++++++++++
- 1 files changed, 83 insertions(+), 0 deletions(-)
-
-diff --git officecfg/registry/schema/org/openoffice/Office/Calc.xcs officecfg/registry/schema/org/openoffice/Office/Calc.xcs
-index 9139027..2db99d2 100644
---- officecfg/registry/schema/org/openoffice/Office/Calc.xcs
-+++ officecfg/registry/schema/org/openoffice/Office/Calc.xcs
-@@ -1217,6 +1217,31 @@
- 					</info>
- 					<value>true</value>
- 				</prop>
-+                <prop oor:name="FormulaSyntax" oor:type="xs:int">
-+                    <!-- UIHints: Tools - Options  Spreadsheet  Calculate -->
-+                    <!-- This node is deprecated, but we still need to keep it for migration purposes. -->
-+                    <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>
-@@ -1224,6 +1249,64 @@
- 				</node-ref>
- 			</group>
- 		</group>
-+        <group oor:name="Formula">
-+            <info>
-+                <desc>Contains settings that affect formula handling.</desc>
-+            </info>
-+            <group oor:name="Syntax">
-+                <info>
-+                    <desc>Contains settings for formula syntax.</desc>
-+                </info>
-+                <prop oor:name="Grammar" oor:type="xs:int">
-+                    <!-- UIHints: Tools - Options  Spreadsheet  Formula -->
-+                    <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>
-+                <prop oor:name="SeparatorArg" oor:type="xs:string">
-+                    <!-- UIHints: Tools - Options  Spreadsheet  Formula -->
-+                    <info>
-+                        <author>kyoshida</author>
-+                        <desc>Argument separator in worksheet function</desc>
-+                    </info>
-+                    <value></value>
-+                </prop>
-+                <prop oor:name="SeparatorArrayRow" oor:type="xs:string">
-+                    <!-- UIHints: Tools - Options  Spreadsheet  Formula -->
-+                    <info>
-+                        <author>kyoshida</author>
-+                        <desc>Row separator in array constant</desc>
-+                    </info>
-+                    <value></value>
-+                </prop>
-+                <prop oor:name="SeparatorArrayCol" oor:type="xs:string">
-+                    <!-- UIHints: Tools - Options  Spreadsheet  Formula -->
-+                    <info>
-+                        <author>kyoshida</author>
-+                        <desc>Column separator in array constant</desc>
-+                    </info>
-+                    <value></value>
-+                </prop>
-+            </group>
-+        </group>
- 		<group oor:name="Revision">
- 			<info>
- 				<desc>Contains settings that affect revision marking.</desc>
--- 
-1.7.0.1
-
commit c10316b1c5879e8d9f350b66da7c597ada615377
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 21:28:16 2010 +0200

    calc-formula-variable-separators-svx.diff: Migrated to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 48cb5ec..5d03ed2 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -527,7 +527,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 # Make the formula separators changeable per locale setting, and add new 
 # configuration page for formula syntax and separators.
 
-calc-formula-variable-separators-svx.diff,       n#447164, i#92056, kohei
 calc-formula-variable-separators-officecfg.diff, n#447164, i#92056, kohei
 
 # Squeeze chart's subtitle into the 2nd line of the main title when exporting
diff --git a/patches/dev300/calc-formula-variable-separators-svx.diff b/patches/dev300/calc-formula-variable-separators-svx.diff
deleted file mode 100644
index 9f5f71c..0000000
--- a/patches/dev300/calc-formula-variable-separators-svx.diff
+++ /dev/null
@@ -1,42 +0,0 @@
----
- cui/source/options/treeopt.cxx |    1 +
- cui/source/options/treeopt.src |    1 +
- svx/inc/svx/dialogs.hrc        |    1 +
- 3 files changed, 3 insertions(+), 0 deletions(-)
-
-diff --git cui/source/options/treeopt.cxx cui/source/options/treeopt.cxx
-index 257d44d..07eba73 100644
---- cui/source/options/treeopt.cxx
-+++ cui/source/options/treeopt.cxx
-@@ -450,6 +450,7 @@ static OptionsMapping_Impl __READONLY_DATA OptionsMap_Impl[] =
-     { "Calc",               "View",                 SID_SC_TP_CONTENT },
-     { "Calc",               "International",        RID_OFA_TP_INTERNATIONAL },
-     { "Calc",               "Calculate",            SID_SC_TP_CALC },
-+    { "Calc",               "Formula",              SID_SC_TP_FORMULA },
-     { "Calc",               "SortLists",            SID_SC_TP_USERLISTS },
-     { "Calc",               "Changes",              SID_SC_TP_CHANGES },
-     { "Calc",               "Grid",                 SID_SC_TP_GRID },
-diff --git cui/source/options/treeopt.src cui/source/options/treeopt.src
-index 45c8124..5b22727 100644
---- cui/source/options/treeopt.src
-+++ cui/source/options/treeopt.src
-@@ -239,6 +239,7 @@ Resource RID_OFADLG_OPTIONS_TREE_PAGES
-             < "View" ;			SID_SC_TP_CONTENT			;> ;
-             < "International" ;		RID_OFA_TP_INTERNATIONAL	;> ;
-             < "Calculate" ;			SID_SC_TP_CALC				;> ;
-+            < "Formula" ;       SID_SC_TP_FORMULA ;> ;
-             < "Sort Lists" ;		SID_SC_TP_USERLISTS			;> ;
-             < "Changes" ;		SID_SC_TP_CHANGES			;> ;
-             < "Grid" ;			SID_SC_TP_GRID				;> ;
-diff --git svx/inc/svx/dialogs.hrc svx/inc/svx/dialogs.hrc
-index eb1d9c5..cb56b02 100755
---- svx/inc/svx/dialogs.hrc
-+++ svx/inc/svx/dialogs.hrc
-@@ -1058,3 +1058,4 @@
- 
- #endif
- 
-+#define SID_SC_TP_FORMULA               (SVX_OOO_BUILD_START + 1)
--- 
-1.7.0.1
-
commit e34af78e991abd406fb6a967a77dcd59ace4c272
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 21:22:13 2010 +0200

    calc-formula-variable-separators-sc.diff: Migrated to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 967616c..48cb5ec 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -527,7 +527,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 # Make the formula separators changeable per locale setting, and add new 
 # configuration page for formula syntax and separators.
 
-calc-formula-variable-separators-sc.diff,        n#447164, i#92056, kohei
 calc-formula-variable-separators-svx.diff,       n#447164, i#92056, kohei
 calc-formula-variable-separators-officecfg.diff, n#447164, i#92056, kohei
 
diff --git a/patches/dev300/calc-formula-variable-separators-sc.diff b/patches/dev300/calc-formula-variable-separators-sc.diff
deleted file mode 100644
index 7ff885a..0000000
--- a/patches/dev300/calc-formula-variable-separators-sc.diff
+++ /dev/null
@@ -1,1070 +0,0 @@
----
- formula/inc/formula/FormulaCompiler.hxx     |    2 +
- formula/source/core/api/FormulaCompiler.cxx |   11 +
- sc/inc/docoptio.hxx                         |   36 ++++
- sc/inc/sc.hrc                               |    4 +
- sc/source/core/data/documen3.cxx            |    7 +
- sc/source/core/tool/docoptio.cxx            |  200 ++++++++++++++++++-
- sc/source/ui/app/scmod.cxx                  |    7 +
- sc/source/ui/attrdlg/scdlgfact.cxx          |    3 +
- sc/source/ui/inc/optdlg.hrc                 |   14 ++
- sc/source/ui/inc/tpformula.hxx              |   96 +++++++++
- sc/source/ui/optdlg/makefile.mk             |    2 +
- sc/source/ui/optdlg/tpformula.cxx           |  288 +++++++++++++++++++++++++++
- sc/source/ui/src/optdlg.src                 |   99 +++++++++
- 13 files changed, 767 insertions(+), 2 deletions(-)
- create mode 100644 sc/source/ui/inc/tpformula.hxx
- create mode 100644 sc/source/ui/optdlg/tpformula.cxx
-
-diff --git formula/inc/formula/FormulaCompiler.hxx formula/inc/formula/FormulaCompiler.hxx
-index b67d78a..d82e2c8 100644
---- formula/inc/formula/FormulaCompiler.hxx
-+++ formula/inc/formula/FormulaCompiler.hxx
-@@ -242,6 +242,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 5bac848..2639515 100644
---- formula/source/core/api/FormulaCompiler.cxx
-+++ formula/source/core/api/FormulaCompiler.cxx
-@@ -1678,6 +1678,17 @@ void FormulaCompiler::AppendString( rtl::OUStringBuffer& rBuffer, const String &
-         rBuffer.append(sal_Unicode('"'));
-     }
- }
-+
-+void FormulaCompiler::UpdateSeparatorsNative(
-+    const rtl::OUString& rSep, const rtl::OUString& rArrayColSep, const rtl::OUString& rArrayRowSep )
-+{
-+    NonConstOpCodeMapPtr xSymbolsNative;
-+    lcl_fillNativeSymbols(xSymbolsNative);
-+    xSymbolsNative->putOpCode(rSep, ocSep);
-+    xSymbolsNative->putOpCode(rArrayColSep, ocArrayColSep);
-+    xSymbolsNative->putOpCode(rArrayRowSep, ocArrayRowSep);
-+}
-+
- // -----------------------------------------------------------------------------
- OpCode FormulaCompiler::NextToken()
- {
-diff --git sc/inc/docoptio.hxx sc/inc/docoptio.hxx
-index c648978..8db36bd 100644
---- sc/inc/docoptio.hxx
-+++ sc/inc/docoptio.hxx
-@@ -34,6 +34,8 @@
- #include "scdllapi.h"
- #include "optutil.hxx"
- 
-+#include "formula/grammar.hxx"
-+
- class SC_DLLPUBLIC ScDocOptions
- {
-     double fIterEps;				// Epsilon-Wert dazu
-@@ -51,6 +53,11 @@ class SC_DLLPUBLIC ScDocOptions
-     BOOL   bDoAutoSpell;			// Auto-Spelling
-     BOOL   bLookUpColRowNames;		// Spalten-/Zeilenbeschriftungen automagisch suchen
-     BOOL   bFormulaRegexEnabled;    // regular expressions in formulas enabled
-+    ::formula::FormulaGrammar::Grammar eFormulaGrammar;  // formula grammar used to switch different formula syntax
-+
-+    ::rtl::OUString aFormulaSepArg;
-+    ::rtl::OUString aFormulaSepArrayRow;
-+    ::rtl::OUString aFormulaSepArrayCol;
- 
- public:
-                 ScDocOptions();
-@@ -97,6 +104,20 @@ public:
- 
-     void    SetFormulaRegexEnabled( BOOL bVal ) { bFormulaRegexEnabled = bVal; }
-     BOOL    IsFormulaRegexEnabled() const       { return bFormulaRegexEnabled; }
-+
-+    void SetFormulaSyntax( ::formula::FormulaGrammar::Grammar eGram ) { eFormulaGrammar = eGram; }
-+    ::formula::FormulaGrammar::Grammar GetFormulaSyntax() const { return eFormulaGrammar; }
-+
-+    void SetFormulaSepArg(const ::rtl::OUString& rSep) { aFormulaSepArg = rSep; }
-+    ::rtl::OUString GetFormulaSepArg() const { return aFormulaSepArg; }
-+
-+    void SetFormulaSepArrayRow(const ::rtl::OUString& rSep) { aFormulaSepArrayRow = rSep; }
-+    ::rtl::OUString GetFormulaSepArrayRow() const { return aFormulaSepArrayRow; }
-+
-+    void SetFormulaSepArrayCol(const ::rtl::OUString& rSep) { aFormulaSepArrayCol = rSep; }
-+    ::rtl::OUString GetFormulaSepArrayCol() const { return aFormulaSepArrayCol; }
-+
-+    const LocaleDataWrapper& GetLocaleDataWrapper() const;
- };
- 
- 
-@@ -117,6 +138,10 @@ inline void ScDocOptions::CopyTo(ScDocOptions& rOpt)
-     rOpt.bDoAutoSpell			= bDoAutoSpell;
-     rOpt.bLookUpColRowNames		= bLookUpColRowNames;
-     rOpt.bFormulaRegexEnabled   = bFormulaRegexEnabled;
-+    rOpt.eFormulaGrammar        = eFormulaGrammar;
-+    rOpt.aFormulaSepArg         = aFormulaSepArg;
-+    rOpt.aFormulaSepArrayRow    = aFormulaSepArrayRow;
-+    rOpt.aFormulaSepArrayCol    = aFormulaSepArrayCol;
- }
- 
- inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
-@@ -136,6 +161,10 @@ inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
-     bDoAutoSpell		= rCpy.bDoAutoSpell;
-     bLookUpColRowNames	= rCpy.bLookUpColRowNames;
-     bFormulaRegexEnabled= rCpy.bFormulaRegexEnabled;
-+    eFormulaGrammar     = rCpy.eFormulaGrammar;
-+    aFormulaSepArg      = rCpy.aFormulaSepArg;
-+    aFormulaSepArrayRow = rCpy.aFormulaSepArrayRow;
-+    aFormulaSepArrayCol = rCpy.aFormulaSepArrayCol;
- 
-     return *this;
- }
-@@ -158,6 +187,10 @@ inline int ScDocOptions::operator==( const ScDocOptions& rOpt ) const
-             &&	rOpt.bDoAutoSpell			== bDoAutoSpell
-             &&	rOpt.bLookUpColRowNames		== bLookUpColRowNames
-             &&  rOpt.bFormulaRegexEnabled   == bFormulaRegexEnabled
-+            &&  rOpt.eFormulaGrammar        == eFormulaGrammar
-+            &&  rOpt.aFormulaSepArg         == aFormulaSepArg
-+            &&  rOpt.aFormulaSepArrayRow    == aFormulaSepArrayRow
-+            &&  rOpt.aFormulaSepArrayCol    == aFormulaSepArrayCol
-             );
- }
- 
-@@ -197,12 +230,15 @@ private:
- class ScDocCfg : public ScDocOptions
- {
-     ScLinkConfigItem	aCalcItem;
-+    ScLinkConfigItem    aFormulaItem;
-     ScLinkConfigItem	aLayoutItem;
- 
-     DECL_LINK( CalcCommitHdl, void* );
-+    DECL_LINK( FormulaCommitHdl, void* );
-     DECL_LINK( LayoutCommitHdl, void* );
- 
-     com::sun::star::uno::Sequence<rtl::OUString> GetCalcPropertyNames();
-+    com::sun::star::uno::Sequence<rtl::OUString> GetFormulaPropertyNames();
-     com::sun::star::uno::Sequence<rtl::OUString> GetLayoutPropertyNames();
- 
- public:
-diff --git sc/inc/sc.hrc sc/inc/sc.hrc
-index 72fb80a..bde1d80 100644
---- sc/inc/sc.hrc
-+++ sc/inc/sc.hrc
-@@ -1664,6 +1664,10 @@
- // Toggle sheet grid
- #define FID_TAB_TOGGLE_GRID         (SC_OOO_BUILD_START + 2)
- 
-+// Formula options page
-+#define RID_SCPAGE_FORMULA          (SC_OOO_BUILD_START + 3)
-+#define HID_SCPAGE_FORMULA          (SC_OOO_BUILD_START + 4)
-+
- #endif
- 
- 
-diff --git sc/source/core/data/documen3.cxx sc/source/core/data/documen3.cxx
-index cce3c02..44a5b22 100644
---- sc/source/core/data/documen3.cxx
-+++ sc/source/core/data/documen3.cxx
-@@ -52,6 +52,7 @@
- #include "rangelst.hxx"
- #include "chartarr.hxx"
- #include "chartlock.hxx"
-+#include "compiler.hxx"
- #include "refupdat.hxx"
- #include "docoptio.hxx"
- #include "viewopti.hxx"
-@@ -1770,6 +1771,12 @@ void ScDocument::SetDocOptions( const ScDocOptions& rOpt )
-     *pDocOptions = rOpt;
- 
-     xPoolHelper->SetFormTableOpt(rOpt);
-+
-+    SetGrammar( rOpt.GetFormulaSyntax() );
-+
-+    // Update the separators.
-+    ScCompiler::UpdateSeparatorsNative(
-+        rOpt.GetFormulaSepArg(), rOpt.GetFormulaSepArrayCol(), rOpt.GetFormulaSepArrayRow());
- }
- 
- const ScViewOptions& ScDocument::GetViewOptions() const
-diff --git sc/source/core/tool/docoptio.cxx sc/source/core/tool/docoptio.cxx
-index 0768b5f..fcb9a0d 100644
---- sc/source/core/tool/docoptio.cxx
-+++ sc/source/core/tool/docoptio.cxx
-@@ -35,6 +35,8 @@
- 
- #include <com/sun/star/uno/Any.hxx>
- #include <com/sun/star/uno/Sequence.hxx>
-+#include <com/sun/star/lang/Locale.hpp>
-+#include <com/sun/star/i18n/LocaleDataItem.hpp>
- 
- #include "cfgids.hxx"
- #include "docoptio.hxx"
-@@ -42,10 +44,13 @@
- #include "scresid.hxx"
- #include "sc.hrc"
- #include "miscuno.hxx"
-+#include "global.hxx"
- 
- using namespace utl;
- using namespace rtl;
- using namespace com::sun::star::uno;
-+using ::com::sun::star::lang::Locale;
-+using ::com::sun::star::i18n::LocaleDataItem;
- 
- //------------------------------------------------------------------------
- 
-@@ -97,7 +102,11 @@ ScDocOptions::ScDocOptions( const ScDocOptions& rCpy )
-             bMatchWholeCell( rCpy.bMatchWholeCell ),
-             bDoAutoSpell( rCpy.bDoAutoSpell ),
-             bLookUpColRowNames( rCpy.bLookUpColRowNames ),
--            bFormulaRegexEnabled( rCpy.bFormulaRegexEnabled )
-+            bFormulaRegexEnabled( rCpy.bFormulaRegexEnabled ),
-+            eFormulaGrammar( rCpy.eFormulaGrammar ),
-+            aFormulaSepArg( rCpy.aFormulaSepArg ),
-+            aFormulaSepArrayRow( rCpy.aFormulaSepArrayRow ),
-+            aFormulaSepArrayCol( rCpy.aFormulaSepArrayCol )
- {
- }
- 
-@@ -126,6 +135,67 @@ void ScDocOptions::ResetDocOptions()
-     bDoAutoSpell		= FALSE;
-     bLookUpColRowNames	= TRUE;
-     bFormulaRegexEnabled= TRUE;
-+    eFormulaGrammar     = ::formula::FormulaGrammar::GRAM_NATIVE;
-+
-+    do
-+    {
-+        const Locale& rLocale = *ScGlobal::GetLocale();
-+        const OUString& rLang = rLocale.Language;
-+        if (rLang.equalsAscii("ru"))
-+            // Don't do automatic guess for these languages, and fall back to
-+            // the old separator set.
-+            break;
-+
-+        const LocaleDataWrapper& rLocaleData = GetLocaleDataWrapper();
-+        const OUString& rDecSep  = rLocaleData.getNumDecimalSep();
-+        const OUString& rListSep = rLocaleData.getListSep();
-+
-+        if (!rDecSep.getLength() || !rListSep.getLength())
-+            // Something is wrong.  Stick with the default separators.
-+            break;
-+
-+        sal_Unicode cDecSep  = rDecSep.getStr()[0];
-+        sal_Unicode cListSep = rListSep.getStr()[0];
-+
-+        // Excel by default uses system's list separator as the parameter
-+        // separator, which in English locales is a comma.  However, OOo's list
-+        // separator value is set to ';' for all English locales.  Because of this
-+        // discrepancy, we will hardcode the separator value here, for now.
-+        if (cDecSep == sal_Unicode('.'))
-+            cListSep = sal_Unicode(',');
-+
-+        // Special case for de_CH locale.
-+        if (rLocale.Language.equalsAsciiL("de", 2) && rLocale.Country.equalsAsciiL("CH", 2))
-+            cListSep = sal_Unicode(';');
-+
-+        // by default, the parameter separator equals the locale-specific
-+        // list separator.
-+        aFormulaSepArg = OUString(cListSep);
-+
-+        if (cDecSep == cListSep && cDecSep != sal_Unicode(';'))
-+            // if the decimal and list separators are equal, set the
-+            // parameter separator to be ';', unless they are both
-+            // semicolon in which case don't change the decimal separator.
-+            aFormulaSepArg = OUString::createFromAscii(";");
-+
-+        aFormulaSepArrayCol = OUString::createFromAscii(",");
-+        if (cDecSep == sal_Unicode(','))
-+            aFormulaSepArrayCol = OUString::createFromAscii(".");
-+        aFormulaSepArrayRow = OUString::createFromAscii(";");
-+
-+        return;
-+    }
-+    while (false);
-+
-+    // Defaults to the old separator values.
-+    aFormulaSepArg      = OUString::createFromAscii(";");
-+    aFormulaSepArrayCol = OUString::createFromAscii(";");
-+    aFormulaSepArrayRow = OUString::createFromAscii("|");
-+}
-+
-+const LocaleDataWrapper& ScDocOptions::GetLocaleDataWrapper() const
-+{
-+    return *ScGlobal::pLocaleData;
- }
- 
- //========================================================================
-@@ -203,6 +273,13 @@ SfxPoolItem* __EXPORT ScTpCalcItem::Clone( SfxItemPool * ) const
- #define SCCALCOPT_REGEX             11
- #define SCCALCOPT_COUNT             12
- 
-+#define CFGPATH_FORMULA     "Office.Calc/Formula"
-+#define SCFORMULAOPT_GRAMMAR           0
-+#define SCFORMULAOPT_SEP_ARG           1
-+#define SCFORMULAOPT_SEP_ARRAY_ROW     2
-+#define SCFORMULAOPT_SEP_ARRAY_COL     3
-+#define SCFORMULAOPT_COUNT             4
-+
- #define CFGPATH_DOCLAYOUT	"Office.Calc/Layout/Other"
- 
- #define SCDOCLAYOUTOPT_TABSTOP		0
-@@ -224,7 +301,7 @@ Sequence<OUString> ScDocCfg::GetCalcPropertyNames()
-         "Other/Precision",					// SCCALCOPT_PRECISION
-         "Other/SearchCriteria",				// SCCALCOPT_SEARCHCRIT
-         "Other/FindLabel",                  // SCCALCOPT_FINDLABEL
--        "Other/RegularExpressions"          // SCCALCOPT_REGEX
-+        "Other/RegularExpressions",         // SCCALCOPT_REGEX
-     };
-     Sequence<OUString> aNames(SCCALCOPT_COUNT);
-     OUString* pNames = aNames.getArray();
-@@ -234,6 +311,23 @@ Sequence<OUString> ScDocCfg::GetCalcPropertyNames()
-     return aNames;
- }
- 
-+Sequence<OUString> ScDocCfg::GetFormulaPropertyNames()
-+{
-+    static const char* aPropNames[] =
-+    {
-+        "Syntax/Grammar",             // SCFORMULAOPT_GRAMMAR
-+        "Syntax/SeparatorArg",        // SCFORMULAOPT_SEP_ARG
-+        "Syntax/SeparatorArrayRow",   // SCFORMULAOPT_SEP_ARRAY_ROW
-+        "Syntax/SeparatorArrayCol",   // SCFORMULAOPT_SEP_ARRAY_COL
-+    };
-+    Sequence<OUString> aNames(SCFORMULAOPT_COUNT);
-+    OUString* pNames = aNames.getArray();
-+    for (int i = 0; i < SCFORMULAOPT_COUNT; ++i)
-+        pNames[i] = OUString::createFromAscii(aPropNames[i]);
-+
-+    return aNames;
-+}
-+
- Sequence<OUString> ScDocCfg::GetLayoutPropertyNames()
- {
-     static const char* aPropNames[] =
-@@ -254,6 +348,7 @@ Sequence<OUString> ScDocCfg::GetLayoutPropertyNames()
- 
- ScDocCfg::ScDocCfg() :
-     aCalcItem( OUString::createFromAscii( CFGPATH_CALC ) ),
-+    aFormulaItem(OUString::createFromAscii(CFGPATH_FORMULA)),
-     aLayoutItem( OUString::createFromAscii( CFGPATH_DOCLAYOUT ) )
- {
-     sal_Int32 nIntVal = 0;
-@@ -325,6 +420,69 @@ ScDocCfg::ScDocCfg() :
- 
-     SetDate( nDateDay, nDateMonth, nDateYear );
- 
-+    aNames = GetFormulaPropertyNames();
-+    aValues = aFormulaItem.GetProperties(aNames);
-+    aFormulaItem.EnableNotification(aNames);
-+    pValues = aValues.getConstArray();
-+    if (aValues.getLength() == aNames.getLength())
-+    {
-+        for (int nProp = 0; nProp < aNames.getLength(); ++nProp)
-+        {
-+            switch (nProp)
-+            {
-+                case SCFORMULAOPT_GRAMMAR:
-+                {
-+                    ::formula::FormulaGrammar::Grammar eGram = ::formula::FormulaGrammar::GRAM_DEFAULT;
-+
-+                    do
-+                    {
-+                        if (!(pValues[nProp] >>= nIntVal))
-+                            // extractino failed.
-+                            break;
-+
-+                        switch (nIntVal)
-+                        {
-+                            case 0: // Calc A1
-+                                eGram = ::formula::FormulaGrammar::GRAM_NATIVE;
-+                            break;
-+                            case 1: // Excel A1
-+                                eGram = ::formula::FormulaGrammar::GRAM_NATIVE_XL_A1;
-+                            break;
-+                            case 2: // Excel R1C1
-+                                eGram = ::formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1;
-+                            break;
-+                        }
-+                    }
-+                    while (false);
-+                    SetFormulaSyntax(eGram);
-+                }
-+                break;
-+                case SCFORMULAOPT_SEP_ARG:
-+                {
-+                    OUString aSep;
-+                    if ((pValues[nProp] >>= aSep) && aSep.getLength())
-+                        SetFormulaSepArg(aSep);
-+                }
-+                break;
-+                case SCFORMULAOPT_SEP_ARRAY_ROW:
-+                {
-+                    OUString aSep;
-+                    if ((pValues[nProp] >>= aSep) && aSep.getLength())
-+                        SetFormulaSepArrayRow(aSep);
-+                }
-+                break;
-+                case SCFORMULAOPT_SEP_ARRAY_COL:
-+                {
-+                    OUString aSep;
-+                    if ((pValues[nProp] >>= aSep) && aSep.getLength())
-+                        SetFormulaSepArrayCol(aSep);
-+                }
-+                break;
-+            }
-+        }
-+    }
-+    aFormulaItem.SetCommitLink( LINK(this, ScDocCfg, FormulaCommitHdl) );
-+
-     aNames = GetLayoutPropertyNames();
-     aValues = aLayoutItem.GetProperties(aNames);
-     aLayoutItem.EnableNotification(aNames);
-@@ -407,6 +565,43 @@ IMPL_LINK( ScDocCfg, CalcCommitHdl, void *, EMPTYARG )
-     return 0;
- }
- 
-+IMPL_LINK( ScDocCfg, FormulaCommitHdl, void *, EMPTYARG )
-+{
-+    Sequence<OUString> aNames = GetFormulaPropertyNames();
-+    Sequence<Any> aValues(aNames.getLength());
-+    Any* pValues = aValues.getArray();
-+
-+    for (int nProp = 0; nProp < aNames.getLength(); ++nProp)
-+    {
-+        switch (nProp)
-+        {
-+            case SCFORMULAOPT_GRAMMAR :
-+            {
-+                sal_Int32 nVal = 0;
-+                switch (GetFormulaSyntax())
-+                {
-+                    case ::formula::FormulaGrammar::GRAM_NATIVE_XL_A1:    nVal = 1; break;
-+                    case ::formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1:  nVal = 2; break;
-+                }
-+                pValues[nProp] <<= nVal;
-+            }
-+            break;
-+            case SCFORMULAOPT_SEP_ARG:
-+                pValues[nProp] <<= GetFormulaSepArg();
-+            break;
-+            case SCFORMULAOPT_SEP_ARRAY_ROW:
-+                pValues[nProp] <<= GetFormulaSepArrayRow();
-+            break;
-+            case SCFORMULAOPT_SEP_ARRAY_COL:
-+                pValues[nProp] <<= GetFormulaSepArrayCol();
-+            break;
-+        }
-+    }
-+    aFormulaItem.PutProperties(aNames, aValues);
-+
-+    return 0;
-+}
-+
- IMPL_LINK( ScDocCfg, LayoutCommitHdl, void *, EMPTYARG )
- {
-     Sequence<OUString> aNames = GetLayoutPropertyNames();
-@@ -436,6 +631,7 @@ void ScDocCfg::SetOptions( const ScDocOptions& rNew )
-     *(ScDocOptions*)this = rNew;
- 
-     aCalcItem.SetModified();
-+    aFormulaItem.SetModified();
-     aLayoutItem.SetModified();
- }
- 
-diff --git sc/source/ui/app/scmod.cxx sc/source/ui/app/scmod.cxx
-index 92d2617..66d9d8c 100644
---- sc/source/ui/app/scmod.cxx
-+++ sc/source/ui/app/scmod.cxx
-@@ -2109,6 +2109,13 @@ SfxTabPage*	 ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItem
-                                                         pRet = (*ScTpCalcOptionsCreate)(pParent, rSet);
-                                 }
-                                 break;
-+        case SID_SC_TP_FORMULA:
-+        {
-+            ::CreateTabPage ScTpFormulaOptionsCreate = pFact->GetTabPageCreatorFunc (RID_SCPAGE_FORMULA);
-+            if (ScTpFormulaOptionsCreate)
-+                pRet = (*ScTpFormulaOptionsCreate)(pParent, rSet);
-+        }
-+        break;
-         case SID_SC_TP_CHANGES:
-                                 {			//CHINA001 pRet = ScRedlineOptionsTabPage::Create(pParent, rSet);
-                                             ::CreateTabPage ScRedlineOptionsTabPageCreate =	pFact->GetTabPageCreatorFunc( RID_SCPAGE_OPREDLINE );
-diff --git sc/source/ui/attrdlg/scdlgfact.cxx sc/source/ui/attrdlg/scdlgfact.cxx
-index 944bd8c..3d261aa 100644
---- sc/source/ui/attrdlg/scdlgfact.cxx
-+++ sc/source/ui/attrdlg/scdlgfact.cxx
-@@ -79,6 +79,7 @@
- #include "tpstat.hxx" //add for ScDocStatPage
- #include "tpusrlst.hxx" //add for ScTpUserLists
- #include "tpview.hxx" //add for ScTpContentOptions
-+#include "tpformula.hxx"
- 
- // ause
- #include "editutil.hxx"
-@@ -1554,6 +1555,8 @@ CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
-         case	RID_SCPAGE_CALC :
-             return ScTpCalcOptions::Create;
-             //break;
-+        case RID_SCPAGE_FORMULA:
-+            return ScTpFormulaOptions::Create;
-         case	RID_SCPAGE_PRINT :
-             return ScTpPrintOptions::Create;
-             //break;
-diff --git sc/source/ui/inc/optdlg.hrc sc/source/ui/inc/optdlg.hrc
-index e5a7e80..7860ad3 100644
---- sc/source/ui/inc/optdlg.hrc
-+++ sc/source/ui/inc/optdlg.hrc
-@@ -49,6 +49,7 @@
- #define TP_LAYOUT           12
- #define TP_INPUT            13
- #define TP_CHANGES			14
-+#define TP_FORMULA          15
- 
- // TP_CALC:
- #define BTN_ITERATE			1
-@@ -190,3 +191,16 @@
- #define CB_TEXTFMT		78
- #define CB_REPLWARN     79
- 
-+
-+// TP_FORMULA
-+#define FL_FORMULA_OPTIONS        80
-+#define FT_FORMULA_SYNTAX         81
-+#define LB_FORMULA_SYNTAX         82
-+#define FL_FORMULA_SEPS           83
-+#define FT_FORMULA_SEP_ARG        84
-+#define ED_FORMULA_SEP_ARG        85
-+#define FT_FORMULA_SEP_ARRAY_R    86
-+#define ED_FORMULA_SEP_ARRAY_R    87
-+#define FT_FORMULA_SEP_ARRAY_C    88
-+#define ED_FORMULA_SEP_ARRAY_C    89
-+#define BTN_FORMULA_SEP_RESET     90
-diff --git sc/source/ui/inc/tpformula.hxx sc/source/ui/inc/tpformula.hxx
-new file mode 100644
-index 0000000..ff9d329
---- /dev/null
-+++ sc/source/ui/inc/tpformula.hxx
-@@ -0,0 +1,96 @@
-+/*************************************************************************
-+ *
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * Copyright 2008 by Sun Microsystems, Inc.
-+ *
-+ * OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ * $RCSfile: tpcalc.hxx,v $
-+ * $Revision: 1.9 $
-+ *
-+ * This file is part of OpenOffice.org.
-+ *
-+ * OpenOffice.org is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Lesser General Public License version 3
-+ * only, as published by the Free Software Foundation.
-+ *
-+ * OpenOffice.org is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU Lesser General Public License version 3 for more details
-+ * (a copy is included in the LICENSE file that accompanied this code).
-+ *
-+ * You should have received a copy of the GNU Lesser General Public License
-+ * version 3 along with OpenOffice.org.  If not, see
-+ * <http://www.openoffice.org/license.html>
-+ * for a copy of the LGPLv3 License.
-+ *
-+ ************************************************************************/
-+
-+#ifndef SC_TPFORMULA_HXX
-+#define SC_TPFORMULA_HXX
-+
-+#include <sfx2/tabdlg.hxx>
-+#include <vcl/fixed.hxx>
-+#include <vcl/lstbox.hxx>
-+#include <vcl/edit.hxx>
-+#include <vcl/button.hxx>
-+
-+#include <memory>
-+
-+class ScDocOptions;
-+class SfxItemSet;
-+class Window;
-+
-+class ScTpFormulaOptions : public SfxTabPage
-+{
-+public:
-+    static  SfxTabPage* Create (Window* pParent, const SfxItemSet& rCoreSet);
-+
-+//  static  USHORT*     GetRanges();
-+    virtual BOOL FillItemSet(SfxItemSet& rCoreSet);
-+    virtual void Reset( const SfxItemSet& rCoreSet );
-+    virtual int DeactivatePage(SfxItemSet* pSet = NULL);
-+
-+private:
-+    explicit ScTpFormulaOptions(Window* pParent, const SfxItemSet& rCoreSet);
-+    virtual ~ScTpFormulaOptions();
-+
-+    void Init();
-+    void ResetSeparators();
-+    void OnFocusSeparatorInput(Edit* pEdit);
-+
-+    bool IsValidSeparator(const ::rtl::OUString& rSep) const;
-+    bool IsValidSeparatorSet() const;
-+
-+    DECL_LINK( ButtonHdl, PushButton* );
-+    DECL_LINK( SepModifyHdl, Edit* );
-+    DECL_LINK( SepEditOnFocusHdl, Edit* );
-+
-+private:
-+    FixedLine maFlFormulaOpt;
-+    FixedText maFtFormulaSyntax;
-+    ListBox   maLbFormulaSyntax;
-+
-+    FixedLine  maFlFormulaSeps;
-+    FixedText  maFtSepFuncArg;
-+    Edit       maEdSepFuncArg;
-+    FixedText  maFtSepArrayCol;
-+    Edit       maEdSepArrayCol;
-+    FixedText  maFtSepArrayRow;
-+    Edit       maEdSepArrayRow;
-+    PushButton maBtnSepReset;
-+
-+    ::std::auto_ptr<ScDocOptions> mpOldOptions;
-+    ::std::auto_ptr<ScDocOptions> mpNewOptions;
-+
-+    /** Stores old separator value of currently focused separator edit box.
-+        This value is used to revert undesired value change. */
-+    ::rtl::OUString maOldSepValue;
-+
-+    sal_Unicode mnDecSep;
-+};
-+
-+
-+#endif
-diff --git sc/source/ui/optdlg/makefile.mk sc/source/ui/optdlg/makefile.mk
-index 52df707..f09eb92 100644
---- sc/source/ui/optdlg/makefile.mk
-+++ sc/source/ui/optdlg/makefile.mk
-@@ -43,6 +43,7 @@ CXXFILES = \
-         tpusrlst.cxx    \
-         tpview.cxx      \
-         tpcalc.cxx      \
-+        tpformula.cxx   \
-         tpprint.cxx     \
-         opredlin.cxx
- 
-@@ -50,6 +51,7 @@ SLOFILES =  \
-         $(SLO)$/tpusrlst.obj \
-         $(SLO)$/tpview.obj   \
-         $(SLO)$/tpcalc.obj	\
-+        $(SLO)$/tpformula.obj	\
-         $(SLO)$/tpprint.obj	\
-         $(SLO)$/opredlin.obj
- 
-diff --git sc/source/ui/optdlg/tpformula.cxx sc/source/ui/optdlg/tpformula.cxx
-new file mode 100644
-index 0000000..db76fee
---- /dev/null
-+++ sc/source/ui/optdlg/tpformula.cxx
-@@ -0,0 +1,288 @@
-+/*************************************************************************
-+ *
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * Copyright 2008 by Sun Microsystems, Inc.
-+ *
-+ * OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ * $RCSfile: tpcalc.hxx,v $
-+ * $Revision: 1.9 $
-+ *
-+ * This file is part of OpenOffice.org.
-+ *
-+ * OpenOffice.org is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Lesser General Public License version 3
-+ * only, as published by the Free Software Foundation.
-+ *
-+ * OpenOffice.org is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU Lesser General Public License version 3 for more details
-+ * (a copy is included in the LICENSE file that accompanied this code).
-+ *
-+ * You should have received a copy of the GNU Lesser General Public License
-+ * version 3 along with OpenOffice.org.  If not, see
-+ * <http://www.openoffice.org/license.html>
-+ * for a copy of the LGPLv3 License.
-+ *
-+ ************************************************************************/
-+
-+// MARKER(update_precomp.py): autogen include statement, do not remove
-+#include "precompiled_sc.hxx"
-+
-+#undef SC_DLLIMPLEMENTATION
-+
-+
-+
-+//------------------------------------------------------------------
-+
-+#include "tpformula.hxx"
-+#include "optdlg.hrc"
-+#include "scresid.hxx"
-+#include "formula/grammar.hxx"
-+#include "docoptio.hxx"
-+#include "global.hxx"
-+
-+#include <unotools/localedatawrapper.hxx>
-+
-+#include <com/sun/star/lang/Locale.hpp>
-+#include <com/sun/star/i18n/LocaleDataItem.hpp>
-+
-+using ::rtl::OUString;
-+using ::com::sun::star::lang::Locale;
-+using ::com::sun::star::i18n::LocaleDataItem;
-+
-+ScTpFormulaOptions::ScTpFormulaOptions(Window* pParent, const SfxItemSet& rCoreAttrs) :
-+    SfxTabPage(pParent, ScResId(RID_SCPAGE_FORMULA), rCoreAttrs),
-+
-+    maFlFormulaOpt(this, ScResId(FL_FORMULA_OPTIONS)),
-+    maFtFormulaSyntax(this, ScResId(FT_FORMULA_SYNTAX)),
-+    maLbFormulaSyntax(this, ScResId(LB_FORMULA_SYNTAX)),
-+    maFlFormulaSeps(this, ScResId(FL_FORMULA_SEPS)),
-+    maFtSepFuncArg(this, ScResId(FT_FORMULA_SEP_ARG)),
-+    maEdSepFuncArg(this, ScResId(ED_FORMULA_SEP_ARG)),
-+    maFtSepArrayCol(this, ScResId(FT_FORMULA_SEP_ARRAY_C)),
-+    maEdSepArrayCol(this, ScResId(ED_FORMULA_SEP_ARRAY_C)),
-+    maFtSepArrayRow(this, ScResId(FT_FORMULA_SEP_ARRAY_R)),
-+    maEdSepArrayRow(this, ScResId(ED_FORMULA_SEP_ARRAY_R)),
-+    maBtnSepReset(this, ScResId(BTN_FORMULA_SEP_RESET)),
-+
-+    mpOldOptions(NULL),
-+    mpNewOptions(NULL),
-+    mnDecSep(0)
-+{
-+    FreeResource();
-+
-+    const ScTpCalcItem& rItem = static_cast<const ScTpCalcItem&>(
-+        rCoreAttrs.Get(GetWhich(SID_SCDOCOPTIONS)));
-+    mpOldOptions.reset(new ScDocOptions(rItem.GetDocOptions()));
-+    mpNewOptions.reset(new ScDocOptions(rItem.GetDocOptions()));
-+
-+    Init();
-+}
-+
-+ScTpFormulaOptions::~ScTpFormulaOptions()
-+{
-+}
-+
-+void ScTpFormulaOptions::Init()
-+{
-+    Link aLink = LINK( this, ScTpFormulaOptions, ButtonHdl );
-+    maBtnSepReset.SetClickHdl(aLink);
-+
-+    aLink = LINK( this, ScTpFormulaOptions, SepModifyHdl );
-+    maEdSepFuncArg.SetModifyHdl(aLink);
-+    maEdSepArrayCol.SetModifyHdl(aLink);
-+    maEdSepArrayRow.SetModifyHdl(aLink);
-+
-+    aLink = LINK( this, ScTpFormulaOptions, SepEditOnFocusHdl );
-+    maEdSepFuncArg.SetGetFocusHdl(aLink);
-+    maEdSepArrayCol.SetGetFocusHdl(aLink);
-+    maEdSepArrayRow.SetGetFocusHdl(aLink);
-+
-+    // Get the decimal separator for current locale.
-+    String aSep = mpOldOptions->GetLocaleDataWrapper().getNumDecimalSep();
-+    mnDecSep = aSep.Len() ? aSep.GetChar(0) : sal_Unicode('.');
-+}
-+
-+void ScTpFormulaOptions::ResetSeparators()
-+{
-+    ScDocOptions aOpt;
-+    maEdSepFuncArg.SetText(aOpt.GetFormulaSepArg());
-+    maEdSepArrayCol.SetText(aOpt.GetFormulaSepArrayCol());
-+    maEdSepArrayRow.SetText(aOpt.GetFormulaSepArrayRow());
-+}
-+
-+void ScTpFormulaOptions::OnFocusSeparatorInput(Edit* pEdit)
-+{
-+    if (!pEdit)
-+        return;
-+
-+    // Make sure the entire text is selected.
-+    xub_StrLen nLen = pEdit->GetText().Len();
-+    Selection aSel(0, nLen);
-+    pEdit->SetSelection(aSel);
-+    maOldSepValue = pEdit->GetText();
-+}
-+
-+bool ScTpFormulaOptions::IsValidSeparator(const OUString& rSep) const
-+{
-+    if (rSep.getLength() != 1)
-+        // Must be one-character long.
-+        return false;
-+
-+    if (rSep.compareToAscii("a") >= 0 && rSep.compareToAscii("z") <= 0)
-+        return false;
-+
-+    if (rSep.compareToAscii("A") >= 0 && rSep.compareToAscii("Z") <= 0)
-+        return false;
-+
-+    sal_Unicode c = rSep.getStr()[0];
-+    switch (c)
-+    {
-+        case '+':
-+        case '-':
-+        case '/':
-+        case '*':
-+        case '<':
-+        case '>':
-+        case '[':
-+        case ']':
-+        case '(':
-+        case ')':
-+        case '"':
-+        case '\'':
-+            // Disallowed characters.  Anything else we want to disallow ?
-+            return false;
-+    }
-+
-+    if (c == mnDecSep)
-+        // decimal separator is not allowed.
-+        return false;
-+
-+    return true;
-+}
-+
-+bool ScTpFormulaOptions::IsValidSeparatorSet() const
-+{
-+    // Make sure the column and row separators are different.
-+    String aColStr = maEdSepArrayCol.GetText();
-+    String aRowStr = maEdSepArrayRow.GetText();
-+    if (aColStr == aRowStr)
-+        return false;
-+
-+    return true;
-+}
-+
-+IMPL_LINK( ScTpFormulaOptions, ButtonHdl, PushButton*, pBtn )
-+{
-+    if (pBtn == &maBtnSepReset)
-+        ResetSeparators();
-+
-+    return 0;
-+}
-+
-+IMPL_LINK( ScTpFormulaOptions, SepModifyHdl, Edit*, pEdit )
-+{
-+    if (!pEdit)
-+        return 0;
-+
-+    String aStr = pEdit->GetText();
-+    if (aStr.Len() > 1)
-+    {
-+        // In case the string is more than one character long, only grab the
-+        // first character.
-+        aStr = aStr.Copy(0, 1);
-+        pEdit->SetText(aStr);
-+    }
-+
-+    if ((!IsValidSeparator(aStr) || !IsValidSeparatorSet()) && maOldSepValue.getLength())
-+        // Invalid separator.  Restore the old value.
-+        pEdit->SetText(maOldSepValue);
-+
-+    OnFocusSeparatorInput(pEdit);
-+    return 0;
-+}
-+
-+IMPL_LINK( ScTpFormulaOptions, SepEditOnFocusHdl, Edit*, pEdit )
-+{
-+    OnFocusSeparatorInput(pEdit);
-+    return 0;
-+}
-+
-+// static
-+SfxTabPage* ScTpFormulaOptions::Create(Window* pParent, const SfxItemSet& rCoreSet)
-+{
-+    return new ScTpFormulaOptions(pParent, rCoreSet);
-+}
-+
-+BOOL ScTpFormulaOptions::FillItemSet(SfxItemSet& rCoreSet)
-+{
-+    ::formula::FormulaGrammar::Grammar eGram = ::formula::FormulaGrammar::GRAM_DEFAULT;
-+    switch (maLbFormulaSyntax.GetSelectEntryPos())
-+    {
-+        case 0:
-+            eGram = ::formula::FormulaGrammar::GRAM_NATIVE;
-+        break;
-+        case 1:
-+            eGram = ::formula::FormulaGrammar::GRAM_NATIVE_XL_A1;
-+        break;
-+        case 2:
-+            eGram = ::formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1;
-+        break;
-+    }
-+
-+    mpNewOptions->SetFormulaSyntax(eGram);
-+
-+    mpNewOptions->SetFormulaSepArg(maEdSepFuncArg.GetText());
-+    mpNewOptions->SetFormulaSepArrayCol(maEdSepArrayCol.GetText());
-+    mpNewOptions->SetFormulaSepArrayRow(maEdSepArrayRow.GetText());
-+
-+    if (*mpNewOptions != *mpOldOptions)
-+    {
-+        rCoreSet.Put(ScTpCalcItem(GetWhich(SID_SCDOCOPTIONS), *mpNewOptions));
-+        return true;
-+    }
-+    else
-+        return false;
-+}
-+
-+void ScTpFormulaOptions::Reset(const SfxItemSet& /*rCoreSet*/)
-+{
-+    ::formula::FormulaGrammar::Grammar eGram = mpNewOptions->GetFormulaSyntax();
-+    switch (eGram)
-+    {
-+        case ::formula::FormulaGrammar::GRAM_NATIVE:
-+            maLbFormulaSyntax.SelectEntryPos(0);
-+        break;
-+        case ::formula::FormulaGrammar::GRAM_NATIVE_XL_A1:
-+            maLbFormulaSyntax.SelectEntryPos(1);
-+        break;
-+        case ::formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1:
-+            maLbFormulaSyntax.SelectEntryPos(2);
-+        break;
-+        default:
-+            maLbFormulaSyntax.SelectEntryPos(0);
-+    }
-+
-+    OUString aSep = mpNewOptions->GetFormulaSepArg();
-+    OUString aSepArrayRow = mpNewOptions->GetFormulaSepArrayRow();
-+    OUString aSepArrayCol = mpNewOptions->GetFormulaSepArrayCol();
-+
-+    if (aSep.getLength() == 1 && aSepArrayRow.getLength() == 1 && aSepArrayCol.getLength() == 1)
-+    {
-+        // Each separator must be one character long.
-+        maEdSepFuncArg.SetText(aSep);
-+        maEdSepArrayCol.SetText(aSepArrayCol);
-+        maEdSepArrayRow.SetText(aSepArrayRow);
-+    }
-+    else
-+        ResetSeparators();
-+}
-+
-+int ScTpFormulaOptions::DeactivatePage(SfxItemSet* /*pSet*/)
-+{
-+    // What's this method for ?
-+    return KEEP_PAGE;
-+}
-diff --git sc/source/ui/src/optdlg.src sc/source/ui/src/optdlg.src
-index 7303ca5..c961cda 100644
---- sc/source/ui/src/optdlg.src
-+++ sc/source/ui/src/optdlg.src
-@@ -179,6 +179,105 @@ TabPage RID_SCPAGE_CALC
- /*                                                                        */
- /**************************************************************************/
- 
-+TabPage RID_SCPAGE_FORMULA
-+{
-+    HelpId = HID_SCPAGE_FORMULA ;
-+    SVLook = TRUE ;
-+    Hide = TRUE ;
-+    Pos = MAP_APPFONT ( 0 , 0 ) ;
-+    Size = MAP_APPFONT ( 260 , 185 ) ;
-+
-+    FixedLine FL_FORMULA_OPTIONS
-+    {
-+        Pos = MAP_APPFONT ( 6 , 3 ) ;
-+        Size = MAP_APPFONT ( 248 , 8 ) ;
-+        Text [ en-US ] = "Formula options";
-+    };
-+
-+    FixedText FT_FORMULA_SYNTAX
-+    {
-+        Pos = MAP_APPFONT ( 21, 16 ) ;
-+        Size = MAP_APPFONT ( 80, 8 ) ;
-+        Text [ en-US ] = "Formula ~syntax" ;
-+    };
-+
-+    ListBox LB_FORMULA_SYNTAX
-+    {
-+        Border = TRUE ;
-+        Pos = MAP_APPFONT ( 85, 14 ) ;
-+        Size = MAP_APPFONT ( 60, 46 ) ;
-+        DropDown = TRUE ;
-+        StringList [ en-US ] =
-+        {
-+            < "Calc A1" ; Default ; > ;
-+            < "Excel A1" ; Default ; > ;
-+            < "Excel R1C1" ; Default ; > ;
-+        };
-+    };
-+
-+    FixedLine FL_FORMULA_SEPS
-+    {
-+        Pos = MAP_APPFONT ( 6 , 32 ) ;
-+        Size = MAP_APPFONT ( 248 , 8 ) ;
-+        Text [ en-US ] = "Separators";
-+    };
-+
-+    FixedText FT_FORMULA_SEP_ARG
-+    {
-+        Pos = MAP_APPFONT ( 21, 45 );
-+        Size = MAP_APPFONT ( 40, 8 );
-+        Text [ en-US ] = "~Function";
-+    };
-+
-+    Edit ED_FORMULA_SEP_ARG
-+    {
-+        Border = TRUE;
-+        Pos = MAP_APPFONT ( 65, 43 );
-+        Size = MAP_APPFONT ( 10, 12 );
-+    };
-+
-+    FixedText FT_FORMULA_SEP_ARRAY_C
-+    {
-+        Pos = MAP_APPFONT ( 21, 63 );
-+        Size = MAP_APPFONT ( 40, 8 );
-+        Text [ en-US ] = "Array co~lumn";
-+    };
-+
-+    Edit ED_FORMULA_SEP_ARRAY_C
-+    {
-+        Border = TRUE;
-+        Pos = MAP_APPFONT ( 65, 61 );
-+        Size = MAP_APPFONT ( 10, 12 );
-+    };
-+
-+    FixedText FT_FORMULA_SEP_ARRAY_R
-+    {
-+        Pos = MAP_APPFONT ( 21, 81 );
-+        Size = MAP_APPFONT ( 40, 8 );
-+        Text [ en-US ] = "Array ~row";
-+    };
-+
-+    Edit ED_FORMULA_SEP_ARRAY_R
-+    {
-+        Border = TRUE;
-+        Pos = MAP_APPFONT ( 65, 79 );
-+        Size = MAP_APPFONT ( 10, 12 );
-+    };
-+
-+    PushButton BTN_FORMULA_SEP_RESET
-+    {
-+        Pos = MAP_APPFONT ( 21, 99 );
-+        Size = MAP_APPFONT ( 40, 14 );
-+        Text [ en-US ] = "Rese~t";
-+    };
-+};
-+
-+/**************************************************************************/
-+/*                                                                        */
-+/*                                                                        */
-+/*                                                                        */
-+/**************************************************************************/
-+
- TabPage RID_SCPAGE_USERLISTS
- {
-     HelpId = HID_SCPAGE_USERLISTS ;
--- 
-1.7.0.1
-
commit e4ba44b3cc7fd610403f486741cafc13e50800ad
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 21:18:11 2010 +0200

    sc-sheet-gridline-toggle.diff: Migrated to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 6aa7933..967616c 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -524,9 +524,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 
 [ CalcFixes ]
 
-# Toggle gridline display per sheet.
-sc-sheet-gridline-toggle.diff, i#14893, kohei
-
 # Make the formula separators changeable per locale setting, and add new 
 # configuration page for formula syntax and separators.
 
diff --git a/patches/dev300/sc-sheet-gridline-toggle.diff b/patches/dev300/sc-sheet-gridline-toggle.diff
deleted file mode 100644
index 2bac902..0000000
--- a/patches/dev300/sc-sheet-gridline-toggle.diff
+++ /dev/null
@@ -1,344 +0,0 @@
----
- .../data/org/openoffice/Office/UI/CalcCommands.xcu |    8 ++++++
- sc/inc/ViewSettingsSequenceDefines.hxx             |    3 +-
- sc/inc/sc.hrc                                      |    3 ++
- sc/inc/scextopt.hxx                                |    1 +
- sc/sdi/docsh.sdi                                   |    1 +
- sc/sdi/scalc.sdi                                   |   27 ++++++++++++++++++++
- sc/source/filter/excel/xeview.cxx                  |    2 +-
- sc/source/filter/excel/xiview.cxx                  |    4 ++-
- sc/source/ui/inc/viewdata.hxx                      |    5 +++
- sc/source/ui/view/gridwin4.cxx                     |    3 +-
- sc/source/ui/view/scextopt.cxx                     |    3 +-
- sc/source/ui/view/tabvwshf.cxx                     |   17 ++++++++++++
- sc/source/ui/view/viewdata.cxx                     |   17 ++++++++++++
- sc/uiconfig/scalc/toolbar/formatobjectbar.xml      |    2 +
- 14 files changed, 91 insertions(+), 5 deletions(-)
-
-diff --git officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
-index 2f3b0a1..55b90b5 100644
---- officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
-+++ officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
-@@ -1485,6 +1485,14 @@
-                     <value xml:lang="en-US">S~hare Document...</value>
-                 </prop>
-             </node>
-+            <node oor:name=".uno:ToggleSheetGrid" oor:op="replace">
-+                <prop oor:name="Label" oor:type="xs:string">
-+                    <value xml:lang="en-US">Toggle Grid Lines for Current Sheet</value>
-+                </prop>
-+                <prop oor:name="Properties" oor:type="xs:int">
-+                    <value>1</value>
-+                </prop>
-+            </node>
-         </node>
-         <node oor:name="Popups">
-             <node oor:name=".uno:AuditMenu" oor:op="replace">
-diff --git sc/inc/ViewSettingsSequenceDefines.hxx sc/inc/ViewSettingsSequenceDefines.hxx
-index a729620..9514514 100644
---- sc/inc/ViewSettingsSequenceDefines.hxx
-+++ sc/inc/ViewSettingsSequenceDefines.hxx
-@@ -61,7 +61,7 @@
- // this are the defines for the position of the settings in the
- // TableViewSettingsSequence
- 
--#define SC_TABLE_VIEWSETTINGS_COUNT         15
-+#define SC_TABLE_VIEWSETTINGS_COUNT         16
- 
- #define SC_CURSOR_X							0
- #define SC_CURSOR_Y							1
-@@ -78,6 +78,7 @@
- #define SC_TABLE_ZOOM_VALUE                 12
- #define SC_TABLE_PAGE_VIEW_ZOOM_VALUE       13
- #define SC_TABLE_TAB_BG_COLOR               14
-+#define SC_TABLE_SHOWGRID                   15
- 
- #define SC_CURSORPOSITIONX					"CursorPositionX"
- #define SC_CURSORPOSITIONY					"CursorPositionY"
-diff --git sc/inc/sc.hrc sc/inc/sc.hrc
-index 30560a0..72fb80a 100644
---- sc/inc/sc.hrc
-+++ sc/inc/sc.hrc
-@@ -1661,6 +1661,9 @@
- // Autoformat for DataPilot
- #define SID_PIVOT_AFMT              (SC_OOO_BUILD_START + 1)
- 
-+// Toggle sheet grid
-+#define FID_TAB_TOGGLE_GRID         (SC_OOO_BUILD_START + 2)
-+
- #endif
- 
- 
-diff --git sc/inc/scextopt.hxx sc/inc/scextopt.hxx
-index 7a30803..e84eebc 100644
---- sc/inc/scextopt.hxx
-+++ sc/inc/scextopt.hxx
-@@ -77,6 +77,7 @@ struct ScExtTabSettings
-     bool                mbSelected;         /// true = Sheet is selected.
-     bool                mbFrozenPanes;      /// true = Frozen panes; false = Normal splits.
-     bool                mbPageMode;         /// true = Pagebreak mode; false = Normal view mode.
-+    bool                mbShowGrid;         /// Whether or not to display gridlines.
- 
-     explicit            ScExtTabSettings();
- };
-diff --git sc/sdi/docsh.sdi sc/sdi/docsh.sdi
-index d0f2eac..51dd7d9 100644
---- sc/sdi/docsh.sdi
-+++ sc/sdi/docsh.sdi
-@@ -61,6 +61,7 @@ interface TableSelection
-     FID_TAB_RENAME		[ ExecMethod = ExecuteTable; StateMethod = GetStateTable; ]
-     FID_TAB_RTL			[ ExecMethod = ExecuteTable; StateMethod = GetStateTable; ]
-     FID_TAB_SET_TAB_BG_COLOR    [ ExecMethod = ExecuteTable; StateMethod = GetStateTable; ]
-+    FID_TAB_TOGGLE_GRID [ ExecMethod = ExecuteTable; StateMethod = GetStateTable; ]
- 
-     SID_TABLE_ACTIVATE	[ ExecMethod = Execute; ]
- }
-diff --git sc/sdi/scalc.sdi sc/sdi/scalc.sdi
-index 1b48cb9..0bf0611 100644
---- sc/sdi/scalc.sdi
-+++ sc/sdi/scalc.sdi
-@@ -7774,6 +7774,33 @@ SfxVoidItem ShareDocument SID_SHARE_DOC
- ]
- 
- //--------------------------------------------------------------------------
-+SfxBoolItem ToggleSheetGrid FID_TAB_TOGGLE_GRID
-+
-+[
-+    /* flags: */
-+    AutoUpdate = FALSE,
-+    Cachable = Cachable,
-+    FastCall = FALSE,
-+    HasCoreId = FALSE,
-+    HasDialog = FALSE,
-+    ReadOnlyDoc = TRUE,
-+    Toggle = FALSE,
-+    Container = FALSE,
-+    RecordAbsolute = FALSE,
-+    RecordPerSet;
-+    Synchron;
-+
-+    /* config: */
-+    AccelConfig = TRUE,
-+    MenuConfig = TRUE,
-+    StatusBarConfig = FALSE,
-+    ToolBoxConfig = TRUE,
-+    GroupId = GID_FORMAT;
-+]
-+
-+
-+
-+//--------------------------------------------------------------------------
- SvxColorItem TabBgColor FID_TAB_SET_TAB_BG_COLOR
- 
- [
-diff --git sc/source/filter/excel/xeview.cxx sc/source/filter/excel/xeview.cxx
-index 5120b6f..a3354ce 100644
---- sc/source/filter/excel/xeview.cxx
-+++ sc/source/filter/excel/xeview.cxx
-@@ -313,7 +313,6 @@ XclExpTabViewSettings::XclExpTabViewSettings( const XclExpRoot& rRoot, SCTAB nSc
- 
-     const ScViewOptions& rViewOpt = GetDoc().GetViewOptions();
-     maData.mbShowFormulas   = rViewOpt.GetOption( VOPT_FORMULAS );
--    maData.mbShowGrid       = rViewOpt.GetOption( VOPT_GRID );
-     maData.mbShowHeadings   = rViewOpt.GetOption( VOPT_HEADER );
-     maData.mbShowZeros      = rViewOpt.GetOption( VOPT_NULLVALS );
-     maData.mbShowOutline    = rViewOpt.GetOption( VOPT_OUTLINER );
-@@ -388,6 +387,7 @@ XclExpTabViewSettings::XclExpTabViewSettings( const XclExpRoot& rRoot, SCTAB nSc
-             else
-                 maData.maGridColor = rGridColor;
-         }
-+        maData.mbShowGrid       = rTabSett.mbShowGrid;
- 
-         // view mode and zoom
-         maData.mbPageMode       = (GetBiff() == EXC_BIFF8) && rTabSett.mbPageMode;
-diff --git sc/source/filter/excel/xiview.cxx sc/source/filter/excel/xiview.cxx
-index bd47a02..5af950b 100644
---- sc/source/filter/excel/xiview.cxx
-+++ sc/source/filter/excel/xiview.cxx
-@@ -274,6 +274,9 @@ void XclImpTabViewSettings::Finalize()
-     else
-         rTabSett.maGridColor = maData.maGridColor;
- 
-+    // show grid option
-+    rTabSett.mbShowGrid      = maData.mbShowGrid;
-+
-     // view mode and zoom
-     if( maData.mnCurrentZoom != 0 )
-         (maData.mbPageMode ? maData.mnPageZoom : maData.mnNormalZoom) = maData.mnCurrentZoom;
-@@ -288,7 +291,6 @@ void XclImpTabViewSettings::Finalize()
-         // set Excel sheet settings globally at Calc document, take settings from displayed sheet
-         ScViewOptions aViewOpt( rDoc.GetViewOptions() );
-         aViewOpt.SetOption( VOPT_FORMULAS, maData.mbShowFormulas );
--        aViewOpt.SetOption( VOPT_GRID,     maData.mbShowGrid );
-         aViewOpt.SetOption( VOPT_HEADER,   maData.mbShowHeadings );
-         aViewOpt.SetOption( VOPT_NULLVALS, maData.mbShowZeros );
-         aViewOpt.SetOption( VOPT_OUTLINER, maData.mbShowOutline );
-diff --git sc/source/ui/inc/viewdata.hxx sc/source/ui/inc/viewdata.hxx
-index 174c5bc..94f9bec 100644
---- sc/source/ui/inc/viewdata.hxx
-+++ sc/source/ui/inc/viewdata.hxx
-@@ -146,6 +146,8 @@ private:
-     SCCOL			nPosX[2];
-     SCROW			nPosY[2];
- 
-+    bool            bShowGrid;                  // per-sheet show grid-lines option.
-+
-     BOOL			bOldCurValid;				// "virtuelle" Cursorpos. bei zusammengefassten
- 
-                     ScViewDataTable();
-@@ -332,6 +334,9 @@ public:
-     const Fraction&	GetZoomX() const        { return bPagebreak ? pThisTab->aPageZoomX : pThisTab->aZoomX; }
-     const Fraction&	GetZoomY() const        { return bPagebreak ? pThisTab->aPageZoomY : pThisTab->aZoomY; }
- 
-+    void            SetShowGrid( bool bShow );
-+    bool            GetShowGrid() const { return pThisTab->bShowGrid; }
-+
-     const MapMode&	GetLogicMode( ScSplitPos eWhich );
-     const MapMode&	GetLogicMode();						// Offset 0
- 
-diff --git sc/source/ui/view/gridwin4.cxx sc/source/ui/view/gridwin4.cxx
-index 5f8de30..3b67789 100644
---- sc/source/ui/view/gridwin4.cxx
-+++ sc/source/ui/view/gridwin4.cxx
-@@ -576,7 +576,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
-     aOutputData.SetEditObject( GetEditObject() );
-     aOutputData.SetViewShell( pViewData->GetViewShell() );
- 
--    BOOL bGrid = rOpts.GetOption( VOPT_GRID );
-+    BOOL bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid();
-+
-     BOOL bPage = rOpts.GetOption( VOPT_PAGEBREAKS );
- 
-     if ( eMode == SC_UPDATE_CHANGED )
-diff --git sc/source/ui/view/scextopt.cxx sc/source/ui/view/scextopt.cxx
-index 22111f6..fb52b5a 100644
---- sc/source/ui/view/scextopt.cxx
-+++ sc/source/ui/view/scextopt.cxx
-@@ -58,7 +58,8 @@ ScExtTabSettings::ScExtTabSettings() :
-     mnPageZoom( 0 ),
-     mbSelected( false ),
-     mbFrozenPanes( false ),
--    mbPageMode( false )
-+    mbPageMode( false ),
-+    mbShowGrid( true )
- {
- }
- 
-diff --git sc/source/ui/view/tabvwshf.cxx sc/source/ui/view/tabvwshf.cxx
-index 5849799..5bd0116 100644
---- sc/source/ui/view/tabvwshf.cxx
-+++ sc/source/ui/view/tabvwshf.cxx
-@@ -34,6 +34,7 @@
- 
- #include "scitems.hxx"
- #include <sfx2/request.hxx>
-+#include <sfx2/bindings.hxx>
- #include <sfx2/viewfrm.hxx>
- #include <basic/sbstar.hxx>
- #include <layout/layout.hxx>
-@@ -691,6 +693,17 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
-             }
-             break;
- 
-+        case FID_TAB_TOGGLE_GRID:
-+            {
-+                bool bShowGrid = pViewData->GetShowGrid();
-+                pViewData->SetShowGrid(!bShowGrid);
-+                SfxBindings& rBindings = GetViewFrame()->GetBindings();
-+                rBindings.Invalidate( FID_TAB_TOGGLE_GRID );
-+                PaintGrid();
-+                rReq.Done();
-+            }
-+            break;
-+
-         case FID_TAB_SET_TAB_BG_COLOR:
-         case FID_TAB_MENU_SET_TAB_BG_COLOR:
-             {
-@@ -937,6 +950,10 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
-                     rSet.Put( SvxColorItem( aColor, nWhich ) );
-                 }
-                 break;
-+
-+            case FID_TAB_TOGGLE_GRID:
-+                rSet.Put( SfxBoolItem(nWhich, pViewData->GetShowGrid()) );
-+                break;
-         }
-         nWhich = aIter.NextWhich();
-     }
-diff --git sc/source/ui/view/viewdata.cxx sc/source/ui/view/viewdata.cxx
-index ca95119..95c927b 100644
---- sc/source/ui/view/viewdata.cxx
-+++ sc/source/ui/view/viewdata.cxx
-@@ -101,6 +101,7 @@ ScViewDataTable::ScViewDataTable() :
-                 nFixPosY( 0 ),
-                 nCurX( 0 ),
-                 nCurY( 0 ),
-+                bShowGrid( true ),
-                 bOldCurValid( FALSE )
- {
-     nPosX[0]=nPosX[1]=0;
-@@ -160,6 +161,9 @@ void ScViewDataTable::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>
-         pSettings[SC_TABLE_ZOOM_VALUE].Value <<= nZoomValue;
-         pSettings[SC_TABLE_PAGE_VIEW_ZOOM_VALUE].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_PAGEVIEWZOOMVALUE));
-         pSettings[SC_TABLE_PAGE_VIEW_ZOOM_VALUE].Value <<= nPageZoomValue;
-+
-+        pSettings[SC_TABLE_SHOWGRID].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_SHOWGRID));
-+        pSettings[SC_TABLE_SHOWGRID].Value <<= static_cast<sal_Bool>(bShowGrid);
-     }
- }
- 
-@@ -264,6 +268,10 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV
-             aPageZoomX = aPageZoomY = aZoom;
-             rHasZoom = true;
-         }
-+        else if (sName.compareToAscii(SC_UNO_SHOWGRID) == 0)
-+        {
-+            aSettings[i].Value >>= bShowGrid;
-+        }
-         else if (sName.compareToAscii(SC_TABLESELECTED) == 0)
-         {
-             bool bSelected = false;
-@@ -744,6 +752,12 @@ void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAl
-     SetZoom( rNewX, rNewY, vTabs );
- }
- 
-+void ScViewData::SetShowGrid( bool bShow )
-+{
-+    CreateSelectedTabData();
-+    pTabData[nTabNo]->bShowGrid = bShow;
-+}
-+
- void ScViewData::RefreshZoom()
- {
-     // recalculate zoom-dependent values (only for current sheet)
-@@ -2547,6 +2561,7 @@ void ScViewData::WriteExtOptions( ScExtDocOptions& rDocOpt ) const
-                 if( rGridColor.GetColor() != SC_STD_GRIDCOLOR )
-                     rTabSett.maGridColor = rGridColor;
-             }
-+            rTabSett.mbShowGrid = pViewTab->bShowGrid;
- 
-             // view mode and zoom
-             rTabSett.mbPageMode = bPagebreak;
-@@ -2679,6 +2694,8 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt )
-             if( rTabSett.mnPageZoom )
-                 rViewTab.aPageZoomX = rViewTab.aPageZoomY = Fraction( rTabSett.mnPageZoom, 100L );
- 
-+            rViewTab.bShowGrid = rTabSett.mbShowGrid;
-+
-             // get some settings from displayed Excel sheet, set at Calc document
-             if( nTab == GetTabNo() )
-             {
-diff --git sc/uiconfig/scalc/toolbar/formatobjectbar.xml sc/uiconfig/scalc/toolbar/formatobjectbar.xml
-index 49c31d7..773befc 100644
---- sc/uiconfig/scalc/toolbar/formatobjectbar.xml
-+++ sc/uiconfig/scalc/toolbar/formatobjectbar.xml
-@@ -50,4 +50,6 @@
-  <toolbar:toolbaritem xlink:href=".uno:InsertColumns" toolbar:helpid="helpid:26268"  toolbar:visible="false" />
-  <toolbar:toolbaritem xlink:href=".uno:DeleteRows" toolbar:helpid="helpid:26236"  toolbar:visible="false" />
-  <toolbar:toolbaritem xlink:href=".uno:DeleteColumns" toolbar:helpid="helpid:26237"  toolbar:visible="false" />
-+ <toolbar:toolbarseparator/>
-+ <toolbar:toolbaritem xlink:href=".uno:ToggleSheetGrid" toolbar:helpid="helpid:26238"  toolbar:visible="true" />
- </toolbar:toolbar>
--- 
-1.7.0.1
-


More information about the ooo-build-commit mailing list