LibreOffice Module reportdesign (master) 1
Groups.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_GROUPS_HXX
20#define INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_GROUPS_HXX
21
22#include <com/sun/star/report/XGroups.hpp>
26#include <com/sun/star/uno/XComponentContext.hpp>
27#include <vector>
28
29
30namespace reportdesign
31{
32 typedef ::cppu::WeakComponentImplHelper< css::report::XGroups> GroupsBase;
37 class OGroups : public cppu::BaseMutex,
38 public GroupsBase
39 {
40 typedef ::std::vector< css::uno::Reference< css::report::XGroup > > TGroups;
42 css::uno::Reference< css::uno::XComponentContext > m_xContext;
43 css::uno::WeakReference< css::report::XReportDefinition > m_xParent;
45 private:
46 OGroups& operator=(const OGroups&) = delete;
47 OGroups(const OGroups&) = delete;
48 void checkIndex(sal_Int32 _nIndex);
49 protected:
50 // TODO: VirtualFunctionFinder: This is virtual function!
51
52 virtual ~OGroups() override;
53
56 // TODO: VirtualFunctionFinder: This is virtual function!
57
58 virtual void SAL_CALL disposing() override;
59 public:
60 OGroups( const css::uno::Reference< css::report::XReportDefinition >& _xParent
61 ,css::uno::Reference< css::uno::XComponentContext > context);
62
63 // XGroups
64 // Attributes
65 virtual css::uno::Reference< css::report::XReportDefinition > SAL_CALL getReportDefinition() override;
66 // Methods
67 virtual css::uno::Reference< css::report::XGroup > SAL_CALL createGroup( ) override;
68 // XIndexContainer
69 virtual void SAL_CALL insertByIndex( ::sal_Int32 Index, const css::uno::Any& Element ) override;
70 virtual void SAL_CALL removeByIndex( ::sal_Int32 Index ) override;
71 // XIndexReplace
72 virtual void SAL_CALL replaceByIndex( ::sal_Int32 Index, const css::uno::Any& Element ) override;
73 // XIndexAccess
74 virtual ::sal_Int32 SAL_CALL getCount( ) override;
75 virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override;
76 // XElementAccess
77 virtual css::uno::Type SAL_CALL getElementType( ) override;
78 virtual sal_Bool SAL_CALL hasElements( ) override;
79 // XChild
80 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( ) override;
81 virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& Parent ) override;
82 // XContainer
83 virtual void SAL_CALL addContainerListener( const css::uno::Reference< css::container::XContainerListener >& xListener ) override;
84 virtual void SAL_CALL removeContainerListener( const css::uno::Reference< css::container::XContainerListener >& xListener ) override;
85
86 // XComponent
87 virtual void SAL_CALL dispose() override;
88 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override
89 {
90 cppu::WeakComponentImplHelperBase::addEventListener(aListener);
91 }
92 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override
93 {
94 cppu::WeakComponentImplHelperBase::removeEventListener(aListener);
95 }
96 };
97}
98#endif // INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_GROUPS_HXX
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
implementation of a
Definition: Groups.hxx:39
virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener > &xListener) override
Definition: Groups.cxx:177
virtual css::uno::Reference< css::report::XGroup > SAL_CALL createGroup() override
Definition: Groups.cxx:70
virtual css::uno::Reference< css::report::XReportDefinition > SAL_CALL getReportDefinition() override
Definition: Groups.cxx:65
OGroups(const css::uno::Reference< css::report::XReportDefinition > &_xParent, css::uno::Reference< css::uno::XComponentContext > context)
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: Groups.hxx:42
virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener > &xListener) override
Definition: Groups.cxx:182
virtual css::uno::Any SAL_CALL getByIndex(::sal_Int32 Index) override
Definition: Groups.cxx:144
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: Groups.hxx:92
virtual void SAL_CALL setParent(const css::uno::Reference< css::uno::XInterface > &Parent) override
Definition: Groups.cxx:171
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > m_aContainerListeners
Definition: Groups.hxx:41
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Definition: Groups.hxx:88
virtual css::uno::Type SAL_CALL getElementType() override
Definition: Groups.cxx:154
virtual void SAL_CALL removeByIndex(::sal_Int32 Index) override
Definition: Groups.cxx:102
virtual sal_Bool SAL_CALL hasElements() override
Definition: Groups.cxx:159
void checkIndex(sal_Int32 _nIndex)
Definition: Groups.cxx:187
virtual void SAL_CALL disposing() override
this function is called upon disposing the component
Definition: Groups.cxx:54
virtual void SAL_CALL replaceByIndex(::sal_Int32 Index, const css::uno::Any &Element) override
Definition: Groups.cxx:118
css::uno::WeakReference< css::report::XReportDefinition > m_xParent
Definition: Groups.hxx:43
virtual void SAL_CALL insertByIndex(::sal_Int32 Index, const css::uno::Any &Element) override
Definition: Groups.cxx:76
virtual ~OGroups() override
Definition: Groups.cxx:43
::std::vector< css::uno::Reference< css::report::XGroup > > TGroups
Definition: Groups.hxx:40
OGroups(const OGroups &)=delete
OGroups & operator=(const OGroups &)=delete
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent() override
Definition: Groups.cxx:166
virtual ::sal_Int32 SAL_CALL getCount() override
Definition: Groups.cxx:138
virtual void SAL_CALL dispose() override
Definition: Groups.cxx:47
::cppu::WeakComponentImplHelper< css::report::XGroups > GroupsBase
Definition: Groups.hxx:32
unsigned char sal_Bool