Update ooo320-m1
[ooovba.git] / chart2 / source / controller / chartapiwrapper / UpDownBarWrapper.hxx
blob3e7a8f20d17ea42908e4022e76f1c356db52b9a5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: UpDownBarWrapper.hxx,v $
10 * $Revision: 1.3.44.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef CHART_UPDOWNBARWRAPPER_HXX
31 #define CHART_UPDOWNBARWRAPPER_HXX
33 #include "ServiceMacros.hxx"
34 #include "MutexContainer.hxx"
35 #include <cppuhelper/interfacecontainer.hxx>
38 #include <com/sun/star/chart2/XDiagram.hpp>
40 // header for class OPropertyArrayHelper
41 #include <cppuhelper/propshlp.hxx>
42 #include <cppuhelper/implbase6.hxx>
43 #include <com/sun/star/beans/XMultiPropertySet.hpp>
44 #include <com/sun/star/beans/XMultiPropertyStates.hpp>
45 #include <com/sun/star/beans/XPropertyState.hpp>
46 #include <com/sun/star/lang/XComponent.hpp>
47 #include <com/sun/star/lang/XServiceInfo.hpp>
48 #include <com/sun/star/uno/XComponentContext.hpp>
50 #include <boost/shared_ptr.hpp>
52 namespace chart
55 namespace wrapper
58 class Chart2ModelContact;
60 class UpDownBarWrapper : public MutexContainer
61 , public ::cppu::WeakImplHelper6
62 < ::com::sun::star::lang::XComponent
63 , ::com::sun::star::lang::XServiceInfo
64 , ::com::sun::star::beans::XPropertySet
65 , ::com::sun::star::beans::XMultiPropertySet
66 , ::com::sun::star::beans::XPropertyState
67 , ::com::sun::star::beans::XMultiPropertyStates
68 // , ::com::sun::star::uno::XWeak // implemented by WeakImplHelper(optional interface)
69 // , ::com::sun::star::uno::XInterface // implemented by WeakImplHelper
70 // , ::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper
73 public:
74 UpDownBarWrapper( bool bUp, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
75 virtual ~UpDownBarWrapper();
77 /// XServiceInfo declarations
78 APPHELPER_XSERVICEINFO_DECL()
80 // ____ XComponent ____
81 virtual void SAL_CALL dispose()
82 throw (::com::sun::star::uno::RuntimeException);
83 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference<
84 ::com::sun::star::lang::XEventListener >& xListener )
85 throw (::com::sun::star::uno::RuntimeException);
86 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference<
87 ::com::sun::star::lang::XEventListener >& aListener )
88 throw (::com::sun::star::uno::RuntimeException);
90 //XPropertySet
91 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
93 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);
94 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);
96 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);
97 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);
98 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);
99 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);
101 //XMultiPropertySet
102 //getPropertySetInfo() already declared in XPropertySet
103 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);
104 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);
105 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);
106 virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
107 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);
109 //XPropertyState
110 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
111 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);
112 virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
113 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);
115 //XMultiPropertyStates
116 //getPropertyStates() already declared in XPropertyState
117 virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
118 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);
119 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);
121 private: //methods
122 ::cppu::IPropertyArrayHelper& getInfoHelper();
124 private: //member
125 ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
126 ::cppu::OInterfaceContainerHelper m_aEventListenerContainer;
128 rtl::OUString m_aPropertySetName;
129 ::com::sun::star::uno::Reference<
130 ::com::sun::star::beans::XPropertySetInfo >
131 m_xInfo;//outer PropertySetInfo
132 ::boost::shared_ptr< ::cppu::OPropertyArrayHelper > m_pPropertyArrayHelper;
136 } // namespace wrapper
137 } // namespace chart
139 // CHART_UPDOWNBARWRAPPER_HXX
140 #endif