sfx2/source/control/thumbnailviewacc.cxx       |    8 +++---
 sfx2/source/dialog/backingwindow.cxx           |    4 +--
 sfx2/source/sidebar/Tools.cxx                  |    4 +--
 slideshow/source/engine/shapes/gdimtftools.cxx |    2 -
 starmath/source/accessibility.cxx              |   16 ++++++------
 starmath/source/dialog.cxx                     |    4 +--
 starmath/source/tmpdevice.cxx                  |    2 -
 svl/source/numbers/numfmuno.cxx                |    6 ++--
 svtools/source/config/colorcfg.cxx             |   32 ++++++++++++++-----------
 svtools/source/config/extcolorcfg.cxx          |    2 -
 svtools/source/config/optionsdrawinglayer.cxx  |   16 ++++++------
 svtools/source/contnr/imivctl1.cxx             |    2 -
 svtools/source/control/accessibleruler.cxx     |    4 +--
 svtools/source/control/toolbarmenuacc.cxx      |    8 +++---
 svtools/source/control/valueacc.cxx            |   12 ++++-----
 svtools/source/dialogs/colrdlg.cxx             |    9 +------
 svtools/source/graphic/grfmgr2.cxx             |    4 +--
 svtools/source/uno/svtxgridcontrol.cxx         |    4 +--
 svtools/source/uno/unocontroltablemodel.cxx    |    2 -
 svtools/source/uno/unoiface.cxx                |    7 ++---
 20 files changed, 73 insertions(+), 75 deletions(-)

New commits:
commit 26a016be816826c80fc914a927758a814f29136c
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Tue Mar 6 13:08:51 2018 +0200

    use more Color in sfx2..svtools
    
    Change-Id: Idd951841ce7e9c4b4e5229bc24efe5c7b8042617
    Reviewed-on: https://gerrit.libreoffice.org/50817
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sfx2/source/control/thumbnailviewacc.cxx 
b/sfx2/source/control/thumbnailviewacc.cxx
index 600e8d705e21..04a7435ccb54 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -394,14 +394,14 @@ void SAL_CALL ThumbnailViewAcc::grabFocus()
 sal_Int32 SAL_CALL ThumbnailViewAcc::getForeground(  )
 {
     ThrowIfDisposed();
-    sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+    Color nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor();
     return static_cast<sal_Int32>(nColor);
 }
 
 sal_Int32 SAL_CALL ThumbnailViewAcc::getBackground(  )
 {
     ThrowIfDisposed();
-    sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+    Color nColor = 
Application::GetSettings().GetStyleSettings().GetWindowColor();
     return static_cast<sal_Int32>(nColor);
 }
 
@@ -884,13 +884,13 @@ void SAL_CALL ThumbnailViewItemAcc::grabFocus()
 
 sal_Int32 SAL_CALL ThumbnailViewItemAcc::getForeground(  )
 {
-    sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+    Color nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor();
     return static_cast<sal_Int32>(nColor);
 }
 
 sal_Int32 SAL_CALL ThumbnailViewItemAcc::getBackground(  )
 {
-    return 
static_cast<sal_Int32>(Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor());
+    return 
static_cast<sal_Int32>(Application::GetSettings().GetStyleSettings().GetWindowColor());
 }
 
 sal_Int64 SAL_CALL ThumbnailViewItemAcc::getSomething( const uno::Sequence< 
sal_Int8 >& rId )
diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index 8966a27face4..d2a30e25acdf 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -72,7 +72,7 @@ float const fMultiplier = 1.4f;
 BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
     Window( i_pParent ),
     mbLocalViewInitialized(false),
