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


Thanks to Norbert Thiebauld a small patch to remove direct use of an RGB-colour from the code.

Winfried
From 31348488869937de80ed78f49730538919f1d3be Mon Sep 17 00:00:00 2001
From: Winfried Donkers <osc@dci-electronics.nl>
Date: Mon, 27 Feb 2012 16:21:33 +0100
Subject: [PATCH] fdo44516 cleanup of direct use of color in code

---
 sw/source/ui/envelp/labfmt.cxx |    2 +-
 tools/inc/tools/color.hxx      |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 6ec2a79..d5208dd 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -173,7 +173,7 @@ void SwLabPreview::Paint(const Rectangle &)
 
     // Labels
     SetClipRegion (Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH)));
-    SetFillColor( Color( 0xE0, 0xE0, 0xFF ) );
+    SetFillColor( COL_LIGHTGRAYBLUE );
     for (sal_uInt16 nRow = 0; nRow < Min((sal_uInt16) 2, (sal_uInt16) aItem.nRows); nRow++)
         for (sal_uInt16 nCol = 0; nCol < Min((sal_uInt16) 2, (sal_uInt16) aItem.nCols); nCol++)
             DrawRect(Rectangle(
diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx
index a9fe589..4594de6 100644
--- a/tools/inc/tools/color.hxx
+++ b/tools/inc/tools/color.hxx
@@ -74,6 +74,7 @@ typedef sal_uInt32 ColorData;
 #define COL_LIGHTCYAN               RGB_COLORDATA( 0x00, 0xFF, 0xFF )
 #define COL_LIGHTRED                RGB_COLORDATA( 0xFF, 0x00, 0x00 )
 #define COL_LIGHTMAGENTA            RGB_COLORDATA( 0xFF, 0x00, 0xFF )
+#define COL_LIGHTGRAYBLUE           RGB_COLORDATA( 0xE0, 0xE0, 0xFF )
 #define COL_YELLOW                  RGB_COLORDATA( 0xFF, 0xFF, 0x00 )
 #define COL_WHITE                   RGB_COLORDATA( 0xFF, 0xFF, 0xFF )
 #define COL_TRANSPARENT             TRGB_COLORDATA( 0xFF, 0xFF, 0xFF, 0xFF )
-- 
1.7.7


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.