LibreOffice Module reportdesign (master) 1
Functions.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#ifndef INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_FUNCTIONS_HXX
20#define INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_FUNCTIONS_HXX
21
22#include <com/sun/star/report/XFunctions.hpp>
23#include <com/sun/star/report/XFunctionsSupplier.hpp>
27#include <com/sun/star/uno/XComponentContext.hpp>
28#include <vector>
29
30
31namespace reportdesign
32{
33 typedef ::cppu::WeakComponentImplHelper< css::report::XFunctions> FunctionsBase;
39 public FunctionsBase
40 {
41 typedef ::std::vector< css::uno::Reference< css::report::XFunction > > TFunctions;
43 css::uno::Reference< css::uno::XComponentContext > m_xContext;
44 css::uno::WeakReference< css::report::XFunctionsSupplier > m_xParent;
46 private:
47 OFunctions& operator=(const OFunctions&) = delete;
48 OFunctions(const OFunctions&) = delete;
49 void checkIndex(sal_Int32 _nIndex);
50 protected:
51 // TODO: VirtualFunctionFinder: This is virtual function!
52
53 virtual ~OFunctions() override;
54
57 // TODO: VirtualFunctionFinder: This is virtual function!
58
59 virtual void SAL_CALL disposing() override;
60 public:
61 explicit OFunctions( const css::uno::Reference< css::report::XFunctionsSupplier >& _xParent
62 ,css::uno::Reference< css::uno::XComponentContext > context);
63
64 // XFunctions
65 // Methods
66 virtual css::uno::Reference< css::report::XFunction > SAL_CALL createFunction( ) override;
67 // XIndexContainer
68 virtual void SAL_CALL insertByIndex( ::sal_Int32 Index, const css::uno::Any& Element ) override;
69 virtual void SAL_CALL removeByIndex( ::sal_Int32 Index ) override;
70 // XIndexReplace
71 virtual void SAL_CALL replaceByIndex( ::sal_Int32 Index, const css::uno::Any& Element ) override;
72 // XIndexAccess
73 virtual ::sal_Int32 SAL_CALL getCount( ) override;
74 virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override;
75 // XElementAccess
76 virtual css::uno::Type SAL_CALL getElementType( ) override;
77 virtual sal_Bool SAL_CALL hasElements( ) override;
78 // XChild
79 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( ) override;
80 virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& Parent ) override;
81 // XContainer
82 virtual void SAL_CALL addContainerListener( const css::uno::Reference< css::container::XContainerListener >& xListener ) override;
83 virtual void SAL_CALL removeContainerListener( const css::uno::Reference< css::container::XContainerListener >& xListener ) override;
84
85 // XComponent
86 virtual void SAL_CALL dispose() override;
87 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override
88 {
89 cppu::WeakComponentImplHelperBase::addEventListener(aListener);
90 }
91 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override
92 {
93 cppu::WeakComponentImplHelperBase::removeEventListener(aListener);
94 }
95 };
96}
97#endif // INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_FUNCTIONS_HXX
98
99/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
implementation of a
Definition: Functions.hxx:40
virtual void SAL_CALL insertByIndex(::sal_Int32 Index, const css::uno::Any &Element) override
Definition: Functions.cxx:72
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: Functions.hxx:91
virtual css::uno::Any SAL_CALL getByIndex(::sal_Int32 Index) override
Definition: Functions.cxx:142
virtual void SAL_CALL dispose() override
Definition: Functions.cxx:47
virtual ::sal_Int32 SAL_CALL getCount() override
Definition: Functions.cxx:136
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: Functions.hxx:87
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > m_aContainerListeners
Definition: Functions.hxx:42
virtual ~OFunctions() override
Definition: Functions.cxx:43
void checkIndex(sal_Int32 _nIndex)
Definition: Functions.cxx:185
virtual void SAL_CALL removeByIndex(::sal_Int32 Index) override
Definition: Functions.cxx:99
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent() override
Definition: Functions.cxx:164
virtual sal_Bool SAL_CALL hasElements() override
Definition: Functions.cxx:157
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: Functions.hxx:43
virtual void SAL_CALL replaceByIndex(::sal_Int32 Index, const css::uno::Any &Element) override
Definition: Functions.cxx:116
virtual void SAL_CALL disposing() override
this function is called upon disposing the component
Definition: Functions.cxx:54
virtual css::uno::Type SAL_CALL getElementType() override
Definition: Functions.cxx:152
virtual css::uno::Reference< css::report::XFunction > SAL_CALL createFunction() override
Definition: Functions.cxx:66
virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener > &xListener) override
Definition: Functions.cxx:180
css::uno::WeakReference< css::report::XFunctionsSupplier > m_xParent
Definition: Functions.hxx:44
virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener > &xListener) override
Definition: Functions.cxx:175
OFunctions(const OFunctions &)=delete
virtual void SAL_CALL setParent(const css::uno::Reference< css::uno::XInterface > &Parent) override
Definition: Functions.cxx:169
OFunctions & operator=(const OFunctions &)=delete
::std::vector< css::uno::Reference< css::report::XFunction > > TFunctions
Definition: Functions.hxx:41
OFunctions(const css::uno::Reference< css::report::XFunctionsSupplier > &_xParent, css::uno::Reference< css::uno::XComponentContext > context)
::cppu::WeakComponentImplHelper< css::report::XFunctions > FunctionsBase
Definition: Functions.hxx:33
unsigned char sal_Bool