--- ie_exp_HTML.cpp.orig Thu Dec 2 13:12:06 1999 +++ ie_exp_HTML.cpp Fri Dec 3 11:22:43 1999 @@ -128,6 +128,11 @@ UT_Bool m_bInBlock; UT_Bool m_bInSpan; const PP_AttrProp* m_pAP_Span; + + // Need to look up proper type, and place to stick #defines... + + UT_uint16 m_iBlockType; + }; void s_HTML_Listener::_closeSection(void) @@ -149,7 +154,29 @@ return; } - m_pie->write("

\n"); + if(m_iBlockType == BT_NORMAL) + m_pie->write("

\n"); + + else if(m_iBlockType == BT_HEADING1) + m_pie->write("\n"); + + else if(m_iBlockType == BT_HEADING2) + m_pie->write("\n"); + + else if(m_iBlockType == BT_HEADING3) + m_pie->write("\n"); + + else if(m_iBlockType == BT_BLOCKTEXT) + m_pie->write("\n"); + + else if(m_iBlockType == BT_PLAINTEXT) + m_pie->write("\n"); + + // Add "catchall" for now + + else + m_pie->write("

\n"); + m_bInBlock = UT_FALSE; return; } @@ -164,19 +191,89 @@ const PP_AttrProp * pAP = NULL; UT_Bool bHaveProp = m_pDocument->getAttrProp(api,&pAP); - m_pie->write("getAttribute("style", szValue)) + ) + { + + if(0 == UT_stricmp(szValue, "Heading 1")) + { + + //

... + + m_iBlockType = BT_HEADING1; + m_pie->write(" ... + + m_iBlockType = BT_HEADING2; + m_pie->write(" ... + + m_iBlockType = BT_HEADING3; + m_pie->write(" ... + + m_iBlockType = BT_BLOCKTEXT; + m_pie->write(" ... + + m_iBlockType = BT_PLAINTEXT; + m_pie->write(" ... + + m_iBlockType = BT_NORMAL; + m_pie->write(" with no style attribute ... + + m_iBlockType = BT_NORMAL; + m_pie->write("getProperty("text-align", szValue)) + m_iBlockType == BT_NORMAL && (pAP->getProperty("text-align", szValue)) ) { m_pie->write(" ALIGN=\""); m_pie->write(szValue); m_pie->write("\""); } + } + else + { + + //

with no style attribute, and no properties either + + m_iBlockType = BT_NORMAL; + m_pie->write("write(">");