-    
maButtonsTextColor(officecfg::Office::Common::Help::StartCenter::StartCenterTextColor::get()),
+    
maButtonsTextColor(Color(officecfg::Office::Common::Help::StartCenter::StartCenterTextColor::get())),
     mbInitControls( false )
 {
     m_pUIBuilder.reset(new VclBuilder(this, getUIRootDir(), 
"sfx/ui/startcenter.ui", "StartCenter" ));
@@ -279,7 +279,7 @@ void BackingWindow::initControls()
     mpHelpButton->SetControlForeground(maButtonsTextColor);
     mpExtensionsButton->SetControlForeground(maButtonsTextColor);
 
-    const Color 
aButtonsBackground(officecfg::Office::Common::Help::StartCenter::StartCenterBackgroundColor::get());
+    const Color aButtonsBackground = 
Color(officecfg::Office::Common::Help::StartCenter::StartCenterBackgroundColor::get());
 
     mpAllButtonsBox->SetBackground(aButtonsBackground);
     mpSmallButtonsBox->SetBackground(aButtonsBackground);
diff --git a/sfx2/source/sidebar/Tools.cxx b/sfx2/source/sidebar/Tools.cxx
index deeb3eb56808..727cd6f24bec 100644
--- a/sfx2/source/sidebar/Tools.cxx
+++ b/sfx2/source/sidebar/Tools.cxx
@@ -97,8 +97,8 @@ Gradient Tools::AwtToVclGradient (const css::awt::Gradient& 
rAwtGradient)
 {
     Gradient aVclGradient (
         GradientStyle(rAwtGradient.Style),
-        rAwtGradient.StartColor,
-        rAwtGradient.EndColor);
+        Color(rAwtGradient.StartColor),
+        Color(rAwtGradient.EndColor));
     aVclGradient.SetAngle(rAwtGradient.Angle);
     aVclGradient.SetBorder(rAwtGradient.Border);
     aVclGradient.SetOfsX(rAwtGradient.XOffset);
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx 
b/slideshow/source/engine/shapes/gdimtftools.cxx
index de099219e11b..2c0b741d1884 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -332,7 +332,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames&   
o_rFrames,
                 if(aMask.IsEmpty())
                 {
                     const tools::Rectangle aRect(rAnimBmp.aPosPix, 
aContent.GetSizePixel());
-                    pVDevMask->SetFillColor(COL_BLACK);
+                    pVDevMask->SetFillColor( COL_BLACK);
                     pVDevMask->SetLineColor();
                     pVDevMask->DrawRect(aRect);
                 }
diff --git a/starmath/source/accessibility.cxx 
b/starmath/source/accessibility.cxx
index 22d5af1c38b1..8f2e4017234b 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -254,7 +254,7 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getForeground()
 
     if (!pWin)
         throw RuntimeException();
-    return static_cast<sal_Int32>(pWin->GetTextColor().GetColor());
+    return static_cast<sal_Int32>(pWin->GetTextColor());
 }
 
 sal_Int32 SAL_CALL SmGraphicAccessible::getBackground()
@@ -266,9 +266,9 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getBackground()
     Wallpaper aWall( pWin->GetDisplayBackground() );
     Color nCol;
     if (aWall.IsBitmap() || aWall.IsGradient())
-        nCol = 
pWin->GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+        nCol = pWin->GetSettings().GetStyleSettings().GetWindowColor();
     else
-        nCol = aWall.GetColor().GetColor();
+        nCol = aWall.GetColor();
     return static_cast<sal_Int32>(nCol);
 }
 
@@ -356,7 +356,7 @@ Reference< XAccessibleStateSet > SAL_CALL 
SmGraphicAccessible::getAccessibleStat
             pStateSet->AddState( AccessibleStateType::SHOWING );
         if (pWin->IsReallyVisible())
             pStateSet->AddState( AccessibleStateType::VISIBLE );
-        if (COL_TRANSPARENT != pWin->GetBackground().GetColor().GetColor())
+        if (COL_TRANSPARENT != pWin->GetBackground().GetColor())
             pStateSet->AddState( AccessibleStateType::OPAQUE );
     }
 
@@ -1677,7 +1677,7 @@ sal_Int32 SAL_CALL SmEditAccessible::getForeground()
 
     if (!pWin)
         throw RuntimeException();
