1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
10 #ifndef INCLUDED_SC_INC_INTERPRETERCONTEXT_HXX
11 #define INCLUDED_SC_INC_INTERPRETERCONTEXT_HXX
14 #include <formula/token.hxx>
16 #define TOKEN_CACHE_SIZE 8
19 class SvNumberFormatter
;
21 struct ScInterpreterContext
23 const ScDocument
& mrDoc
;
24 SvNumberFormatter
* mpFormatter
;
25 size_t mnTokenCachePos
;
26 std::vector
<formula::FormulaToken
*> maTokens
;
28 ScInterpreterContext(const ScDocument
& rDoc
, SvNumberFormatter
* pFormatter
)
30 , mpFormatter(pFormatter
)
32 , maTokens(TOKEN_CACHE_SIZE
, nullptr)
36 ~ScInterpreterContext()
38 for (auto p
: maTokens
)
43 SvNumberFormatter
* GetFormatTable() const { return mpFormatter
; }
46 #endif // INCLUDED_SC_INC_INTERPRETERCONTEXT_HXX
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */