LibreOffice Module framework (master) 1
constitemcontainer.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 <com/sun/star/beans/PropertyValue.hpp>
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <com/sun/star/beans/XFastPropertySet.hpp>
25#include <com/sun/star/container/XIndexAccess.hpp>
26
27#include <rtl/ustring.hxx>
30
31#include <vector>
32
33namespace framework
34{
35
36class RootItemContainer;
37class ItemContainer;
38class ConstItemContainer final : public ::cppu::WeakImplHelper<
39 css::container::XIndexAccess,
40 css::beans::XFastPropertySet,
41 css::beans::XPropertySet >
42{
43 friend class RootItemContainer;
44 friend class ItemContainer;
45
46 public:
48 ConstItemContainer( const ItemContainer& rtemContainer );
49 ConstItemContainer( const css::uno::Reference< css::container::XIndexAccess >& rSourceContainer, bool bFastCopy = false );
50 virtual ~ConstItemContainer() override;
51
52 // XIndexAccess
53 virtual sal_Int32 SAL_CALL getCount() override;
54
55 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
56
57 // XElementAccess
58 virtual css::uno::Type SAL_CALL getElementType() override
59 {
61 }
62
63 virtual sal_Bool SAL_CALL hasElements() override;
64
65 // XPropertySet
66 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
67 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
68 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
69 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
70 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
71 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
72 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
73
74 // XFastPropertySet
75 virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const css::uno::Any& aValue ) override;
76 virtual css::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle ) override;
77
78 private:
80 css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor();
81
82 void copyItemContainer( const std::vector< css::uno::Sequence< css::beans::PropertyValue > >& rSourceVector );
83 css::uno::Reference< css::container::XIndexAccess > deepCopyContainer( const css::uno::Reference< css::container::XIndexAccess >& rSubContainer );
84
85 std::vector< css::uno::Sequence< css::beans::PropertyValue > > m_aItemVector;
86 OUString m_aUIName;
87};
88
89}
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
std::vector< css::uno::Sequence< css::beans::PropertyValue > > m_aItemVector
css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor()
::cppu::IPropertyArrayHelper & getInfoHelper()
virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) override
virtual sal_Int32 SAL_CALL getCount() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
css::uno::Reference< css::container::XIndexAccess > deepCopyContainer(const css::uno::Reference< css::container::XIndexAccess > &rSubContainer)
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
void copyItemContainer(const std::vector< css::uno::Sequence< css::beans::PropertyValue > > &rSourceVector)
virtual void SAL_CALL setFastPropertyValue(sal_Int32 nHandle, const css::uno::Any &aValue) override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
ConstItemContainer(const css::uno::Reference< css::container::XIndexAccess > &rSourceContainer, bool bFastCopy=false)
virtual sal_Bool SAL_CALL hasElements() override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Type SAL_CALL getElementType() override
unsigned char sal_Bool