2012-05-29 23:25:06 -04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
2013-04-19 21:10:42 +01:00
|
|
|
* This file is part of the LibreOffice project.
|
2012-05-29 23:25:06 -04:00
|
|
|
*
|
2013-04-19 21:10:42 +01:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2012-05-29 23:25:06 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "calcconfig.hxx"
|
|
|
|
|
|
|
|
ScCalcConfig::ScCalcConfig() :
|
2012-07-23 17:49:03 -04:00
|
|
|
meStringRefAddressSyntax(formula::FormulaGrammar::CONV_UNSPECIFIED),
|
2014-03-13 19:50:14 +01:00
|
|
|
meStringConversion(STRING_CONVERSION_LOCALE_DEPENDENT), // old LibreOffice behavior
|
2013-06-25 13:38:22 +01:00
|
|
|
mbEmptyStringAsZero(false),
|
2014-10-30 15:40:54 +02:00
|
|
|
mbOpenCLEnabled(true),
|
|
|
|
mbOpenCLSubsetOnly(true),
|
|
|
|
mbOpenCLAutoSelect(true),
|
|
|
|
mnOpenCLMinimumFormulaGroupSize(20)
|
2013-06-25 13:38:22 +01:00
|
|
|
{
|
|
|
|
}
|
2012-05-29 23:25:06 -04:00
|
|
|
|
2012-05-30 10:03:05 -04:00
|
|
|
void ScCalcConfig::reset()
|
|
|
|
{
|
|
|
|
*this = ScCalcConfig();
|
|
|
|
}
|
|
|
|
|
2014-03-14 23:00:25 +01:00
|
|
|
void ScCalcConfig::MergeDocumentSpecific( const ScCalcConfig& r )
|
|
|
|
{
|
|
|
|
// String conversion options are per document.
|
|
|
|
meStringConversion = r.meStringConversion;
|
|
|
|
mbEmptyStringAsZero = r.mbEmptyStringAsZero;
|
|
|
|
// INDIRECT ref syntax is per document.
|
|
|
|
meStringRefAddressSyntax = r.meStringRefAddressSyntax;
|
|
|
|
}
|
|
|
|
|
2012-05-29 23:25:06 -04:00
|
|
|
bool ScCalcConfig::operator== (const ScCalcConfig& r) const
|
|
|
|
{
|
2012-07-23 17:49:03 -04:00
|
|
|
return meStringRefAddressSyntax == r.meStringRefAddressSyntax &&
|
2014-03-13 19:50:14 +01:00
|
|
|
meStringConversion == r.meStringConversion &&
|
2013-06-25 13:38:22 +01:00
|
|
|
mbEmptyStringAsZero == r.mbEmptyStringAsZero &&
|
2013-09-13 16:57:56 +02:00
|
|
|
mbOpenCLEnabled == r.mbOpenCLEnabled &&
|
2014-10-30 15:40:54 +02:00
|
|
|
mbOpenCLSubsetOnly == r.mbOpenCLSubsetOnly &&
|
2013-09-16 13:52:51 +02:00
|
|
|
mbOpenCLAutoSelect == r.mbOpenCLAutoSelect &&
|
2014-10-30 15:40:54 +02:00
|
|
|
maOpenCLDevice == r.maOpenCLDevice &&
|
|
|
|
mnOpenCLMinimumFormulaGroupSize == r.mnOpenCLMinimumFormulaGroupSize;
|
2012-05-29 23:25:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
bool ScCalcConfig::operator!= (const ScCalcConfig& r) const
|
|
|
|
{
|
|
|
|
return !operator==(r);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|