-    return static_cast<sal_Int32>(pWin->GetTextColor().GetColor());
+    return static_cast<sal_Int32>(pWin->GetTextColor());
 }
 
 sal_Int32 SAL_CALL SmEditAccessible::getBackground()
@@ -1689,9 +1689,9 @@ sal_Int32 SAL_CALL SmEditAccessible::getBackground()
     Wallpaper aWall( pWin->GetDisplayBackground() );
     Color nCol;
     if (aWall.IsBitmap() || aWall.IsGradient())
-        nCol = 
pWin->GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+        nCol = pWin->GetSettings().GetStyleSettings().GetWindowColor();
     else
-        nCol = aWall.GetColor().GetColor();
+        nCol = aWall.GetColor();
     return static_cast<sal_Int32>(nCol);
 }
 
@@ -1784,7 +1784,7 @@ uno::Reference< XAccessibleStateSet > SAL_CALL 
SmEditAccessible::getAccessibleSt
             pStateSet->AddState( AccessibleStateType::SHOWING );
         if (pWin->IsReallyVisible())
             pStateSet->AddState( AccessibleStateType::VISIBLE );
-        if (COL_TRANSPARENT != pWin->GetBackground().GetColor().GetColor())
+        if (COL_TRANSPARENT != pWin->GetBackground().GetColor())
             pStateSet->AddState( AccessibleStateType::OPAQUE );
     }
 
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 756eb67b675d..ee3e1f5cbf5b 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -54,8 +54,8 @@ void lclGetSettingColors(Color& rBackgroundColor, Color& 
rTextColor)
     const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
     if (rStyleSettings.GetHighContrastMode())
     {
-        rBackgroundColor = rStyleSettings.GetFieldColor().GetColor();
-        rTextColor = rStyleSettings.GetFieldTextColor().GetColor();
+        rBackgroundColor = rStyleSettings.GetFieldColor();
+        rTextColor = rStyleSettings.GetFieldTextColor();
     }
     else
     {
diff --git a/starmath/source/tmpdevice.cxx b/starmath/source/tmpdevice.cxx
index a6bb67a7d77f..231204ea4631 100644
--- a/starmath/source/tmpdevice.cxx
+++ b/starmath/source/tmpdevice.cxx
@@ -45,7 +45,7 @@ SmTmpDevice::SmTmpDevice(OutputDevice &rTheDev, bool 
bUseMap100th_mm) :
 
 Color SmTmpDevice::Impl_GetColor( const Color& rColor )
 {
-    Color nNewCol = rColor.GetColor();
+    Color nNewCol = rColor;
     if (nNewCol == COL_AUTO)
     {
         if (OUTDEV_PRINTER == rOutDev.GetOutDevType())
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 88302f86d026..3d465ed17183 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -203,7 +203,7 @@ util::Color SAL_CALL 
SvNumberFormatterServiceObj::queryColorForNumber( sal_Int32
     Color* pColor = nullptr;
     pFormatter->GetOutputString(fValue, nKey, aStr, &pColor);
     if (pColor)
-        nRet = pColor->GetColor();
+        nRet = sal_uInt32(*pColor);
     // Else keep Default
 
     return nRet;
@@ -245,7 +245,7 @@ util::Color SAL_CALL 
SvNumberFormatterServiceObj::queryColorForString( sal_Int32
     pFormatter->GetOutputString(aString, nKey, aStr, &pColor);
     if (pColor)
     {
-        nRet = pColor->GetColor();
+        nRet = sal_uInt32(*pColor);
     }
     // Else keep Default
 
@@ -322,7 +322,7 @@ util::Color SAL_CALL 
SvNumberFormatterServiceObj::queryPreviewColorForNumber( co
         throw util::MalformedNumberFormatException();
 
     if (pColor)
-        nRet = pColor->GetColor();
+        nRet = sal_uInt32(*pColor);
     // Else keep Default
 
     return nRet;
diff --git a/svtools/source/config/colorcfg.cxx 
b/svtools/source/config/colorcfg.cxx
index 038c1623b3ad..fa4671a76ab9 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -223,7 +223,11 @@ void ColorConfig_Impl::Load(const OUString& rScheme)
     for(int i = 0; i < ColorConfigEntryCount && aColors.getLength() > nIndex; 
++i)
     {
         if(pColors[nIndex].hasValue())
-            pColors[nIndex] >>= m_aConfigValues[i].nColor;
+        {
+            sal_Int32 nTmp;
+            pColors[nIndex] >>= nTmp;
+            m_aConfigValues[i].nColor = Color(nTmp);
+        }
         else
             m_aConfigValues[i].nColor = COL_AUTO;
         nIndex++;
@@ -353,8 +357,8 @@ void ColorConfig_Impl::ImplUpdateApplicationSettings()
     StyleSettings aStyleSettings( aSettings.GetStyleSettings() );
 
     ColorConfigValue aRet = GetColorConfigValue(svtools::FONTCOLOR);
-    if(aRet.nColor == COL_AUTO)
-        aRet.nColor = 
ColorConfig::GetDefaultColor(svtools::FONTCOLOR).GetColor();
+    if(COL_AUTO == aRet.nColor)
+        aRet.nColor = ColorConfig::GetDefaultColor(svtools::FONTCOLOR);
 
     Color aFontColor(aRet.nColor);
 
@@ -400,12 +404,12 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry 
eEntry)
     {
         COL_WHITE, // DOCCOLOR
         COL_LIGHTGRAY, // DOCBOUNDARIES
-        0xDFDFDE, // APPBACKGROUND
+        Color(0xDFDFDE), // APPBACKGROUND
         COL_LIGHTGRAY, // OBJECTBOUNDARIES
         COL_LIGHTGRAY, // TABLEBOUNDARIES
         COL_BLACK, // FONTCOLOR
         COL_BLUE, // LINKS
-        0x0000cc, // LINKSVISITED
+        Color(0x0000cc), // LINKSVISITED
         COL_LIGHTRED, // SPELL
         COL_LIGHTMAGENTA, // SMARTTAGS
         COL_GRAY, // SHADOWCOLOR
@@ -415,7 +419,7 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry eEntry)
         COL_BLACK, // WRITERDIRECTCURSOR
         COL_GREEN, //WRITERSCRIPTINDICATOR
         COL_LIGHTGRAY, //WRITERSECTIONBOUNDARIES
-        0x0369a3, //WRITERHEADERFOOTERMARK,
+        Color(0x0369a3), //WRITERHEADERFOOTERMARK,
         COL_BLUE, //WRITERPAGEBREAKS,
         COL_LIGHTBLUE, // HTMLSGML
         COL_LIGHTGREEN, // HTMLCOMMENT
@@ -423,12 +427,12 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry 
eEntry)
         COL_GRAY, // HTMLUNKNOWN
         COL_GRAY3, // CALCGRID
         COL_BLUE, //CALCPAGEBREAK
-        0x2300dc, //CALCPAGEBREAKMANUAL
+        Color(0x2300dc), //CALCPAGEBREAKMANUAL
         COL_GRAY7, //CALCPAGEBREAKAUTOMATIC
         COL_LIGHTBLUE, // CALCDETECTIVE
         COL_LIGHTRED, // CALCDETECTIVEERROR
-        0xef0fff, // CALCREFERENCE
-        0xffffc0, // CALCNOTESBACKGROUND
+        Color(0xef0fff), // CALCREFERENCE
+        Color(0xffffc0), // CALCNOTESBACKGROUND
         COL_LIGHTGRAY, // DRAWGRID
         COL_GREEN, // BASICIDENTIFIER,
         COL_GRAY, // BASICCOMMENT,
@@ -437,12 +441,12 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry 
eEntry)
         COL_BLUE, // BASICOPERATOR,
         COL_BLUE, // BASICKEYWORD,
         COL_RED, //BASICERROR
-        0x009900, // SQLIDENTIFIER
+        Color(0x009900), // SQLIDENTIFIER
         COL_BLACK, // SQLNUMBER
-        0xCE7B00, // SQLSTRING
+        Color(0xCE7B00), // SQLSTRING
         COL_BLACK, // SQLOPERATOR
-        0x0000E6, // SQLKEYWORD
-        0x259D9D, // SQLPARAMETER
+        Color(0x0000E6), // SQLKEYWORD
+        Color(0x259D9D), // SQLPARAMETER
         COL_GRAY, // SQLCOMMENT
     };
     Color aRet;
@@ -491,7 +495,7 @@ ColorConfigValue 
ColorConfig::GetColorValue(ColorConfigEntry eEntry, bool bSmart
     if (bSmart)
     {
         if(aRet.nColor == COL_AUTO)
-            aRet.nColor = ColorConfig::GetDefaultColor(eEntry).GetColor();
+            aRet.nColor = ColorConfig::GetDefaultColor(eEntry);
     }
 
     return aRet;
diff --git a/svtools/source/config/extcolorcfg.cxx 
b/svtools/source/config/extcolorcfg.cxx
index 945299289555..76c4c6ac5343 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -353,7 +353,7 @@ void 
ExtendedColorConfig_Impl::FillComponentColors(uno::Sequence < OUString >& _
 
                     OSL_ENSURE(pColors[i].hasValue(),"Color config entry has 
NIL as color value set!");
                     OSL_ENSURE(pDefaultColors[i].hasValue(),"Color config 
entry has NIL as color value set!");
-                    sal_Int32 nColor = 0,nDefaultColor = 0;
+                    Color nColor, nDefaultColor;
                     pColors[i] >>= nColor;
                     if ( bDefaultColorFound )
                         pDefaultColors[i] >>= nDefaultColor;
diff --git a/svtools/source/config/optionsdrawinglayer.cxx 
b/svtools/source/config/optionsdrawinglayer.cxx
index 418ae34c7596..d1e8427eb032 100644
--- a/svtools/source/config/optionsdrawinglayer.cxx
+++ b/svtools/source/config/optionsdrawinglayer.cxx
@@ -37,8 +37,8 @@ using namespace ::com::sun::star::uno   ;
 #define ROOTNODE_START                  "Office.Common/Drawinglayer"
 #define DEFAULT_OVERLAYBUFFER           true
 #define DEFAULT_PAINTBUFFER             true
-#define DEFAULT_STRIPE_COLOR_A          0
-#define DEFAULT_STRIPE_COLOR_B          16581375
+#define DEFAULT_STRIPE_COLOR_A          Color(0)
+#define DEFAULT_STRIPE_COLOR_B          Color(16581375)
 #define DEFAULT_STRIPE_LENGTH           4
 
 // #i73602#
@@ -261,8 +261,8 @@ SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl() :
     ConfigItem( ROOTNODE_START  ),
     m_bOverlayBuffer( DEFAULT_OVERLAYBUFFER ),
     m_bPaintBuffer( DEFAULT_PAINTBUFFER ),
-    m_bStripeColorA(Color(DEFAULT_STRIPE_COLOR_A)),
-    m_bStripeColorB(Color(DEFAULT_STRIPE_COLOR_B)),
+    m_bStripeColorA(DEFAULT_STRIPE_COLOR_A),
+    m_bStripeColorB(DEFAULT_STRIPE_COLOR_B),
     m_nStripeLength(DEFAULT_STRIPE_LENGTH),
 
     // #i73602#
@@ -334,7 +334,7 @@ SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl() :
                 
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), 
"SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed 
the value type of \"Office.Common\\Drawinglayer\\StripeColorA\"?" );
                 sal_Int32 nValue = 0;
                 seqValues[nProperty] >>= nValue;
-                m_bStripeColorA = nValue;
+                m_bStripeColorA = Color(nValue);
             }
             break;
 
@@ -343,7 +343,7 @@ SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl() :
                 
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), 
"SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed 
the value type of \"Office.Common\\Drawinglayer\\StripeColorB\"?" );
                 sal_Int32 nValue = 0;
                 seqValues[nProperty] >>= nValue;
-                m_bStripeColorB = nValue;
+                m_bStripeColorB = Color(nValue);
             }
             break;
 
@@ -543,11 +543,11 @@ void SvtOptionsDrawinglayer_Impl::ImplCommit()
             break;
 
             case PROPERTYHANDLE_STRIPE_COLOR_A:
-                aSeqValues[nProperty] <<= m_bStripeColorA.GetColor();
+                aSeqValues[nProperty] <<= m_bStripeColorA;
             break;
 
             case PROPERTYHANDLE_STRIPE_COLOR_B:
-                aSeqValues[nProperty] <<= m_bStripeColorB.GetColor();
+                aSeqValues[nProperty] <<= m_bStripeColorB;
             break;
 
             case PROPERTYHANDLE_STRIPE_LENGTH:
diff --git a/svtools/source/contnr/imivctl1.cxx 
b/svtools/source/contnr/imivctl1.cxx
index d04cd408dae4..48c65c97deb6 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -593,7 +593,7 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& 
rRenderContext, const too
 
 #if defined(OV_DRAWGRID)
     Color aOldColor (rRenderContext.GetLineColor());
-    Color aColor(COL_BLACK);
+    Color aCOL_BLACK);
     rRenderContext.SetLineColor( aColor );
     Point aOffs(rRenderContext.GetMapMode().GetOrigin());
     Size aXSize(GetOutputSizePixel());
