10#include <com/sun/star/uno/Sequence.hxx>
11#include <com/sun/star/lang/Locale.hpp>
12#include <osl/diagnose.h>
23namespace lang = ::com::sun::star::lang;
51 OUString& rSepArg, OUString& rSepArrayCol, OUString& rSepArrayRow)
59 const OUString& rLang = rLocale.Language;
67 const OUString& rListSep = rLocaleData.
getListSep();
69 if (rDecSep.isEmpty() || rListSep.isEmpty())
84 if (cDecSep ==
'.' || (cDecSepAlt ==
'.' && cDecSep !=
','))
86 else if (cDecSep ==
',' && cDecSepAlt ==
'.')
90 if (rLocale.Language ==
"de" && rLocale.Country ==
"CH")
95 rSepArg = OUString(cListSep);
97 if (cDecSep == cListSep && cDecSep !=
';')
129 theOptions (
std::move( aOpt ))
139 assert(SfxPoolItem::operator==(rItem));
152#define SCFORMULAOPT_GRAMMAR 0
153#define SCFORMULAOPT_ENGLISH_FUNCNAME 1
154#define SCFORMULAOPT_SEP_ARG 2
155#define SCFORMULAOPT_SEP_ARRAY_ROW 3
156#define SCFORMULAOPT_SEP_ARRAY_COL 4
157#define SCFORMULAOPT_STRING_REF_SYNTAX 5
158#define SCFORMULAOPT_STRING_CONVERSION 6
159#define SCFORMULAOPT_EMPTY_OUSTRING_AS_ZERO 7
160#define SCFORMULAOPT_OOXML_RECALC 8
161#define SCFORMULAOPT_ODF_RECALC 9
162#define SCFORMULAOPT_OPENCL_AUTOSELECT 10
163#define SCFORMULAOPT_OPENCL_DEVICE 11
164#define SCFORMULAOPT_OPENCL_SUBSET_ONLY 12
165#define SCFORMULAOPT_OPENCL_MIN_SIZE 13
166#define SCFORMULAOPT_OPENCL_SUBSET_OPS 14
170 return {
"Syntax/Grammar",
171 "Syntax/EnglishFunctionName",
172 "Syntax/SeparatorArg",
173 "Syntax/SeparatorArrayRow",
174 "Syntax/SeparatorArrayCol",
175 "Syntax/StringRefAddressSyntax",
176 "Syntax/StringConversion",
177 "Syntax/EmptyStringAsZero",
178 "Load/OOXMLRecalcMode",
179 "Load/ODFRecalcMode",
180 "Calculation/OpenCLAutoSelect",
181 "Calculation/OpenCLDevice",
182 "Calculation/OpenCLSubsetOnly",
183 "Calculation/OpenCLMinimumDataSize",
184 "Calculation/OpenCLSubsetOpCodes"};
190 static sal_uInt16 aVals[] = {
226 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
228 if(aValues.getLength() != aNames.getLength())
231 sal_Int32 nIntVal = 0;
232 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
234 PropsToIds::iterator it_end = aPropMap.end();
235 PropsToIds::iterator it = aPropMap.find( aNames[nProp] );
236 if(
pValues[nProp].hasValue() && it != it_end )
247 if (!(
pValues[nProp] >>= nIntVal))
272 bool bEnglish =
false;
273 if (
pValues[nProp] >>= bEnglish)
280 if ((
pValues[nProp] >>= aSep) && !aSep.isEmpty())
287 if ((
pValues[nProp] >>= aSep) && !aSep.isEmpty())
294 if ((
pValues[nProp] >>= aSep) && !aSep.isEmpty())
305 if (!(
pValues[nProp] >>= nIntVal))
341 if (!(
pValues[nProp] >>= nIntVal))
360 SAL_WARN(
"sc",
"unknown string conversion option!");
377 if (
pValues[nProp] >>= nIntVal)
391 SAL_WARN(
"sc",
"unknown ooxml recalc option!");
401 if (
pValues[nProp] >>= nIntVal)
415 SAL_WARN(
"sc",
"unknown odf recalc option!");
432 pValues[nProp] >>= aOpenCLDevice;
469 Any* pOldValues = aOldValues.getArray();
471 bool bSetOpenCL =
false;
473 for (
int nProp = 0; nProp < aNames.getLength(); ++nProp)
482 case ::formula::FormulaGrammar::GRAM_NATIVE_XL_A1: nVal = 1;
break;
483 case ::formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1: nVal = 2;
break;
512 case ::formula::FormulaGrammar::CONV_OOO: nVal = 0;
break;
513 case ::formula::FormulaGrammar::CONV_XL_A1: nVal = 1;
break;
514 case ::formula::FormulaGrammar::CONV_XL_R1C1: nVal = 2;
break;
515 case ::formula::FormulaGrammar::CONV_A1_XL_A1: nVal = 3;
break;
522 pValues[nProp] = pOldValues[nProp];
543 pValues[nProp] = pOldValues[nProp];
556 pValues[nProp] = pOldValues[nProp];
608 pValues[nProp] <<= aOpenCLDevice;
632#if !HAVE_FEATURE_OPENCL
636 sc::FormulaGroupInterpreter::switchOpenCLDevice(
const PropertyValue * pValues
OUString ScOpCodeSetToSymbolicString(const ScCalcConfig::OpCodeSet &rOpCodes)
ScCalcConfig::OpCodeSet ScStringToOpCodeSet(std::u16string_view rOpCodes)
const OUString & getListSep() const
const OUString & getNumDecimalSepAlt() const
const OUString & getNumDecimalSep() const
static css::lang::Locale & GetLocale()
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
static bool PutProperties(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues, bool bAllLocales)
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
static css::uno::Sequence< css::uno::Any > GetProperties(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, bool bAllLocales)
#define SAL_WARN(area, stream)
#define SAL_N_ELEMENTS(arr)
const PropertyStruct aPropNames[]
sal_Int32 mnOpenCLMinimumFormulaGroupSize
StringConversion meStringConversion
OpCodeSet mpOpenCLSubsetOpCodes
@ UNAMBIGUOUS
=1+"1" gives 2, but =1+"1.000" or =1+"x" give VALUE!
@ LOCALE
=1+"1.000" may be 2 or 1001 ... =1+"x" gives VALUE!
@ ILLEGAL
=1+"1" or =1+"x" give VALUE!
@ ZERO
=1+"1" or =1+"x" give 1
formula::FormulaGrammar::AddressConvention meStringRefAddressSyntax