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 _COMPHELPER_PROPERTYCONTAINER_HXX_ 25*b1cdbd2cSJim Jagielski #define _COMPHELPER_PROPERTYCONTAINER_HXX_ 26*b1cdbd2cSJim Jagielski 27*b1cdbd2cSJim Jagielski #include <comphelper/propertycontainerhelper.hxx> 28*b1cdbd2cSJim Jagielski #include <cppuhelper/propshlp.hxx> 29*b1cdbd2cSJim Jagielski #include <com/sun/star/uno/Type.hxx> 30*b1cdbd2cSJim Jagielski #include "comphelper/comphelperdllapi.h" 31*b1cdbd2cSJim Jagielski 32*b1cdbd2cSJim Jagielski //......................................................................... 33*b1cdbd2cSJim Jagielski namespace comphelper 34*b1cdbd2cSJim Jagielski { 35*b1cdbd2cSJim Jagielski //......................................................................... 36*b1cdbd2cSJim Jagielski 37*b1cdbd2cSJim Jagielski //========================================================================== 38*b1cdbd2cSJim Jagielski //= OPropertyContainer 39*b1cdbd2cSJim Jagielski //========================================================================== 40*b1cdbd2cSJim Jagielski typedef ::cppu::OPropertySetHelper OPropertyContainer_Base; 41*b1cdbd2cSJim Jagielski /** a OPropertySetHelper implementation which is just a simple container for properties represented 42*b1cdbd2cSJim Jagielski by class members, usually in a derived class. 43*b1cdbd2cSJim Jagielski <BR> 44*b1cdbd2cSJim Jagielski A restriction of this class is that no value conversions are made on a setPropertyValue call. Though 45*b1cdbd2cSJim Jagielski the base class supports this with the convertFastPropertyValue method, the OPropertyContainer accepts only 46*b1cdbd2cSJim Jagielski values which already have the correct type, it's unable to convert, for instance, a long to a short. 47*b1cdbd2cSJim Jagielski */ 48*b1cdbd2cSJim Jagielski class COMPHELPER_DLLPUBLIC OPropertyContainer 49*b1cdbd2cSJim Jagielski :public OPropertyContainer_Base 50*b1cdbd2cSJim Jagielski ,public OPropertyContainerHelper 51*b1cdbd2cSJim Jagielski { 52*b1cdbd2cSJim Jagielski public: 53*b1cdbd2cSJim Jagielski // this dtor is needed otherwise we can get a wrong delete operator 54*b1cdbd2cSJim Jagielski virtual ~OPropertyContainer(); 55*b1cdbd2cSJim Jagielski 56*b1cdbd2cSJim Jagielski protected: 57*b1cdbd2cSJim Jagielski OPropertyContainer(::cppu::OBroadcastHelper& _rBHelper); 58*b1cdbd2cSJim Jagielski 59*b1cdbd2cSJim Jagielski /// for scripting : the types of the interfaces supported by this class 60*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException); 61*b1cdbd2cSJim Jagielski 62*b1cdbd2cSJim Jagielski // OPropertySetHelper overridables 63*b1cdbd2cSJim Jagielski virtual sal_Bool SAL_CALL convertFastPropertyValue( 64*b1cdbd2cSJim Jagielski ::com::sun::star::uno::Any & rConvertedValue, 65*b1cdbd2cSJim Jagielski ::com::sun::star::uno::Any & rOldValue, 66*b1cdbd2cSJim Jagielski sal_Int32 nHandle, 67*b1cdbd2cSJim Jagielski const ::com::sun::star::uno::Any& rValue ) 68*b1cdbd2cSJim Jagielski throw (::com::sun::star::lang::IllegalArgumentException); 69*b1cdbd2cSJim Jagielski 70*b1cdbd2cSJim Jagielski virtual void SAL_CALL setFastPropertyValue_NoBroadcast( 71*b1cdbd2cSJim Jagielski sal_Int32 nHandle, 72*b1cdbd2cSJim Jagielski const ::com::sun::star::uno::Any& rValue 73*b1cdbd2cSJim Jagielski ) 74*b1cdbd2cSJim Jagielski throw (::com::sun::star::uno::Exception); 75*b1cdbd2cSJim Jagielski 76*b1cdbd2cSJim Jagielski using OPropertyContainer_Base::getFastPropertyValue; 77*b1cdbd2cSJim Jagielski virtual void SAL_CALL getFastPropertyValue( 78*b1cdbd2cSJim Jagielski ::com::sun::star::uno::Any& rValue, 79*b1cdbd2cSJim Jagielski sal_Int32 nHandle 80*b1cdbd2cSJim Jagielski ) const; 81*b1cdbd2cSJim Jagielski 82*b1cdbd2cSJim Jagielski // disambiguate a base class method (XFastPropertySet) 83*b1cdbd2cSJim Jagielski virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) 84*b1cdbd2cSJim Jagielski throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 85*b1cdbd2cSJim Jagielski }; 86*b1cdbd2cSJim Jagielski 87*b1cdbd2cSJim Jagielski //......................................................................... 88*b1cdbd2cSJim Jagielski } // namespace comphelper 89*b1cdbd2cSJim Jagielski //......................................................................... 90*b1cdbd2cSJim Jagielski 91*b1cdbd2cSJim Jagielski #endif // _COMPHELPER_PROPERTYCONTAINER_HXX_ 92*b1cdbd2cSJim Jagielski 93*b1cdbd2cSJim Jagielski 94