1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef CHART_MINMAXLINEWRAPPER_HXX 24 #define CHART_MINMAXLINEWRAPPER_HXX 25 26 #include "ServiceMacros.hxx" 27 #include "MutexContainer.hxx" 28 #include "WrappedIgnoreProperty.hxx" 29 #include <cppuhelper/interfacecontainer.hxx> 30 31 32 #include <com/sun/star/chart2/XDiagram.hpp> 33 34 // header for class OPropertyArrayHelper 35 #include <cppuhelper/propshlp.hxx> 36 #include <cppuhelper/implbase6.hxx> 37 #include <com/sun/star/beans/XMultiPropertySet.hpp> 38 #include <com/sun/star/beans/XMultiPropertyStates.hpp> 39 #include <com/sun/star/beans/XPropertyState.hpp> 40 #include <com/sun/star/lang/XComponent.hpp> 41 #include <com/sun/star/lang/XServiceInfo.hpp> 42 #include <com/sun/star/uno/XComponentContext.hpp> 43 44 #include <boost/shared_ptr.hpp> 45 46 namespace chart 47 { 48 49 namespace wrapper 50 { 51 52 class Chart2ModelContact; 53 54 class MinMaxLineWrapper : public MutexContainer 55 , public ::cppu::WeakImplHelper6 56 < ::com::sun::star::lang::XComponent 57 , ::com::sun::star::lang::XServiceInfo 58 , ::com::sun::star::beans::XPropertySet 59 , ::com::sun::star::beans::XMultiPropertySet 60 , ::com::sun::star::beans::XPropertyState 61 , ::com::sun::star::beans::XMultiPropertyStates 62 // , ::com::sun::star::uno::XWeak // implemented by WeakImplHelper(optional interface) 63 // , ::com::sun::star::uno::XInterface // implemented by WeakImplHelper 64 // , ::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper 65 > 66 { 67 public: 68 MinMaxLineWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ); 69 virtual ~MinMaxLineWrapper(); 70 71 /// XServiceInfo declarations 72 APPHELPER_XSERVICEINFO_DECL() 73 74 // ____ XComponent ____ 75 virtual void SAL_CALL dispose() 76 throw (::com::sun::star::uno::RuntimeException); 77 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< 78 ::com::sun::star::lang::XEventListener >& xListener ) 79 throw (::com::sun::star::uno::RuntimeException); 80 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< 81 ::com::sun::star::lang::XEventListener >& aListener ) 82 throw (::com::sun::star::uno::RuntimeException); 83 84 //XPropertySet 85 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException); 86 87 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) 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); 88 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 89 90 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 91 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 92 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 93 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 94 95 //XMultiPropertySet 96 //getPropertySetInfo() already declared in XPropertySet 97 virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 98 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); 99 virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); 100 virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); 101 virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); 102 103 //XPropertyState 104 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 105 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 106 virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 107 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 108 109 //XMultiPropertyStates 110 //getPropertyStates() already declared in XPropertyState 111 virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException); 112 virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 113 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 114 115 private: //methods 116 ::cppu::IPropertyArrayHelper& getInfoHelper(); 117 118 private: //member 119 ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact; 120 ::cppu::OInterfaceContainerHelper m_aEventListenerContainer; 121 122 WrappedIgnoreProperty m_aWrappedLineJointProperty; 123 }; 124 125 } // namespace wrapper 126 } // namespace chart 127 128 // CHART_MINMAXLINEWRAPPER_HXX 129 #endif 130