summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2015-10-12 11:43:46 +0200
committerEike Rathke <erack@redhat.com>2015-10-16 22:15:53 +0000
commit313df729a3b6a94275ac992e74b18256fd286f93 (patch)
treee55113c2a5e31803a9d75bcf938cf9ec4f9d4e96 /sc/inc
parentf1bcf41baea1636ff33f2c918ebb4a4fa589d10a (diff)
tdf#92256, c#19: Implement "current doc only" switch
that'll save calculation settings into current document only, not into global user profile Change-Id: I50ab31b679f712ff512f85a2cd58319d356462ea Reviewed-on: https://gerrit.libreoffice.org/19318 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/docoptio.hxx5
-rw-r--r--sc/inc/formulaopt.hxx4
2 files changed, 9 insertions, 0 deletions
diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx
index 1a54a3e585c5..d8ff78517c40 100644
--- a/sc/inc/docoptio.hxx
+++ b/sc/inc/docoptio.hxx
@@ -46,6 +46,7 @@ class SC_DLLPUBLIC ScDocOptions
bool bDoAutoSpell; ///< auto-spelling
bool bLookUpColRowNames; ///< determine column-/row titles automagically
bool bFormulaRegexEnabled; ///< regular expressions in formulas enabled
+ bool bWriteCalcConfig; ///< (subset of) Calc config will be written to user's profile
public:
ScDocOptions();
ScDocOptions( const ScDocOptions& rCpy );
@@ -91,6 +92,8 @@ public:
void SetFormulaRegexEnabled( bool bVal ) { bFormulaRegexEnabled = bVal; }
bool IsFormulaRegexEnabled() const { return bFormulaRegexEnabled; }
+ void SetWriteCalcConfig( bool bVal ) { bWriteCalcConfig = bVal; }
+ bool IsWriteCalcConfig() const { return bWriteCalcConfig; }
};
inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
@@ -110,6 +113,7 @@ inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
bDoAutoSpell = rCpy.bDoAutoSpell;
bLookUpColRowNames = rCpy.bLookUpColRowNames;
bFormulaRegexEnabled= rCpy.bFormulaRegexEnabled;
+ bWriteCalcConfig = rCpy.bWriteCalcConfig;
return *this;
}
@@ -132,6 +136,7 @@ inline bool ScDocOptions::operator==( const ScDocOptions& rOpt ) const
&& rOpt.bDoAutoSpell == bDoAutoSpell
&& rOpt.bLookUpColRowNames == bLookUpColRowNames
&& rOpt.bFormulaRegexEnabled == bFormulaRegexEnabled
+ && rOpt.bWriteCalcConfig == bWriteCalcConfig
);
}
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index ce56f208a947..8a903d22c95e 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -25,6 +25,7 @@ private:
bool bUseEnglishFuncName; // use English function name even if the locale is not English.
formula::FormulaGrammar::Grammar eFormulaGrammar; // formula grammar used to switch different formula syntax
ScCalcConfig aCalcConfig;
+ bool mbWriteCalcConfig;
OUString aFormulaSepArg;
OUString aFormulaSepArrayRow;
@@ -50,6 +51,9 @@ public:
void SetUseEnglishFuncName( bool bVal ) { bUseEnglishFuncName = bVal; }
bool GetUseEnglishFuncName() const { return bUseEnglishFuncName; }
+ void SetWriteCalcConfig( bool bVal ) { mbWriteCalcConfig = bVal; }
+ bool GetWriteCalcConfig() const { return mbWriteCalcConfig; }
+
void SetFormulaSepArg(const OUString& rSep) { aFormulaSepArg = rSep; }
OUString GetFormulaSepArg() const { return aFormulaSepArg; }