| 1193 | } |
| 1194 | |
| 1195 | ResultType Map::CaseSense(ResultToken &aResultToken, int aID, int aFlags, ExprTokenType *aParam[], int aParamCount) |
| 1196 | { |
| 1197 | if (IS_INVOKE_GET) |
| 1198 | { |
| 1199 | if (mFlags & MapUseLocale) |
| 1200 | _o_return_p(_T("Locale")); |
| 1201 | if (mFlags & MapCaseless) |
| 1202 | _o_return_p(_T("Off")); |
| 1203 | _o_return_p(_T("On")); |
| 1204 | } |
| 1205 | |
| 1206 | // Do not permit a change of flags if the Map contains string keys, as the expected order |
| 1207 | // may not match the actual order. To simplify the error message and documentation, |
| 1208 | // the Map must be empty of other types of keys as well. |
| 1209 | if (mCount) |
| 1210 | _o_throw(_T("Map must be empty")); |
| 1211 | |
| 1212 | LPTSTR value = ParamIndexToString(0, _f_number_buf); |
| 1213 | switch (Line::ConvertStringCaseSense(value)) |
| 1214 | { |
| 1215 | case SCS_SENSITIVE: |
| 1216 | mFlags &= ~(MapCaseless | MapUseLocale); |
| 1217 | break; |
| 1218 | case SCS_INSENSITIVE_LOCALE: |
| 1219 | mFlags |= (MapCaseless | MapUseLocale); |
| 1220 | break; |
| 1221 | case SCS_INSENSITIVE: |
| 1222 | mFlags = (mFlags | MapCaseless) & ~MapUseLocale; |
| 1223 | break; |
| 1224 | default: |
| 1225 | _o_throw_value(ERR_INVALID_VALUE, value); |
| 1226 | } |
| 1227 | return OK; |
| 1228 | } |
| 1229 | |
| 1230 | ResultType Object::GetCapacity(ResultToken &aResultToken, int aID, int aFlags, ExprTokenType *aParam[], int aParamCount) |
| 1231 | { |
nothing calls this directly
no outgoing calls
no test coverage detected