diff --git a/svtools/source/control/accessibleruler.cxx 
b/svtools/source/control/accessibleruler.cxx
index c1eb425106de..38fe6a9275fb 100644
--- a/svtools/source/control/accessibleruler.cxx
+++ b/svtools/source/control/accessibleruler.cxx
@@ -288,7 +288,7 @@ sal_Int32 SvtRulerAccessible::getForeground(  )
     ::osl::MutexGuard   aGuard( m_aMutex );
     ThrowExceptionIfNotAlive();
 
-    return mpRepr->GetControlForeground().GetColor();
+    return sal_Int32(mpRepr->GetControlForeground());
 }
 sal_Int32 SvtRulerAccessible::getBackground(  )
 {
@@ -296,7 +296,7 @@ sal_Int32 SvtRulerAccessible::getBackground(  )
     ::osl::MutexGuard   aGuard( m_aMutex );
     ThrowExceptionIfNotAlive();
 
-    return mpRepr->GetControlBackground().GetColor();
+    return sal_Int32(mpRepr->GetControlBackground());
 }
 
 // XServiceInfo
diff --git a/svtools/source/control/toolbarmenuacc.cxx 
b/svtools/source/control/toolbarmenuacc.cxx
index 74d91e584b29..611654ae5986 100644
--- a/svtools/source/control/toolbarmenuacc.cxx
+++ b/svtools/source/control/toolbarmenuacc.cxx
@@ -394,14 +394,14 @@ void SAL_CALL ToolbarMenuAcc::grabFocus()
 sal_Int32 SAL_CALL ToolbarMenuAcc::getForeground()
 {
     ThrowIfDisposed();
-    sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetMenuTextColor().GetColor();
+    Color nColor = 
Application::GetSettings().GetStyleSettings().GetMenuTextColor();
     return static_cast<sal_Int32>(nColor);
 }
 
 sal_Int32 SAL_CALL ToolbarMenuAcc::getBackground()
 {
     ThrowIfDisposed();
-    sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetMenuColor().GetColor();
+    Color nColor = 
Application::GetSettings().GetStyleSettings().GetMenuColor();
     return static_cast<sal_Int32>(nColor);
 }
 
