IWORKFormula.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libetonyek 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 IWORKFORMULA_H_INCLUDED
11 #define IWORKFORMULA_H_INCLUDED
12
13 #include <memory>
14 #include <string>
15
16 #include <boost/optional.hpp>
17
18 #include "IWORKTypes_fwd.h"
19 #include "libetonyek_utils.h"
20
21 namespace libetonyek
22 {
23
24 class IWORKFormula
25 {
26 struct Impl;
27
28 public:
29 IWORKFormula(const boost::optional<unsigned> &hc);
30
31 bool parse(const std::string &formula);
32
33 const std::string str(const boost::optional<unsigned> &hc) const;
34
35 void write(const boost::optional<unsigned> &hc, librevenge::RVNGPropertyListVector &formula, const IWORKTableNameMapPtr_t &tableNameMap) const;
36
37 private:
38 bool computeOffset(const boost::optional<unsigned> &hc, int &offsetColumn, int &offsetRow) const;
39 std::shared_ptr<Impl> m_impl;
40 boost::optional<unsigned> m_hc;
41 };
42
43 } // namespace libetonyek
44
45 #endif // IWORKFORMULA_H_INCLUDED
46
47 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKFormula::IWORKFormula
IWORKFormula(const boost::optional< unsigned > &hc)
libetonyek::IWORKToken::hc
Definition: IWORKToken.h:552
libetonyek::IWORKFormula::parse
bool parse(const std::string &formula)
libetonyek::IWORKFormula::computeOffset
bool computeOffset(const boost::optional< unsigned > &hc, int &offsetColumn, int &offsetRow) const
IWORKTypes_fwd.h
libetonyek::IWORKFormula
Definition: IWORKFormula.h:24
libetonyek::IWORKFormula::str
const std::string str(const boost::optional< unsigned > &hc) const
libetonyek::IWORKTableNameMapPtr_t
std::shared_ptr< IWORKTableNameMap_t > IWORKTableNameMapPtr_t
Definition: IWORKTypes_fwd.h:34
libetonyek::IWORKFormula::m_hc
boost::optional< unsigned > m_hc
Definition: IWORKFormula.h:40
libetonyek::IWORKToken::string
Definition: IWORKToken.h:411
libetonyek::IWORKToken::formula
Definition: IWORKToken.h:224
libetonyek::IWORKFormula::write
void write(const boost::optional< unsigned > &hc, librevenge::RVNGPropertyListVector &formula, const IWORKTableNameMapPtr_t &tableNameMap) const
libetonyek_utils.h
libetonyek::IWORKFormula::m_impl
std::shared_ptr< Impl > m_impl
Definition: IWORKFormula.h:39