From 86472954f91342e683e4cafa016bc02387dbbb56 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 11 May 2020 18:28:03 +0300 Subject: Rename attributes to reflect that they represent different effects ... not only shadow. In preparation to add soft edge effect (tdf#49247). Change-Id: Ia5b17fff00e1c2d7f717179687dbd44410795a71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94007 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski --- .../sdr/attribute/sdreffectstextattribute.cxx | 73 ++++++++++++++++++++ .../sdr/attribute/sdrlineeffectstextattribute.cxx | 77 +++++++++++++++++++++ .../attribute/sdrlinefilleffectstextattribute.cxx | 79 ++++++++++++++++++++++ .../attribute/sdrlinefillshadowtextattribute.cxx | 79 ---------------------- .../sdr/attribute/sdrlineshadowtextattribute.cxx | 77 --------------------- .../sdr/attribute/sdrshadowtextattribute.cxx | 73 -------------------- 6 files changed, 229 insertions(+), 229 deletions(-) create mode 100644 svx/source/sdr/attribute/sdreffectstextattribute.cxx create mode 100644 svx/source/sdr/attribute/sdrlineeffectstextattribute.cxx create mode 100644 svx/source/sdr/attribute/sdrlinefilleffectstextattribute.cxx delete mode 100644 svx/source/sdr/attribute/sdrlinefillshadowtextattribute.cxx delete mode 100644 svx/source/sdr/attribute/sdrlineshadowtextattribute.cxx delete mode 100644 svx/source/sdr/attribute/sdrshadowtextattribute.cxx (limited to 'svx/source/sdr/attribute') diff --git a/svx/source/sdr/attribute/sdreffectstextattribute.cxx b/svx/source/sdr/attribute/sdreffectstextattribute.cxx new file mode 100644 index 000000000000..05775f0beffa --- /dev/null +++ b/svx/source/sdr/attribute/sdreffectstextattribute.cxx @@ -0,0 +1,73 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#include + + +namespace drawinglayer::attribute +{ + SdrEffectsTextAttribute::SdrEffectsTextAttribute( + const SdrShadowAttribute& rShadow, + const SdrTextAttribute& rTextAttribute, + const SdrGlowAttribute& rGlow) + : maShadow(rShadow), + maTextAttribute(rTextAttribute), + maGlow(rGlow) + { + } + + SdrEffectsTextAttribute::SdrEffectsTextAttribute() + : maShadow(), + maTextAttribute() + { + } + + SdrEffectsTextAttribute::SdrEffectsTextAttribute(const SdrEffectsTextAttribute& rCandidate) + : maShadow(rCandidate.getShadow()), + maTextAttribute(rCandidate.getText()), + maGlow(rCandidate.maGlow) + { + } + + SdrEffectsTextAttribute& SdrEffectsTextAttribute::operator=(const SdrEffectsTextAttribute& rCandidate) + { + maShadow = rCandidate.getShadow(); + maTextAttribute = rCandidate.getText(); + maGlow = rCandidate.maGlow; + + return *this; + } + + bool SdrEffectsTextAttribute::isDefault() const + { + return (getShadow().isDefault() + && getText().isDefault() && maGlow.isDefault()); + } + + bool SdrEffectsTextAttribute::operator==(const SdrEffectsTextAttribute& rCandidate) const + { + return (getShadow() == rCandidate.getShadow() + && getText() == rCandidate.getText() + && getGlow() == rCandidate.getGlow()); + } + +} // end of namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/attribute/sdrlineeffectstextattribute.cxx b/svx/source/sdr/attribute/sdrlineeffectstextattribute.cxx new file mode 100644 index 000000000000..a7a5e265427c --- /dev/null +++ b/svx/source/sdr/attribute/sdrlineeffectstextattribute.cxx @@ -0,0 +1,77 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#include + + +namespace drawinglayer::attribute +{ + SdrLineEffectsTextAttribute::SdrLineEffectsTextAttribute( + const SdrLineAttribute& rLine, + const SdrLineStartEndAttribute& rLineStartEnd, + const SdrShadowAttribute& rShadow, + const SdrTextAttribute& rTextAttribute, + const SdrGlowAttribute& rGlow) + : SdrEffectsTextAttribute(rShadow, rTextAttribute, rGlow), + maLine(rLine), + maLineStartEnd(rLineStartEnd) + { + } + + SdrLineEffectsTextAttribute::SdrLineEffectsTextAttribute() + : SdrEffectsTextAttribute(), + maLine(), + maLineStartEnd() + { + } + + SdrLineEffectsTextAttribute::SdrLineEffectsTextAttribute(const SdrLineEffectsTextAttribute& rCandidate) + : SdrEffectsTextAttribute(rCandidate), + maLine(rCandidate.getLine()), + maLineStartEnd(rCandidate.getLineStartEnd()) + { + } + + SdrLineEffectsTextAttribute& SdrLineEffectsTextAttribute::operator=(const SdrLineEffectsTextAttribute& rCandidate) + { + SdrEffectsTextAttribute::operator=(rCandidate); + maLine = rCandidate.getLine(); + maLineStartEnd = rCandidate.getLineStartEnd(); + + return *this; + } + + bool SdrLineEffectsTextAttribute::isDefault() const + { + return(SdrEffectsTextAttribute::isDefault() + && getLine().isDefault() + && getLineStartEnd().isDefault()); + } + + bool SdrLineEffectsTextAttribute::operator==(const SdrLineEffectsTextAttribute& rCandidate) const + { + return(SdrEffectsTextAttribute::operator==(rCandidate) + && getLine() == rCandidate.getLine() + && getLineStartEnd() == rCandidate.getLineStartEnd()); + } + +} // end of namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/attribute/sdrlinefilleffectstextattribute.cxx b/svx/source/sdr/attribute/sdrlinefilleffectstextattribute.cxx new file mode 100644 index 000000000000..6200b7b51308 --- /dev/null +++ b/svx/source/sdr/attribute/sdrlinefilleffectstextattribute.cxx @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#include + + +namespace drawinglayer::attribute +{ + SdrLineFillEffectsTextAttribute::SdrLineFillEffectsTextAttribute( + const SdrLineAttribute& rLine, + const SdrFillAttribute& rFill, + const SdrLineStartEndAttribute& rLineStartEnd, + const SdrShadowAttribute& rShadow, + const FillGradientAttribute& rFillFloatTransGradient, + const SdrTextAttribute& rTextAttribute, + const SdrGlowAttribute& rGlow) + : SdrLineEffectsTextAttribute(rLine, rLineStartEnd, rShadow, rTextAttribute, rGlow), + maFill(rFill), + maFillFloatTransGradient(rFillFloatTransGradient) + { + } + + SdrLineFillEffectsTextAttribute::SdrLineFillEffectsTextAttribute() + : SdrLineEffectsTextAttribute(), + maFill(), + maFillFloatTransGradient() + { + } + + SdrLineFillEffectsTextAttribute::SdrLineFillEffectsTextAttribute(const SdrLineFillEffectsTextAttribute& rCandidate) + : SdrLineEffectsTextAttribute(rCandidate), + maFill(rCandidate.getFill()), + maFillFloatTransGradient(rCandidate.getFillFloatTransGradient()) + { + } + + SdrLineFillEffectsTextAttribute& SdrLineFillEffectsTextAttribute::operator=(const SdrLineFillEffectsTextAttribute& rCandidate) + { + SdrLineEffectsTextAttribute::operator=(rCandidate); + maFill = rCandidate.getFill(); + maFillFloatTransGradient = rCandidate.getFillFloatTransGradient(); + + return *this; + } + + bool SdrLineFillEffectsTextAttribute::isDefault() const + { + return (SdrLineEffectsTextAttribute::isDefault() + && getFill().isDefault() + && getFillFloatTransGradient().isDefault()); + } + + bool SdrLineFillEffectsTextAttribute::operator==(const SdrLineFillEffectsTextAttribute& rCandidate) const + { + return(SdrLineEffectsTextAttribute::operator==(rCandidate) + && getFill() == rCandidate.getFill() + && getFillFloatTransGradient() == rCandidate.getFillFloatTransGradient()); + } + +} // end of namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/attribute/sdrlinefillshadowtextattribute.cxx b/svx/source/sdr/attribute/sdrlinefillshadowtextattribute.cxx deleted file mode 100644 index 9ecbf331961e..000000000000 --- a/svx/source/sdr/attribute/sdrlinefillshadowtextattribute.cxx +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include - - -namespace drawinglayer::attribute -{ - SdrLineFillShadowTextAttribute::SdrLineFillShadowTextAttribute( - const SdrLineAttribute& rLine, - const SdrFillAttribute& rFill, - const SdrLineStartEndAttribute& rLineStartEnd, - const SdrShadowAttribute& rShadow, - const FillGradientAttribute& rFillFloatTransGradient, - const SdrTextAttribute& rTextAttribute, - const SdrGlowAttribute& rGlow) - : SdrLineShadowTextAttribute(rLine, rLineStartEnd, rShadow, rTextAttribute, rGlow), - maFill(rFill), - maFillFloatTransGradient(rFillFloatTransGradient) - { - } - - SdrLineFillShadowTextAttribute::SdrLineFillShadowTextAttribute() - : SdrLineShadowTextAttribute(), - maFill(), - maFillFloatTransGradient() - { - } - - SdrLineFillShadowTextAttribute::SdrLineFillShadowTextAttribute(const SdrLineFillShadowTextAttribute& rCandidate) - : SdrLineShadowTextAttribute(rCandidate), - maFill(rCandidate.getFill()), - maFillFloatTransGradient(rCandidate.getFillFloatTransGradient()) - { - } - - SdrLineFillShadowTextAttribute& SdrLineFillShadowTextAttribute::operator=(const SdrLineFillShadowTextAttribute& rCandidate) - { - SdrLineShadowTextAttribute::operator=(rCandidate); - maFill = rCandidate.getFill(); - maFillFloatTransGradient = rCandidate.getFillFloatTransGradient(); - - return *this; - } - - bool SdrLineFillShadowTextAttribute::isDefault() const - { - return (SdrLineShadowTextAttribute::isDefault() - && getFill().isDefault() - && getFillFloatTransGradient().isDefault()); - } - - bool SdrLineFillShadowTextAttribute::operator==(const SdrLineFillShadowTextAttribute& rCandidate) const - { - return(SdrLineShadowTextAttribute::operator==(rCandidate) - && getFill() == rCandidate.getFill() - && getFillFloatTransGradient() == rCandidate.getFillFloatTransGradient()); - } - -} // end of namespace - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/attribute/sdrlineshadowtextattribute.cxx b/svx/source/sdr/attribute/sdrlineshadowtextattribute.cxx deleted file mode 100644 index 667a996d1379..000000000000 --- a/svx/source/sdr/attribute/sdrlineshadowtextattribute.cxx +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include - - -namespace drawinglayer::attribute -{ - SdrLineShadowTextAttribute::SdrLineShadowTextAttribute( - const SdrLineAttribute& rLine, - const SdrLineStartEndAttribute& rLineStartEnd, - const SdrShadowAttribute& rShadow, - const SdrTextAttribute& rTextAttribute, - const SdrGlowAttribute& rGlow) - : SdrShadowTextAttribute(rShadow, rTextAttribute, rGlow), - maLine(rLine), - maLineStartEnd(rLineStartEnd) - { - } - - SdrLineShadowTextAttribute::SdrLineShadowTextAttribute() - : SdrShadowTextAttribute(), - maLine(), - maLineStartEnd() - { - } - - SdrLineShadowTextAttribute::SdrLineShadowTextAttribute(const SdrLineShadowTextAttribute& rCandidate) - : SdrShadowTextAttribute(rCandidate), - maLine(rCandidate.getLine()), - maLineStartEnd(rCandidate.getLineStartEnd()) - { - } - - SdrLineShadowTextAttribute& SdrLineShadowTextAttribute::operator=(const SdrLineShadowTextAttribute& rCandidate) - { - SdrShadowTextAttribute::operator=(rCandidate); - maLine = rCandidate.getLine(); - maLineStartEnd = rCandidate.getLineStartEnd(); - - return *this; - } - - bool SdrLineShadowTextAttribute::isDefault() const - { - return(SdrShadowTextAttribute::isDefault() - && getLine().isDefault() - && getLineStartEnd().isDefault()); - } - - bool SdrLineShadowTextAttribute::operator==(const SdrLineShadowTextAttribute& rCandidate) const - { - return(SdrShadowTextAttribute::operator==(rCandidate) - && getLine() == rCandidate.getLine() - && getLineStartEnd() == rCandidate.getLineStartEnd()); - } - -} // end of namespace - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/attribute/sdrshadowtextattribute.cxx b/svx/source/sdr/attribute/sdrshadowtextattribute.cxx deleted file mode 100644 index b8f48cd1f57e..000000000000 --- a/svx/source/sdr/attribute/sdrshadowtextattribute.cxx +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include - - -namespace drawinglayer::attribute -{ - SdrShadowTextAttribute::SdrShadowTextAttribute( - const SdrShadowAttribute& rShadow, - const SdrTextAttribute& rTextAttribute, - const SdrGlowAttribute& rGlow) - : maShadow(rShadow), - maTextAttribute(rTextAttribute), - maGlow(rGlow) - { - } - - SdrShadowTextAttribute::SdrShadowTextAttribute() - : maShadow(), - maTextAttribute() - { - } - - SdrShadowTextAttribute::SdrShadowTextAttribute(const SdrShadowTextAttribute& rCandidate) - : maShadow(rCandidate.getShadow()), - maTextAttribute(rCandidate.getText()), - maGlow(rCandidate.maGlow) - { - } - - SdrShadowTextAttribute& SdrShadowTextAttribute::operator=(const SdrShadowTextAttribute& rCandidate) - { - maShadow = rCandidate.getShadow(); - maTextAttribute = rCandidate.getText(); - maGlow = rCandidate.maGlow; - - return *this; - } - - bool SdrShadowTextAttribute::isDefault() const - { - return (getShadow().isDefault() - && getText().isDefault() && maGlow.isDefault()); - } - - bool SdrShadowTextAttribute::operator==(const SdrShadowTextAttribute& rCandidate) const - { - return (getShadow() == rCandidate.getShadow() - && getText() == rCandidate.getText() - && getGlow() == rCandidate.getGlow()); - } - -} // end of namespace - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit