1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: actiontriggerseparatorpropertyset.hxx,v $
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 ************************************************************************/
31 #ifndef __FRAMEWORK_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX_
32 #define __FRAMEWORK_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX_
34 #include <threadhelp/threadhelpbase.hxx>
35 #include <cppuhelper/propshlp.hxx>
36 #include <cppuhelper/weak.hxx>
37 #include <osl/mutex.hxx>
38 #include <rtl/ustring.hxx>
39 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
40 #include <com/sun/star/lang/XServiceInfo.hpp>
41 #include <com/sun/star/lang/XTypeProvider.hpp>
42 #include <com/sun/star/lang/IllegalArgumentException.hpp>
44 #define SERVICENAME_ACTIONTRIGGERSEPARATOR "com.sun.star.ui.ActionTriggerSeparator"
45 #define IMPLEMENTATIONNAME_ACTIONTRIGGERSEPARATOR "com.sun.star.comp.ui.ActionTriggerSeparator"
50 class ActionTriggerSeparatorPropertySet
: public ThreadHelpBase
, // Struct for right initalization of mutex member! Must be first of baseclasses.
51 public ::com::sun::star::lang::XServiceInfo
,
52 public ::com::sun::star::lang::XTypeProvider
,
53 public ::cppu::OBroadcastHelper
,
54 public ::cppu::OPropertySetHelper
, // -> XPropertySet, XFastPropertySet, XMultiPropertySet
55 public ::cppu::OWeakObject
58 ActionTriggerSeparatorPropertySet( const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& xServiceManager
);
59 virtual ~ActionTriggerSeparatorPropertySet();
62 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
)
63 throw (::com::sun::star::uno::RuntimeException
);
64 virtual void SAL_CALL
acquire() throw ();
65 virtual void SAL_CALL
release() throw ();
68 virtual ::rtl::OUString SAL_CALL
getImplementationName( ) throw (::com::sun::star::uno::RuntimeException
);
69 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
) throw (::com::sun::star::uno::RuntimeException
);
70 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException
);
73 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw (::com::sun::star::uno::RuntimeException
);
74 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw (::com::sun::star::uno::RuntimeException
);
77 //---------------------------------------------------------------------------------------------------------
79 //---------------------------------------------------------------------------------------------------------
80 virtual sal_Bool SAL_CALL
convertFastPropertyValue( com::sun::star::uno::Any
& aConvertedValue
,
81 com::sun::star::uno::Any
& aOldValue
,
83 const com::sun::star::uno::Any
& aValue
)
84 throw( com::sun::star::lang::IllegalArgumentException
);
87 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast( sal_Int32 nHandle
, const com::sun::star::uno::Any
& aValue
)
88 throw( com::sun::star::uno::Exception
);
90 using cppu::OPropertySetHelper::getFastPropertyValue
;
91 virtual void SAL_CALL
getFastPropertyValue( com::sun::star::uno::Any
& aValue
, sal_Int32 nHandle
) const;
93 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
95 virtual com::sun::star::uno::Reference
< com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo()
96 throw (::com::sun::star::uno::RuntimeException
);
98 static const com::sun::star::uno::Sequence
< com::sun::star::beans::Property
> impl_getStaticPropertyDescriptor();
100 //---------------------------------------------------------------------------------------------------------
102 //---------------------------------------------------------------------------------------------------------
104 sal_Bool
impl_tryToChangeProperty( sal_Int16 aCurrentValue
,
105 const com::sun::star::uno::Any
& aNewValue
,
106 com::sun::star::uno::Any
& aOldValue
,
107 com::sun::star::uno::Any
& aConvertedValue
) throw( com::sun::star::lang::IllegalArgumentException
);
109 //---------------------------------------------------------------------------------------------------------
111 //---------------------------------------------------------------------------------------------------------
113 sal_Int16 m_nSeparatorType
;
118 #endif // __FRAMEWORK_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX_