fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / framework / inc / classes / actiontriggerpropertyset.hxx
blob66e6c1dda5939fc3189a4505b0729ff034440878
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERPROPERTYSET_HXX
21 #define INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERPROPERTYSET_HXX
23 #include <cppuhelper/basemutex.hxx>
24 #include <cppuhelper/propshlp.hxx>
25 #include <cppuhelper/weak.hxx>
26 #include <osl/mutex.hxx>
27 #include <rtl/ustring.hxx>
29 #include <com/sun/star/awt/XBitmap.hpp>
30 #include <com/sun/star/lang/XServiceInfo.hpp>
31 #include <com/sun/star/lang/XTypeProvider.hpp>
32 #include <com/sun/star/lang/IllegalArgumentException.hpp>
33 #include <framework/fwedllapi.h>
35 #define SERVICENAME_ACTIONTRIGGER "com.sun.star.ui.ActionTrigger"
36 #define IMPLEMENTATIONNAME_ACTIONTRIGGER "com.sun.star.comp.ui.ActionTrigger"
38 namespace framework
41 class ActionTriggerPropertySet : private cppu::BaseMutex,
42 public ::com::sun::star::lang::XServiceInfo ,
43 public ::com::sun::star::lang::XTypeProvider,
44 public ::cppu::OBroadcastHelper ,
45 public ::cppu::OPropertySetHelper , // -> XPropertySet, XFastPropertySet, XMultiPropertySet
46 public ::cppu::OWeakObject
48 public:
49 FWE_DLLPUBLIC ActionTriggerPropertySet();
50 FWE_DLLPUBLIC virtual ~ActionTriggerPropertySet();
52 // XInterface
53 virtual FWE_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType )
54 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
55 virtual FWE_DLLPUBLIC void SAL_CALL acquire() throw () SAL_OVERRIDE;
56 virtual FWE_DLLPUBLIC void SAL_CALL release() throw () SAL_OVERRIDE;
58 // XServiceInfo
59 virtual FWE_DLLPUBLIC OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 virtual FWE_DLLPUBLIC sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
61 virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
63 // XTypeProvider
64 virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
65 virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
67 private:
69 // OPropertySetHelper
71 virtual sal_Bool SAL_CALL convertFastPropertyValue( com::sun::star::uno::Any& aConvertedValue,
72 com::sun::star::uno::Any& aOldValue,
73 sal_Int32 nHandle,
74 const com::sun::star::uno::Any& aValue )
75 throw( com::sun::star::lang::IllegalArgumentException ) SAL_OVERRIDE;
77 virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& aValue )
78 throw( com::sun::star::uno::Exception, std::exception ) SAL_OVERRIDE;
80 using cppu::OPropertySetHelper::getFastPropertyValue;
81 virtual void SAL_CALL getFastPropertyValue( com::sun::star::uno::Any& aValue, sal_Int32 nHandle ) const SAL_OVERRIDE;
83 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
85 virtual com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo()
86 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
88 static const com::sun::star::uno::Sequence< com::sun::star::beans::Property > impl_getStaticPropertyDescriptor();
90 // helper
92 bool impl_tryToChangeProperty( const OUString& aCurrentValue ,
93 const com::sun::star::uno::Any& aNewValue ,
94 com::sun::star::uno::Any& aOldValue ,
95 com::sun::star::uno::Any& aConvertedValue ) throw( com::sun::star::lang::IllegalArgumentException );
97 bool impl_tryToChangeProperty( const com::sun::star::uno::Reference< com::sun::star::awt::XBitmap > xBitmap,
98 const com::sun::star::uno::Any& aNewValue ,
99 com::sun::star::uno::Any& aOldValue ,
100 com::sun::star::uno::Any& aConvertedValue ) throw( com::sun::star::lang::IllegalArgumentException );
102 bool impl_tryToChangeProperty( const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > xInterface,
103 const com::sun::star::uno::Any& aNewValue ,
104 com::sun::star::uno::Any& aOldValue ,
105 com::sun::star::uno::Any& aConvertedValue ) throw( com::sun::star::lang::IllegalArgumentException );
107 // members
109 OUString m_aCommandURL;
110 OUString m_aHelpURL;
111 OUString m_aText;
112 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap > m_xBitmap;
113 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xActionTriggerContainer;
118 #endif // INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERPROPERTYSET_HXX
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */