| 3430 | } |
| 3431 | |
| 3432 | static void nsvg__parseGroup(NSVGparser* p, const char** dict) |
| 3433 | { |
| 3434 | NSVGgroup* group; |
| 3435 | NSVGattrib* oldAttr = nsvg__getAttr(p); |
| 3436 | nsvg__pushAttr(p); |
| 3437 | NSVGattrib* curAttr = nsvg__getAttr(p); |
| 3438 | int i; |
| 3439 | int visSet = 0; |
| 3440 | if (!curAttr) { |
| 3441 | return; |
| 3442 | } |
| 3443 | // DBG("parse group\n"); |
| 3444 | group = (NSVGgroup*)AllocateZeroPool(sizeof(NSVGgroup)); |
| 3445 | |
| 3446 | // if (curAttr->id[0] == '\0') //skip anonymous groups |
| 3447 | // return; |
| 3448 | for (i = 0; dict[i]; i += 2) { |
| 3449 | if (strcmp(dict[i], "visibility") == 0) { |
| 3450 | visSet = 1; |
| 3451 | if (strcmp(dict[i+1], "hidden") == 0) { |
| 3452 | group->visibility &= ~NSVG_VIS_VISIBLE; |
| 3453 | } else if (strcmp(dict[i+1], "visible") == 0) { |
| 3454 | group->visibility |= NSVG_VIS_VISIBLE; |
| 3455 | } |
| 3456 | } else nsvg__parseAttr(p, dict[i], dict[i + 1]); |
| 3457 | } |
| 3458 | AsciiStrCpyS(group->id, 64, curAttr->id); |
| 3459 | // DBG("parsed groupID=%s\n", group->id); |
| 3460 | |
| 3461 | if (oldAttr != NULL) { |
| 3462 | group->next = oldAttr->group; |
| 3463 | } |
| 3464 | curAttr->group = group; |
| 3465 | |
| 3466 | if (!visSet) { |
| 3467 | if (group->next != NULL) { |
| 3468 | group->visibility = group->next->visibility; |
| 3469 | } else { |
| 3470 | group->visibility = NSVG_VIS_VISIBLE; |
| 3471 | } |
| 3472 | } |
| 3473 | } |
| 3474 | |
| 3475 | //parse Clover settings for theme |
| 3476 | void XTheme::parseTheme(void* parser, const char** dict) |
no test coverage detected