xref: /trunk/main/svx/source/sdr/attribute/sdrlinefillshadowtextattribute.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2008 by Sun Microsystems, Inc.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * $RCSfile: sdrallattribute.cxx,v $
10  *
11  * $Revision: 1.2 $
12  *
13  * This file is part of OpenOffice.org.
14  *
15  * OpenOffice.org is free software: you can redistribute it and/or modify
16  * it under the terms of the GNU Lesser General Public License version 3
17  * only, as published by the Free Software Foundation.
18  *
19  * OpenOffice.org is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU Lesser General Public License version 3 for more details
23  * (a copy is included in the LICENSE file that accompanied this code).
24  *
25  * You should have received a copy of the GNU Lesser General Public License
26  * version 3 along with OpenOffice.org.  If not, see
27  * <http://www.openoffice.org/license.html>
28  * for a copy of the LGPLv3 License.
29  *
30  ************************************************************************/
31 
32 #include "precompiled_svx.hxx"
33 
34 #include <svx/sdr/attribute/sdrlinefillshadowtextattribute.hxx>
35 
36 //////////////////////////////////////////////////////////////////////////////
37 
38 namespace drawinglayer
39 {
40     namespace attribute
41     {
42         SdrLineFillShadowTextAttribute::SdrLineFillShadowTextAttribute(
43             const SdrLineAttribute& rLine,
44             const SdrFillAttribute& rFill,
45             const SdrLineStartEndAttribute& rLineStartEnd,
46             const SdrShadowAttribute& rShadow,
47             const FillGradientAttribute& rFillFloatTransGradient,
48             const SdrTextAttribute& rTextAttribute)
49         :   SdrLineShadowTextAttribute(rLine, rLineStartEnd, rShadow, rTextAttribute),
50             maFill(rFill),
51             maFillFloatTransGradient(rFillFloatTransGradient)
52         {
53         }
54 
55         SdrLineFillShadowTextAttribute::SdrLineFillShadowTextAttribute()
56         :   SdrLineShadowTextAttribute(),
57             maFill(),
58             maFillFloatTransGradient()
59         {
60         }
61 
62         SdrLineFillShadowTextAttribute::SdrLineFillShadowTextAttribute(const SdrLineFillShadowTextAttribute& rCandidate)
63         :   SdrLineShadowTextAttribute(rCandidate),
64             maFill(rCandidate.getFill()),
65             maFillFloatTransGradient(rCandidate.getFillFloatTransGradient())
66         {
67         }
68 
69         SdrLineFillShadowTextAttribute& SdrLineFillShadowTextAttribute::operator=(const SdrLineFillShadowTextAttribute& rCandidate)
70         {
71             SdrLineShadowTextAttribute::operator=(rCandidate);
72             maFill = rCandidate.getFill();
73             maFillFloatTransGradient = rCandidate.getFillFloatTransGradient();
74 
75             return *this;
76         }
77 
78         bool SdrLineFillShadowTextAttribute::isDefault() const
79         {
80             return (SdrLineShadowTextAttribute::isDefault()
81                 && getFill().isDefault()
82                 && getFillFloatTransGradient().isDefault());
83         }
84 
85         bool SdrLineFillShadowTextAttribute::operator==(const SdrLineFillShadowTextAttribute& rCandidate) const
86         {
87             return(SdrLineShadowTextAttribute::operator==(rCandidate)
88                 && getFill() == rCandidate.getFill()
89                 && getFillFloatTransGradient() == rCandidate.getFillFloatTransGradient());
90         }
91     } // end of namespace attribute
92 } // end of namespace drawinglayer
93 
94 //////////////////////////////////////////////////////////////////////////////
95 // eof
96