1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef CHART_MINMAXLINEWRAPPER_HXX 28 #define CHART_MINMAXLINEWRAPPER_HXX 29 30 #include "ServiceMacros.hxx" 31 #include "MutexContainer.hxx" 32 #include "WrappedIgnoreProperty.hxx" 33 #include <cppuhelper/interfacecontainer.hxx> 34 35 36 #include <com/sun/star/chart2/XDiagram.hpp> 37 38 // header for class OPropertyArrayHelper 39 #include <cppuhelper/propshlp.hxx> 40 #include <cppuhelper/implbase6.hxx> 41 #include <com/sun/star/beans/XMultiPropertySet.hpp> 42 #include <com/sun/star/beans/XMultiPropertyStates.hpp> 43 #include <com/sun/star/beans/XPropertyState.hpp> 44 #include <com/sun/star/lang/XComponent.hpp> 45 #include <com/sun/star/lang/XServiceInfo.hpp> 46 #include <com/sun/star/uno/XComponentContext.hpp> 47 48 #include <boost/shared_ptr.hpp> 49 50 namespace chart 51 { 52 53 namespace wrapper 54 { 55 56 class Chart2ModelContact; 57 58 class MinMaxLineWrapper : public MutexContainer 59 , public ::cppu::WeakImplHelper6 60 < ::com::sun::star::lang::XComponent 61 , ::com::sun::star::lang::XServiceInfo 62 , ::com::sun::star::beans::XPropertySet 63 , ::com::sun::star::beans::XMultiPropertySet 64 , ::com::sun::star::beans::XPropertyState 65 , ::com::sun::star::beans::XMultiPropertyStates 66 // , ::com::sun::star::uno::XWeak // implemented by WeakImplHelper(optional interface) 67 // , ::com::sun::star::uno::XInterface // implemented by WeakImplHelper 68 // , ::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper 69 > 70 { 71 public: 72 MinMaxLineWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ); 73 virtual ~MinMaxLineWrapper(); 74 75 /// XServiceInfo declarations 76 APPHELPER_XSERVICEINFO_DECL() 77 78 // ____ XComponent ____ 79 virtual void SAL_CALL dispose() 80 throw (::com::sun::star::uno::RuntimeException); 81 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< 82 ::com::sun::star::lang::XEventListener >& xListener ) 83 throw (::com::sun::star::uno::RuntimeException); 84 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< 85 ::com::sun::star::lang::XEventListener >& aListener ) 86 throw (::com::sun::star::uno::RuntimeException); 87 88 //XPropertySet 89 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException); 90 91 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); 92 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); 93 94 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); 95 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); 96 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); 97 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); 98 99 //XMultiPropertySet 100 //getPropertySetInfo() already declared in XPropertySet 101 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); 102 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); 103 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); 104 virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); 105 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); 106 107 //XPropertyState 108 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 109 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); 110 virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 111 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); 112 113 //XMultiPropertyStates 114 //getPropertyStates() already declared in XPropertyState 115 virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException); 116 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); 117 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); 118 119 private: //methods 120 ::cppu::IPropertyArrayHelper& getInfoHelper(); 121 122 private: //member 123 ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact; 124 ::cppu::OInterfaceContainerHelper m_aEventListenerContainer; 125 126 WrappedIgnoreProperty m_aWrappedLineJointProperty; 127 }; 128 129 } // namespace wrapper 130 } // namespace chart 131 132 // CHART_MINMAXLINEWRAPPER_HXX 133 #endif 134