LCOV - code coverage report
Current view: top level - sc/inc - tokenstringcontext.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 2 0.0 %
Date: 2014-04-14 Functions: 0 2 0.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 SC_TOKENSTRINGCONTEXT_HXX
      11             : #define SC_TOKENSTRINGCONTEXT_HXX
      12             : 
      13             : #include "compiler.hxx"
      14             : 
      15             : #include <boost/unordered_map.hpp>
      16             : 
      17             : class ScDocument;
      18             : 
      19             : namespace sc {
      20             : 
      21             : /**
      22             :  * Context for creating string from an array of formula tokens, used in
      23             :  * ScTokenArray::CreateString().  You can re-use the same string context
      24             :  * between multiple CreateString() calls as long as the document content is
      25             :  * unmodified.
      26             :  */
      27           0 : struct SC_DLLPUBLIC TokenStringContext
      28             : {
      29             :     typedef boost::unordered_map<sal_uInt16, OUString> IndexNameMapType;
      30             :     typedef boost::unordered_map<size_t, std::vector<OUString> > IndexNamesMapType;
      31             :     typedef boost::unordered_map<SCTAB, IndexNameMapType> TabIndexMapType;
      32             : 
      33             :     formula::FormulaGrammar::Grammar meGram;
      34             :     formula::FormulaCompiler::OpCodeMapPtr mxOpCodeMap;
      35             :     const ScCompiler::Convention* mpRefConv;
      36             :     OUString maErrRef;
      37             : 
      38             :     std::vector<OUString> maTabNames;
      39             :     IndexNameMapType maGlobalRangeNames;
      40             :     TabIndexMapType maSheetRangeNames;
      41             :     IndexNameMapType maNamedDBs;
      42             : 
      43             :     std::vector<OUString> maExternalFileNames;
      44             :     IndexNamesMapType maExternalCachedTabNames;
      45             : 
      46             :     TokenStringContext( const ScDocument* pDoc, formula::FormulaGrammar::Grammar eGram );
      47             : };
      48             : 
      49           0 : class CompileFormulaContext
      50             : {
      51             :     ScDocument* mpDoc;
      52             :     formula::FormulaGrammar::Grammar meGram;
      53             :     std::vector<OUString> maTabNames;
      54             : 
      55             :     void updateTabNames();
      56             : 
      57             : public:
      58             :     CompileFormulaContext( ScDocument* pDoc );
      59             :     CompileFormulaContext( ScDocument* pDoc, formula::FormulaGrammar::Grammar eGram );
      60             : 
      61             :     formula::FormulaGrammar::Grammar getGrammar() const;
      62             :     void setGrammar( formula::FormulaGrammar::Grammar eGram );
      63             : 
      64             :     const std::vector<OUString>& getTabNames() const;
      65             : 
      66             :     ScDocument* getDoc();
      67             : };
      68             : 
      69             : }
      70             : 
      71             : #endif
      72             : 
      73             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10