[ooo-build-commit] .: patches/dev300

Thorsten Behrens thorsten at kemper.freedesktop.org
Wed Feb 17 04:07:19 PST 2010


 patches/dev300/apply                       |    1 
 patches/dev300/basegfx-colorspace-fix.diff |   38 +++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)

New commits:
commit bec35b9ae813778b09706628bc252dcf1db12d9c
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Wed Feb 17 13:02:48 2010 +0100

    Fix bug in colorspace calculation
    
    * patches/dev300/apply: added the patch
    * patches/dev300/basegfx-colorspace-fix.diff: fix for rgb2hsl plus
      test case; thx Cedric for spotting it.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index b83dee3..dc710c0 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3594,6 +3594,7 @@ svx-validate-paradepth.diff, thorsten
 vcl-pngread-greypalette-fix.diff, thorsten
 svx-textpropreader-limit-fix.diff, thorsten
 vcl-xinerama-clone-fix.diff, n#578730, thorsten
+basegfx-colorspace-fix.diff, i#109364, thorsten
 
 [ Toolbars ]
 SectionOwner => cbosdo
diff --git a/patches/dev300/basegfx-colorspace-fix.diff b/patches/dev300/basegfx-colorspace-fix.diff
new file mode 100644
index 0000000..9128287
--- /dev/null
+++ b/patches/dev300/basegfx-colorspace-fix.diff
@@ -0,0 +1,38 @@
+Fix a bug in rgb2hsl method - thx Cedric for finding
+
+From: Thorsten Behrens <tbehrens at novell.com>
+
+
+---
+
+ basegfx/source/color/bcolortools.cxx |    2 +-
+ basegfx/test/basegfx2d.cxx           |    2 ++
+ 2 files changed, 3 insertions(+), 1 deletions(-)
+
+
+diff --git basegfx/source/color/bcolortools.cxx basegfx/source/color/bcolortools.cxx
+index 5e55e55..d20887d 100644
+--- basegfx/source/color/bcolortools.cxx
++++ basegfx/source/color/bcolortools.cxx
+@@ -65,7 +65,7 @@ namespace basegfx { namespace tools
+             else if( g == maxVal )
+                 h = 2.0 + (b - r)/d;
+             else
+-                h = 4.0 + (r - h)/d;
++                h = 4.0 + (r - g)/d;
+ 
+             h *= 60.0;
+ 
+diff --git basegfx/test/basegfx2d.cxx basegfx/test/basegfx2d.cxx
+index 1bb14b8..3eb6d7e 100644
+--- basegfx/test/basegfx2d.cxx
++++ basegfx/test/basegfx2d.cxx
+@@ -1497,6 +1497,8 @@ public:
+                                tools::rgb2hsl(maMagenta) == BColor(300,1,0.5));
+         CPPUNIT_ASSERT_MESSAGE("cyan", 
+                                tools::rgb2hsl(maCyan) == BColor(180,1,0.5));
++        CPPUNIT_ASSERT_MESSAGE("third hue case", 
++                               tools::rgb2hsl(BColor(0,0.5,1)) == BColor(210,1,0.5));
+ 
+         CPPUNIT_ASSERT_MESSAGE("roundtrip white", 
+                                tools::hsl2rgb(tools::rgb2hsl(maWhite)) == maWhite);


More information about the ooo-build-commit mailing list