| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 if (!identifier.languages.isEmpty()) { | 156 if (!identifier.languages.isEmpty()) { |
| 157 // This glyph exists only in certain languages, if we're not specifying
a | 157 // This glyph exists only in certain languages, if we're not specifying
a |
| 158 // language on the referencing element we're unable to use this glyph. | 158 // language on the referencing element we're unable to use this glyph. |
| 159 if (language.isEmpty()) | 159 if (language.isEmpty()) |
| 160 return false; | 160 return false; |
| 161 | 161 |
| 162 // Split subcode from language, if existant. | 162 // Split subcode from language, if existant. |
| 163 String languagePrefix; | 163 String languagePrefix; |
| 164 | 164 |
| 165 size_t subCodeSeparator = language.find('-'); | 165 size_t subCodeSeparator = language.find('-'); |
| 166 if (subCodeSeparator != notFound) | 166 if (subCodeSeparator != kNotFound) |
| 167 languagePrefix = language.left(subCodeSeparator); | 167 languagePrefix = language.left(subCodeSeparator); |
| 168 | 168 |
| 169 Vector<String>::const_iterator it = identifier.languages.begin(); | 169 Vector<String>::const_iterator it = identifier.languages.begin(); |
| 170 Vector<String>::const_iterator end = identifier.languages.end(); | 170 Vector<String>::const_iterator end = identifier.languages.end(); |
| 171 | 171 |
| 172 bool found = false; | 172 bool found = false; |
| 173 for (; it != end; ++it) { | 173 for (; it != end; ++it) { |
| 174 const String& cur = *it; | 174 const String& cur = *it; |
| 175 if (cur == language || cur == languagePrefix) { | 175 if (cur == language || cur == languagePrefix) { |
| 176 found = true; | 176 found = true; |
| 177 break; | 177 break; |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 | 180 |
| 181 if (!found) | 181 if (!found) |
| 182 return false; | 182 return false; |
| 183 } | 183 } |
| 184 | 184 |
| 185 // Check wheter arabic form is compatible | 185 // Check wheter arabic form is compatible |
| 186 return isCompatibleArabicForm(identifier, chars, startPosition, endPosition)
; | 186 return isCompatibleArabicForm(identifier, chars, startPosition, endPosition)
; |
| 187 } | 187 } |
| 188 | 188 |
| 189 } | 189 } |
| 190 | 190 |
| 191 #endif | 191 #endif |
| OLD | NEW |