summaryrefslogtreecommitdiff
path: root/sc/inc/docoptio.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-10-12 15:44:56 -0400
committerKohei Yoshida <kyoshida@novell.com>2010-10-12 15:44:56 -0400
commitf7cf0280f9f83eabad93221ea91977bc384ec20a (patch)
tree9659acc8104c6b6cccc0c051153bde63a747450d /sc/inc/docoptio.hxx
parent3ab2280e3f88b75408117948deb385ac146be5d6 (diff)
Took care of loading and saving of the new option value.
The new option value is now persistent with the Options dialog, but key bindings don't get reset yet.
Diffstat (limited to 'sc/inc/docoptio.hxx')
-rw-r--r--sc/inc/docoptio.hxx40
1 files changed, 14 insertions, 26 deletions
diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx
index 46845df55434..37111dfdc484 100644
--- a/sc/inc/docoptio.hxx
+++ b/sc/inc/docoptio.hxx
@@ -38,9 +38,15 @@
class SC_DLLPUBLIC ScDocOptions
{
+public:
+ // values must correspond with integer values stored in the configuration
+ enum KeyBindingType { KEY_DEFAULT = 0, KEY_OOO_LEGACY = 1 };
+
+private:
double fIterEps; // Epsilon-Wert dazu
USHORT nIterCount; // Anzahl
sal_uInt16 nPrecStandardFormat; // precision for standard format
+ KeyBindingType eKeyBindingType; // key binding type: Default (0), OOo legacy (1)
USHORT nDay; // Nulldatum:
USHORT nMonth;
USHORT nYear;
@@ -88,7 +94,6 @@ public:
void SetTabDistance( USHORT nTabDist ) {nTabDistance = nTabDist;}
void ResetDocOptions();
- inline void CopyTo(ScDocOptions& rOpt);
inline const ScDocOptions& operator=( const ScDocOptions& rOpt );
inline int operator==( const ScDocOptions& rOpt ) const;
@@ -97,6 +102,9 @@ public:
sal_uInt16 GetStdPrecision() const { return nPrecStandardFormat; }
void SetStdPrecision( sal_uInt16 n ) { nPrecStandardFormat = n; }
+ KeyBindingType GetKeyBindingType() const { return eKeyBindingType; }
+ void SetKeyBindingType( KeyBindingType e ) { eKeyBindingType = e; }
+
BOOL IsCalcAsShown() const { return bCalcAsShown; }
void SetCalcAsShown( BOOL bVal ) { bCalcAsShown = bVal; }
@@ -125,31 +133,6 @@ public:
static const LocaleDataWrapper& GetLocaleDataWrapper();
};
-
-inline void ScDocOptions::CopyTo(ScDocOptions& rOpt)
-{
- rOpt.bIsIgnoreCase = bIsIgnoreCase;
- rOpt.bIsIter = bIsIter;
- rOpt.nIterCount = nIterCount;
- rOpt.fIterEps = fIterEps;
- rOpt.nPrecStandardFormat = nPrecStandardFormat;
- rOpt.nDay = nDay;
- rOpt.nMonth = nMonth;
- rOpt.nYear2000 = nYear2000;
- rOpt.nYear = nYear;
- rOpt.nTabDistance = nTabDistance;
- rOpt.bCalcAsShown = bCalcAsShown;
- rOpt.bMatchWholeCell = bMatchWholeCell;
- rOpt.bDoAutoSpell = bDoAutoSpell;
- rOpt.bLookUpColRowNames = bLookUpColRowNames;
- rOpt.bFormulaRegexEnabled = bFormulaRegexEnabled;
- rOpt.bUseEnglishFuncName = bUseEnglishFuncName;
- rOpt.eFormulaGrammar = eFormulaGrammar;
- rOpt.aFormulaSepArg = aFormulaSepArg;
- rOpt.aFormulaSepArrayRow = aFormulaSepArrayRow;
- rOpt.aFormulaSepArrayCol = aFormulaSepArrayCol;
-}
-
inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
{
bIsIgnoreCase = rCpy.bIsIgnoreCase;
@@ -157,6 +140,7 @@ inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
nIterCount = rCpy.nIterCount;
fIterEps = rCpy.fIterEps;
nPrecStandardFormat = rCpy.nPrecStandardFormat;
+ eKeyBindingType = rCpy.eKeyBindingType;
nDay = rCpy.nDay;
nMonth = rCpy.nMonth;
nYear = rCpy.nYear;
@@ -184,6 +168,7 @@ inline int ScDocOptions::operator==( const ScDocOptions& rOpt ) const
&& rOpt.nIterCount == nIterCount
&& rOpt.fIterEps == fIterEps
&& rOpt.nPrecStandardFormat == nPrecStandardFormat
+ && rOpt.eKeyBindingType == eKeyBindingType
&& rOpt.nDay == nDay
&& rOpt.nMonth == nMonth
&& rOpt.nYear == nYear
@@ -239,14 +224,17 @@ class ScDocCfg : public ScDocOptions
ScLinkConfigItem aCalcItem;
ScLinkConfigItem aFormulaItem;
ScLinkConfigItem aLayoutItem;
+ ScLinkConfigItem aCompatItem;
DECL_LINK( CalcCommitHdl, void* );
DECL_LINK( FormulaCommitHdl, void* );
DECL_LINK( LayoutCommitHdl, void* );
+ DECL_LINK( CompatCommitHdl, 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();
+ com::sun::star::uno::Sequence<rtl::OUString> GetCompatPropertyNames();
public:
ScDocCfg();