LCOV - code coverage report
Current view: top level - sc/inc - calcconfig.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 1 100.0 %
Date: 2015-06-13 12:38:46 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          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             : 
      15             : #include <ostream>
      16             : #include <set>
      17             : 
      18             : #include <formula/grammar.hxx>
      19             : #include <formula/opcode.hxx>
      20             : #include <rtl/ustring.hxx>
      21             : 
      22             : // have to match the registry values
      23             : enum ScRecalcOptions
      24             : {
      25             :     RECALC_ALWAYS = 0,
      26             :     RECALC_NEVER,
      27             :     RECALC_ASK,
      28             : };
      29             : 
      30             : /**
      31             :  * Configuration options for formula interpreter.
      32             :  */
      33       31810 : struct SC_DLLPUBLIC ScCalcConfig
      34             : {
      35             :     // from most stringent to most relaxed
      36             :     enum class StringConversion
      37             :     {
      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!
      42             :     };
      43             :     formula::FormulaGrammar::AddressConvention meStringRefAddressSyntax;
      44             :     StringConversion meStringConversion;
      45             :     bool mbEmptyStringAsZero:1;
      46             : 
      47             :     bool mbOpenCLSubsetOnly:1;
      48             :     bool mbOpenCLAutoSelect:1;
      49             :     OUString maOpenCLDevice;
      50             :     sal_Int32 mnOpenCLMinimumFormulaGroupSize;
      51             : 
      52             :     typedef std::set<OpCode> OpCodeSet;
      53             : 
      54             :     OpCodeSet maOpenCLSubsetOpCodes;
      55             : 
      56             :     ScCalcConfig();
      57             : 
      58             :     void setOpenCLConfigToDefault();
      59             : 
      60             :     void reset();
      61             :     void MergeDocumentSpecific( const ScCalcConfig& r );
      62             : 
      63             :     bool operator== (const ScCalcConfig& r) const;
      64             :     bool operator!= (const ScCalcConfig& r) const;
      65             : };
      66             : 
      67             : SC_DLLPUBLIC std::ostream& operator<<(std::ostream& rStream, const ScCalcConfig& rConfig);
      68             : 
      69             : SC_DLLPUBLIC OUString ScOpCodeSetToNumberString(const ScCalcConfig::OpCodeSet& rOpCodes);
      70             : SC_DLLPUBLIC OUString ScOpCodeSetToSymbolicString(const ScCalcConfig::OpCodeSet& rOpCodes);
      71             : SC_DLLPUBLIC ScCalcConfig::OpCodeSet ScStringToOpCodeSet(const OUString& rOpCodes);
      72             : 
      73             : #endif
      74             : 
      75             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11