LibreOffice Module sc (master) 1
reftokenhelper.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 "address.hxx"
23#include "types.hxx"
24#include "scdllapi.h"
25
26#include <vector>
27
28class ScDocument;
29class ScRangeList;
30struct ScComplexRefData;
31
33{
39 ::std::vector<ScTokenRef>& rRefTokens, const OUString& rRangeStr, ScDocument& rDoc,
40 const sal_Unicode cSep, ::formula::FormulaGrammar::Grammar eGrammar, bool bOnly3DRef = false);
41
42 bool getRangeFromToken(const ScDocument* pDoc, ScRange& rRange, const ScTokenRef& pToken, const ScAddress& rPos, bool bExternal = false);
43
44 void getRangeListFromTokens(const ScDocument* pDoc, ScRangeList& rRangeList, const ::std::vector<ScTokenRef>& pTokens, const ScAddress& rPos);
45
49 void getTokenFromRange(const ScDocument* pDoc, ScTokenRef& pToken, const ScRange& rRange);
50
51 void getTokensFromRangeList(const ScDocument* pDoc, ::std::vector<ScTokenRef>& pTokens, const ScRangeList& rRanges);
52
53 bool SC_DLLPUBLIC isRef(const ScTokenRef& pToken);
54 bool SC_DLLPUBLIC isExternalRef(const ScTokenRef& pToken);
55
57 const ::std::vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos);
58
59 void SC_DLLPUBLIC join(const ScDocument* pDoc, ::std::vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos);
60
61 bool getDoubleRefDataFromToken(ScComplexRefData& rData, const ScTokenRef& pToken);
62
63 ScTokenRef createRefToken(const ScDocument& rDoc, const ScAddress& rAddr);
64 ScTokenRef createRefToken(const ScDocument& rDoc, const ScRange& rRange);
65};
66
67/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool SC_DLLPUBLIC isRef(const ScTokenRef &pToken)
void getRangeListFromTokens(const ScDocument *pDoc, ScRangeList &rRangeList, const ::std::vector< ScTokenRef > &pTokens, const ScAddress &rPos)
void compileRangeRepresentation(::std::vector< ScTokenRef > &rRefTokens, const OUString &rRangeStr, ScDocument &rDoc, const sal_Unicode cSep, ::formula::FormulaGrammar::Grammar eGrammar, bool bOnly3DRef=false)
Compile an array of reference tokens from a data source range string.
ScTokenRef createRefToken(const ScDocument &rDoc, const ScAddress &rAddr)
void getTokensFromRangeList(const ScDocument *pDoc, ::std::vector< ScTokenRef > &pTokens, const ScRangeList &rRanges)
bool getRangeFromToken(const ScDocument *pDoc, ScRange &rRange, const ScTokenRef &pToken, const ScAddress &rPos, bool bExternal=false)
bool SC_DLLPUBLIC intersects(const ScDocument *pDoc, const ::std::vector< ScTokenRef > &rTokens, const ScTokenRef &pToken, const ScAddress &rPos)
void getTokenFromRange(const ScDocument *pDoc, ScTokenRef &pToken, const ScRange &rRange)
Create a double reference token from a range object.
bool SC_DLLPUBLIC isExternalRef(const ScTokenRef &pToken)
void SC_DLLPUBLIC join(const ScDocument *pDoc, ::std::vector< ScTokenRef > &rTokens, const ScTokenRef &pToken, const ScAddress &rPos)
bool getDoubleRefDataFromToken(ScComplexRefData &rData, const ScTokenRef &pToken)
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
Complex reference (a range) into the sheet.
Definition: refdata.hxx:123
sal_uInt16 sal_Unicode
::boost::intrusive_ptr< formula::FormulaToken > ScTokenRef
Definition: types.hxx:29