use less TRGB_COLORDATA

part of removing ColorData

Change-Id: Id2d5843762227559f97cfb5eb61c01c888a0601e
Reviewed-on: https://gerrit.libreoffice.org/50347
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2018-02-26 16:12:08 +01:00
parent 97448039e1
commit c410a3dcfe
6 changed files with 13 additions and 12 deletions
+5 -4
View File
@@ -24,6 +24,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <vcl/vclptr.hxx>
#include <tools/color.hxx>
#include <basecontrol.hxx>
@@ -34,14 +35,14 @@ namespace unocontrols{
#define PROGRESSBAR_FREESPACE 4
#define PROGRESSBAR_DEFAULT_HORIZONTAL true
#define PROGRESSBAR_DEFAULT_BLOCKDIMENSION Size(1,1)
#define PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 ) // lightgray
#define PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x80 ) // blue
#define PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR sal_Int32(Color( 0x00, 0xC0, 0xC0, 0xC0 )) // lightgray
#define PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR sal_Int32(Color( 0x00, 0x00, 0x00, 0x80 )) // blue
#define PROGRESSBAR_DEFAULT_MINRANGE INT_MIN
#define PROGRESSBAR_DEFAULT_MAXRANGE INT_MAX
#define PROGRESSBAR_DEFAULT_BLOCKVALUE 1
#define PROGRESSBAR_DEFAULT_VALUE PROGRESSBAR_DEFAULT_MINRANGE
#define PROGRESSBAR_LINECOLOR_BRIGHT TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF ) // white
#define PROGRESSBAR_LINECOLOR_SHADOW TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 ) // black
#define PROGRESSBAR_LINECOLOR_BRIGHT sal_Int32(Color( 0x00, 0xFF, 0xFF, 0xFF )) // white
#define PROGRESSBAR_LINECOLOR_SHADOW sal_Int32(Color( 0x00, 0x00, 0x00, 0x00 )) // black
class ProgressBar : public css::awt::XControlModel
, public css::awt::XProgressBar
+2 -2
View File
@@ -78,8 +78,8 @@ class ProgressBar;
#define DEFAULT_BUTTONLABEL "Abbrechen"
#define PROGRESSMONITOR_DEFAULT_TOPIC ""
#define PROGRESSMONITOR_DEFAULT_TEXT ""
#define PROGRESSMONITOR_LINECOLOR_BRIGHT TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF ) // white
#define PROGRESSMONITOR_LINECOLOR_SHADOW TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 ) // black
#define PROGRESSMONITOR_LINECOLOR_BRIGHT sal_Int32(Color( 0x00, 0xFF, 0xFF, 0xFF )) // white
#define PROGRESSMONITOR_LINECOLOR_SHADOW sal_Int32(Color( 0x00, 0x00, 0x00, 0x00 )) // black
#define PROGRESSMONITOR_DEFAULT_WIDTH 350
#define PROGRESSMONITOR_DEFAULT_HEIGHT 100
+3 -3
View File
@@ -42,9 +42,9 @@ class ProgressBar;
#define FIXEDTEXT_MODELNAME "com.sun.star.awt.UnoControlFixedTextModel"
#define CONTROLNAME_TEXT "Text" // identifier the control in container
#define CONTROLNAME_PROGRESSBAR "ProgressBar" // -||-
#define STATUSINDICATOR_BACKGROUNDCOLOR TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 ) // lightgray
#define STATUSINDICATOR_LINECOLOR_BRIGHT TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF ) // white
#define STATUSINDICATOR_LINECOLOR_SHADOW TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 ) // black
#define STATUSINDICATOR_BACKGROUNDCOLOR sal_Int32(Color( 0x00, 0xC0, 0xC0, 0xC0 )) // lightgray
#define STATUSINDICATOR_LINECOLOR_BRIGHT sal_Int32(Color( 0x00, 0xFF, 0xFF, 0xFF )) // white
#define STATUSINDICATOR_LINECOLOR_SHADOW sal_Int32(Color( 0x00, 0x00, 0x00, 0x00 )) // black
#define STATUSINDICATOR_DEFAULT_WIDTH 300
#define STATUSINDICATOR_DEFAULT_HEIGHT 25
+1 -1
View File
@@ -1372,7 +1372,7 @@ Color SvxCharEffectsPage::GetPreviewFontColor(const Color& rColor) const
{
if (rColor.GetColor() == COL_AUTO)
return Color(COL_BLACK);
if (m_bEnableNoneFontColor && rColor.GetColor() == COL_NONE_COLOR)
if (m_bEnableNoneFontColor && rColor == COL_NONE_COLOR)
return Color(COL_BLACK);
return rColor;
}
+1 -1
View File
@@ -47,7 +47,7 @@ public:
class Button;
typedef std::function<void(const OUString&, const NamedColor&)> ColorSelectFunction;
#define COL_NONE_COLOR TRGB_COLORDATA(0x80, 0xFF, 0xFF, 0xFF)
#define COL_NONE_COLOR ::Color(0x80, 0xFF, 0xFF, 0xFF)
class SVX_DLLPUBLIC SvxColorWindow : public svtools::ToolbarPopup
{
+1 -1
View File
@@ -1430,7 +1430,7 @@ namespace
NamedColor GetNoneColor()
{
return std::make_pair(Color(COL_NONE_COLOR), SvxResId(RID_SVXSTR_NONE));
return std::make_pair(COL_NONE_COLOR, SvxResId(RID_SVXSTR_NONE));
}
}