From: Fridrich S. <str...@us...> - 2005-05-11 14:24:20
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28511/src/lib Modified Files: WP6HLContentListener.cpp Log Message: Ignore font size of 0 points (fixes http://bugzilla.abisource.com/show_bug.cgi?id=8830) Index: WP6HLContentListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6HLContentListener.cpp,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** WP6HLContentListener.cpp 11 Mar 2005 17:37:52 -0000 1.78 --- WP6HLContentListener.cpp 11 May 2005 14:24:06 -0000 1.79 *************** *** 608,620 **** _flushText(); ! m_ps->m_fontSize = rint((double)((((float)matchedFontPointSize)/100.0f)*2.0f)); ! // We compute the real space after paragraph in inches using the size of the font and relative spacing. ! // We have to recompute this every change of fontSize. ! m_ps->m_paragraphMarginBottom = ! (float)(((m_parseState->m_paragraphMarginBottomRelative - 1.0f)*m_ps->m_fontSize)/72.0f) + ! m_parseState->m_paragraphMarginBottomAbsolute; ! const WP6FontDescriptorPacket *fontDescriptorPacket = NULL; ! if (fontDescriptorPacket = dynamic_cast<const WP6FontDescriptorPacket *>(WP6LLListener::getPrefixDataPacket(fontPID))) { m_ps->m_fontName->sprintf("%s", fontDescriptorPacket->getFontName()); } m_ps->m_textAttributesChanged = true; --- 608,626 ---- _flushText(); ! if (matchedFontPointSize) ! { ! m_ps->m_fontSize = rint((double)((((float)matchedFontPointSize)/100.0f)*2.0f)); ! // We compute the real space after paragraph in inches using the size of the font and relative spacing. ! // We have to recompute this every change of fontSize. ! m_ps->m_paragraphMarginBottom = ! (float)(((m_parseState->m_paragraphMarginBottomRelative - 1.0f)*m_ps->m_fontSize)/72.0f) + ! m_parseState->m_paragraphMarginBottomAbsolute; ! } ! if (fontPID) ! { ! const WP6FontDescriptorPacket *fontDescriptorPacket = NULL; ! if (fontDescriptorPacket = dynamic_cast<const WP6FontDescriptorPacket *>(WP6LLListener::getPrefixDataPacket(fontPID))) { m_ps->m_fontName->sprintf("%s", fontDescriptorPacket->getFontName()); + } } m_ps->m_textAttributesChanged = true; |