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 /writerfilter | |
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 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/ConversionHelper.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdispatchvalue.cxx | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx index 91b1fb47266f..81916a8c224d 100644 --- a/writerfilter/source/dmapper/ConversionHelper.cxx +++ b/writerfilter/source/dmapper/ConversionHelper.cxx @@ -241,11 +241,11 @@ void MakeBorderLine( sal_Int32 nLineThickness, sal_Int32 nLineToken, sal_Int32 nLineColor, table::BorderLine2& rToFill, bool bIsOOXML ) { - static const sal_Int32 aBorderDefColor[] = + static const Color aBorderDefColor[] = { // The first item means automatic color (COL_AUTO), but we // do not use it anyway (see the next statement) .-) - 0, COL_BLACK, COL_LIGHTBLUE, COL_LIGHTCYAN, COL_LIGHTGREEN, + COL_AUTO, COL_BLACK, COL_LIGHTBLUE, COL_LIGHTCYAN, COL_LIGHTGREEN, COL_LIGHTMAGENTA, COL_LIGHTRED, COL_YELLOW, COL_WHITE, COL_BLUE, COL_CYAN, COL_GREEN, COL_MAGENTA, COL_RED, COL_BROWN, COL_GRAY, COL_LIGHTGRAY @@ -254,7 +254,7 @@ void MakeBorderLine( sal_Int32 nLineThickness, sal_Int32 nLineToken, if(!nLineColor) ++nLineColor; if(!bIsOOXML && sal::static_int_cast<sal_uInt32>(nLineColor) < SAL_N_ELEMENTS(aBorderDefColor)) - nLineColor = aBorderDefColor[nLineColor]; + nLineColor = sal_Int32(aBorderDefColor[nLineColor]); sal_Int32 nLineType = lcl_convertBorderStyleFromToken(nLineToken); diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 8cbb6c6eff4b..d20adca936fa 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -634,7 +634,7 @@ table::ShadowFormat PropertyMap::getShadowFromBorder( const table::BorderLine2& // property of the page style, with shadow location, distance and // color. See SwWW8ImplReader::SetShadow(). table::ShadowFormat aFormat; - aFormat.Color = COL_BLACK; + aFormat.Color = sal_Int32(COL_BLACK); aFormat.Location = table::ShadowLocation_BOTTOM_RIGHT; aFormat.ShadowWidth = rBorder.LineWidth; return aFormat; diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx index efe8a1ef0c1f..3408375884a1 100644 --- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx +++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx @@ -506,7 +506,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) case RTF_CHCBPAT: { auto pValue - = std::make_shared<RTFValue>(nParam ? sal_uInt32(getColorTable(nParam)) : COL_AUTO); + = std::make_shared<RTFValue>(sal_uInt32(nParam ? getColorTable(nParam) : COL_AUTO)); putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_EG_RPrBase_shd, NS_ooxml::LN_CT_Shd_fill, pValue); } @@ -536,7 +536,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) case RTF_HIGHLIGHT: { auto pValue - = std::make_shared<RTFValue>(nParam ? sal_uInt32(getColorTable(nParam)) : COL_AUTO); + = std::make_shared<RTFValue>(sal_uInt32(nParam ? getColorTable(nParam) : COL_AUTO)); m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_highlight, pValue); } break; |