Line data Source code
1 : #ifndef INCLUDED_COM_SUN_STAR_AWT_GRADIENT_HPP
2 : #define INCLUDED_COM_SUN_STAR_AWT_GRADIENT_HPP
3 :
4 : #include "sal/config.h"
5 :
6 : #include "com/sun/star/awt/Gradient.hdl"
7 :
8 : #include "com/sun/star/awt/GradientStyle.hpp"
9 : #include "com/sun/star/util/Color.hpp"
10 : #include "com/sun/star/uno/Type.hxx"
11 : #include "cppu/unotype.hxx"
12 : #include "sal/types.h"
13 : #include "typelib/typeclass.h"
14 : #include "typelib/typedescription.h"
15 :
16 : namespace com { namespace sun { namespace star { namespace awt {
17 :
18 1122 : inline Gradient::Gradient() SAL_THROW(())
19 : : Style(css::awt::GradientStyle_LINEAR)
20 : , StartColor(0)
21 : , EndColor(0)
22 : , Angle(0)
23 : , Border(0)
24 : , XOffset(0)
25 : , YOffset(0)
26 : , StartIntensity(0)
27 : , EndIntensity(0)
28 1122 : , StepCount(0)
29 : {
30 1122 : }
31 :
32 0 : inline Gradient::Gradient(const css::awt::GradientStyle& Style_, const ::sal_Int32& StartColor_, const ::sal_Int32& EndColor_, const ::sal_Int16& Angle_, const ::sal_Int16& Border_, const ::sal_Int16& XOffset_, const ::sal_Int16& YOffset_, const ::sal_Int16& StartIntensity_, const ::sal_Int16& EndIntensity_, const ::sal_Int16& StepCount_) SAL_THROW(())
33 : : Style(Style_)
34 : , StartColor(StartColor_)
35 : , EndColor(EndColor_)
36 : , Angle(Angle_)
37 : , Border(Border_)
38 : , XOffset(XOffset_)
39 : , YOffset(YOffset_)
40 : , StartIntensity(StartIntensity_)
41 : , EndIntensity(EndIntensity_)
42 0 : , StepCount(StepCount_)
43 : {
44 0 : }
45 :
46 : } } } }
47 :
48 : namespace com { namespace sun { namespace star { namespace awt {
49 :
50 1423 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::awt::Gradient const *) {
51 : //TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage
52 : static ::typelib_TypeDescriptionReference * the_type = 0;
53 1423 : if (the_type == 0) {
54 66 : ::typelib_static_type_init(&the_type, typelib_TypeClass_STRUCT, "com.sun.star.awt.Gradient");
55 : }
56 1423 : return *reinterpret_cast< ::com::sun::star::uno::Type * >(&the_type);
57 : }
58 :
59 : } } } }
60 :
61 289 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER css::awt::Gradient const *) SAL_THROW(()) {
62 289 : return ::cppu::UnoType< css::awt::Gradient >::get();
63 : }
64 :
65 : #endif // INCLUDED_COM_SUN_STAR_AWT_GRADIENT_HPP
|