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 24 #ifndef __FRAMEWORK_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX_ 25 #define __FRAMEWORK_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX_ 26 27 #include <threadhelp/threadhelpbase.hxx> 28 #include <cppuhelper/propshlp.hxx> 29 #include <cppuhelper/weak.hxx> 30 #include <osl/mutex.hxx> 31 #include <rtl/ustring.hxx> 32 #include <com/sun/star/lang/XMultiServiceFactory.hpp> 33 #include <com/sun/star/lang/XServiceInfo.hpp> 34 #include <com/sun/star/lang/XTypeProvider.hpp> 35 #include <com/sun/star/lang/IllegalArgumentException.hpp> 36 #include <framework/fwedllapi.h> 37 38 #define SERVICENAME_ACTIONTRIGGERSEPARATOR "com.sun.star.ui.ActionTriggerSeparator" 39 #define IMPLEMENTATIONNAME_ACTIONTRIGGERSEPARATOR "com.sun.star.comp.ui.ActionTriggerSeparator" 40 41 42 namespace framework 43 { 44 45 class ActionTriggerSeparatorPropertySet : public ThreadHelpBase , // Struct for right initialization of mutex member! Must be first of baseclasses. 46 public ::com::sun::star::lang::XServiceInfo , 47 public ::com::sun::star::lang::XTypeProvider, 48 public ::cppu::OBroadcastHelper , 49 public ::cppu::OPropertySetHelper , // -> XPropertySet, XFastPropertySet, XMultiPropertySet 50 public ::cppu::OWeakObject 51 { 52 public: 53 ActionTriggerSeparatorPropertySet( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); 54 virtual ~ActionTriggerSeparatorPropertySet(); 55 56 // XInterface 57 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ); 58 virtual void SAL_CALL acquire() throw (); 59 virtual void SAL_CALL release() throw (); 60 61 // XServiceInfo 62 virtual ::rtl::OUString SAL_CALL getImplementationName( ); 63 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ); 64 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ); 65 66 // XTypeProvider 67 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ); 68 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ); 69 70 private: 71 //--------------------------------------------------------------------------------------------------------- 72 // OPropertySetHelper 73 //--------------------------------------------------------------------------------------------------------- 74 virtual sal_Bool SAL_CALL convertFastPropertyValue( com::sun::star::uno::Any& aConvertedValue, 75 com::sun::star::uno::Any& aOldValue, 76 sal_Int32 nHandle, 77 const com::sun::star::uno::Any& aValue ); 78 79 80 virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& aValue ); 81 82 using cppu::OPropertySetHelper::getFastPropertyValue; 83 virtual void SAL_CALL getFastPropertyValue( com::sun::star::uno::Any& aValue, sal_Int32 nHandle ) const; 84 85 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); 86 87 virtual com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(); 88 89 static const com::sun::star::uno::Sequence< com::sun::star::beans::Property > impl_getStaticPropertyDescriptor(); 90 91 //--------------------------------------------------------------------------------------------------------- 92 // helper 93 //--------------------------------------------------------------------------------------------------------- 94 95 sal_Bool impl_tryToChangeProperty( sal_Int16 aCurrentValue , 96 const com::sun::star::uno::Any& aNewValue , 97 com::sun::star::uno::Any& aOldValue , 98 com::sun::star::uno::Any& aConvertedValue ); 99 100 //--------------------------------------------------------------------------------------------------------- 101 // members 102 //--------------------------------------------------------------------------------------------------------- 103 104 sal_Int16 m_nSeparatorType; 105 }; 106 107 } 108 109 #endif // __FRAMEWORK_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX_ 110