| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 m_unitType = SVG_ANGLETYPE_UNSPECIFIED; | 156 m_unitType = SVG_ANGLETYPE_UNSPECIFIED; |
| 157 return; | 157 return; |
| 158 } | 158 } |
| 159 | 159 |
| 160 float valueInSpecifiedUnits = 0; | 160 float valueInSpecifiedUnits = 0; |
| 161 SVGAngleType unitType = SVG_ANGLETYPE_UNKNOWN; | 161 SVGAngleType unitType = SVG_ANGLETYPE_UNKNOWN; |
| 162 | 162 |
| 163 bool success = value.is8Bit() ? parseValue<LChar>(value, valueInSpecifiedUni
ts, unitType) | 163 bool success = value.is8Bit() ? parseValue<LChar>(value, valueInSpecifiedUni
ts, unitType) |
| 164 : parseValue<UChar>(value, valueInSpecifiedUni
ts, unitType); | 164 : parseValue<UChar>(value, valueInSpecifiedUni
ts, unitType); |
| 165 if (!success) { | 165 if (!success) { |
| 166 ec = SYNTAX_ERR; | 166 ec = SyntaxError; |
| 167 return; | 167 return; |
| 168 } | 168 } |
| 169 | 169 |
| 170 m_unitType = unitType; | 170 m_unitType = unitType; |
| 171 m_valueInSpecifiedUnits = valueInSpecifiedUnits; | 171 m_valueInSpecifiedUnits = valueInSpecifiedUnits; |
| 172 } | 172 } |
| 173 | 173 |
| 174 void SVGAngle::newValueSpecifiedUnits(unsigned short unitType, float valueInSpec
ifiedUnits, ExceptionCode& ec) | 174 void SVGAngle::newValueSpecifiedUnits(unsigned short unitType, float valueInSpec
ifiedUnits, ExceptionCode& ec) |
| 175 { | 175 { |
| 176 if (unitType == SVG_ANGLETYPE_UNKNOWN || unitType > SVG_ANGLETYPE_GRAD) { | 176 if (unitType == SVG_ANGLETYPE_UNKNOWN || unitType > SVG_ANGLETYPE_GRAD) { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 break; | 245 break; |
| 246 case SVG_ANGLETYPE_UNKNOWN: | 246 case SVG_ANGLETYPE_UNKNOWN: |
| 247 ASSERT_NOT_REACHED(); | 247 ASSERT_NOT_REACHED(); |
| 248 break; | 248 break; |
| 249 } | 249 } |
| 250 | 250 |
| 251 m_unitType = static_cast<SVGAngleType>(unitType); | 251 m_unitType = static_cast<SVGAngleType>(unitType); |
| 252 } | 252 } |
| 253 | 253 |
| 254 } | 254 } |
| OLD | NEW |