LibreOffice Module sc (master)  1
ooxformulaparser.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 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_OOXFORMULAPARSER_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_OOXFORMULAPARSER_HXX
22 
23 #include <memory>
24 #include <com/sun/star/lang/XInitialization.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <com/sun/star/sheet/XFilterFormulaParser.hpp>
27 #include <cppuhelper/implbase.hxx>
28 
29 namespace com::sun::star::lang { class XComponent; }
30 
31 namespace oox::xls {
32 
34 
35 typedef ::cppu::WeakImplHelper<
36  css::lang::XServiceInfo,
37  css::lang::XInitialization,
38  css::sheet::XFilterFormulaParser > OOXMLFormulaParser_BASE;
39 
41 class OOXMLFormulaParser : public OOXMLFormulaParser_BASE
42 {
43 public:
44  explicit OOXMLFormulaParser();
45  virtual ~OOXMLFormulaParser() override;
46 
47  // com.sun.star.lang.XServiceInfo interface -------------------------------
48 
49  virtual OUString SAL_CALL
50  getImplementationName() override;
51 
52  virtual sal_Bool SAL_CALL
53  supportsService( const OUString& rService ) override;
54 
55  virtual css::uno::Sequence< OUString > SAL_CALL
56  getSupportedServiceNames() override;
57 
58  // com.sun.star.lang.XInitialization interface ----------------------------
59 
60  virtual void SAL_CALL initialize(
61  const css::uno::Sequence< css::uno::Any >& rArgs ) override;
62 
63  // com.sun.star.sheet.XFilterFormulaParser interface ----------------------
64 
65  virtual OUString SAL_CALL
66  getSupportedNamespace() override;
67 
68  // com.sun.star.sheet.XFormulaParser interface ----------------------------
69 
70  virtual css::uno::Sequence< css::sheet::FormulaToken > SAL_CALL
72  const OUString& rFormula,
73  const css::table::CellAddress& rReferencePos ) override;
74 
75  virtual OUString SAL_CALL
77  const css::uno::Sequence< css::sheet::FormulaToken >& rTokens,
78  const css::table::CellAddress& rReferencePos ) override;
79 
80 private:
81  typedef std::shared_ptr< OOXMLFormulaParserImpl > ParserImplRef;
82 
83  css::uno::Reference< css::lang::XComponent >
85  ParserImplRef mxParserImpl;
86 };
87 
88 } // namespace oox::xls
89 
90 #endif
91 
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL printFormula(const css::uno::Sequence< css::sheet::FormulaToken > &rTokens, const css::table::CellAddress &rReferencePos) override
virtual OUString SAL_CALL getSupportedNamespace() override
std::shared_ptr< OOXMLFormulaParserImpl > ParserImplRef
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &rArgs) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &rService) override
unsigned char sal_Bool
virtual css::uno::Sequence< css::sheet::FormulaToken > SAL_CALL parseFormula(const OUString &rFormula, const css::table::CellAddress &rReferencePos) override
virtual ~OOXMLFormulaParser() override
OOXML formula parser/compiler service for usage in ODF filters.
::cppu::WeakImplHelper< css::lang::XServiceInfo, css::lang::XInitialization, css::sheet::XFilterFormulaParser > OOXMLFormulaParser_BASE
css::uno::Reference< css::lang::XComponent > mxComponent
virtual OUString SAL_CALL getImplementationName() override