1*b1cdbd2cSJim Jagielski /************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski 24*b1cdbd2cSJim Jagielski #ifndef __FRAMEWORK_HELPER_PROPERTYSETCONTAINER_HXX_ 25*b1cdbd2cSJim Jagielski #define __FRAMEWORK_HELPER_PROPERTYSETCONTAINER_HXX_ 26*b1cdbd2cSJim Jagielski 27*b1cdbd2cSJim Jagielski /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble 28*b1cdbd2cSJim Jagielski with solaris headers ... 29*b1cdbd2cSJim Jagielski */ 30*b1cdbd2cSJim Jagielski #include <vector> 31*b1cdbd2cSJim Jagielski #include <cppuhelper/weak.hxx> 32*b1cdbd2cSJim Jagielski #include <com/sun/star/lang/XMultiServiceFactory.hpp> 33*b1cdbd2cSJim Jagielski #include <com/sun/star/container/XIndexContainer.hpp> 34*b1cdbd2cSJim Jagielski #include <com/sun/star/beans/XPropertySet.hpp> 35*b1cdbd2cSJim Jagielski #include <threadhelp/threadhelpbase.hxx> 36*b1cdbd2cSJim Jagielski #include <framework/fwedllapi.h> 37*b1cdbd2cSJim Jagielski 38*b1cdbd2cSJim Jagielski namespace framework 39*b1cdbd2cSJim Jagielski { 40*b1cdbd2cSJim Jagielski 41*b1cdbd2cSJim Jagielski class FWE_DLLPUBLIC PropertySetContainer : public com::sun::star::container::XIndexContainer , 42*b1cdbd2cSJim Jagielski public ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. 43*b1cdbd2cSJim Jagielski public ::cppu::OWeakObject 44*b1cdbd2cSJim Jagielski { 45*b1cdbd2cSJim Jagielski public: 46*b1cdbd2cSJim Jagielski PropertySetContainer( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& ); 47*b1cdbd2cSJim Jagielski virtual ~PropertySetContainer(); 48*b1cdbd2cSJim Jagielski 49*b1cdbd2cSJim Jagielski // XInterface 50*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) 51*b1cdbd2cSJim Jagielski throw (::com::sun::star::uno::RuntimeException); 52*b1cdbd2cSJim Jagielski virtual void SAL_CALL acquire() throw (); 53*b1cdbd2cSJim Jagielski virtual void SAL_CALL release() throw (); 54*b1cdbd2cSJim Jagielski 55*b1cdbd2cSJim Jagielski // XIndexContainer 56*b1cdbd2cSJim Jagielski virtual void SAL_CALL insertByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) 57*b1cdbd2cSJim Jagielski throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 58*b1cdbd2cSJim Jagielski 59*b1cdbd2cSJim Jagielski virtual void SAL_CALL removeByIndex( sal_Int32 Index ) 60*b1cdbd2cSJim Jagielski throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 61*b1cdbd2cSJim Jagielski 62*b1cdbd2cSJim Jagielski // XIndexReplace 63*b1cdbd2cSJim Jagielski virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) 64*b1cdbd2cSJim Jagielski throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 65*b1cdbd2cSJim Jagielski 66*b1cdbd2cSJim Jagielski // XIndexAccess 67*b1cdbd2cSJim Jagielski virtual sal_Int32 SAL_CALL getCount() 68*b1cdbd2cSJim Jagielski throw (::com::sun::star::uno::RuntimeException); 69*b1cdbd2cSJim Jagielski 70*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) 71*b1cdbd2cSJim Jagielski throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 72*b1cdbd2cSJim Jagielski 73*b1cdbd2cSJim Jagielski // XElementAccess getElementType()74*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Type SAL_CALL getElementType() 75*b1cdbd2cSJim Jagielski throw (::com::sun::star::uno::RuntimeException) 76*b1cdbd2cSJim Jagielski { 77*b1cdbd2cSJim Jagielski return ::getCppuType((com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >*)0); 78*b1cdbd2cSJim Jagielski } 79*b1cdbd2cSJim Jagielski 80*b1cdbd2cSJim Jagielski virtual sal_Bool SAL_CALL hasElements() 81*b1cdbd2cSJim Jagielski throw (::com::sun::star::uno::RuntimeException); 82*b1cdbd2cSJim Jagielski 83*b1cdbd2cSJim Jagielski protected: 84*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; 85*b1cdbd2cSJim Jagielski 86*b1cdbd2cSJim Jagielski private: 87*b1cdbd2cSJim Jagielski typedef std::vector< com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > > PropertySetVector; 88*b1cdbd2cSJim Jagielski PropertySetVector m_aPropertySetVector; 89*b1cdbd2cSJim Jagielski 90*b1cdbd2cSJim Jagielski }; 91*b1cdbd2cSJim Jagielski 92*b1cdbd2cSJim Jagielski } 93*b1cdbd2cSJim Jagielski 94*b1cdbd2cSJim Jagielski #endif // __FRAMEWORK_CLASSES_PROPERTYSETCONTAINER_HXX_ 95