| 497 | } |
| 498 | |
| 499 | static String * htmlForAbstractMultipartRelated(AbstractMultipart * part, htmlRendererContext * context) |
| 500 | { |
| 501 | if (part->parts()->count() == 0) { |
| 502 | if (context->pass == 0) { |
| 503 | return NULL; |
| 504 | } |
| 505 | else { |
| 506 | return MCSTR(""); |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | // root of the multipart/related. |
| 511 | AbstractPart * subpart = (AbstractPart *) part->parts()->objectAtIndex(0); |
| 512 | if (context->relatedAttachments != NULL) { |
| 513 | for(unsigned int i = 1 ; i < part->parts()->count() ; i ++) { |
| 514 | AbstractPart * otherSubpart = (AbstractPart *) part->parts()->objectAtIndex(i); |
| 515 | if (context->relatedAttachments != NULL) { |
| 516 | context->relatedAttachments->addObject(otherSubpart); |
| 517 | } |
| 518 | } |
| 519 | } |
| 520 | return htmlForAbstractPart(subpart, context); |
| 521 | } |
| 522 | |
| 523 | static void fillTemplateDictionaryFromMCHashMap(ctemplate::TemplateDictionary * dict, HashMap * mcHashMap) |
| 524 | { |
no test coverage detected