@@ -818,12 +818,12 @@ void SAL_CALL ToolbarMenuEntryAcc::grabFocus()
 
 sal_Int32 SAL_CALL ToolbarMenuEntryAcc::getForeground(  )
 {
-    return 
static_cast<sal_Int32>(Application::GetSettings().GetStyleSettings().GetMenuTextColor().GetColor());
+    return 
static_cast<sal_Int32>(Application::GetSettings().GetStyleSettings().GetMenuTextColor());
 }
 
 sal_Int32 SAL_CALL ToolbarMenuEntryAcc::getBackground(  )
 {
-    return 
static_cast<sal_Int32>(Application::GetSettings().GetStyleSettings().GetMenuColor().GetColor());
+    return 
static_cast<sal_Int32>(Application::GetSettings().GetStyleSettings().GetMenuColor());
 }
 
 }
diff --git a/svtools/source/control/valueacc.cxx 
b/svtools/source/control/valueacc.cxx
index 4abbb3a4c645..b5cb0ef17f89 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -469,14 +469,14 @@ void SAL_CALL ValueSetAcc::grabFocus()
 sal_Int32 SAL_CALL ValueSetAcc::getForeground(  )
 {
     ThrowIfDisposed();
-    sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+    Color nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor();
     return static_cast<sal_Int32>(nColor);
 }
 
 sal_Int32 SAL_CALL ValueSetAcc::getBackground(  )
 {
     ThrowIfDisposed();
-    sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+    Color nColor = 
Application::GetSettings().GetStyleSettings().GetWindowColor();
     return static_cast<sal_Int32>(nColor);
 }
 
