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 #include "precompiled_svx.hxx"
25 
26 #include <svx/sdr/attribute/sdrfilltextattribute.hxx>
27 
28 //////////////////////////////////////////////////////////////////////////////
29 
30 namespace drawinglayer
31 {
32 	namespace attribute
33 	{
SdrFillTextAttribute(const SdrFillAttribute & rFill,const FillGradientAttribute & rFillFloatTransGradient,const SdrTextAttribute & rTextAttribute)34 		SdrFillTextAttribute::SdrFillTextAttribute(
35             const SdrFillAttribute& rFill,
36             const FillGradientAttribute& rFillFloatTransGradient,
37             const SdrTextAttribute& rTextAttribute)
38 		:	maFill(rFill),
39 			maFillFloatTransGradient(rFillFloatTransGradient),
40 			maTextAttribute(rTextAttribute)
41 		{
42 		}
43 
SdrFillTextAttribute()44 		SdrFillTextAttribute::SdrFillTextAttribute()
45 		:	maFill(),
46 			maFillFloatTransGradient(),
47 			maTextAttribute()
48 		{
49 		}
50 
SdrFillTextAttribute(const SdrFillTextAttribute & rCandidate)51 		SdrFillTextAttribute::SdrFillTextAttribute(const SdrFillTextAttribute& rCandidate)
52 		:	maFill(rCandidate.getFill()),
53 			maFillFloatTransGradient(rCandidate.getFillFloatTransGradient()),
54 			maTextAttribute(rCandidate.getText())
55 		{
56 		}
57 
operator =(const SdrFillTextAttribute & rCandidate)58 		SdrFillTextAttribute& SdrFillTextAttribute::operator=(const SdrFillTextAttribute& rCandidate)
59 		{
60 			maFill = rCandidate.getFill();
61 			maFillFloatTransGradient = rCandidate.getFillFloatTransGradient();
62 			maTextAttribute = rCandidate.getText();
63 
64 			return *this;
65 		}
66 
isDefault() const67         bool SdrFillTextAttribute::isDefault() const
68 		{
69 			return(getFill().isDefault()
70 				&& getFillFloatTransGradient().isDefault()
71 				&& getText().isDefault());
72 		}
73 
operator ==(const SdrFillTextAttribute & rCandidate) const74 		bool SdrFillTextAttribute::operator==(const SdrFillTextAttribute& rCandidate) const
75 		{
76 			return(getFill() == rCandidate.getFill()
77 				&& getFillFloatTransGradient() == rCandidate.getFillFloatTransGradient()
78 				&& getText() == rCandidate.getText());
79 		}
80 	} // end of namespace attribute
81 } // end of namespace drawinglayer
82 
83 //////////////////////////////////////////////////////////////////////////////
84 // eof
85