1*f8e07b45SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*f8e07b45SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*f8e07b45SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*f8e07b45SAndrew Rist  * distributed with this work for additional information
6*f8e07b45SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*f8e07b45SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*f8e07b45SAndrew Rist  * "License"); you may not use this file except in compliance
9*f8e07b45SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*f8e07b45SAndrew Rist  *
11*f8e07b45SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*f8e07b45SAndrew Rist  *
13*f8e07b45SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*f8e07b45SAndrew Rist  * software distributed under the License is distributed on an
15*f8e07b45SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*f8e07b45SAndrew Rist  * KIND, either express or implied.  See the License for the
17*f8e07b45SAndrew Rist  * specific language governing permissions and limitations
18*f8e07b45SAndrew Rist  * under the License.
19*f8e07b45SAndrew Rist  *
20*f8e07b45SAndrew Rist  *************************************************************/
21*f8e07b45SAndrew Rist 
22*f8e07b45SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef __FRAMEWORK_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX_
25cdf0e10cSrcweir #define __FRAMEWORK_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <threadhelp/threadhelpbase.hxx>
28cdf0e10cSrcweir #include <cppuhelper/propshlp.hxx>
29cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
30cdf0e10cSrcweir #include <osl/mutex.hxx>
31cdf0e10cSrcweir #include <rtl/ustring.hxx>
32cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
33cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
34cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp>
35cdf0e10cSrcweir #include <com/sun/star/lang/IllegalArgumentException.hpp>
36cdf0e10cSrcweir #include <framework/fwedllapi.h>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir #define SERVICENAME_ACTIONTRIGGERSEPARATOR			"com.sun.star.ui.ActionTriggerSeparator"
39cdf0e10cSrcweir #define IMPLEMENTATIONNAME_ACTIONTRIGGERSEPARATOR	"com.sun.star.comp.ui.ActionTriggerSeparator"
40cdf0e10cSrcweir 
41cdf0e10cSrcweir 
42cdf0e10cSrcweir namespace framework
43cdf0e10cSrcweir {
44cdf0e10cSrcweir 
45cdf0e10cSrcweir class ActionTriggerSeparatorPropertySet :	public ThreadHelpBase						,	// Struct for right initalization of mutex member! Must be first of baseclasses.
46cdf0e10cSrcweir 											public ::com::sun::star::lang::XServiceInfo	,
47cdf0e10cSrcweir 											public ::com::sun::star::lang::XTypeProvider,
48cdf0e10cSrcweir 											public ::cppu::OBroadcastHelper				,
49cdf0e10cSrcweir 											public ::cppu::OPropertySetHelper			,	// -> XPropertySet, XFastPropertySet, XMultiPropertySet
50cdf0e10cSrcweir 											public ::cppu::OWeakObject
51cdf0e10cSrcweir {
52cdf0e10cSrcweir 	public:
53cdf0e10cSrcweir 		ActionTriggerSeparatorPropertySet( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
54cdf0e10cSrcweir 		virtual ~ActionTriggerSeparatorPropertySet();
55cdf0e10cSrcweir 
56cdf0e10cSrcweir 		// XInterface
57cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType )
58cdf0e10cSrcweir 			throw (::com::sun::star::uno::RuntimeException);
59cdf0e10cSrcweir 		virtual void SAL_CALL acquire() throw ();
60cdf0e10cSrcweir 		virtual void SAL_CALL release() throw ();
61cdf0e10cSrcweir 
62cdf0e10cSrcweir 		// XServiceInfo
63cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
64cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
65cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 		// XTypeProvider
68cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw (::com::sun::star::uno::RuntimeException);
69cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw (::com::sun::star::uno::RuntimeException);
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 	private:
72cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
73cdf0e10cSrcweir 		//	OPropertySetHelper
74cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
75cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL convertFastPropertyValue(	com::sun::star::uno::Any&		aConvertedValue,
76cdf0e10cSrcweir 															com::sun::star::uno::Any&		aOldValue,
77cdf0e10cSrcweir 															sal_Int32						nHandle,
78cdf0e10cSrcweir 															const com::sun::star::uno::Any&	aValue			)
79cdf0e10cSrcweir 			throw( com::sun::star::lang::IllegalArgumentException );
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 
82cdf0e10cSrcweir 		virtual void SAL_CALL setFastPropertyValue_NoBroadcast(	sal_Int32 nHandle, const com::sun::star::uno::Any& aValue )
83cdf0e10cSrcweir 			throw( com::sun::star::uno::Exception );
84cdf0e10cSrcweir 
85cdf0e10cSrcweir         using cppu::OPropertySetHelper::getFastPropertyValue;
86cdf0e10cSrcweir 		virtual void SAL_CALL getFastPropertyValue(	com::sun::star::uno::Any& aValue, sal_Int32	nHandle	) const;
87cdf0e10cSrcweir 
88cdf0e10cSrcweir 		virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
89cdf0e10cSrcweir 
90cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo()
91cdf0e10cSrcweir 			throw (::com::sun::star::uno::RuntimeException);
92cdf0e10cSrcweir 
93cdf0e10cSrcweir 		static const com::sun::star::uno::Sequence< com::sun::star::beans::Property > impl_getStaticPropertyDescriptor();
94cdf0e10cSrcweir 
95cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
96cdf0e10cSrcweir 		//	helper
97cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
98cdf0e10cSrcweir 
99cdf0e10cSrcweir 		sal_Bool impl_tryToChangeProperty(	sal_Int16							aCurrentValue	,
100cdf0e10cSrcweir 											const	com::sun::star::uno::Any&	aNewValue		,
101cdf0e10cSrcweir 											com::sun::star::uno::Any&			aOldValue		,
102cdf0e10cSrcweir 											com::sun::star::uno::Any&			aConvertedValue	) throw( com::sun::star::lang::IllegalArgumentException );
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
105cdf0e10cSrcweir 		//	members
106cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
107cdf0e10cSrcweir 
108cdf0e10cSrcweir 		sal_Int16	m_nSeparatorType;
109cdf0e10cSrcweir };
110cdf0e10cSrcweir 
111cdf0e10cSrcweir }
112cdf0e10cSrcweir 
113cdf0e10cSrcweir #endif // __FRAMEWORK_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX_
114