Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : */
9 :
10 : #ifndef INCLUDED_SC_INC_CALCCONFIG_HXX
11 : #define INCLUDED_SC_INC_CALCCONFIG_HXX
12 :
13 : #include "scdllapi.h"
14 : #include <formula/grammar.hxx>
15 :
16 : #include <rtl/ustring.hxx>
17 :
18 : // have to match the registry values
19 : enum ScRecalcOptions
20 : {
21 : RECALC_ALWAYS = 0,
22 : RECALC_NEVER,
23 : RECALC_ASK,
24 : };
25 :
26 : /**
27 : * Configuration options for formula interpreter.
28 : */
29 54284 : struct SC_DLLPUBLIC ScCalcConfig
30 : {
31 : // from most stringent to most relaxed
32 : enum StringConversion
33 : {
34 : STRING_CONVERSION_AS_ERROR = 0, ///< =1+"1" or =1+"x" give #VALUE!
35 : STRING_CONVERSION_AS_ZERO, ///< =1+"1" or =1+"x" give 1
36 : STRING_CONVERSION_UNAMBIGUOUS, ///< =1+"1" gives 2, but =1+"1.000" or =1+"x" give #VALUE!
37 : STRING_CONVERSION_LOCALE_DEPENDENT ///< =1+"1.000" may be 2 or 1001 ... =1+"x" gives #VALUE!
38 : };
39 :
40 : formula::FormulaGrammar::AddressConvention meStringRefAddressSyntax;
41 : StringConversion meStringConversion;
42 : bool mbEmptyStringAsZero:1;
43 : bool mbOpenCLEnabled:1;
44 : bool mbOpenCLAutoSelect:1;
45 : OUString maOpenCLDevice;
46 :
47 : ScCalcConfig();
48 :
49 : void reset();
50 : void MergeDocumentSpecific( const ScCalcConfig& r );
51 :
52 : bool operator== (const ScCalcConfig& r) const;
53 : bool operator!= (const ScCalcConfig& r) const;
54 : };
55 :
56 : #endif
57 :
58 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|