update emoji autocorrect entries from po-files
[LibreOffice.git] / sc / inc / calcconfig.hxx
blob18aab2166c0d5772f98b662dd5389c224d840914
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef INCLUDED_SC_INC_CALCCONFIG_HXX
11 #define INCLUDED_SC_INC_CALCCONFIG_HXX
13 #include "scdllapi.h"
15 #include <ostream>
16 #include <set>
18 #include <formula/grammar.hxx>
19 #include <formula/opcode.hxx>
20 #include <rtl/ustring.hxx>
22 // have to match the registry values
23 enum ScRecalcOptions
25 RECALC_ALWAYS = 0,
26 RECALC_NEVER,
27 RECALC_ASK,
30 /**
31 * Configuration options for formula interpreter.
33 struct SC_DLLPUBLIC ScCalcConfig
35 // from most stringent to most relaxed
36 enum class StringConversion
38 ILLEGAL, ///< =1+"1" or =1+"x" give #VALUE!
39 ZERO, ///< =1+"1" or =1+"x" give 1
40 UNAMBIGUOUS, ///< =1+"1" gives 2, but =1+"1.000" or =1+"x" give #VALUE!
41 LOCALE ///< =1+"1.000" may be 2 or 1001 ... =1+"x" gives #VALUE!
43 formula::FormulaGrammar::AddressConvention meStringRefAddressSyntax;
44 StringConversion meStringConversion;
45 bool mbEmptyStringAsZero:1;
46 bool mbHasStringRefSyntax:1;
48 bool mbOpenCLSubsetOnly:1;
49 bool mbOpenCLAutoSelect:1;
50 OUString maOpenCLDevice;
51 sal_Int32 mnOpenCLMinimumFormulaGroupSize;
53 typedef std::set<OpCode> OpCodeSet;
55 OpCodeSet maOpenCLSubsetOpCodes;
57 ScCalcConfig();
59 void setOpenCLConfigToDefault();
61 void reset();
62 void MergeDocumentSpecific( const ScCalcConfig& r );
63 void SetStringRefSyntax( formula::FormulaGrammar::AddressConvention eConv );
65 bool operator== (const ScCalcConfig& r) const;
66 bool operator!= (const ScCalcConfig& r) const;
69 SC_DLLPUBLIC std::ostream& operator<<(std::ostream& rStream, const ScCalcConfig& rConfig);
71 SC_DLLPUBLIC OUString ScOpCodeSetToNumberString(const ScCalcConfig::OpCodeSet& rOpCodes);
72 SC_DLLPUBLIC OUString ScOpCodeSetToSymbolicString(const ScCalcConfig::OpCodeSet& rOpCodes);
73 SC_DLLPUBLIC ScCalcConfig::OpCodeSet ScStringToOpCodeSet(const OUString& rOpCodes);
75 #endif
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */