Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Caolan McNamara wrote:
963c6b655032b4e5d0f26555f3c26a129a9efb03 in slideshow. The RGBColor copy
constructor is wrong, which means that colors in e.g. font color
transitions are always black to black, i.e. transitions appear to get
lost.

I reckon we should stick this into 3.3, what do you think ?

Hi Caolan,

good catch - indeed. But I'd suggest attached patch, both methods
are just fine when auto-generated by the compiler.

Cheers,

-- Thorsten
From 35a6e32b9edfea1a9bb390d8e3046a9267acd05f Mon Sep 17 00:00:00 2001
From: Thorsten Behrens <tbehrens@novell.com>
Date: Sat, 18 Dec 2010 21:41:59 +0100
Subject: [PATCH] Remove extraneous copy ctor and assignment op

---
 slideshow/source/engine/color.cxx |   13 -------------
 slideshow/source/inc/rgbcolor.hxx |    3 ---
 2 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/slideshow/source/engine/color.cxx b/slideshow/source/engine/color.cxx
index 4e65fc5..1da2c12 100644
--- a/slideshow/source/engine/color.cxx
+++ b/slideshow/source/engine/color.cxx
@@ -266,19 +266,6 @@ namespace slideshow
             return RGBColor( aColor.mnRed, aColor.mnGreen, aColor.mnBlue );
         }
          
-        RGBColor::RGBColor(const RGBColor& rLHS)
-        {
-            RGBColor(rLHS.getRed(), rLHS.getGreen(), rLHS.getBlue());          
-        }
-
-        RGBColor& RGBColor::operator=( const RGBColor& rLHS ){
-
-            maRGBTriple.mnRed = rLHS.getRed();
-            maRGBTriple.mnGreen = rLHS.getGreen();
-            maRGBTriple.mnBlue = rLHS.getBlue();
-            return *this;
-        }        
-
         HSLColor operator+( const HSLColor& rLHS, const HSLColor& rRHS )
         {
             return HSLColor( rLHS.getHue() + rRHS.getHue(),
diff --git a/slideshow/source/inc/rgbcolor.hxx b/slideshow/source/inc/rgbcolor.hxx
index fd27859..202fd81 100644
--- a/slideshow/source/inc/rgbcolor.hxx
+++ b/slideshow/source/inc/rgbcolor.hxx
@@ -88,9 +88,6 @@ namespace slideshow
              */
             ::cppcanvas::Color::IntSRGBA getIntegerColor() const;
  
-            RGBColor(const RGBColor& rLHS);
-            RGBColor& operator=( const RGBColor& rLHS); 
-
             struct RGBTriple
             {
                 RGBTriple();
-- 
1.7.1

Attachment: pgpfSP4yHWPss.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.