Fix for bug #300809: Composer adds and deletes tags; bad image display;

HTML does not validate
Modified CEditContainerElement::PrintEnd() to fix problem where we were
not closing all CENTER tags.
This commit is contained in:
kin%netscape.com 1998-07-24 23:04:39 +00:00
parent b2fd4c6cf1
commit e017a96635

View File

@ -7026,11 +7026,11 @@ void CEditContainerElement::PrintEnd( CPrintState *pPrintState ){
pPrintState->m_pOut->Printf( space );
pPrintState->m_iCharPos += XP_STRLEN(space);
}
if( (GetAlignment() == ED_ALIGN_RIGHT && !IsEmpty() )&& (!pNextContainer || !CompareAlignments(pNextContainer->GetAlignment(),GetAlignment())) ) {
if( (GetAlignment() == ED_ALIGN_RIGHT && !IsEmpty() )&& (!pNextContainer || pNextContainer->GetType() != P_NSDT || !CompareAlignments(pNextContainer->GetAlignment(),GetAlignment())) ) {
pPrintState->m_pOut->Printf( "</DIV>");
bNeedReturn = TRUE;
}
else if(( GetAlignment() == ED_ALIGN_ABSCENTER && !IsEmpty() ) && (!pNextContainer || !CompareAlignments(pNextContainer->GetAlignment(),GetAlignment())) ) {
else if(( GetAlignment() == ED_ALIGN_ABSCENTER && !IsEmpty() ) && (!pNextContainer || pNextContainer->GetType() != P_NSDT || !CompareAlignments(pNextContainer->GetAlignment(),GetAlignment())) ) {
pPrintState->m_pOut->Printf( "</CENTER>");
bNeedReturn = TRUE;
}