LibreOffice Module sc (master) 1
xeformula.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 "xeroot.hxx"
24#include <memory>
25
26struct XclAddress;
27
28// External reference log =====================================================
29
32{
36 sal_uInt16 mnFirstXclTab;
37 sal_uInt16 mnLastXclTab;
38
39 explicit XclExpRefLogEntry();
40};
41
43typedef ::std::vector< XclExpRefLogEntry > XclExpRefLog;
44
45// Formula compiler ===========================================================
46
47class ScRangeList;
49
52{
53public:
54 explicit XclExpFormulaCompiler( const XclExpRoot& rRoot );
55 virtual ~XclExpFormulaCompiler() override;
56
59 XclFormulaType eType, const ScTokenArray& rScTokArr,
60 const ScAddress* pScBasePos = nullptr, XclExpRefLog* pRefLog = nullptr );
61
64
67
70
73
78
81 XclTokenArrayRef CreateNameXFormula( sal_uInt16 nExtSheet, sal_uInt16 nExtName );
82
83 bool IsRef2D( const ScSingleRefData& rRefData ) const;
84 bool IsRef2D( const ScComplexRefData& rRefData ) const;
85
86private:
87 typedef std::shared_ptr< XclExpFmlaCompImpl > XclExpFmlaCompImplRef;
89};
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Implementation class of the export formula compiler.
Definition: xeformula.cxx:298
The formula compiler to create Excel token arrays from Calc token arrays.
Definition: xeformula.hxx:52
std::shared_ptr< XclExpFmlaCompImpl > XclExpFmlaCompImplRef
Definition: xeformula.hxx:87
bool IsRef2D(const ScSingleRefData &rRefData) const
Definition: xeformula.cxx:2712
XclTokenArrayRef CreateErrorFormula(sal_uInt8 nErrCode)
Creates a single error token containing the passed error code.
Definition: xeformula.cxx:2695
XclExpFmlaCompImplRef mxImpl
Definition: xeformula.hxx:88
virtual ~XclExpFormulaCompiler() override
Definition: xeformula.cxx:2652
XclExpFormulaCompiler(const XclExpRoot &rRoot)
Definition: xeformula.cxx:2646
XclTokenArrayRef CreateNameXFormula(sal_uInt16 nExtSheet, sal_uInt16 nExtName)
Creates a single tNameXR token for a reference to an external name.
Definition: xeformula.cxx:2706
XclTokenArrayRef CreateFormula(XclFormulaType eType, const ScTokenArray &rScTokArr, const ScAddress *pScBasePos=nullptr, XclExpRefLog *pRefLog=nullptr)
Creates and returns the token array of a formula.
Definition: xeformula.cxx:2656
XclTokenArrayRef CreateSpecialRefFormula(sal_uInt8 nTokenId, const XclAddress &rXclPos)
Creates a single token for a special cell reference.
Definition: xeformula.cxx:2700
Access to global data from other classes.
Definition: xeroot.hxx:113
This class stores an unformatted or formatted string for Excel export.
Definition: xestring.hxx:48
DocumentType eType
Complex reference (a range) into the sheet.
Definition: refdata.hxx:123
Single reference (one address) into the sheet.
Definition: refdata.hxx:30
A 2D cell address struct with Excel column and row indexes.
Definition: xladdress.hxx:30
Log entry for external references in a formula, used i.e.
Definition: xeformula.hxx:32
const XclExpString * mpUrl
Definition: xeformula.hxx:33
XclExpRefLogEntry()
Calc index of the last sheet.
Definition: xeformula.cxx:43
const XclExpString * mpLastTab
Name of the first sheet.
Definition: xeformula.hxx:35
sal_uInt16 mnLastXclTab
Calc index of the first sheet.
Definition: xeformula.hxx:37
const XclExpString * mpFirstTab
URL of the document containing the first sheet.
Definition: xeformula.hxx:34
sal_uInt16 mnFirstXclTab
Name of the last sheet.
Definition: xeformula.hxx:36
unsigned char sal_uInt8
::std::vector< XclExpRefLogEntry > XclExpRefLog
Vector containing a log for all external references in a formula, used i.e.
Definition: xeformula.hxx:43
XclFormulaType
Mask for number of appended ranges.
Definition: xlformula.hxx:160
std::shared_ptr< XclTokenArray > XclTokenArrayRef
Definition: xlformula.hxx:416