diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-02-21 11:16:59 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-02-21 12:04:27 +0100 |
commit | 8a467da032954f4591ed30c0ca3a9bc05b343e06 (patch) | |
tree | 32734700993c535c1b2511382bc5be89d7316a11 /svtools | |
parent | 0f1b3df7a35251e077404c4534bc14a35fd0501a (diff) |
html: Make GetColor() working in lower case.
To be consistent with the rest that works in lower case now.
Change-Id: I6fe40e71393230bbde8e283b1f98479bf644c610
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 6517e5c8ca92..5d49ab5eafdf 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -229,8 +229,7 @@ void HTMLOption::GetColor( Color& rColor ) const DBG_ASSERT( (nToken>=HTML_OPTION_COLOR_START && nToken<HTML_OPTION_COLOR_END) || nToken==HTML_O_SIZE, "GetColor: Option is not a color." ); - OUString aTmp( aValue ); - aTmp = aTmp.toAsciiUpperCase(); + OUString aTmp(aValue.toAsciiLowerCase()); sal_uInt32 nColor = SAL_MAX_UINT32; if( '#' != aTmp[0] ) nColor = GetHTMLColor( aTmp ); @@ -252,9 +251,9 @@ void HTMLOption::GetColor( Color& rColor ) const } nColor *= 16; if( c >= '0' && c <= '9' ) - nColor += (c - 48); - else if( c >= 'A' && c <= 'F' ) - nColor += (c - 55); + nColor += (c - '0'); + else if( c >= 'a' && c <= 'f' ) + nColor += (c + 0xa - 'a'); } } |