@@ -1010,17 +1010,17 @@ void SAL_CALL ValueItemAcc::grabFocus()
 
 sal_Int32 SAL_CALL ValueItemAcc::getForeground(  )
 {
-    sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+    Color nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor();
     return static_cast<sal_Int32>(nColor);
 }
 
 sal_Int32 SAL_CALL ValueItemAcc::getBackground(  )
 {
-    sal_uInt32 nColor;
+    Color nColor;
     if (mpParent && mpParent->meType == VALUESETITEM_COLOR)
-        nColor = mpParent->maColor.GetColor();
+        nColor = mpParent->maColor;
     else
-        nColor = 
Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+        nColor = 
Application::GetSettings().GetStyleSettings().GetWindowColor();
     return static_cast<sal_Int32>(nColor);
 }
 
diff --git a/svtools/source/dialogs/colrdlg.cxx 
b/svtools/source/dialogs/colrdlg.cxx
index 68aad12d8566..8c60e753f2bf 100644
--- a/svtools/source/dialogs/colrdlg.cxx
+++ b/svtools/source/dialogs/colrdlg.cxx
@@ -74,7 +74,7 @@ short SvColorDialog::Execute()
 
         Sequence< PropertyValue > props( 2 );
         props[0].Name = sColor;
-        props[0].Value <<= static_cast<sal_Int32>(maColor.GetColor());
+        props[0].Value <<= maColor;
         props[1].Name = "Mode";
         props[1].Value <<= static_cast<sal_Int16>(meMode);
 
