summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx2
-rw-r--r--editeng/source/accessibility/AccessibleImageBullet.cxx2
-rw-r--r--framework/source/services/taskcreatorsrv.cxx2
-rw-r--r--include/svtools/colorcfg.hxx2
-rw-r--r--reportdesign/source/ui/inc/ColorListener.hxx2
-rw-r--r--sc/source/core/tool/detfunc.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleCsvControl.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx4
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx2
-rw-r--r--sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx2
-rw-r--r--sd/source/ui/accessibility/AccessibleSlideSorterView.cxx2
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsTheme.hxx18
-rw-r--r--sd/source/ui/slidesorter/view/SlsTheme.cxx25
-rw-r--r--sfx2/source/sidebar/Paint.cxx2
-rw-r--r--starmath/source/accessibility.cxx4
-rw-r--r--starmath/source/tmpdevice.cxx4
-rw-r--r--starmath/source/view.cxx2
-rw-r--r--svtools/source/config/colorcfg.cxx6
-rw-r--r--svtools/source/edit/editsyntaxhighlighter.cxx14
-rw-r--r--svx/source/accessibility/GraphCtlAccessibleContext.cxx2
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx5
-rw-r--r--svx/source/unodraw/unoctabl.cxx8
-rw-r--r--sw/source/core/access/accdoc.cxx2
25 files changed, 62 insertions, 64 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 29fa9380eaf9..ecaf8445eea0 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1136,7 +1136,7 @@ namespace accessibility
{
// #104444# Added to XAccessibleComponent interface
svtools::ColorConfig aColorConfig;
- sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
+ Color nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
return static_cast<sal_Int32>(nColor);
}
diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx
index a475af08b09a..5ab8259f92a7 100644
--- a/editeng/source/accessibility/AccessibleImageBullet.cxx
+++ b/editeng/source/accessibility/AccessibleImageBullet.cxx
@@ -326,7 +326,7 @@ namespace accessibility
// #104444# Added to XAccessibleComponent interface
svtools::ColorConfig aColorConfig;
- sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
+ Color nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
return static_cast<sal_Int32>(nColor);
}
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index 5c60edf117fb..532c96c401f3 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -267,7 +267,7 @@ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContai
{
try
{
- nBackground = ::svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor;
+ nBackground = sal_Int32(::svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor);
}
catch (const css::uno::Exception &)
{
diff --git a/include/svtools/colorcfg.hxx b/include/svtools/colorcfg.hxx
index ad3672d7b83b..983db90311cb 100644
--- a/include/svtools/colorcfg.hxx
+++ b/include/svtools/colorcfg.hxx
@@ -84,7 +84,7 @@ struct ColorConfigValue
{
bool bIsVisible; //validity depends on the element type
- sal_Int32 nColor;
+ ::Color nColor;
ColorConfigValue() : bIsVisible(false), nColor(0) {}
bool operator !=(const ColorConfigValue& rCmp) const
{ return nColor != rCmp.nColor || bIsVisible != rCmp.bIsVisible;}
diff --git a/reportdesign/source/ui/inc/ColorListener.hxx b/reportdesign/source/ui/inc/ColorListener.hxx
index 6150a14c4924..449717760742 100644
--- a/reportdesign/source/ui/inc/ColorListener.hxx
+++ b/reportdesign/source/ui/inc/ColorListener.hxx
@@ -36,7 +36,7 @@ namespace rptui
svtools::ExtendedColorConfig m_aExtendedColorConfig;
OUString m_sColorEntry;
sal_Int32 m_nColor;
- sal_Int32 m_nTextBoundaries;
+ Color m_nTextBoundaries;
bool m_bCollapsed;
bool m_bMarked;
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 8762ad70240b..8ba2a4ac075d 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -1657,9 +1657,9 @@ void ScDetectiveFunc::InitializeColors()
// may be called several times to update colors from configuration
const svtools::ColorConfig& rColorCfg = SC_MOD()->GetColorConfig();
- nArrowColor = rColorCfg.GetColorValue(svtools::CALCDETECTIVE).nColor;
- nErrorColor = rColorCfg.GetColorValue(svtools::CALCDETECTIVEERROR).nColor;
- nCommentColor = rColorCfg.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor;
+ nArrowColor = sal_Int32(rColorCfg.GetColorValue(svtools::CALCDETECTIVE).nColor);
+ nErrorColor = sal_Int32(rColorCfg.GetColorValue(svtools::CALCDETECTIVEERROR).nColor);
+ nCommentColor = sal_Int32(rColorCfg.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor);
bColorsInitialized = true;
}
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index 59544f0d85e4..442e5d9d4d9b 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -885,7 +885,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvGrid::getBackground( )
{
SolarMutexGuard aGuard;
ensureAlive();
- return SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
+ return sal_Int32(SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
}
// XAccessibleContext ---------------------------------------------------------
@@ -1402,7 +1402,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvCell::getBackground( )
{
SolarMutexGuard aGuard;
ensureAlive();
- return SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
+ return sal_Int32(SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
}
// XAccessibleContext -----------------------------------------------------
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 5e8eac4c4a4c..2aed5a341243 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -2444,7 +2444,7 @@ sal_Int32 SAL_CALL ScAccessibleDocument::getBackground( )
{
SolarMutexGuard aGuard;
IsObjectValid();
- return SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
+ return sal_Int32(SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index e5ba30cccc6c..edaa96b58b57 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -1001,7 +1001,7 @@ sal_Int32 SAL_CALL ScAccessibleSpreadsheet::getBackground( )
{
SolarMutexGuard aGuard;
IsObjectValid();
- return SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
+ return sal_Int32(SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
}
//===== XAccessibleContext ==============================================
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index b62761e61306..60fa18819e16 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2387,7 +2387,7 @@ void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor)
if (mpPattern == mpOldPattern && mpCondSet == mpOldCondSet && mpPreviewFontSet == mpOldPreviewFontSet )
return;
- sal_Int32 nConfBackColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
+ Color nConfBackColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
bool bCellContrast = bUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
@@ -4435,7 +4435,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
nRotMax = pRowInfo[nRotY].nRotMaxCol;
ScModule* pScMod = SC_MOD();
- sal_Int32 nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
+ Color nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
bool bCellContrast = mbUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 97b53cbcf162..5d1f3db27f0d 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -836,7 +836,7 @@ sal_Int32 SAL_CALL AccessibleDocumentViewBase::getBackground( )
{
ThrowIfDisposed ();
::osl::MutexGuard aGuard (maMutex);
- return mpViewShell->GetView()->getColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
+ return sal_Int32(mpViewShell->GetView()->getColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
}
} // end of namespace accessibility
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
index 99f7b360fdaf..756395796bcc 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
@@ -370,7 +370,7 @@ sal_Int32 SAL_CALL AccessibleSlideSorterObject::getForeground()
{
ThrowIfDisposed ();
svtools::ColorConfig aColorConfig;
- sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
+ Color nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
return static_cast<sal_Int32>(nColor);
}
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index d070bcd14a6d..6e9348f475ba 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -480,7 +480,7 @@ sal_Int32 SAL_CALL AccessibleSlideSorterView::getForeground()
{
ThrowIfDisposed();
svtools::ColorConfig aColorConfig;
- sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
+ Color nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
return static_cast<sal_Int32>(nColor);
}
diff --git a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
index e9d5d6b29b2c..1f4827c0c5a6 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
@@ -73,7 +73,7 @@ public:
Color_PageCountFontColor,
ColorType_Size_
};
- ColorData GetColor (const ColorType eType);
+ Color GetColor (const ColorType eType);
enum GradientColorType {
Gradient_NormalPage,
@@ -91,12 +91,12 @@ public:
Fill1,
Fill2
};
- ColorData GetGradientColor (
+ Color GetGradientColor (
const GradientColorType eType,
const GradientColorClass eClass);
void SetGradient (
const GradientColorType eType,
- const ColorData aBaseColor,
+ const Color aBaseColor,
const sal_Int32 nSaturationOverride,
const sal_Int32 nBrightnessOverride,
const sal_Int32 nFillStartOffset,
@@ -118,15 +118,15 @@ private:
class GradientDescriptor
{
public:
- ColorData maFillColor1;
- ColorData maFillColor2;
- ColorData maBorderColor1;
- ColorData maBorderColor2;
+ Color maFillColor1;
+ Color maFillColor2;
+ Color maBorderColor1;
+ Color maBorderColor2;
};
- ColorData maBackgroundColor;
+ Color maBackgroundColor;
::std::vector<GradientDescriptor> maGradients;
::std::vector<BitmapEx> maIcons;
- ::std::vector<ColorData> maColor;
+ ::std::vector<Color> maColor;
GradientDescriptor& GetGradient (const GradientColorType eType);
/** Guarded initialization of the specified icon in the maIcons
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index bc38109a7f75..5b22ad40f474 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -32,28 +32,27 @@
namespace sd { namespace slidesorter { namespace view {
-const static ColorData Black = 0x000000;
-const static ColorData White = 0xffffff;
+const static Color Black = 0x000000;
+const static Color White = 0xffffff;
-ColorData ChangeLuminance (const ColorData aColorData, const int nValue)
+Color ChangeLuminance (Color aColor, const int nValue)
{
- Color aColor (aColorData);
if (nValue > 0)
aColor.IncreaseLuminance(nValue);
else
aColor.DecreaseLuminance(-nValue);
- return aColor.GetColor();
+ return aColor;
}
-ColorData HGBAdapt (
- const ColorData aColorData,
+Color HGBAdapt (
+ const Color aColor,
const sal_Int32 nNewSaturation,
const sal_Int32 nNewBrightness)
{
sal_uInt16 nHue (0);
sal_uInt16 nSaturation (0);
sal_uInt16 nBrightness (0);
- Color(aColorData).RGBtoHSB(nHue, nSaturation, nBrightness);
+ aColor.RGBtoHSB(nHue, nSaturation, nBrightness);
return Color::HSBtoRGB(
nHue,
nNewSaturation>=0 ? nNewSaturation : nSaturation,
@@ -88,7 +87,7 @@ void Theme::Update (const std::shared_ptr<controller::Properties>& rpProperties)
maGradients.resize(GradientColorType_Size_);
maColor[Color_Background] = maBackgroundColor;
- const ColorData aSelectionColor (rpProperties->GetSelectionColor().GetColor());
+ const Color aSelectionColor (rpProperties->GetSelectionColor());
maColor[Color_Selection] = aSelectionColor;
if (Color(aSelectionColor).IsBright())
maColor[Color_PageCountFontColor] = Black;
@@ -160,7 +159,7 @@ std::shared_ptr<vcl::Font> Theme::GetFont (
return pFont;
}
-ColorData Theme::GetColor (const ColorType eType)
+Color Theme::GetColor (const ColorType eType)
{
if (sal_uInt32(eType)<maColor.size())
return maColor[eType];
@@ -168,7 +167,7 @@ ColorData Theme::GetColor (const ColorType eType)
return 0;
}
-ColorData Theme::GetGradientColor (
+Color Theme::GetGradientColor (
const GradientColorType eType,
const GradientColorClass eClass)
{
@@ -186,7 +185,7 @@ ColorData Theme::GetGradientColor (
void Theme::SetGradient (
const GradientColorType eType,
- const ColorData aBaseColor,
+ const Color aBaseColor,
const sal_Int32 nSaturationOverride,
const sal_Int32 nBrightnessOverride,
const sal_Int32 nFillStartOffset,
@@ -196,7 +195,7 @@ void Theme::SetGradient (
{
GradientDescriptor& rGradient (GetGradient(eType));
- const ColorData aColor (nSaturationOverride>=0 || nBrightnessOverride>=0
+ const Color aColor (nSaturationOverride>=0 || nBrightnessOverride>=0
? HGBAdapt(aBaseColor, nSaturationOverride, nBrightnessOverride)
: aBaseColor);
diff --git a/sfx2/source/sidebar/Paint.cxx b/sfx2/source/sidebar/Paint.cxx
index 414d0b51608c..6e5a133f3af4 100644
--- a/sfx2/source/sidebar/Paint.cxx
+++ b/sfx2/source/sidebar/Paint.cxx
@@ -43,7 +43,7 @@ Paint::Paint (const Gradient& rGradient)
Paint Paint::Create (const css::uno::Any& rValue)
{
- ColorData aColor (0);
+ Color aColor (0);
if (rValue >>= aColor)
return Paint(Color(aColor));
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index afb79f841ee3..59ab5412c806 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -264,7 +264,7 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getBackground()
if (!pWin)
throw RuntimeException();
Wallpaper aWall( pWin->GetDisplayBackground() );
- ColorData nCol;
+ Color nCol;
if (aWall.IsBitmap() || aWall.IsGradient())
nCol = pWin->GetSettings().GetStyleSettings().GetWindowColor().GetColor();
else
@@ -1689,7 +1689,7 @@ sal_Int32 SAL_CALL SmEditAccessible::getBackground()
if (!pWin)
throw RuntimeException();
Wallpaper aWall( pWin->GetDisplayBackground() );
- ColorData nCol;
+ Color nCol;
if (aWall.IsBitmap() || aWall.IsGradient())
nCol = pWin->GetSettings().GetStyleSettings().GetWindowColor().GetColor();
else
diff --git a/starmath/source/tmpdevice.cxx b/starmath/source/tmpdevice.cxx
index e47bc1b72ffb..3e822a3f7854 100644
--- a/starmath/source/tmpdevice.cxx
+++ b/starmath/source/tmpdevice.cxx
@@ -45,8 +45,8 @@ SmTmpDevice::SmTmpDevice(OutputDevice &rTheDev, bool bUseMap100th_mm) :
Color SmTmpDevice::Impl_GetColor( const Color& rColor )
{
- ColorData nNewCol = rColor.GetColor();
- if (COL_AUTO == nNewCol)
+ Color nNewCol = rColor.GetColor();
+ if (nNewCol == COL_AUTO)
{
if (OUTDEV_PRINTER == rOutDev.GetOutDevType())
nNewCol = COL_BLACK;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index e007b78b0cab..fbd977d07ff2 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -133,7 +133,7 @@ void SmGraphicWindow::ApplyColorConfigValues(const svtools::ColorConfig &rColorC
{
// Note: SetTextColor not necessary since the nodes that
// get painted have the color information.
- SetBackground(Color(static_cast<ColorData>(rColorCfg.GetColorValue(svtools::DOCCOLOR).nColor)));
+ SetBackground(rColorCfg.GetColorValue(svtools::DOCCOLOR).nColor);
}
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index c7be767896a3..de54a88c64d7 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -262,7 +262,7 @@ void ColorConfig_Impl::ImplCommit()
{
pPropValues[nIndex].Name = pColorNames[nIndex];
//save automatic colors as void value
- if(COL_AUTO != sal::static_int_cast<ColorData>(m_aConfigValues[i].nColor))
+ if(m_aConfigValues[i].nColor != COL_AUTO)
pPropValues[nIndex].Value <<= m_aConfigValues[i].nColor;
nIndex++;
@@ -353,7 +353,7 @@ void ColorConfig_Impl::ImplUpdateApplicationSettings()
StyleSettings aStyleSettings( aSettings.GetStyleSettings() );
ColorConfigValue aRet = GetColorConfigValue(svtools::FONTCOLOR);
- if(COL_AUTO == sal::static_int_cast<ColorData>(aRet.nColor))
+ if(aRet.nColor == COL_AUTO)
aRet.nColor = ColorConfig::GetDefaultColor(svtools::FONTCOLOR).GetColor();
Color aFontColor(aRet.nColor);
@@ -490,7 +490,7 @@ ColorConfigValue ColorConfig::GetColorValue(ColorConfigEntry eEntry, bool bSmart
if (bSmart)
{
- if(COL_AUTO == sal::static_int_cast<ColorData>(aRet.nColor))
+ if(aRet.nColor == COL_AUTO)
aRet.nColor = ColorConfig::GetDefaultColor(eEntry).GetColor();
}
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index 004cecdd18f5..99c1fde4c4ea 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -124,13 +124,13 @@ Color MultiLineEditSyntaxHighlight::GetColorValue(TokenType aToken)
{
switch (aToken)
{
- case TokenType::Identifier: aColor = static_cast<ColorData>(m_aColorConfig.GetColorValue(svtools::SQLIDENTIFIER).nColor); break;
- case TokenType::Number: aColor = static_cast<ColorData>(m_aColorConfig.GetColorValue(svtools::SQLNUMBER).nColor); break;
- case TokenType::String: aColor = static_cast<ColorData>(m_aColorConfig.GetColorValue(svtools::SQLSTRING).nColor); break;
- case TokenType::Operator: aColor = static_cast<ColorData>(m_aColorConfig.GetColorValue(svtools::SQLOPERATOR).nColor); break;
- case TokenType::Keywords: aColor = static_cast<ColorData>(m_aColorConfig.GetColorValue(svtools::SQLKEYWORD).nColor); break;
- case TokenType::Parameter: aColor = static_cast<ColorData>(m_aColorConfig.GetColorValue(svtools::SQLPARAMETER).nColor); break;
- case TokenType::Comment: aColor = static_cast<ColorData>(m_aColorConfig.GetColorValue(svtools::SQLCOMMENT).nColor); break;
+ case TokenType::Identifier: aColor = m_aColorConfig.GetColorValue(svtools::SQLIDENTIFIER).nColor; break;
+ case TokenType::Number: aColor = m_aColorConfig.GetColorValue(svtools::SQLNUMBER).nColor; break;
+ case TokenType::String: aColor = m_aColorConfig.GetColorValue(svtools::SQLSTRING).nColor; break;
+ case TokenType::Operator: aColor = m_aColorConfig.GetColorValue(svtools::SQLOPERATOR).nColor; break;
+ case TokenType::Keywords: aColor = m_aColorConfig.GetColorValue(svtools::SQLKEYWORD).nColor; break;
+ case TokenType::Parameter: aColor = m_aColorConfig.GetColorValue(svtools::SQLPARAMETER).nColor; break;
+ case TokenType::Comment: aColor = m_aColorConfig.GetColorValue(svtools::SQLCOMMENT).nColor; break;
default: aColor = Color(0,0,0);
}
break;
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index a5473ada9e25..f42477c0899d 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -434,7 +434,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::grabFocus()
sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getForeground()
{
svtools::ColorConfig aColorConfig;
- sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
+ Color nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
return static_cast<sal_Int32>(nColor);
}
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index 1765cee285ab..86e530a3eca6 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -262,11 +262,10 @@ uno::Any SvxUnoXColorTable::getAny( const XPropertyEntry* pEntry ) const throw()
std::unique_ptr<XPropertyEntry> SvxUnoXColorTable::createEntry(const OUString& rName, const uno::Any& rAny) const
{
- sal_Int32 nColor = 0;
- if( !(rAny >>= nColor) )
+ Color aColor;
+ if( !(rAny >>= aColor) )
return std::unique_ptr<XPropertyEntry>();
- const Color aColor( static_cast<ColorData>(nColor) );
return o3tl::make_unique<XColorEntry>(aColor, rName);
}
diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx
index 677809a5b39e..267726fe93c5 100644
--- a/svx/source/unodraw/unoctabl.cxx
+++ b/svx/source/unodraw/unoctabl.cxx
@@ -92,13 +92,13 @@ void SAL_CALL SvxUnoColorTable::insertByName( const OUString& aName, const uno::
if( hasByName( aName ) )
throw container::ElementExistException();
- sal_Int32 nColor = 0;
- if( !(aElement >>= nColor) )
+ Color aColor;
+ if( !(aElement >>= aColor) )
throw lang::IllegalArgumentException();
if( pList.is() )
{
- pList->Insert(o3tl::make_unique<XColorEntry>(Color(static_cast<ColorData>(nColor)), aName));
+ pList->Insert(o3tl::make_unique<XColorEntry>(aColor, aName));
}
}
@@ -122,7 +122,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno:
if( nIndex == -1 )
throw container::NoSuchElementException();
- pList->Replace(nIndex, o3tl::make_unique<XColorEntry>(Color(static_cast<ColorData>(nColor)), aName ));
+ pList->Replace(nIndex, o3tl::make_unique<XColorEntry>(Color(static_cast<Color>(nColor)), aName ));
}
// XNameAccess
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 7cf9b874e8d7..d58e21167ca2 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -760,7 +760,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
sal_Int32 SAL_CALL SwAccessibleDocument::getBackground()
{
SolarMutexGuard aGuard;
- return SW_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
+ return sal_Int32(SW_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
}
css::uno::Sequence< css::uno::Any >