Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / basic / source / inc / propacc.hxx
blobc00673055c8c146c0d09b7169c78910286a484ac
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef INCLUDED_BASIC_SOURCE_INC_PROPACC_HXX
20 #define INCLUDED_BASIC_SOURCE_INC_PROPACC_HXX
22 #include <com/sun/star/beans/PropertyValue.hpp>
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/beans/XPropertySetInfo.hpp>
25 #include <com/sun/star/beans/XPropertyAccess.hpp>
26 #include <cppuhelper/implbase.hxx>
28 #include <vector>
30 typedef std::vector<css::beans::PropertyValue> SbPropertyValueArr_Impl;
32 typedef ::cppu::WeakImplHelper< css::beans::XPropertySet,
33 css::beans::XPropertyAccess > SbPropertyValuesHelper;
36 class SbPropertyValues: public SbPropertyValuesHelper
38 SbPropertyValueArr_Impl m_aPropVals;
39 css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo;
41 private:
42 size_t GetIndex_Impl( const OUString &rPropName ) const;
44 public:
45 SbPropertyValues();
46 virtual ~SbPropertyValues() override;
48 // XPropertySet
49 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
50 getPropertySetInfo() override;
51 virtual void SAL_CALL setPropertyValue(
52 const OUString& aPropertyName,
53 const css::uno::Any& aValue) override;
54 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
55 virtual void SAL_CALL addPropertyChangeListener(
56 const OUString& aPropertyName,
57 const css::uno::Reference< css::beans::XPropertyChangeListener >& ) override;
58 virtual void SAL_CALL removePropertyChangeListener(
59 const OUString& aPropertyName,
60 const css::uno::Reference< css::beans::XPropertyChangeListener >& ) override;
61 virtual void SAL_CALL addVetoableChangeListener(
62 const OUString& aPropertyName,
63 const css::uno::Reference< css::beans::XVetoableChangeListener >& ) override;
64 virtual void SAL_CALL removeVetoableChangeListener(
65 const OUString& aPropertyName,
66 const css::uno::Reference< css::beans::XVetoableChangeListener >& ) override;
68 // XPropertyAccess
69 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPropertyValues() override;
70 virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< css::beans::PropertyValue >& PropertyValues_) override;
73 class SbxArray;
75 void RTL_Impl_CreatePropertySet( SbxArray& rPar );
77 #endif
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */