diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-26 17:13:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-28 07:34:27 +0100 |
commit | e2cb154195fdc2ffccdb6f5e87cae8b29640b3eb (patch) | |
tree | 7c3d53d78e0867aa879b98d84211d1e73602520f /chart2/source/view | |
parent | 0ea41fea75cd1ac1d81fa57c4411e75a6b4001f0 (diff) |
convert COL_ constants to be of type Color
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view')
-rw-r--r-- | chart2/source/view/axes/VCartesianAxis.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/axes/VPolarAngleAxis.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/main/OpenGLRender.cxx | 16 | ||||
-rw-r--r-- | chart2/source/view/main/OpenGLRender.hxx | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 2089b2705d40..adaa91b83bf3 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -700,7 +700,7 @@ bool VCartesianAxis::createTextShapes( getAxisLabelProperties(aPropNames, aPropValues, m_aAxisProperties, rAxisLabelProperties, nLimitedSpaceForText, bLimitedHeight); uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor"); - sal_Int32 nColor = Color(COL_AUTO).GetColor(); + sal_Int32 nColor = COL_AUTO.GetColor(); if(pColorAny) *pColorAny >>= nColor; @@ -888,7 +888,7 @@ bool VCartesianAxis::createTextShapesSimple( getAxisLabelProperties(aPropNames, aPropValues, m_aAxisProperties, rAxisLabelProperties, -1, bLimitedHeight); uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor"); - sal_Int32 nColor = Color(COL_AUTO).GetColor(); + sal_Int32 nColor = COL_AUTO.GetColor(); if(pColorAny) *pColorAny >>= nColor; diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx index ee2c7343d760..9561cf66b456 100644 --- a/chart2/source/view/axes/VPolarAngleAxis.cxx +++ b/chart2/source/view/axes/VPolarAngleAxis.cxx @@ -67,7 +67,7 @@ bool VPolarAngleAxis::createTextShapes_ForAngleAxis( , rAxisLabelProperties.m_aFontReferenceSize ); uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor"); - sal_Int32 nColor = Color(COL_AUTO).GetColor(); + sal_Int32 nColor = COL_AUTO.GetColor(); if(pColorAny) *pColorAny >>= nColor; diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index fb3d7e0a8df0..35fbbac1d76f 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -851,11 +851,11 @@ int OpenGLRender::RenderArea2DShape() return 0; } -void OpenGLRender::SetBackGroundColor(sal_uInt32 color1, sal_uInt32 color2, css::drawing::FillStyle fillStyle) +void OpenGLRender::SetBackGroundColor(::Color color1, ::Color color2, css::drawing::FillStyle fillStyle) { - sal_uInt8 r = (color1 & 0x00FF0000) >> 16; - sal_uInt8 g = (color1 & 0x0000FF00) >> 8; - sal_uInt8 b = (color1 & 0x000000FF); + sal_uInt8 r = color1.GetRed(); + sal_uInt8 g = color1.GetGreen(); + sal_uInt8 b = color1.GetBlue(); m_BackgroundColor[0] = static_cast<float>(r) / 255.0f; m_BackgroundColor[1] = static_cast<float>(g) / 255.0f; @@ -867,9 +867,9 @@ void OpenGLRender::SetBackGroundColor(sal_uInt32 color1, sal_uInt32 color2, css: m_BackgroundColor[6] = static_cast<float>(b) / 255.0f; m_BackgroundColor[7] = fillStyle != css::drawing::FillStyle_NONE ? 1.0 : 0.0; - r = (color2 & 0x00FF0000) >> 16; - g = (color2 & 0x0000FF00) >> 8; - b = (color2 & 0x000000FF); + r = color2.GetRed(); + g = color2.GetGreen(); + b = color2.GetBlue(); m_BackgroundColor[8] = static_cast<float>(r) / 255.0f; m_BackgroundColor[9] = static_cast<float>(g) / 255.0f; @@ -880,7 +880,7 @@ void OpenGLRender::SetBackGroundColor(sal_uInt32 color1, sal_uInt32 color2, css: m_BackgroundColor[13] = static_cast<float>(g) / 255.0f; m_BackgroundColor[14] = static_cast<float>(b) / 255.0f; m_BackgroundColor[15] = fillStyle != css::drawing::FillStyle_NONE ? 1.0 : 0.0; - SAL_INFO("chart2.opengl", "color1 = " << color1 << ", color2 = " << color2); + SAL_INFO("chart2.opengl", "color1 = " << sal_uInt32(color1) << ", color2 = " << sal_uInt32(color2)); } diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx index d8f81a0f1799..b222a40f6647 100644 --- a/chart2/source/view/main/OpenGLRender.hxx +++ b/chart2/source/view/main/OpenGLRender.hxx @@ -106,7 +106,7 @@ public: void renderDebug(); #endif - void SetBackGroundColor(sal_uInt32 color1, sal_uInt32 color2, css::drawing::FillStyle fillstyle); + void SetBackGroundColor(::Color color1, ::Color color2, css::drawing::FillStyle fillstyle); private: int m_iWidth; |