MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / htmlForAbstractMultipartRelated

Function htmlForAbstractMultipartRelated

src/core/renderer/MCHTMLRenderer.cpp:499–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

497}
498
499static 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
523static void fillTemplateDictionaryFromMCHashMap(ctemplate::TemplateDictionary * dict, HashMap * mcHashMap)
524{

Callers 1

htmlForAbstractPartFunction · 0.85

Calls 5

htmlForAbstractPartFunction · 0.85
objectAtIndexMethod · 0.80
countMethod · 0.45
partsMethod · 0.45
addObjectMethod · 0.45

Tested by

no test coverage detected