1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
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 #include <com/sun/star/lang/XUnoTunnel.hpp>
28 #include <rtl/ustring.hxx>
29 #include <cppuhelper/implbase.hxx>
30 #include <cppuhelper/propshlp.hxx>
37 class RootItemContainer
;
39 class ConstItemContainer final
: public ::cppu::WeakImplHelper
<
40 css::container::XIndexAccess
,
41 css::lang::XUnoTunnel
,
42 css::beans::XFastPropertySet
,
43 css::beans::XPropertySet
>
45 friend class RootItemContainer
;
46 friend class ItemContainer
;
50 ConstItemContainer( const ItemContainer
& rtemContainer
);
51 ConstItemContainer( const css::uno::Reference
< css::container::XIndexAccess
>& rSourceContainer
, bool bFastCopy
= false );
52 virtual ~ConstItemContainer() override
;
55 static const css::uno::Sequence
< sal_Int8
>& getUnoTunnelId() noexcept
;
56 sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& rIdentifier
) override
;
59 virtual sal_Int32 SAL_CALL
getCount() override
;
61 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
64 virtual css::uno::Type SAL_CALL
getElementType() override
66 return cppu::UnoType
<css::uno::Sequence
< css::beans::PropertyValue
>>::get();
69 virtual sal_Bool SAL_CALL
hasElements() override
;
72 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
73 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
74 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
;
75 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
76 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
77 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
78 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
81 virtual void SAL_CALL
setFastPropertyValue( sal_Int32 nHandle
, const css::uno::Any
& aValue
) override
;
82 virtual css::uno::Any SAL_CALL
getFastPropertyValue( sal_Int32 nHandle
) override
;
85 ::cppu::IPropertyArrayHelper
& getInfoHelper();
86 css::uno::Sequence
< css::beans::Property
> impl_getStaticPropertyDescriptor();
88 void copyItemContainer( const std::vector
< css::uno::Sequence
< css::beans::PropertyValue
> >& rSourceVector
);
89 css::uno::Reference
< css::container::XIndexAccess
> deepCopyContainer( const css::uno::Reference
< css::container::XIndexAccess
>& rSubContainer
);
91 std::vector
< css::uno::Sequence
< css::beans::PropertyValue
> > m_aItemVector
;
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */