void CMessageFrame::LoadMessage( MSG_FolderInfo *folderInfo, MessageKey id ) { INTL_CharSetInfo c = LO_GetDocumentCharacterSetInfo( GetMainContext()->GetContext() ); int16 cur_csid = INTL_GetCSIDocCSID( c ); int16 doc_csid = MSG_GetFolderCSID( folderInfo ); if (!doc_csid) doc_csid = INTL_DefaultWinCharSetID(0); if ( cur_csid != doc_csid ) RefreshNewEncoding( doc_csid, FALSE ); MSG_LoadMessage( m_pPane, folderInfo, id ); if (id == MSG_MESSAGEKEYNONE) m_pMessageView->SetAttachments(NULL, 0); else MSG_AddBacktrackMessage( m_pPane, folderInfo, id ); MSG_FolderLine folderLine; MSG_MessageLine messageLine; MSG_GetFolderLineById( m_pMaster, folderInfo, &folderLine ); MSG_GetThreadLineById( m_pPane, id, &messageLine ); SetIsNews( folderLine.flags & MSG_FOLDER_FLAG_NEWSGROUP ? TRUE : FALSE ); m_bCategory = (folderLine.flags & MSG_FOLDER_FLAG_CATEGORY ? TRUE : FALSE); m_pInfoBar->Update(); }
PUBLIC int16 INTL_DefaultTextAttributeCharSetID(iDocumentContext context) { if (context) { INTL_CharSetInfo c = LO_GetDocumentCharacterSetInfo(context); if (INTL_GetCSIWinCSID(c)) return INTL_GetCSIWinCSID(c); } return INTL_DefaultWinCharSetID(context); }
extern "C" XP_Bool FE_CheckFormTextAttributes(MWContext *context, LO_TextAttr *oldAttr, LO_TextAttr *newAttr, int32 type) { if (oldAttr && newAttr && !oldAttr->font_face) { memcpy(newAttr,oldAttr, sizeof(LO_TextAttr)); // setup the text attribute here. CDCCX *pDCCX = CXDC(context); int csid = INTL_DefaultWinCharSetID(context); if (oldAttr->fontmask & LO_FONT_FIXED) { if (csid == CS_LATIN1) { newAttr->font_face = fixFont; } else { newAttr->font_face = (char*)IntlGetUIFixFaceName(csid); } } else { if (csid == CS_LATIN1) { // this is a hack, so default Arial font for form element will not look so // big. if (newAttr->size > 1); newAttr->size -=1; newAttr->font_face = propFont; } else { newAttr->font_face = (char*)IntlGetUIPropFaceName(csid); } } newAttr->font_weight = FW_NORMAL; /* 100, 200, ... 900 */ newAttr->FE_Data = NULL; /* For the front end to store font IDs */ return TRUE; } else return FALSE; }