LibreOffice Module sc (master)  1
xiformula.hxx
Go to the documentation of this file.
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  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #pragma once
21 
22 #include "xlformula.hxx"
23 #include "xiroot.hxx"
24 #include <memory>
25 
26 // Formula compiler ===========================================================
27 
28 class ScRangeList;
29 class XclImpFmlaCompImpl;
30 
33 {
34 public:
35  explicit XclImpFormulaCompiler( const XclImpRoot& rRoot );
36  virtual ~XclImpFormulaCompiler() override;
37 
40  void CreateRangeList(
41  ScRangeList& rScRanges, XclFormulaType eType,
42  const XclTokenArray& rXclTokArr, XclImpStream& rStrm );
43 
47  std::unique_ptr<ScTokenArray> CreateFormula( XclFormulaType eType, const XclTokenArray& rXclTokArr );
48 
49 private:
50  typedef std::shared_ptr< XclImpFmlaCompImpl > XclImpFmlaCompImplRef;
51  XclImpFmlaCompImplRef mxImpl;
52 };
53 
54 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< ScTokenArray > CreateFormula(XclFormulaType eType, const XclTokenArray &rXclTokArr)
Creates a formula token array from the Excel token array.
Definition: xiformula.cxx:101
XclFormulaType
Mask for number of appended ranges.
Definition: xlformula.hxx:159
virtual ~XclImpFormulaCompiler() override
Definition: xiformula.cxx:90
void CreateRangeList(ScRangeList &rScRanges, XclFormulaType eType, const XclTokenArray &rXclTokArr, XclImpStream &rStrm)
Creates a range list from the passed Excel token array.
Definition: xiformula.cxx:94
DocumentType eType
The formula compiler to create Calc token arrays from Excel token arrays.
Definition: xiformula.hxx:32
Binary representation of an Excel token array.
Definition: xlformula.hxx:376
XclImpFmlaCompImplRef mxImpl
Definition: xiformula.hxx:51
XclImpFormulaCompiler(const XclImpRoot &rRoot)
Definition: xiformula.cxx:84
This class is used to import record oriented streams.
Definition: xistream.hxx:277
void SvStream & rStrm
Access to global data from other classes.
Definition: xiroot.hxx:125
Implementation class of the export formula compiler.
Definition: xiformula.cxx:29
std::shared_ptr< XclImpFmlaCompImpl > XclImpFmlaCompImplRef
Definition: xiformula.hxx:50