@@ -89,12 +89,7 @@ short SvColorDialog::Execute()
             {
                 if( props[n].Name == sColor )
                 {
-                    sal_Int32 nColor = 0;
-                    if( props[n].Value >>= nColor )
-                    {
-                        maColor = nColor;
-                    }
-
+                    props[n].Value >>= maColor;
                 }
             }
         }
diff --git a/svtools/source/graphic/grfmgr2.cxx 
b/svtools/source/graphic/grfmgr2.cxx
index 2351564f439e..d19f8c1eae04 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -1736,7 +1736,7 @@ bool GraphicObject::ImplRenderTileRecursive( 
VirtualDevice& rVDev, int nExponent
             }
 
 #ifdef DBG_TEST
-//          rVDev.SetFillColor( COL_WHITE );
+//          rVDev.SetFillCOL_WHITE );
             rVDev.SetFillColor();
             rVDev.SetLineColor( Color( 255 * nExponent / nMSBFactor, 255 - 255 
* nExponent / nMSBFactor, 128 - 255 * nExponent / nMSBFactor ) );
             rVDev.DrawEllipse( Rectangle(aTileInfo.aNextTileTopLeft.X(), 
aTileInfo.aTileTopLeft.Y(),
@@ -1820,7 +1820,7 @@ bool GraphicObject::ImplRenderTileRecursive( 
VirtualDevice& rVDev, int nExponent
     }
 
 #ifdef DBG_TEST
-//  rVDev.SetFillColor( COL_WHITE );
+//  rVDev.SetFillCOL_WHITE );
     rVDev.SetFillColor();
     rVDev.SetLineColor( Color( 255 * nExponent / nMSBFactor, 255 - 255 * 
nExponent / nMSBFactor, 128 - 255 * nExponent / nMSBFactor ) );
     rVDev.DrawRect( 
Rectangle((rTileInfo.aTileTopLeft.X())*rTileSizePixel.Width(),
diff --git a/svtools/source/uno/svtxgridcontrol.cxx 
b/svtools/source/uno/svtxgridcontrol.cxx
index 981461fd8b97..148f85a9b359 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -461,7 +461,7 @@ namespace
         if ( !i_color )
             o_colorValue.clear();
         else
-            o_colorValue <<= i_color->GetColor();
+            o_colorValue <<= sal_Int32(*i_color);
     }
 }
 
@@ -547,7 +547,7 @@ Any SVTXGridControl::getProperty( const OUString& 
PropertyName )
             Sequence< css::util::Color > aAPIColors( aColors->size() );
             for ( size_t i=0; i<aColors->size(); ++i )
             {
-                aAPIColors[i] = aColors->at(i).GetColor();
+                aAPIColors[i] = sal_Int32(aColors->at(i));
             }
             aPropertyValue <<= aAPIColors;
         }
diff --git a/svtools/source/uno/unocontroltablemodel.cxx 
b/svtools/source/uno/unocontroltablemodel.cxx
index 36226892970b..b249e40b64f3 100644
--- a/svtools/source/uno/unocontroltablemodel.cxx
+++ b/svtools/source/uno/unocontroltablemodel.cxx
@@ -702,7 +702,7 @@ namespace svt { namespace table
             ::std::vector< ::Color > aColors( aAPIColors.getLength() );
             for ( sal_Int32 i=0; i<aAPIColors.getLength(); ++i )
             {
-                aColors[i] = ::Color( aAPIColors[i] );
+                aColors[i] = Color(aAPIColors[i]);
             }
             m_pImpl->m_aRowColors.reset( aColors );
         }
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 27b2c7180f40..022db626eb7e 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -2122,8 +2122,7 @@ void VCLXProgressBar::setForegroundColor( sal_Int32 
nColor )
     VclPtr<vcl::Window> pWindow = GetWindow();
     if ( pWindow )
     {
-        Color aColor( nColor );
-        pWindow->SetControlForeground( aColor );
+        pWindow->SetControlForeground( Color(nColor) );
     }
 }
 
@@ -2134,7 +2133,7 @@ void VCLXProgressBar::setBackgroundColor( sal_Int32 
nColor )
     VclPtr<vcl::Window> pWindow = GetWindow();
     if ( pWindow )
     {
-        Color aColor( nColor );
+        Color aColor = Color( nColor );
         pWindow->SetBackground( aColor );
         pWindow->SetControlBackground( aColor );
         pWindow->Invalidate();
@@ -2222,7 +2221,7 @@ void VCLXProgressBar::setProperty( const OUString& 
PropertyName, const css::uno:
                     sal_Int32 nColor = 0;
                     if ( Value >>= nColor )
                     {
-                        Color aColor( nColor );
+                        Color aColor = Color( nColor );
                         pWindow->SetControlForeground( aColor );
                     }
                 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to