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 : #include "calcconfig.hxx"
11 :
12 0 : ScCalcConfig::ScCalcConfig() :
13 : meStringRefAddressSyntax(formula::FormulaGrammar::CONV_UNSPECIFIED),
14 : meStringConversion(STRING_CONVERSION_LOCALE_DEPENDENT), // old LibreOffice behavior
15 : mbEmptyStringAsZero(false),
16 : mbOpenCLEnabled(false),
17 0 : mbOpenCLAutoSelect(true)
18 : {
19 0 : }
20 :
21 0 : void ScCalcConfig::reset()
22 : {
23 0 : *this = ScCalcConfig();
24 0 : }
25 :
26 0 : void ScCalcConfig::MergeDocumentSpecific( const ScCalcConfig& r )
27 : {
28 : // String conversion options are per document.
29 0 : meStringConversion = r.meStringConversion;
30 0 : mbEmptyStringAsZero = r.mbEmptyStringAsZero;
31 : // INDIRECT ref syntax is per document.
32 0 : meStringRefAddressSyntax = r.meStringRefAddressSyntax;
33 0 : }
34 :
35 0 : bool ScCalcConfig::operator== (const ScCalcConfig& r) const
36 : {
37 0 : return meStringRefAddressSyntax == r.meStringRefAddressSyntax &&
38 0 : meStringConversion == r.meStringConversion &&
39 0 : mbEmptyStringAsZero == r.mbEmptyStringAsZero &&
40 0 : mbOpenCLEnabled == r.mbOpenCLEnabled &&
41 0 : mbOpenCLAutoSelect == r.mbOpenCLAutoSelect &&
42 0 : maOpenCLDevice == r.maOpenCLDevice;
43 : }
44 :
45 0 : bool ScCalcConfig::operator!= (const ScCalcConfig& r) const
46 : {
47 0 : return !operator==(r);
48 : }
49 :
50 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|