summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-22 13:29:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-26 07:20:25 +0100
commitace95cf48ee88d78a17765e5f4f26bb93d5940cf (patch)
tree206d070d4b9eef0c84a78deda5df863ac174354c /editeng
parentfa2dd2ba03f8be1f148dca8f6164daaf7bbf7d96 (diff)
ColorData->Color in various
Change-Id: I22018b6a535224316d93bfd621771248b873a218 Reviewed-on: https://gerrit.libreoffice.org/50167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/itemtype.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/editeng/source/items/itemtype.cxx b/editeng/source/items/itemtype.cxx
index f3b26da98e09..3167a5996870 100644
--- a/editeng/source/items/itemtype.cxx
+++ b/editeng/source/items/itemtype.cxx
@@ -144,20 +144,15 @@ OUString GetColorString( const Color& rCol )
if (rCol.GetColor() == COL_AUTO)
return EditResId(RID_SVXSTR_AUTOMATIC);
- OUString sStr;
-
- ColorData nColData =
- RGB_COLORDATA( rCol.GetRed(), rCol.GetGreen(), rCol.GetBlue() );
- sal_uInt16 nColor = 0;
-
- static const ColorData aColAry[] = {
+ static const Color aColAry[] = {
COL_BLACK, COL_BLUE, COL_GREEN, COL_CYAN,
COL_RED, COL_MAGENTA, COL_BROWN, COL_GRAY,
COL_LIGHTGRAY, COL_LIGHTBLUE, COL_LIGHTGREEN, COL_LIGHTCYAN,
COL_LIGHTRED, COL_LIGHTMAGENTA, COL_YELLOW, COL_WHITE };
+ sal_uInt16 nColor = 0;
while ( nColor < SAL_N_ELEMENTS(aColAry) &&
- aColAry[nColor] != nColData )
+ aColAry[nColor] != rCol.GetRGBColor() )
{
nColor += 1;
}
@@ -184,6 +179,7 @@ OUString GetColorString( const Color& rCol )
static_assert(SAL_N_ELEMENTS(aColAry) == SAL_N_ELEMENTS(RID_SVXITEMS_COLORS), "must match");
+ OUString sStr;
if ( nColor < SAL_N_ELEMENTS(aColAry) )
sStr = EditResId(RID_SVXITEMS_COLORS[nColor]);