summaryrefslogtreecommitdiff
path: root/UnoControls
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-07 09:10:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-07 09:49:26 +0100
commitdbcf5b28aacba55d5f48e58a07fa4d6fc06931b9 (patch)
tree858a5755198f789344a99b31b9bb9d6ca3e96a95 /UnoControls
parent39a13fa68c87cc7e141cd75affe228b86dd817e3 (diff)
use more Color in UnoControls..canvas
Change-Id: I8dda18f9630b4e59ead83fa7471525bdf4eaeda0 Reviewed-on: https://gerrit.libreoffice.org/50863 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'UnoControls')
-rw-r--r--UnoControls/source/controls/progressbar.cxx12
-rw-r--r--UnoControls/source/inc/progressbar.hxx4
2 files changed, 8 insertions, 8 deletions
diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx
index ebffd5a44069..898c4032ebaf 100644
--- a/UnoControls/source/controls/progressbar.cxx
+++ b/UnoControls/source/controls/progressbar.cxx
@@ -144,7 +144,7 @@ void SAL_CALL ProgressBar::setForegroundColor( sal_Int32 nColor )
MutexGuard aGuard (m_aMutex);
// Safe color for later use.
- m_nForegroundColor = nColor;
+ m_nForegroundColor = Color(nColor);
// Repaint control
impl_paint ( 0, 0, impl_getGraphicsPeer() );
@@ -158,7 +158,7 @@ void SAL_CALL ProgressBar::setBackgroundColor ( sal_Int32 nColor )
MutexGuard aGuard (m_aMutex);
// Safe color for later use.
- m_nBackgroundColor = nColor;
+ m_nBackgroundColor = Color(nColor);
// Repaint control
impl_paint ( 0, 0, impl_getGraphicsPeer() );
@@ -316,13 +316,13 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra
// Clear background
// (same color for line and fill)
- rGraphics->setFillColor ( m_nBackgroundColor );
- rGraphics->setLineColor ( m_nBackgroundColor );
+ rGraphics->setFillColor ( sal_Int32(m_nBackgroundColor) );
+ rGraphics->setLineColor ( sal_Int32(m_nBackgroundColor) );
rGraphics->drawRect ( nX, nY, impl_getWidth(), impl_getHeight() );
// same color for line and fill for blocks
- rGraphics->setFillColor ( m_nForegroundColor );
- rGraphics->setLineColor ( m_nForegroundColor );
+ rGraphics->setFillColor ( sal_Int32(m_nForegroundColor) );
+ rGraphics->setLineColor ( sal_Int32(m_nForegroundColor) );
sal_Int32 nBlockStart = 0; // = left site of new block
sal_Int32 nBlockCount = m_nBlockValue!=0.00 ? static_cast<sal_Int32>((m_nValue-m_nMinRange)/m_nBlockValue) : 0; // = number of next block
diff --git a/UnoControls/source/inc/progressbar.hxx b/UnoControls/source/inc/progressbar.hxx
index a31208ca0c5a..f162f423a58c 100644
--- a/UnoControls/source/inc/progressbar.hxx
+++ b/UnoControls/source/inc/progressbar.hxx
@@ -138,8 +138,8 @@ private:
bool m_bHorizontal; // orientation for steps [true=horizontal/false=vertical]
css::awt::Size m_aBlockSize; // width and height of a block [>=0,0]
- sal_Int32 m_nForegroundColor; // (alpha,r,g,b)
- sal_Int32 m_nBackgroundColor; // (alpha,r,g,b)
+ Color m_nForegroundColor; // (alpha,r,g,b)
+ Color m_nBackgroundColor; // (alpha,r,g,b)
sal_Int32 m_nMinRange; // lowest value = 0% [long, <_nMaxRange]
sal_Int32 m_nMaxRange; // highest value = 100% [long, >_nMinRange]
double m_nBlockValue; // value for one block [long, >0]