/src/libreoffice/svx/source/sdr/attribute/sdreffectstextattribute.cxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | * |
9 | | * This file incorporates work covered by the following license notice: |
10 | | * |
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 . |
18 | | */ |
19 | | |
20 | | |
21 | | #include <sdr/attribute/sdreffectstextattribute.hxx> |
22 | | #include <utility> |
23 | | |
24 | | |
25 | | namespace drawinglayer::attribute |
26 | | { |
27 | | SdrEffectsTextAttribute::SdrEffectsTextAttribute( |
28 | | SdrShadowAttribute aShadow, |
29 | | SdrTextAttribute aTextAttribute, |
30 | | SdrGlowAttribute aGlow, |
31 | | SdrGlowTextAttribute aGlowText, |
32 | | sal_Int32 nSoftEdgeRadius) |
33 | 2.22k | : maShadow(std::move(aShadow)), |
34 | 2.22k | maTextAttribute(std::move(aTextAttribute)), |
35 | 2.22k | maGlow(std::move(aGlow)), |
36 | 2.22k | maGlowText(std::move(aGlowText)), |
37 | 2.22k | mnSoftEdgeRadius(nSoftEdgeRadius) |
38 | 2.22k | { |
39 | 2.22k | } |
40 | | |
41 | | SdrEffectsTextAttribute::SdrEffectsTextAttribute() |
42 | 0 | { |
43 | 0 | } |
44 | | |
45 | | SdrEffectsTextAttribute::SdrEffectsTextAttribute(const SdrEffectsTextAttribute& rCandidate) |
46 | 1.56k | : maShadow(rCandidate.getShadow()), |
47 | 1.56k | maTextAttribute(rCandidate.getText()), |
48 | 1.56k | maGlow(rCandidate.maGlow), |
49 | 1.56k | maGlowText(rCandidate.maGlowText), |
50 | 1.56k | mnSoftEdgeRadius(rCandidate.mnSoftEdgeRadius) |
51 | 1.56k | { |
52 | 1.56k | } |
53 | | |
54 | | SdrEffectsTextAttribute& SdrEffectsTextAttribute::operator=(const SdrEffectsTextAttribute& rCandidate) |
55 | 0 | { |
56 | 0 | maShadow = rCandidate.getShadow(); |
57 | 0 | maTextAttribute = rCandidate.getText(); |
58 | 0 | maGlow = rCandidate.maGlow; |
59 | 0 | maGlowText = rCandidate.maGlowText; |
60 | 0 | mnSoftEdgeRadius = rCandidate.mnSoftEdgeRadius; |
61 | |
|
62 | 0 | return *this; |
63 | 0 | } |
64 | | |
65 | | bool SdrEffectsTextAttribute::isDefault() const |
66 | 0 | { |
67 | 0 | return (getShadow().isDefault() |
68 | 0 | && getText().isDefault() && maGlow.isDefault() |
69 | 0 | && maGlowText.isDefault() && getSoftEdgeRadius() == 0); |
70 | 0 | } |
71 | | |
72 | | bool SdrEffectsTextAttribute::operator==(const SdrEffectsTextAttribute& rCandidate) const |
73 | 666 | { |
74 | 666 | return (getShadow() == rCandidate.getShadow() |
75 | 666 | && getText() == rCandidate.getText() |
76 | 666 | && getGlow() == rCandidate.getGlow() |
77 | 666 | && getGlowText() == rCandidate.getGlowText() |
78 | 666 | && getSoftEdgeRadius() == rCandidate.getSoftEdgeRadius()); |
79 | 666 | } |
80 | | |
81 | | } // end of namespace |
82 | | |
83 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |