Paint.cxx (ff12d537) Paint.cxx (95a18594)
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

--- 8 unchanged lines hidden (view full) ---

17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22#include "precompiled_sfx2.hxx"
23
24#include "Paint.hxx"
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

--- 8 unchanged lines hidden (view full) ---

17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22#include "precompiled_sfx2.hxx"
23
24#include "Paint.hxx"
25#include "Tools.hxx"
26#include <com/sun/star/awt/Gradient.hpp>
25
27
28
29using namespace ::com::sun::star;
30
26namespace sfx2 { namespace sidebar {
27
28Paint::Paint (void)
29 : meType(NoPaint)
30{
31}
32
33

--- 12 unchanged lines hidden (view full) ---

46 : meType(GradientPaint),
47 maValue(rGradient)
48{
49}
50
51
52
53
31namespace sfx2 { namespace sidebar {
32
33Paint::Paint (void)
34 : meType(NoPaint)
35{
36}
37
38

--- 12 unchanged lines hidden (view full) ---

51 : meType(GradientPaint),
52 maValue(rGradient)
53{
54}
55
56
57
58
59Paint Paint::Create (const cssu::Any& rValue)
60{
61 ColorData aColor (0);
62 if (rValue >>= aColor)
63 return Paint(Color(aColor));
64
65 awt::Gradient aAwtGradient;
66 if (rValue >>= aAwtGradient)
67 return Paint(Tools::AwtToVclGradient(aAwtGradient));
68
69 return Paint();
70}
71
72
73
74
54void Paint::Set (const Paint& rOther)
55{
56 meType = rOther.meType;
57 maValue = rOther.maValue;
58}
59
60
61

--- 60 unchanged lines hidden ---
75void Paint::Set (const Paint& rOther)
76{
77 meType = rOther.meType;
78 maValue = rOther.maValue;
79}
80
81
82

--- 60 unchanged lines hidden ---