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