You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
(28) |
Jul
(15) |
Aug
(23) |
Sep
(2) |
Oct
(13) |
Nov
(26) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(1) |
Feb
(2) |
Mar
(5) |
Apr
(4) |
May
(70) |
Jun
(32) |
Jul
(27) |
Aug
(25) |
Sep
(8) |
Oct
(16) |
Nov
(30) |
Dec
(30) |
2007 |
Jan
(17) |
Feb
(7) |
Mar
(6) |
Apr
(36) |
May
(19) |
Jun
(82) |
Jul
(99) |
Aug
(44) |
Sep
(60) |
Oct
(106) |
Nov
(47) |
Dec
(37) |
2008 |
Jan
(5) |
Feb
(5) |
Mar
(4) |
Apr
(16) |
May
(2) |
Jun
|
Jul
(20) |
Aug
(5) |
Sep
|
Oct
(95) |
Nov
(104) |
Dec
(23) |
2009 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(8) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(1) |
Jun
(46) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Fridrich S. <str...@us...> - 2005-11-21 14:18:37
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1446/src/lib Modified Files: Tag: fs_refactoring2 WP3Listener.cpp Log Message: Remove some unnecessary code Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -C2 -d -r1.1.2.7 -r1.1.2.8 *** WP3Listener.cpp 21 Nov 2005 13:43:49 -0000 1.1.2.7 --- WP3Listener.cpp 21 Nov 2005 14:18:26 -0000 1.1.2.8 *************** *** 200,204 **** throw ParseException(); - RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); while (m_ps->m_currentTableCol < m_parseState->m_numColumnsToSkip.size() && m_parseState->m_numColumnsToSkip[m_ps->m_currentTableCol]) { --- 200,203 ---- *************** *** 206,210 **** m_ps->m_currentTableCol++; } ! m_parseState->m_numColumnsToSkip[m_ps->m_currentTableCol] += (m_parseState->m_rowSpan - 1); _openTableCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, false, false, 0x00000000, NULL, NULL, &tmpCellBorderColor, TOP); --- 205,210 ---- m_ps->m_currentTableCol++; } ! m_parseState->m_numColumnsToSkip[m_ps->m_currentTableCol] += (m_parseState->m_rowSpan - 1); ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); _openTableCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, false, false, 0x00000000, NULL, NULL, &tmpCellBorderColor, TOP); *************** *** 221,225 **** insertEOL(); _closeTableCell(); - RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); while (m_ps->m_currentTableCol < m_parseState->m_numColumnsToSkip.size() && m_parseState->m_colSpan > 0) { --- 221,224 ---- *************** *** 242,246 **** closeCell(); - RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); while (m_ps->m_currentTableCol < m_parseState->m_numColumnsToSkip.size()) { --- 241,244 ---- *************** *** 250,254 **** m_ps->m_currentTableCol++; } - _closeTableRow(); } --- 248,251 ---- |
From: Fridrich S. <str...@us...> - 2005-11-21 13:44:07
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24543/src/lib Modified Files: Tag: fs_refactoring2 WP3FileStructure.h WP3FontGroup.cpp WP3FontGroup.h WP3Listener.cpp WP3Listener.h WP6Listener.h WPXListener.cpp WPXListener.h libwpd_internal.cpp libwpd_internal.h Log Message: Font colour for WP3 parser, although there are no documents to test it + some more table related work Index: WPXListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WPXListener.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WPXListener.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WPXListener.cpp 21 Nov 2005 13:43:49 -0000 1.1.2.2 *************** *** 202,206 **** } m_ps->m_isSectionOpened = false; - } --- 202,205 ---- Index: WP3FileStructure.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3FileStructure.h,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -C2 -d -r1.9.2.1 -r1.9.2.2 *** WP3FileStructure.h 17 Nov 2005 15:34:13 -0000 1.9.2.1 --- WP3FileStructure.h 21 Nov 2005 13:43:49 -0000 1.9.2.2 *************** *** 76,79 **** --- 76,80 ---- /* Font Group */ + #define WP3_FONT_GROUP_SET_TEXT_COLOR 0x00 #define WP3_FONT_GROUP_SET_TEXT_FONT 0x01 #define WP3_FONT_GROUP_SET_FONT_SIZE 0x02 Index: libwpd_internal.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.h,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -C2 -d -r1.17 -r1.17.2.1 *** libwpd_internal.h 5 Oct 2005 19:07:42 -0000 1.17 --- libwpd_internal.h 21 Nov 2005 13:43:49 -0000 1.17.2.1 *************** *** 152,155 **** --- 152,157 ---- { _RGBSColor(uint8_t r, uint8_t g, uint8_t b, uint8_t s); + _RGBSColor(uint16_t red, uint16_t green, uint16_t blue); // Construct + // RBBSColor from double precision RGB color used by WP3.x for Mac _RGBSColor(); // initializes all values to 0 uint8_t m_r; Index: WP3FontGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3FontGroup.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP3FontGroup.cpp 17 Nov 2005 15:34:13 -0000 1.1.2.1 --- WP3FontGroup.cpp 21 Nov 2005 13:43:49 -0000 1.1.2.2 *************** *** 32,36 **** WP3VariableLengthGroup(), m_fontName(NULL), ! m_fontSize(0) { _read(input); --- 32,37 ---- WP3VariableLengthGroup(), m_fontName(NULL), ! m_fontSize(0), ! m_fontColor() { _read(input); *************** *** 49,52 **** --- 50,62 ---- switch (getSubGroup()) { + case WP3_FONT_GROUP_SET_TEXT_COLOR: + input->seek(6, WPX_SEEK_CUR); + { + uint16_t tmpRed = readU16(input, true); + uint16_t tmpGreen = readU16(input, true); + uint16_t tmpBlue = readU16(input, true); + m_fontColor = RGBSColor(tmpRed, tmpGreen, tmpBlue); + } + break; case WP3_FONT_GROUP_SET_TEXT_FONT: input->seek(12, WPX_SEEK_CUR); *************** *** 72,75 **** --- 82,88 ---- switch (getSubGroup()) { + case WP3_FONT_GROUP_SET_TEXT_COLOR: + listener->setTextColor(&m_fontColor); + break; case WP3_FONT_GROUP_SET_TEXT_FONT: listener->setTextFont(m_fontName); Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** WP3Listener.cpp 18 Nov 2005 10:06:23 -0000 1.1.2.6 --- WP3Listener.cpp 21 Nov 2005 13:43:49 -0000 1.1.2.7 *************** *** 33,40 **** --- 33,42 ---- m_rowSpan(1) { + m_textBuffer.clear(); } _WP3ParsingState::~_WP3ParsingState() { + m_textBuffer.clear(); } *************** *** 43,47 **** m_parseState(new WP3ParsingState) { - m_textBuffer.clear(); } --- 45,48 ---- *************** *** 62,66 **** if (!m_ps->m_isSpanOpened) _openSpan(); ! appendUCS4(m_textBuffer, (uint32_t)character); } } --- 63,67 ---- if (!m_ps->m_isSpanOpened) _openSpan(); ! appendUCS4(m_parseState->m_textBuffer, (uint32_t)character); } } *************** *** 85,97 **** { if (!m_ps->m_isTableRowOpened) ! insertRow(0, true, false); if (!m_ps->m_isTableCellOpened) { ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! insertCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, false, false, 0x00000000, ! NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); ! m_parseState->m_colSpan=1; ! m_parseState->m_rowSpan=1; } } --- 86,94 ---- { if (!m_ps->m_isTableRowOpened) ! insertRow(); if (!m_ps->m_isTableCellOpened) { ! insertCell(); } } *************** *** 147,150 **** --- 144,148 ---- m_ps->m_tableDefinition.columns.clear(); m_ps->m_tableDefinition.columnsProperties.clear(); + m_parseState->m_numColumnsToSkip.clear(); } } *************** *** 168,171 **** --- 166,172 ---- m_ps->m_tableDefinition.columnsProperties.push_back(colProp); + + // initialize the variable that tells us how many columns to skip + m_parseState->m_numColumnsToSkip.push_back(0); } } *************** *** 186,202 **** } ! void WP3Listener::insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) { if (!isUndoOn()) ! { ! float rowHeightInch = (float)((double) rowHeight / (double)WPX_NUM_WPUS_PER_INCH); ! _openTableRow(rowHeightInch, isMinimumHeight, isHeaderRow); ! } } ! void WP3Listener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, ! const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes) { if (!isUndoOn()) --- 187,197 ---- } ! void WP3Listener::insertRow() { if (!isUndoOn()) ! _openTableRow(0, true, false); } ! void WP3Listener::insertCell() { if (!isUndoOn()) *************** *** 204,214 **** if (m_ps->m_currentTableRow < 0) // cell without a row, invalid throw ParseException(); ! _openTableCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, borderBits, ! cellFgColor, cellBgColor, cellBorderColor, cellVerticalAlignment); m_ps->m_isCellWithoutParagraph = true; ! if (useCellAttributes) ! m_ps->m_cellAttributeBits = cellAttributes; ! else ! m_ps->m_cellAttributeBits = m_ps->m_tableDefinition.columnsProperties[m_ps->m_currentTableCol-1].m_attributes; } } --- 199,215 ---- if (m_ps->m_currentTableRow < 0) // cell without a row, invalid throw ParseException(); ! ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! while (m_ps->m_currentTableCol < m_parseState->m_numColumnsToSkip.size() && m_parseState->m_numColumnsToSkip[m_ps->m_currentTableCol]) ! { ! m_parseState->m_numColumnsToSkip[m_ps->m_currentTableCol]--; ! m_ps->m_currentTableCol++; ! } ! m_parseState->m_numColumnsToSkip[m_ps->m_currentTableCol] += (m_parseState->m_rowSpan - 1); ! _openTableCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, false, false, 0x00000000, ! NULL, NULL, &tmpCellBorderColor, TOP); ! m_parseState->m_colSpan--; m_ps->m_isCellWithoutParagraph = true; ! m_ps->m_cellAttributeBits = 0x00000000; } } *************** *** 220,223 **** --- 221,236 ---- insertEOL(); _closeTableCell(); + RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); + while (m_ps->m_currentTableCol < m_parseState->m_numColumnsToSkip.size() && m_parseState->m_colSpan > 0) + { + if (m_parseState->m_numColumnsToSkip[m_ps->m_currentTableCol]) // This case should not happen, so if it does it means that we did something wrong + throw ParseException(); + m_parseState->m_numColumnsToSkip[m_ps->m_currentTableCol] += (m_parseState->m_rowSpan - 1); + m_ps->m_currentTableCol++; + m_parseState->m_colSpan--; + } + m_parseState->m_rowSpan = 1; + m_parseState->m_colSpan = 1; + } } *************** *** 228,231 **** --- 241,254 ---- { closeCell(); + + RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); + while (m_ps->m_currentTableCol < m_parseState->m_numColumnsToSkip.size()) + { + if (!m_parseState->m_numColumnsToSkip[m_ps->m_currentTableCol]) // This case should not happen, so if it does it means that we did something wrong + throw ParseException(); + m_parseState->m_numColumnsToSkip[m_ps->m_currentTableCol]--; + m_ps->m_currentTableCol++; + } + _closeTableRow(); } *************** *** 402,405 **** --- 425,438 ---- } + void WP3Listener::setTextColor(const RGBSColor *fontColor) + { + if (!isUndoOn()) + { + _closeSpan(); + + *(m_ps->m_fontColor) = *fontColor; + } + } + void WP3Listener::setTextFont(const char* fontName) { *************** *** 428,440 **** { if (!m_ps->m_isTableRowOpened) ! insertRow(0, true, false); if (!m_ps->m_isTableCellOpened) { ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! insertCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, false, false, 0x00000000, ! NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); ! m_parseState->m_colSpan=1; ! m_parseState->m_rowSpan=1; } } --- 461,469 ---- { if (!m_ps->m_isTableRowOpened) ! insertRow(); if (!m_ps->m_isTableCellOpened) { ! insertCell(); } } *************** *** 449,454 **** void WP3Listener::_flushText() { ! if (m_textBuffer.len()) ! m_listenerImpl->insertText(m_textBuffer); ! m_textBuffer.clear(); } --- 478,483 ---- void WP3Listener::_flushText() { ! if (m_parseState->m_textBuffer.len()) ! m_listenerImpl->insertText(m_parseState->m_textBuffer); ! m_parseState->m_textBuffer.clear(); } Index: WP6Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6Listener.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** WP6Listener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 --- WP6Listener.h 21 Nov 2005 13:43:49 -0000 1.1.2.3 *************** *** 65,68 **** --- 65,73 ---- virtual void headerFooterGroup(const uint8_t headerFooterType, const uint8_t occurenceBits, const uint16_t textPID) = 0; virtual void suppressPageCharacteristics(const uint8_t suppressCode) = 0; + virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) = 0; + virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, + const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, + const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, + const bool useCellAttributes, const uint32_t cellAttributes) = 0; void setPrefixData(WP6PrefixData *prefixData) { m_prefixData = prefixData; } Index: WP3FontGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3FontGroup.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP3FontGroup.h 17 Nov 2005 15:34:13 -0000 1.1.2.1 --- WP3FontGroup.h 21 Nov 2005 13:43:49 -0000 1.1.2.2 *************** *** 37,40 **** --- 37,42 ---- private: + /* Set Text Color */ + RGBSColor m_fontColor; /* Set Text Font */ char* m_fontName; Index: libwpd_internal.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.cpp,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -C2 -d -r1.19 -r1.19.2.1 *** libwpd_internal.cpp 5 Oct 2005 19:07:42 -0000 1.19 --- libwpd_internal.cpp 21 Nov 2005 13:43:49 -0000 1.19.2.1 *************** *** 943,946 **** --- 943,970 ---- } + _RGBSColor::_RGBSColor(uint16_t red, uint16_t green, uint16_t blue) + { + int minRGB = red; + if (minRGB > green) + minRGB = green; + if (minRGB > blue) + minRGB = blue; + + if (minRGB >= 255) + { + m_r = 255; + m_g = 255; + m_b = 255; + m_s = 100; + } + else + { + m_r = (uint8_t)rint(255*((double)(red - minRGB))/((double)(65535 - minRGB))); + m_g = (uint8_t)rint(255*((double)(green - minRGB))/((double)(65535 - minRGB))); + m_b = (uint8_t)rint(255*((double)(blue - minRGB))/((double)(65535 - minRGB))); + m_s = (uint8_t)rint(100*((double)(65535 - minRGB))/(double)65535); + } + } + _WPXTabStop::_WPXTabStop(float position, WPXTabAlignment alignment, uint16_t leaderCharacter, uint8_t leaderNumSpaces) : m_position(position), Index: WPXListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WPXListener.h,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** WPXListener.h 17 Nov 2005 15:34:13 -0000 1.1.2.3 --- WPXListener.h 21 Nov 2005 13:43:49 -0000 1.1.2.4 *************** *** 195,203 **** virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) = 0; virtual void startTable() = 0; - virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) = 0; - virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, - const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, - const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, - const bool useCellAttributes, const uint32_t cellAttributes) = 0; virtual void endTable() = 0; --- 195,198 ---- Index: WP3Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.h,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** WP3Listener.h 17 Nov 2005 15:34:13 -0000 1.1.2.4 --- WP3Listener.h 21 Nov 2005 13:43:49 -0000 1.1.2.5 *************** *** 36,39 **** --- 36,41 ---- uint16_t m_colSpan; uint16_t m_rowSpan; + WPXString m_textBuffer; + std::vector<unsigned int> m_numColumnsToSkip; }; *************** *** 67,75 **** virtual void addTableColumnDefinition(const uint32_t width, const uint32_t leftGutter, const uint32_t rightGutter, const uint32_t attributes, const uint8_t alignment); virtual void startTable(); ! virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); ! virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, ! const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes); virtual void closeCell(); virtual void closeRow(); --- 69,74 ---- virtual void addTableColumnDefinition(const uint32_t width, const uint32_t leftGutter, const uint32_t rightGutter, const uint32_t attributes, const uint8_t alignment); virtual void startTable(); ! virtual void insertRow(); ! virtual void insertCell(); virtual void closeCell(); virtual void closeRow(); *************** *** 78,81 **** --- 77,81 ---- virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel); virtual void justificationChange(const uint8_t justification); + virtual void setTextColor(const RGBSColor * fontColor); virtual void setTextFont(const char* fontName); virtual void setFontSize(const uint16_t fontSize); *************** *** 89,94 **** void _changeList() {}; - WPXString m_textBuffer; - WP3ParsingState *m_parseState; }; --- 89,92 ---- |
From: Fridrich S. <str...@us...> - 2005-11-18 10:06:31
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23364/src/lib Modified Files: Tag: fs_refactoring2 WP3Listener.cpp Log Message: another small fix Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** WP3Listener.cpp 17 Nov 2005 15:45:31 -0000 1.1.2.5 --- WP3Listener.cpp 18 Nov 2005 10:06:23 -0000 1.1.2.6 *************** *** 82,85 **** --- 82,100 ---- if (!isUndoOn()) { + if (m_ps->m_isTableOpened) + { + if (!m_ps->m_isTableRowOpened) + insertRow(0, true, false); + + if (!m_ps->m_isTableCellOpened) + { + RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); + insertCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, false, false, 0x00000000, + NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); + m_parseState->m_colSpan=1; + m_parseState->m_rowSpan=1; + } + } + if (!m_ps->m_isParagraphOpened && !m_ps->m_isListElementOpened) _openSpan(); *************** *** 203,218 **** if (!isUndoOn()) { ! if (!m_ps->m_isTableRowOpened) ! insertRow(0, true, false); ! ! if (!m_ps->m_isTableCellOpened) ! { ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! insertCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, false, false, 0x00000000, ! NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); ! m_parseState->m_colSpan=1; ! m_parseState->m_rowSpan=1; ! } ! _closeTableCell(); } --- 218,222 ---- if (!isUndoOn()) { ! insertEOL(); _closeTableCell(); } |
From: Fridrich S. <str...@us...> - 2005-11-17 15:45:38
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1041/src/lib Modified Files: Tag: fs_refactoring2 WP3Listener.cpp Log Message: A small fix. Sectionless documents are not legal in AbiWord Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** WP3Listener.cpp 17 Nov 2005 15:34:13 -0000 1.1.2.4 --- WP3Listener.cpp 17 Nov 2005 15:45:31 -0000 1.1.2.5 *************** *** 163,171 **** m_ps->m_paragraphJustificationBeforeTable = m_ps->m_paragraphJustification; if (m_ps->m_sectionAttributesChanged && !m_ps->m_isTableOpened) - { _closeSection(); _openSection(); - m_ps->m_sectionAttributesChanged = false; - } _openTable(); } --- 163,170 ---- m_ps->m_paragraphJustificationBeforeTable = m_ps->m_paragraphJustification; if (m_ps->m_sectionAttributesChanged && !m_ps->m_isTableOpened) _closeSection(); + m_ps->m_sectionAttributesChanged = false; + if (!m_ps->m_isTableOpened && !m_ps->m_isSectionOpened) _openSection(); _openTable(); } |
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30872/src/lib Modified Files: Tag: fs_refactoring2 Makefile.am WP3EndOfLinePageGroup.cpp WP3FileStructure.h WP3Listener.cpp WP3Listener.h WP3SingleByteFunction.cpp WP3SingleByteFunction.h WP3StylesListener.cpp WP3StylesListener.h WP3TablesGroup.cpp WP3VariableLengthGroup.cpp WPXListener.h Added Files: Tag: fs_refactoring2 WP3FontGroup.cpp WP3FontGroup.h Log Message: More work on WP3 parser: Font + font size + tables (the last still a bit dirty, but works well for all the sample documents that I have) Index: WP3SingleByteFunction.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3SingleByteFunction.cpp,v retrieving revision 1.3.4.3 retrieving revision 1.3.4.4 diff -C2 -d -r1.3.4.3 -r1.3.4.4 *** WP3SingleByteFunction.cpp 15 Nov 2005 14:46:51 -0000 1.3.4.3 --- WP3SingleByteFunction.cpp 17 Nov 2005 15:34:13 -0000 1.3.4.4 *************** *** 48,54 **** return new WP3HardSpaceFunction(); - case 0xab: // beginning of paragraph OFF - return new WP3BeginningOfParagraphOffFunction(); - default: // should not happen --- 48,51 ---- *************** *** 81,87 **** listener->insertBreak(WPX_PAGE_BREAK); } - - void WP3BeginningOfParagraphOffFunction::parse(WP3Listener *listener) - { - listener->beginningOfParagraphOff(); - } --- 78,79 ---- Index: WP3Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.h,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** WP3Listener.h 15 Nov 2005 14:46:51 -0000 1.1.2.3 --- WP3Listener.h 17 Nov 2005 15:34:13 -0000 1.1.2.4 *************** *** 36,40 **** uint16_t m_colSpan; uint16_t m_rowSpan; - bool m_isTableCellToBeStarted; }; --- 36,39 ---- *************** *** 65,70 **** virtual void endDocument(); ! virtual void defineTable(uint8_t position, uint16_t leftOffset); ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment); virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); --- 64,69 ---- virtual void endDocument(); ! virtual void defineTable(const uint8_t position, const uint16_t leftOffset); ! virtual void addTableColumnDefinition(const uint32_t width, const uint32_t leftGutter, const uint32_t rightGutter, const uint32_t attributes, const uint8_t alignment); virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); *************** *** 73,84 **** const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes); virtual void setTableCellSpan(const uint16_t colSpan, const uint16_t rowSpan); - virtual void beginningOfParagraphOn() {}; - virtual void beginningOfParagraphOff(); virtual void endTable(); virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel); ! protected: virtual void _handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {} private: --- 72,87 ---- const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes); + virtual void closeCell(); + virtual void closeRow(); virtual void setTableCellSpan(const uint16_t colSpan, const uint16_t rowSpan); virtual void endTable(); virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel); ! virtual void justificationChange(const uint8_t justification); ! virtual void setTextFont(const char* fontName); ! virtual void setFontSize(const uint16_t fontSize); ! protected: virtual void _handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {} + virtual void _openParagraph(); private: Index: WP3EndOfLinePageGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3EndOfLinePageGroup.cpp,v retrieving revision 1.2.4.3 retrieving revision 1.2.4.4 diff -C2 -d -r1.2.4.3 -r1.2.4.4 *** WP3EndOfLinePageGroup.cpp 12 Nov 2005 10:50:36 -0000 1.2.4.3 --- WP3EndOfLinePageGroup.cpp 17 Nov 2005 15:34:13 -0000 1.2.4.4 *************** *** 130,173 **** break; case 0x16: // Hard End of Table Cell ! { ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); ! } break; case 0x17: // (reserved) break; case 0x18: // Hard End of Table Row/Cell ! { ! listener->insertRow(0x0000, true, false); ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); ! } break; case 0x19: // Hard End of Table Row/Cell/Soft EOP ! { ! listener->insertRow(0x0000, true, false); ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); ! } break; case 0x1A: // Hard End of Table Row/End of Table listener->endTable(); break; case 0x1B: // Hard End of Table Row/End of Table/Soft EOP listener->endTable(); break; case 0x1C: // Hard End of Table Row/Cell/End of Header ! { ! listener->insertRow(0x0000, true, false); ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); ! } break; case 0x1D: // Hard End of Table Row/Cell/Soft EOP/Start of Header ! { ! listener->insertRow(0x0000, true, false); ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); ! } break; case 0x1E: // (reserved) --- 130,156 ---- break; case 0x16: // Hard End of Table Cell ! listener->closeCell(); break; case 0x17: // (reserved) break; case 0x18: // Hard End of Table Row/Cell ! listener->closeRow(); break; case 0x19: // Hard End of Table Row/Cell/Soft EOP ! listener->closeRow(); break; case 0x1A: // Hard End of Table Row/End of Table + listener->closeRow(); listener->endTable(); break; case 0x1B: // Hard End of Table Row/End of Table/Soft EOP + listener->closeRow(); listener->endTable(); break; case 0x1C: // Hard End of Table Row/Cell/End of Header ! listener->closeRow(); break; case 0x1D: // Hard End of Table Row/Cell/Soft EOP/Start of Header ! listener->closeRow(); break; case 0x1E: // (reserved) Index: WP3FileStructure.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3FileStructure.h,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** WP3FileStructure.h 5 Oct 2005 19:07:42 -0000 1.9 --- WP3FileStructure.h 17 Nov 2005 15:34:13 -0000 1.9.2.1 *************** *** 40,43 **** --- 40,44 ---- #define WP3_PAGE_FORMAT_GROUP 0xD0 + #define WP3_FONT_GROUP 0xD1 #define WP3_MISCELLANEOUS_GROUP 0xD9 *************** *** 74,77 **** --- 75,82 ---- #define WP3_PAGE_FORMAT_GROUP_INDENT_AT_BEGINNING_OF_PARAGRAPH 0x0C + /* Font Group */ + #define WP3_FONT_GROUP_SET_TEXT_FONT 0x01 + #define WP3_FONT_GROUP_SET_FONT_SIZE 0x02 + /* Miscellaneous Group */ --- NEW FILE: WP3FontGroup.cpp --- /* libwpd * Copyright (C) 2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For further information visit http://libwpd.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #include <math.h> #include "WP3FontGroup.h" #include "WP3FileStructure.h" #include "libwpd_internal.h" #include "libwpd_math.h" WP3FontGroup::WP3FontGroup(WPXInputStream *input) : WP3VariableLengthGroup(), m_fontName(NULL), m_fontSize(0) { _read(input); } WP3FontGroup::~WP3FontGroup() { // fixme delete the font name } void WP3FontGroup::_readContents(WPXInputStream *input) { // this group can contain different kinds of data, thus we need to read // the contents accordingly uint8_t tmpFontNameLength; switch (getSubGroup()) { case WP3_FONT_GROUP_SET_TEXT_FONT: input->seek(12, WPX_SEEK_CUR); tmpFontNameLength = readU8(input); m_fontName = new char[tmpFontNameLength+1]; for (uint8_t i=0; i<tmpFontNameLength; i++) m_fontName[i]=readU8(input); m_fontName[tmpFontNameLength]='\0'; break; case WP3_FONT_GROUP_SET_FONT_SIZE: input->seek(2, WPX_SEEK_CUR); m_fontSize = readU16(input, true); break; default: /* something else we don't support, since it isn't in the docs */ break; } } void WP3FontGroup::parse(WP3Listener *listener) { WPD_DEBUG_MSG(("WordPerfect: handling a Page group\n")); switch (getSubGroup()) { case WP3_FONT_GROUP_SET_TEXT_FONT: listener->setTextFont(m_fontName); delete [] m_fontName; break; case WP3_FONT_GROUP_SET_FONT_SIZE: listener->setFontSize(m_fontSize); break; default: // something else we don't support, since it isn't in the docs break; } } Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** WP3Listener.cpp 15 Nov 2005 14:46:51 -0000 1.1.2.3 --- WP3Listener.cpp 17 Nov 2005 15:34:13 -0000 1.1.2.4 *************** *** 31,36 **** _WP3ParsingState::_WP3ParsingState(): m_colSpan(1), ! m_rowSpan(1), ! m_isTableCellToBeStarted(false) { } --- 31,35 ---- _WP3ParsingState::_WP3ParsingState(): m_colSpan(1), ! m_rowSpan(1) { } *************** *** 136,140 **** } ! void WP3Listener::addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) { if (!isUndoOn()) --- 135,139 ---- } ! void WP3Listener::addTableColumnDefinition(const uint32_t width, const uint32_t leftGutter, const uint32_t rightGutter, const uint32_t attributes, const uint8_t alignment) { if (!isUndoOn()) *************** *** 177,181 **** if (!isUndoOn()) { - _flushText(); float rowHeightInch = (float)((double) rowHeight / (double)WPX_NUM_WPUS_PER_INCH); _openTableRow(rowHeightInch, isMinimumHeight, isHeaderRow); --- 176,179 ---- *************** *** 190,194 **** if (!isUndoOn()) { ! m_parseState->m_isTableCellToBeStarted = true; } } --- 188,229 ---- if (!isUndoOn()) { ! if (m_ps->m_currentTableRow < 0) // cell without a row, invalid ! throw ParseException(); ! _openTableCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, borderBits, ! cellFgColor, cellBgColor, cellBorderColor, cellVerticalAlignment); ! m_ps->m_isCellWithoutParagraph = true; ! if (useCellAttributes) ! m_ps->m_cellAttributeBits = cellAttributes; ! else ! m_ps->m_cellAttributeBits = m_ps->m_tableDefinition.columnsProperties[m_ps->m_currentTableCol-1].m_attributes; ! } ! } ! ! void WP3Listener::closeCell() ! { ! if (!isUndoOn()) ! { ! if (!m_ps->m_isTableRowOpened) ! insertRow(0, true, false); ! ! if (!m_ps->m_isTableCellOpened) ! { ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! insertCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, false, false, 0x00000000, ! NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); ! m_parseState->m_colSpan=1; ! m_parseState->m_rowSpan=1; ! } ! ! _closeTableCell(); ! } ! } ! ! void WP3Listener::closeRow() ! { ! if (!isUndoOn()) ! { ! closeCell(); ! _closeTableRow(); } } *************** *** 211,215 **** // restore the justification that was there before the table. m_ps->m_paragraphJustification = m_ps->m_paragraphJustificationBeforeTable; - m_parseState->m_isTableCellToBeStarted = false; } } --- 246,249 ---- *************** *** 296,300 **** } ! void WP3Listener::marginChange(uint8_t side, uint16_t margin) { if (!isUndoOn()) --- 330,334 ---- } ! void WP3Listener::marginChange(const uint8_t side, const uint16_t margin) { if (!isUndoOn()) *************** *** 321,325 **** } ! void WP3Listener::indentFirstLineChange(int16_t offset) { if (!isUndoOn()) --- 355,389 ---- } ! void WP3Listener::justificationChange(const uint8_t justification) ! { ! if (!isUndoOn()) ! { ! // could be done simply by: ! // m_ps->m_paragraphJustification = justification; ! switch (justification) ! { ! case 0x00: ! m_ps->m_paragraphJustification = WPX_PARAGRAPH_JUSTIFICATION_LEFT; ! break; ! case 0x01: ! m_ps->m_paragraphJustification = WPX_PARAGRAPH_JUSTIFICATION_CENTER; ! break; ! case 0x02: ! m_ps->m_paragraphJustification = WPX_PARAGRAPH_JUSTIFICATION_RIGHT; ! break; ! case 0x03: ! m_ps->m_paragraphJustification = WPX_PARAGRAPH_JUSTIFICATION_FULL; ! break; ! case 0x04: ! m_ps->m_paragraphJustification = WPX_PARAGRAPH_JUSTIFICATION_FULL_ALL_LINES; ! break; ! case 0x05: ! m_ps->m_paragraphJustification = WPX_PARAGRAPH_JUSTIFICATION_DECIMAL_ALIGNED; ! break; ! } ! } ! } ! ! void WP3Listener::indentFirstLineChange(const int16_t offset) { if (!isUndoOn()) *************** *** 335,357 **** } ! void WP3Listener::beginningOfParagraphOff() { if (!isUndoOn()) { ! if (m_parseState->m_isTableCellToBeStarted) { - if (m_ps->m_currentTableRow < 0) // cell without a row, invalid - throw ParseException(); - _flushText(); RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! _openTableCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, false, false, 0x00000000, ! NULL, NULL, &tmpCellBorderColor, TOP); m_parseState->m_colSpan=1; m_parseState->m_rowSpan=1; - m_parseState->m_isTableCellToBeStarted = false; - m_ps->m_isCellWithoutParagraph = true; - m_ps->m_cellAttributeBits = 0x00000000; } } } --- 399,441 ---- } ! void WP3Listener::setTextFont(const char* fontName) { if (!isUndoOn()) { ! _closeSpan(); ! ! m_ps->m_fontName->sprintf("%s", fontName); ! } ! } ! ! void WP3Listener::setFontSize(const uint16_t fontSize) ! { ! if (!isUndoOn()) ! { ! _closeSpan(); ! ! m_ps->m_fontSize=float(fontSize); ! } ! } ! ! void WP3Listener::_openParagraph() ! { ! ! if (m_ps->m_isTableOpened) ! { ! if (!m_ps->m_isTableRowOpened) ! insertRow(0, true, false); ! ! if (!m_ps->m_isTableCellOpened) { RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! insertCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, false, false, 0x00000000, ! NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); m_parseState->m_colSpan=1; m_parseState->m_rowSpan=1; } } + + WPXListener::_openParagraph(); } Index: WP3StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3StylesListener.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** WP3StylesListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 --- WP3StylesListener.h 17 Nov 2005 15:34:13 -0000 1.1.2.3 *************** *** 66,71 **** const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes); virtual void endTable() {} ! protected: --- 66,75 ---- const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes); + virtual void closeCell() {} + virtual void closeRow() {} + virtual void setTableCellSpan(const uint16_t colSpan, const uint16_t rowSpan) {} virtual void endTable() {} ! virtual void setTextFont(const char* fontName) {} ! virtual void setFontSize(const uint16_t fontSize) {} protected: Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Makefile.am,v retrieving revision 1.61.2.2 retrieving revision 1.61.2.3 diff -C2 -d -r1.61.2.2 -r1.61.2.3 *** Makefile.am 10 Nov 2005 12:57:17 -0000 1.61.2.2 --- Makefile.am 17 Nov 2005 15:34:13 -0000 1.61.2.3 *************** *** 45,50 **** WP3FileStructure.cpp \ WP3FixedLengthGroup.cpp \ WP3Header.cpp \ ! WP3Listener.cpp \ WP3StylesListener.cpp \ WP3MiscellaneousGroup.cpp \ --- 45,51 ---- WP3FileStructure.cpp \ WP3FixedLengthGroup.cpp \ + WP3FontGroup.cpp \ WP3Header.cpp \ ! WP3Listener.cpp \ WP3StylesListener.cpp \ WP3MiscellaneousGroup.cpp \ *************** *** 61,65 **** WP42Heuristics.cpp \ WP42Listener.cpp \ ! WP42StylesListener.cpp \ WP42Parser.cpp \ WP42Part.cpp \ --- 62,66 ---- WP42Heuristics.cpp \ WP42Listener.cpp \ ! WP42StylesListener.cpp \ WP42Parser.cpp \ WP42Part.cpp \ *************** *** 103,108 **** WP6HeaderFooterGroup.cpp \ WP6HighlightGroup.cpp \ ! WP6ContentListener.cpp \ ! WP6Listener.cpp \ WP6StylesListener.cpp \ WP6Parser.cpp \ --- 104,109 ---- WP6HeaderFooterGroup.cpp \ WP6HighlightGroup.cpp \ ! WP6ContentListener.cpp \ ! WP6Listener.cpp \ WP6StylesListener.cpp \ WP6Parser.cpp \ *************** *** 142,145 **** --- 143,147 ---- WP3FileStructure.h \ WP3FixedLengthGroup.h \ + WP3FontGroup.h \ WP3Header.h \ WP3Listener.h \ *************** *** 157,161 **** WP42FileStructure.h \ WP42Heuristics.h \ ! WP42Listener.h \ WP42StylesListener.h \ WP42Part.h \ --- 159,163 ---- WP42FileStructure.h \ WP42Heuristics.h \ ! WP42Listener.h \ WP42StylesListener.h \ WP42Part.h \ --- NEW FILE: WP3FontGroup.h --- /* libwpd * Copyright (C) 2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For further information visit http://libwpd.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #ifndef WP3FONTGROUP_H #define WP3FONTGROUP_H #include "WP3VariableLengthGroup.h" class WP3FontGroup : public WP3VariableLengthGroup { public: WP3FontGroup(WPXInputStream *input); virtual ~WP3FontGroup(); virtual void _readContents(WPXInputStream *input); virtual void parse(WP3Listener *listener); private: /* Set Text Font */ char* m_fontName; /* Set Font Size */ uint16_t m_fontSize; }; #endif /* WP3FONTGROUP_H */ Index: WPXListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WPXListener.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** WPXListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 --- WPXListener.h 17 Nov 2005 15:34:13 -0000 1.1.2.3 *************** *** 218,226 **** void _closePageSpan(); ! void _appendParagraphProperties(WPXPropertyList &propList, const bool isListElement=false); ! void _getTabStops(WPXPropertyListVector &tabStops); ! void _appendJustification(WPXPropertyList &propList, int justification); ! virtual void _openParagraph(); virtual void _resetParagraphState(const bool isListElement=false); void _closeParagraph(); --- 218,226 ---- void _closePageSpan(); ! virtual void _appendParagraphProperties(WPXPropertyList &propList, const bool isListElement=false); ! virtual void _getTabStops(WPXPropertyListVector &tabStops); ! virtual void _appendJustification(WPXPropertyList &propList, int justification); virtual void _resetParagraphState(const bool isListElement=false); + virtual void _openParagraph(); void _closeParagraph(); Index: WP3StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3StylesListener.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP3StylesListener.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP3StylesListener.cpp 17 Nov 2005 15:34:13 -0000 1.1.2.2 *************** *** 186,187 **** --- 186,188 ---- } } + Index: WP3TablesGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3TablesGroup.cpp,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** WP3TablesGroup.cpp 15 Nov 2005 14:46:51 -0000 1.1.2.4 --- WP3TablesGroup.cpp 17 Nov 2005 15:34:13 -0000 1.1.2.5 *************** *** 117,125 **** fixedPointToWPUs(m_rightGutterSpacing), 0, LEFT); listener->startTable(); - listener->insertRow(0x0000, true, false); - { - RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); - listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); - } break; case WP3_TABLES_GROUP_SET_TABLE_CELL_SPAN: --- 117,120 ---- Index: WP3VariableLengthGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3VariableLengthGroup.cpp,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** WP3VariableLengthGroup.cpp 5 Oct 2005 19:07:42 -0000 1.4 --- WP3VariableLengthGroup.cpp 17 Nov 2005 15:34:13 -0000 1.4.2.1 *************** *** 30,33 **** --- 30,34 ---- #include "WP3MiscellaneousGroup.h" #include "WP3PageFormatGroup.h" + #include "WP3FontGroup.h" #include "WP3TablesGroup.h" #include "libwpd_internal.h" *************** *** 49,52 **** --- 50,55 ---- case WP3_TABLES_GROUP: return new WP3TablesGroup(input); + case WP3_FONT_GROUP: + return new WP3FontGroup(input); default: // this is an unhandled group, just skip it Index: WP3SingleByteFunction.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3SingleByteFunction.h,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -C2 -d -r1.3.2.2 -r1.3.2.3 *** WP3SingleByteFunction.h 15 Nov 2005 14:46:51 -0000 1.3.2.2 --- WP3SingleByteFunction.h 17 Nov 2005 15:34:13 -0000 1.3.2.3 *************** *** 66,74 **** }; - class WP3BeginningOfParagraphOffFunction : public WP3SingleByteFunction - { - public: - virtual void parse(WP3Listener *listener); - }; - #endif /* WP3SINGLEBYTEFUNCTION_H */ --- 66,68 ---- |
From: Fridrich S. <str...@us...> - 2005-11-15 14:47:00
|
Update of /cvsroot/libwpd/libwpd2/src/conv/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20260/src/conv/html Modified Files: Tag: fs_refactoring2 HtmlListenerImpl.cpp Log Message: Some improvement of WP3 tables support, but much is still broken :-( Index: HtmlListenerImpl.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/html/HtmlListenerImpl.cpp,v retrieving revision 1.62 retrieving revision 1.62.4.1 diff -C2 -d -r1.62 -r1.62.4.1 *** HtmlListenerImpl.cpp 15 Apr 2005 20:08:26 -0000 1.62 --- HtmlListenerImpl.cpp 15 Nov 2005 14:46:51 -0000 1.62.4.1 *************** *** 328,334 **** if (propList["table:number-columns-spanned"]) ! printf("colspan=\"%d ", propList["table:number-columns-spanned"]->getInt()); if (propList["table:number-rows-spanned"]) ! printf("rowspan=\"%d ", propList["table:number-rows-spanned"]->getInt()); printf(">\n"); --- 328,334 ---- if (propList["table:number-columns-spanned"]) ! printf("colspan=\"%d\" ", propList["table:number-columns-spanned"]->getInt()); if (propList["table:number-rows-spanned"]) ! printf("rowspan=\"%d\" ", propList["table:number-rows-spanned"]->getInt()); printf(">\n"); |
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20260/src/lib Modified Files: Tag: fs_refactoring2 WP3Listener.cpp WP3Listener.h WP3SingleByteFunction.cpp WP3SingleByteFunction.h WP3TablesGroup.cpp WP3TablesGroup.h Log Message: Some improvement of WP3 tables support, but much is still broken :-( Index: WP3SingleByteFunction.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3SingleByteFunction.cpp,v retrieving revision 1.3.4.2 retrieving revision 1.3.4.3 diff -C2 -d -r1.3.4.2 -r1.3.4.3 *** WP3SingleByteFunction.cpp 10 Nov 2005 12:57:17 -0000 1.3.4.2 --- WP3SingleByteFunction.cpp 15 Nov 2005 14:46:51 -0000 1.3.4.3 *************** *** 48,51 **** --- 48,54 ---- return new WP3HardSpaceFunction(); + case 0xab: // beginning of paragraph OFF + return new WP3BeginningOfParagraphOffFunction(); + default: // should not happen *************** *** 54,62 **** } - /*void WP3SpaceFunction::parse(WP3Listener *listener) - { - listener->insertCharacter((uint16_t) ' '); - }*/ - void WP3HardSpaceFunction::parse(WP3Listener *listener) { --- 57,60 ---- *************** *** 79,87 **** } - /* void WP3EOCFunction::parse(WP3Listener *listener) - { - listener->insertBreak(WPX_COLUMN_BREAK); - }*/ - void WP3EOPFunction::parse(WP3Listener *listener) { --- 77,80 ---- *************** *** 89,90 **** --- 82,87 ---- } + void WP3BeginningOfParagraphOffFunction::parse(WP3Listener *listener) + { + listener->beginningOfParagraphOff(); + } Index: WP3TablesGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3TablesGroup.cpp,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** WP3TablesGroup.cpp 12 Nov 2005 10:50:36 -0000 1.1.2.3 --- WP3TablesGroup.cpp 15 Nov 2005 14:46:51 -0000 1.1.2.4 *************** *** 72,77 **** break; case WP3_TABLES_GROUP_SET_TABLE_CELL_SPAN: ! m_colSpan = readU8(input); ! m_rowSpan = readU8(input); break; case WP3_TABLES_GROUP_SET_TABLE_CELL_TOP_LINE: --- 72,78 ---- break; case WP3_TABLES_GROUP_SET_TABLE_CELL_SPAN: ! m_colSpan = readU16(input, true); ! m_rowSpan = readU16(input, true); ! m_colSpan++; m_rowSpan++; break; case WP3_TABLES_GROUP_SET_TABLE_CELL_TOP_LINE: *************** *** 123,126 **** --- 124,128 ---- break; case WP3_TABLES_GROUP_SET_TABLE_CELL_SPAN: + listener->setTableCellSpan(m_colSpan, m_rowSpan); break; case WP3_TABLES_GROUP_SET_TABLE_CELL_TOP_LINE: Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** WP3Listener.cpp 12 Nov 2005 10:50:36 -0000 1.1.2.2 --- WP3Listener.cpp 15 Nov 2005 14:46:51 -0000 1.1.2.3 *************** *** 29,33 **** #include "libwpd_internal.h" ! _WP3ParsingState::_WP3ParsingState() { } --- 29,36 ---- #include "libwpd_internal.h" ! _WP3ParsingState::_WP3ParsingState(): ! m_colSpan(1), ! m_rowSpan(1), ! m_isTableCellToBeStarted(false) { } *************** *** 187,201 **** if (!isUndoOn()) { ! if (m_ps->m_currentTableRow < 0) // cell without a row, invalid ! throw ParseException(); ! _flushText(); ! _openTableCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, borderBits, ! cellFgColor, cellBgColor, cellBorderColor, cellVerticalAlignment); ! m_ps->m_isCellWithoutParagraph = true; ! if (useCellAttributes) ! m_ps->m_cellAttributeBits = cellAttributes; ! else ! m_ps->m_cellAttributeBits = m_ps->m_tableDefinition.columnsProperties[m_ps->m_currentTableCol-1].m_attributes; ! // justificationChange(m_ps->m_tableDefinition.columnsProperties[m_ps->m_currentTableCol-1].m_alignment); } } --- 190,203 ---- if (!isUndoOn()) { ! m_parseState->m_isTableCellToBeStarted = true; ! } ! } ! ! void WP3Listener::setTableCellSpan(const uint16_t colSpan, const uint16_t rowSpan) ! { ! if (!isUndoOn()) ! { ! m_parseState->m_colSpan=colSpan; ! m_parseState->m_rowSpan=rowSpan; } } *************** *** 209,212 **** --- 211,215 ---- // restore the justification that was there before the table. m_ps->m_paragraphJustification = m_ps->m_paragraphJustificationBeforeTable; + m_parseState->m_isTableCellToBeStarted = false; } } *************** *** 332,336 **** } ! /**************************************** --- 335,358 ---- } ! void WP3Listener::beginningOfParagraphOff() ! { ! if (!isUndoOn()) ! { ! if (m_parseState->m_isTableCellToBeStarted) ! { ! if (m_ps->m_currentTableRow < 0) // cell without a row, invalid ! throw ParseException(); ! _flushText(); ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! _openTableCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, false, false, 0x00000000, ! NULL, NULL, &tmpCellBorderColor, TOP); ! m_parseState->m_colSpan=1; ! m_parseState->m_rowSpan=1; ! m_parseState->m_isTableCellToBeStarted = false; ! m_ps->m_isCellWithoutParagraph = true; ! m_ps->m_cellAttributeBits = 0x00000000; ! } ! } ! } /**************************************** Index: WP3TablesGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3TablesGroup.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP3TablesGroup.h 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP3TablesGroup.h 15 Nov 2005 14:46:51 -0000 1.1.2.2 *************** *** 51,56 **** // variables needed for subgroup 2 (Set Table Cell Span) ! uint8_t m_colSpan; ! uint8_t m_rowSpan; }; --- 51,56 ---- // variables needed for subgroup 2 (Set Table Cell Span) ! uint16_t m_colSpan; ! uint16_t m_rowSpan; }; Index: WP3Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** WP3Listener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 --- WP3Listener.h 15 Nov 2005 14:46:51 -0000 1.1.2.3 *************** *** 34,37 **** --- 34,40 ---- _WP3ParsingState(); ~_WP3ParsingState(); + uint16_t m_colSpan; + uint16_t m_rowSpan; + bool m_isTableCellToBeStarted; }; *************** *** 70,73 **** --- 73,79 ---- const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes); + virtual void setTableCellSpan(const uint16_t colSpan, const uint16_t rowSpan); + virtual void beginningOfParagraphOn() {}; + virtual void beginningOfParagraphOff(); virtual void endTable(); virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel); Index: WP3SingleByteFunction.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3SingleByteFunction.h,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** WP3SingleByteFunction.h 10 Nov 2005 12:57:17 -0000 1.3.2.1 --- WP3SingleByteFunction.h 15 Nov 2005 14:46:51 -0000 1.3.2.2 *************** *** 36,45 **** }; - /*class WP3SpaceFunction : public WP3SingleByteFunction - { - public: - virtual void parse(WP3Listener *listener); - };*/ - class WP3HardSpaceFunction : public WP3SingleByteFunction { --- 36,39 ---- *************** *** 54,64 **** }; ! /*class WP3EOCFunction : public WP3SingleByteFunction { public: virtual void parse(WP3Listener *listener); ! };*/ ! class WP3EOPFunction : public WP3SingleByteFunction { public: --- 48,58 ---- }; ! class WP3EOPFunction : public WP3SingleByteFunction { public: virtual void parse(WP3Listener *listener); ! }; ! class WP3HyphenFunction : public WP3SingleByteFunction { public: *************** *** 66,70 **** }; ! class WP3HyphenFunction : public WP3SingleByteFunction { public: --- 60,64 ---- }; ! class WP3SoftHyphenFunction : public WP3SingleByteFunction { public: *************** *** 72,76 **** }; ! class WP3SoftHyphenFunction : public WP3SingleByteFunction { public: --- 66,70 ---- }; ! class WP3BeginningOfParagraphOffFunction : public WP3SingleByteFunction { public: |
From: Fridrich S. <str...@us...> - 2005-11-12 10:50:50
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16772/src/lib Modified Files: Tag: fs_refactoring2 WP3EndOfLinePageGroup.cpp WP3Listener.cpp WP3Listener.h WP3StylesListener.h WP3TablesGroup.cpp WP42Listener.h WP42StylesListener.h WP5Listener.h WP5StylesListener.h WP6ContentListener.h WP6Listener.h WP6StylesListener.h WPXListener.h Log Message: Some more modifications related to the collapse of LL and HL listeners and initial implementation of tables in WP3 listener (ugly and raw that works with tables without cells spanning multiple columns/rows) Index: WP3TablesGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3TablesGroup.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** WP3TablesGroup.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.2 --- WP3TablesGroup.cpp 12 Nov 2005 10:50:36 -0000 1.1.2.3 *************** *** 61,64 **** --- 61,65 ---- m_bottomGutterSpacing = readU32(input, true); m_rightGutterSpacing = readU32(input, true); + input->seek(3, WPX_SEEK_CUR); m_numColumns = readU8(input); for (uint8_t i=0; i<m_numColumns; i++) *************** *** 110,113 **** --- 111,124 ---- { case WP3_TABLES_GROUP_TABLE_FUNCTION: + listener->defineTable(m_tableMode, fixedPointToWPUs(m_offsetFromLeftEdge)); + for (uint8_t i=0; i<m_numColumns; i++) + listener->addTableColumnDefinition(fixedPointToWPUs(m_columnWidth[i]), fixedPointToWPUs(m_leftGutterSpacing), + fixedPointToWPUs(m_rightGutterSpacing), 0, LEFT); + listener->startTable(); + listener->insertRow(0x0000, true, false); + { + RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); + listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); + } break; case WP3_TABLES_GROUP_SET_TABLE_CELL_SPAN: Index: WP3EndOfLinePageGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3EndOfLinePageGroup.cpp,v retrieving revision 1.2.4.2 retrieving revision 1.2.4.3 diff -C2 -d -r1.2.4.2 -r1.2.4.3 *** WP3EndOfLinePageGroup.cpp 10 Nov 2005 12:57:17 -0000 1.2.4.2 --- WP3EndOfLinePageGroup.cpp 12 Nov 2005 10:50:36 -0000 1.2.4.3 *************** *** 130,147 **** --- 130,173 ---- break; case 0x16: // Hard End of Table Cell + { + RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); + listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); + } break; case 0x17: // (reserved) break; case 0x18: // Hard End of Table Row/Cell + { + listener->insertRow(0x0000, true, false); + RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); + listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); + } break; case 0x19: // Hard End of Table Row/Cell/Soft EOP + { + listener->insertRow(0x0000, true, false); + RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); + listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); + } break; case 0x1A: // Hard End of Table Row/End of Table + listener->endTable(); break; case 0x1B: // Hard End of Table Row/End of Table/Soft EOP + listener->endTable(); break; case 0x1C: // Hard End of Table Row/Cell/End of Header + { + listener->insertRow(0x0000, true, false); + RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); + listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); + } break; case 0x1D: // Hard End of Table Row/Cell/Soft EOP/Start of Header + { + listener->insertRow(0x0000, true, false); + RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); + listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, true, 0x00000000); + } break; case 0x1E: // (reserved) Index: WP6ContentListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6ContentListener.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP6ContentListener.h 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP6ContentListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 *************** *** 25,30 **** */ ! #ifndef WP6HLCONTENTLISTENER_H ! #define WP6HLCONTENTLISTENER_H #include "WP6Listener.h" --- 25,30 ---- */ ! #ifndef WP6CONTENTLISTENER_H ! #define WP6CONTENTLISTENER_H #include "WP6Listener.h" *************** *** 204,206 **** }; ! #endif /* WP6HLCONTENTLISTENER_H */ --- 204,206 ---- }; ! #endif /* WP6CONTENTLISTENER_H */ Index: WP3Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP3Listener.h 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP3Listener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 *************** *** 23,28 **** */ ! #ifndef WP3HLLISTENER_H ! #define WP3HLLISTENER_H #include "WPXListener.h" --- 23,28 ---- */ ! #ifndef WP3LISTENER_H ! #define WP3LISTENER_H #include "WPXListener.h" *************** *** 62,74 **** virtual void endDocument(); ! virtual void defineTable(uint8_t position, uint16_t leftOffset) {}; ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) {}; ! virtual void startTable() {}; ! virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) {}; virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes) {}; ! virtual void endTable() {}; virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel); --- 62,74 ---- virtual void endDocument(); ! virtual void defineTable(uint8_t position, uint16_t leftOffset); ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment); ! virtual void startTable(); ! virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes); ! virtual void endTable(); virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel); *************** *** 85,87 **** }; ! #endif /* WP3HLLISTENER_H */ --- 85,87 ---- }; ! #endif /* WP3LISTENER_H */ Index: WP42Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP42Listener.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP42Listener.h 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP42Listener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 *************** *** 24,29 **** */ ! #ifndef WP42HLLISTENER_H ! #define WP42HLLISTENER_H #include "WPXListener.h" --- 24,29 ---- */ ! #ifndef WP42LISTENER_H ! #define WP42LISTENER_H #include "WPXListener.h" *************** *** 76,78 **** }; ! #endif /* WP42HLLISTENER_H */ --- 76,78 ---- }; ! #endif /* WP42LISTENER_H */ Index: WP5Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5Listener.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP5Listener.h 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP5Listener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 *************** *** 24,29 **** */ ! #ifndef WP5HLLISTENER_H ! #define WP5HLLISTENER_H #include "WPXListener.h" --- 24,29 ---- */ ! #ifndef WP5LISTENER_H ! #define WP5LISTENER_H #include "WPXListener.h" *************** *** 85,87 **** }; ! #endif /* WP5HLLISTENER_H */ --- 85,87 ---- }; ! #endif /* WP5LISTENER_H */ Index: WP6Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6Listener.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP6Listener.h 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP6Listener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 *************** *** 24,29 **** */ ! #ifndef WP6HLLISTENER_H ! #define WP6HLLISTENER_H #include "WPXListener.h" --- 24,29 ---- */ ! #ifndef WP6LISTENER_H ! #define WP6LISTENER_H #include "WPXListener.h" *************** *** 76,78 **** }; ! #endif /* WP6HLLISTENER_H */ --- 76,78 ---- }; ! #endif /* WP6LISTENER_H */ Index: WPXListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WPXListener.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WPXListener.h 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WPXListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 *************** *** 25,30 **** */ ! #ifndef WPXHLLISTENER_H ! #define WPXHLLISTENER_H #include "WPXHLListenerImpl.h" --- 25,30 ---- */ ! #ifndef WPXLISTENER_H ! #define WPXLISTENER_H #include "WPXHLListenerImpl.h" *************** *** 249,251 **** }; ! #endif /* WPXHLLISTENER_H */ --- 249,251 ---- }; ! #endif /* WPXLISTENER_H */ Index: WP5StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5StylesListener.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP5StylesListener.h 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP5StylesListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 *************** *** 24,29 **** */ ! #ifndef WP5HLSTYLESLISTENER_H ! #define WP5HLSTYLESLISTENER_H #include "WP5Listener.h" --- 24,29 ---- */ ! #ifndef WP5STYLESLISTENER_H ! #define WP5STYLESLISTENER_H #include "WP5Listener.h" *************** *** 82,84 **** }; ! #endif /* WP5HLSTYLESLISTENER_H */ --- 82,84 ---- }; ! #endif /* WP5STYLESLISTENER_H */ Index: WP42StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP42StylesListener.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP42StylesListener.h 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP42StylesListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 *************** *** 24,29 **** */ ! #ifndef WP42HLSTYLESLISTENER_H ! #define WP42HLSTYLESLISTENER_H #include "WP42Listener.h" --- 24,29 ---- */ ! #ifndef WP42STYLESLISTENER_H ! #define WP42STYLESLISTENER_H #include "WP42Listener.h" *************** *** 85,87 **** }; ! #endif /* WP42HLSTYLESLISTENER_H */ --- 85,87 ---- }; ! #endif /* WP42STYLESLISTENER_H */ Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP3Listener.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP3Listener.cpp 12 Nov 2005 10:50:36 -0000 1.1.2.2 *************** *** 99,102 **** --- 99,215 ---- } + void WP3Listener::defineTable(uint8_t position, uint16_t leftOffset) + { + if (!isUndoOn()) + { + switch (position & 0x07) + { + case 0: + m_ps->m_tableDefinition.m_positionBits = WPX_TABLE_POSITION_ALIGN_WITH_LEFT_MARGIN; + break; + case 1: + m_ps->m_tableDefinition.m_positionBits = WPX_TABLE_POSITION_ALIGN_WITH_RIGHT_MARGIN; + break; + case 2: + m_ps->m_tableDefinition.m_positionBits = WPX_TABLE_POSITION_CENTER_BETWEEN_MARGINS; + break; + case 3: + m_ps->m_tableDefinition.m_positionBits = WPX_TABLE_POSITION_FULL; + break; + case 4: + m_ps->m_tableDefinition.m_positionBits = WPX_TABLE_POSITION_ABSOLUTE_FROM_LEFT_MARGIN; + break; + default: + // should not happen + break; + } + // Note: WordPerfect has an offset from the left edge of the page. We translate it to the offset from the left margin + m_ps->m_tableDefinition.m_leftOffset = (float)((double)leftOffset / (double)WPX_NUM_WPUS_PER_INCH) - m_ps->m_paragraphMarginLeft; + + // remove all the old column information + m_ps->m_tableDefinition.columns.clear(); + m_ps->m_tableDefinition.columnsProperties.clear(); + } + } + + void WP3Listener::addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) + { + if (!isUndoOn()) + { + // define the new column + WPXColumnDefinition colDef; + colDef.m_width = (float)((double)width / (double)WPX_NUM_WPUS_PER_INCH); + colDef.m_leftGutter = (float)((double)width / (double)WPX_NUM_WPUS_PER_INCH); + colDef.m_rightGutter = (float)((double)width / (double)WPX_NUM_WPUS_PER_INCH); + + // add the new column definition to our table definition + m_ps->m_tableDefinition.columns.push_back(colDef); + + WPXColumnProperties colProp; + colProp.m_attributes = attributes; + colProp.m_alignment = alignment; + + m_ps->m_tableDefinition.columnsProperties.push_back(colProp); + } + } + + void WP3Listener::startTable() + { + if (!isUndoOn()) + { + // save the justification information. We will need it after the table ends. + m_ps->m_paragraphJustificationBeforeTable = m_ps->m_paragraphJustification; + if (m_ps->m_sectionAttributesChanged && !m_ps->m_isTableOpened) + { + _closeSection(); + _openSection(); + m_ps->m_sectionAttributesChanged = false; + } + _openTable(); + } + } + + void WP3Listener::insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) + { + if (!isUndoOn()) + { + _flushText(); + float rowHeightInch = (float)((double) rowHeight / (double)WPX_NUM_WPUS_PER_INCH); + _openTableRow(rowHeightInch, isMinimumHeight, isHeaderRow); + } + } + + void WP3Listener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, + const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, + const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, + const bool useCellAttributes, const uint32_t cellAttributes) + { + if (!isUndoOn()) + { + if (m_ps->m_currentTableRow < 0) // cell without a row, invalid + throw ParseException(); + _flushText(); + _openTableCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, borderBits, + cellFgColor, cellBgColor, cellBorderColor, cellVerticalAlignment); + m_ps->m_isCellWithoutParagraph = true; + if (useCellAttributes) + m_ps->m_cellAttributeBits = cellAttributes; + else + m_ps->m_cellAttributeBits = m_ps->m_tableDefinition.columnsProperties[m_ps->m_currentTableCol-1].m_attributes; + // justificationChange(m_ps->m_tableDefinition.columnsProperties[m_ps->m_currentTableCol-1].m_alignment); + } + } + + void WP3Listener::endTable() + { + if (!isUndoOn()) + { + _flushText(); + _closeTable(); + // restore the justification that was there before the table. + m_ps->m_paragraphJustification = m_ps->m_paragraphJustificationBeforeTable; + } + } + /**************************************** Index: WP6StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6StylesListener.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP6StylesListener.h 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP6StylesListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 *************** *** 27,32 **** // sequence of messages passed to it by the parser. ! #ifndef WP6HLSTYLESLISTENER_H ! #define WP6HLSTYLESLISTENER_H #include "WP6Listener.h" --- 27,32 ---- // sequence of messages passed to it by the parser. ! #ifndef WP6STYLESLISTENER_H ! #define WP6STYLESLISTENER_H #include "WP6Listener.h" *************** *** 116,118 **** }; ! #endif /* WP6HLSTYLESLISTENER_H */ --- 116,118 ---- }; ! #endif /* WP6STYLESLISTENER_H */ Index: WP3StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3StylesListener.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** WP3StylesListener.h 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP3StylesListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 *************** *** 23,28 **** */ ! #ifndef WP3HLSTYLESLISTENER_H ! #define WP3HLSTYLESLISTENER_H #include "WP3Listener.h" --- 23,28 ---- */ ! #ifndef WP3STYLESLISTENER_H ! #define WP3STYLESLISTENER_H #include "WP3Listener.h" *************** *** 81,83 **** }; ! #endif /* WP3HLSTYLESLISTENER_H */ --- 81,83 ---- }; ! #endif /* WP3STYLESLISTENER_H */ |
From: Fridrich S. <str...@us...> - 2005-11-10 13:10:53
|
Update of /cvsroot/libwpd/libwpd2/src/conv/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29508/src/conv/text Modified Files: Tag: fs_refactoring2 TextListenerImpl.h Log Message: Removing unneccessary include of non-API header Index: TextListenerImpl.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/text/TextListenerImpl.h,v retrieving revision 1.23.4.1 retrieving revision 1.23.4.2 diff -C2 -d -r1.23.4.1 -r1.23.4.2 *** TextListenerImpl.h 10 Nov 2005 12:57:17 -0000 1.23.4.1 --- TextListenerImpl.h 10 Nov 2005 13:10:43 -0000 1.23.4.2 *************** *** 29,33 **** #include <glib.h> #include "WPXHLListenerImpl.h" - #include "WPXListener.h" class TextListenerImpl : public WPXHLListenerImpl --- 29,32 ---- |
From: Fridrich S. <str...@us...> - 2005-11-10 12:57:24
|
Update of /cvsroot/libwpd/libwpd2/src/conv/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23091/src/conv/text Modified Files: Tag: fs_refactoring2 TextListenerImpl.h Log Message: Changing Names of HL Listeners to simply Listeners Index: TextListenerImpl.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/text/TextListenerImpl.h,v retrieving revision 1.23 retrieving revision 1.23.4.1 diff -C2 -d -r1.23 -r1.23.4.1 *** TextListenerImpl.h 7 Feb 2005 00:06:24 -0000 1.23 --- TextListenerImpl.h 10 Nov 2005 12:57:17 -0000 1.23.4.1 *************** *** 29,33 **** #include <glib.h> #include "WPXHLListenerImpl.h" ! #include "WPXHLListener.h" class TextListenerImpl : public WPXHLListenerImpl --- 29,33 ---- #include <glib.h> #include "WPXHLListenerImpl.h" ! #include "WPXListener.h" class TextListenerImpl : public WPXHLListenerImpl |
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30366/src/lib Modified Files: Tag: fs_refactoring2 Makefile.am WP3AttributeGroup.cpp WP3EndOfLinePageGroup.cpp WP3ExtendedCharacterGroup.cpp WP3HLListener.cpp WP3HLListener.h WP3MiscellaneousGroup.cpp WP3PageFormatGroup.cpp WP3Part.h WP3SingleByteFunction.cpp WP3TablesGroup.cpp WP3UndoGroup.cpp WP3UnsupportedFixedLengthGroup.cpp WP42HLListener.cpp WP42HLListener.h WP5DefinitionGroup.cpp WP5ExtendedCharacterGroup.cpp WP5FormatGroup.cpp WP5HLListener.cpp WP5HLListener.h WP5PageFormatGroup.cpp WP5Part.h WP5SingleByteFunction.cpp WP5TableEOLGroup.cpp WP5TableEOPGroup.cpp WP5UnsupportedFixedLengthGroup.cpp WP6AttributeGroup.cpp WP6CharacterGroup.cpp WP6ColumnGroup.cpp WP6DisplayNumberReferenceGroup.cpp WP6EOLGroup.cpp WP6ExtendedCharacterGroup.cpp WP6FillStylePacket.h WP6FootnoteEndnoteGroup.cpp WP6GeneralTextPacket.h WP6HLContentListener.cpp WP6HLListener.cpp WP6HLListener.h WP6HLStylesListener.cpp WP6HeaderFooterGroup.cpp WP6HighlightGroup.cpp WP6PageGroup.cpp WP6ParagraphGroup.cpp WP6Parser.cpp WP6PrefixData.cpp WP6PrefixData.h WP6SingleByteFunction.cpp WP6StyleGroup.cpp WP6TabGroup.cpp WP6UndoGroup.cpp WP6UnsupportedFixedLengthGroup.cpp WPXHLListener.cpp WPXHLListener.h WPXParser.h makefile.mk Removed Files: Tag: fs_refactoring2 WP3LLListener.h WP42LLListener.h WP5LLListener.h WP6LLListener.cpp WP6LLListener.h WPXLLListener.h Log Message: Removing the LL Listeners and everything is still OK including valgrind Index: WP6ExtendedCharacterGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6ExtendedCharacterGroup.cpp,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -C2 -d -r1.20 -r1.20.2.1 *** WP6ExtendedCharacterGroup.cpp 15 Jun 2005 12:18:28 -0000 1.20 --- WP6ExtendedCharacterGroup.cpp 9 Nov 2005 12:27:45 -0000 1.20.2.1 *************** *** 27,31 **** #include "WP6ExtendedCharacterGroup.h" #include "WP6FileStructure.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 27,30 ---- Index: WP3ExtendedCharacterGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3ExtendedCharacterGroup.cpp,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** WP3ExtendedCharacterGroup.cpp 15 Jun 2005 12:18:27 -0000 1.5 --- WP3ExtendedCharacterGroup.cpp 9 Nov 2005 12:27:45 -0000 1.5.2.1 *************** *** 28,32 **** #include "WP3ExtendedCharacterGroup.h" #include "WP3FileStructure.h" - #include "WP3LLListener.h" #include "libwpd_internal.h" --- 28,31 ---- Index: WP3PageFormatGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3PageFormatGroup.cpp,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** WP3PageFormatGroup.cpp 5 Oct 2005 19:07:42 -0000 1.4 --- WP3PageFormatGroup.cpp 9 Nov 2005 12:27:45 -0000 1.4.2.1 *************** *** 28,32 **** #include "WP3PageFormatGroup.h" #include "WP3FileStructure.h" - #include "WP3LLListener.h" #include "libwpd_internal.h" #include "libwpd_math.h" --- 28,31 ---- --- WP3LLListener.h DELETED --- Index: WP6ColumnGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6ColumnGroup.cpp,v retrieving revision 1.18 retrieving revision 1.18.4.1 diff -C2 -d -r1.18 -r1.18.4.1 *** WP6ColumnGroup.cpp 16 Jan 2005 08:31:06 -0000 1.18 --- WP6ColumnGroup.cpp 9 Nov 2005 12:27:45 -0000 1.18.4.1 *************** *** 25,29 **** #include "WP6ColumnGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" #include "WPXFileStructure.h" --- 25,28 ---- Index: WP6HLStylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6HLStylesListener.cpp,v retrieving revision 1.30 retrieving revision 1.30.2.1 diff -C2 -d -r1.30 -r1.30.2.1 *** WP6HLStylesListener.cpp 3 Oct 2005 12:16:42 -0000 1.30 --- WP6HLStylesListener.cpp 9 Nov 2005 12:27:45 -0000 1.30.2.1 *************** *** 244,248 **** m_tableList = tableList; ! WP6LLListener::getPrefixDataPacket(textPID)->parse(this); m_tableList = oldTableList; --- 244,248 ---- m_tableList = tableList; ! WP6HLListener::getPrefixDataPacket(textPID)->parse(this); m_tableList = oldTableList; *************** *** 251,255 **** else { ! WP6LLListener::getPrefixDataPacket(textPID)->parse(this); } m_subDocumentTextPIDs = oldTextPIDs; --- 251,255 ---- else { ! WP6HLListener::getPrefixDataPacket(textPID)->parse(this); } m_subDocumentTextPIDs = oldTextPIDs; Index: WP5TableEOPGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5TableEOPGroup.cpp,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** WP5TableEOPGroup.cpp 3 Oct 2005 12:16:42 -0000 1.1 --- WP5TableEOPGroup.cpp 9 Nov 2005 12:27:45 -0000 1.1.2.1 *************** *** 27,31 **** #include "WP5TableEOPGroup.h" #include "WP5FileStructure.h" - #include "WP5LLListener.h" #include "libwpd_internal.h" --- 27,30 ---- Index: WP42HLListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP42HLListener.h,v retrieving revision 1.36 retrieving revision 1.36.2.1 diff -C2 -d -r1.36 -r1.36.2.1 *** WP42HLListener.h 3 Oct 2005 12:16:42 -0000 1.36 --- WP42HLListener.h 9 Nov 2005 12:27:45 -0000 1.36.2.1 *************** *** 27,35 **** #define WP42HLLISTENER_H - #include "WP42LLListener.h" #include "WPXHLListener.h" #include "WPXHLListenerImpl.h" ! class WP42HLListener : public WPXHLListener, public WP42LLListener { public: --- 27,34 ---- #define WP42HLLISTENER_H #include "WPXHLListener.h" #include "WPXHLListenerImpl.h" ! class WP42HLListener : public WPXHLListener { public: --- WP42LLListener.h DELETED --- Index: WPXHLListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXHLListener.cpp,v retrieving revision 1.64 retrieving revision 1.64.2.1 diff -C2 -d -r1.64 -r1.64.2.1 *** WPXHLListener.cpp 3 Oct 2005 12:16:42 -0000 1.64 --- WPXHLListener.cpp 9 Nov 2005 12:27:45 -0000 1.64.2.1 *************** *** 124,128 **** WPXHLListener::WPXHLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl) : - WPXLLListener(), m_pageList(pageList), m_listenerImpl(listenerImpl), --- 124,127 ---- Index: WP3EndOfLinePageGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3EndOfLinePageGroup.cpp,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** WP3EndOfLinePageGroup.cpp 10 Aug 2004 14:53:49 -0000 1.2 --- WP3EndOfLinePageGroup.cpp 9 Nov 2005 12:27:45 -0000 1.2.4.1 *************** *** 48,52 **** #include "WP3EndOfLinePageGroup.h" - #include "WP3LLListener.h" #include "WPXHLListener.h" #include "libwpd_internal.h" --- 48,51 ---- Index: WP6CharacterGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6CharacterGroup.cpp,v retrieving revision 1.24 retrieving revision 1.24.2.1 diff -C2 -d -r1.24 -r1.24.2.1 *** WP6CharacterGroup.cpp 3 Oct 2005 12:16:42 -0000 1.24 --- WP6CharacterGroup.cpp 9 Nov 2005 12:27:45 -0000 1.24.2.1 *************** *** 26,30 **** #include "WP6CharacterGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 26,29 ---- Index: WP5SingleByteFunction.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5SingleByteFunction.cpp,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** WP5SingleByteFunction.cpp 10 Aug 2004 14:53:49 -0000 1.2 --- WP5SingleByteFunction.cpp 9 Nov 2005 12:27:45 -0000 1.2.4.1 *************** *** 26,30 **** #include "WP5SingleByteFunction.h" - #include "WP5LLListener.h" #include "libwpd_internal.h" --- 26,29 ---- Index: WP6HeaderFooterGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6HeaderFooterGroup.cpp,v retrieving revision 1.9 retrieving revision 1.9.4.1 diff -C2 -d -r1.9 -r1.9.4.1 *** WP6HeaderFooterGroup.cpp 22 Jun 2004 15:03:01 -0000 1.9 --- WP6HeaderFooterGroup.cpp 9 Nov 2005 12:27:45 -0000 1.9.4.1 *************** *** 25,29 **** #include "WP6HeaderFooterGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 25,28 ---- Index: WP5ExtendedCharacterGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5ExtendedCharacterGroup.cpp,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** WP5ExtendedCharacterGroup.cpp 15 Jun 2005 12:18:27 -0000 1.2 --- WP5ExtendedCharacterGroup.cpp 9 Nov 2005 12:27:45 -0000 1.2.2.1 *************** *** 28,32 **** #include "WP5ExtendedCharacterGroup.h" #include "WP5FileStructure.h" - #include "WP5LLListener.h" #include "libwpd_internal.h" --- 28,31 ---- Index: makefile.mk =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/makefile.mk,v retrieving revision 1.6 retrieving revision 1.6.4.1 diff -C2 -d -r1.6 -r1.6.4.1 *** makefile.mk 7 Feb 2005 09:07:31 -0000 1.6 --- makefile.mk 9 Nov 2005 12:27:45 -0000 1.6.4.1 *************** *** 82,86 **** $(SLO)$/WP6HLListener.obj \ $(SLO)$/WP6HLStylesListener.obj \ - $(SLO)$/WP6LLListener.obj \ $(SLO)$/WP6Parser.obj \ $(SLO)$/WP6OutlineStylePacket.obj \ --- 82,85 ---- Index: WP5TableEOLGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5TableEOLGroup.cpp,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** WP5TableEOLGroup.cpp 3 Oct 2005 12:16:42 -0000 1.1 --- WP5TableEOLGroup.cpp 9 Nov 2005 12:27:45 -0000 1.1.2.1 *************** *** 27,31 **** #include "WP5TableEOLGroup.h" #include "WP5FileStructure.h" - #include "WP5LLListener.h" #include "libwpd_internal.h" --- 27,30 ---- --- WP6LLListener.cpp DELETED --- Index: WP6DisplayNumberReferenceGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6DisplayNumberReferenceGroup.cpp,v retrieving revision 1.11 retrieving revision 1.11.4.1 diff -C2 -d -r1.11 -r1.11.4.1 *** WP6DisplayNumberReferenceGroup.cpp 22 Jun 2004 15:03:01 -0000 1.11 --- WP6DisplayNumberReferenceGroup.cpp 9 Nov 2005 12:27:45 -0000 1.11.4.1 *************** *** 26,30 **** #include "WP6DisplayNumberReferenceGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 26,29 ---- Index: WP6SingleByteFunction.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6SingleByteFunction.cpp,v retrieving revision 1.16 retrieving revision 1.16.2.1 diff -C2 -d -r1.16 -r1.16.2.1 *** WP6SingleByteFunction.cpp 3 Oct 2005 12:16:42 -0000 1.16 --- WP6SingleByteFunction.cpp 9 Nov 2005 12:27:45 -0000 1.16.2.1 *************** *** 26,30 **** #include "WP6SingleByteFunction.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 26,29 ---- Index: WP6PrefixData.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6PrefixData.h,v retrieving revision 1.13 retrieving revision 1.13.4.1 diff -C2 -d -r1.13 -r1.13.4.1 *** WP6PrefixData.h 8 Feb 2005 16:03:04 -0000 1.13 --- WP6PrefixData.h 9 Nov 2005 12:27:45 -0000 1.13.4.1 *************** *** 30,34 **** #include <vector> - class WP6LLListener; typedef std::map<int, WP6PrefixDataPacket *> DPH; typedef std::multimap<int, WP6PrefixDataPacket *> MPDP; --- 30,33 ---- Index: WP6UndoGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6UndoGroup.cpp,v retrieving revision 1.16 retrieving revision 1.16.4.1 diff -C2 -d -r1.16 -r1.16.4.1 *** WP6UndoGroup.cpp 3 Jun 2004 00:06:00 -0000 1.16 --- WP6UndoGroup.cpp 9 Nov 2005 12:27:45 -0000 1.16.4.1 *************** *** 25,29 **** #include "WP6UndoGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 25,28 ---- Index: WP6ParagraphGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6ParagraphGroup.cpp,v retrieving revision 1.26 retrieving revision 1.26.4.1 diff -C2 -d -r1.26 -r1.26.4.1 *** WP6ParagraphGroup.cpp 8 Feb 2005 16:03:04 -0000 1.26 --- WP6ParagraphGroup.cpp 9 Nov 2005 12:27:45 -0000 1.26.4.1 *************** *** 26,30 **** #include "WP6ParagraphGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" #include "WPXFileStructure.h" --- 26,29 ---- Index: WP5HLListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5HLListener.h,v retrieving revision 1.37 retrieving revision 1.37.2.1 diff -C2 -d -r1.37 -r1.37.2.1 *** WP5HLListener.h 3 Oct 2005 12:16:42 -0000 1.37 --- WP5HLListener.h 9 Nov 2005 12:27:45 -0000 1.37.2.1 *************** *** 27,31 **** #define WP5HLLISTENER_H - #include "WP5LLListener.h" #include "WPXHLListener.h" #include "WPXHLListenerImpl.h" --- 27,30 ---- *************** *** 39,43 **** ! class WP5HLListener : public WPXHLListener, public WP5LLListener { public: --- 38,42 ---- ! class WP5HLListener : public WPXHLListener { public: --- WP6LLListener.h DELETED --- Index: WP5HLListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5HLListener.cpp,v retrieving revision 1.34 retrieving revision 1.34.2.1 diff -C2 -d -r1.34 -r1.34.2.1 *** WP5HLListener.cpp 3 Oct 2005 12:16:42 -0000 1.34 --- WP5HLListener.cpp 9 Nov 2005 12:27:45 -0000 1.34.2.1 *************** *** 40,44 **** WP5HLListener::WP5HLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl) : WPXHLListener(pageList, listenerImpl), - WP5LLListener(), m_parseState(new WP5ParsingState) { --- 40,43 ---- Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Makefile.am,v retrieving revision 1.61 retrieving revision 1.61.2.1 diff -C2 -d -r1.61 -r1.61.2.1 *** Makefile.am 5 Oct 2005 19:07:42 -0000 1.61 --- Makefile.am 9 Nov 2005 12:27:45 -0000 1.61.2.1 *************** *** 106,110 **** WP6HLListener.cpp \ WP6HLStylesListener.cpp \ - WP6LLListener.cpp \ WP6Parser.cpp \ WP6OutlineStylePacket.cpp \ --- 106,109 ---- *************** *** 146,150 **** WP3HLListener.h \ WP3HLStylesListener.h \ - WP3LLListener.h \ WP3MiscellaneousGroup.h \ WP3PageFormatGroup.h \ --- 145,148 ---- *************** *** 161,165 **** WP42HLListener.h \ WP42HLStylesListener.h \ - WP42LLListener.h \ WP42Part.h \ WP42Parser.h \ --- 159,162 ---- *************** *** 175,179 **** WP5HLListener.h \ WP5HLStylesListener.h \ - WP5LLListener.h \ WP5PageFormatGroup.h \ WP5Part.h \ --- 172,175 ---- *************** *** 207,211 **** WP6HLListener.h \ WP6HLStylesListener.h \ - WP6LLListener.h \ WP6OutlineStylePacket.h \ WP6PageGroup.h \ --- 203,206 ---- *************** *** 227,231 **** WPDocument.h \ WPXFileStructure.h \ - WPXLLListener.h \ WPXHLListener.h \ WPXHLListenerImpl.h \ --- 222,225 ---- Index: WP6HLListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6HLListener.h,v retrieving revision 1.39 retrieving revision 1.39.4.1 diff -C2 -d -r1.39 -r1.39.4.1 *** WP6HLListener.h 8 Feb 2005 16:03:04 -0000 1.39 --- WP6HLListener.h 9 Nov 2005 12:27:45 -0000 1.39.4.1 *************** *** 27,43 **** #define WP6HLLISTENER_H - #include "WP6LLListener.h" #include "WPXHLListener.h" #include "WP6FileStructure.h" #include <vector> ! class WP6HLListener : public WPXHLListener, public WP6LLListener { public: WP6HLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl); // for getting low-level messages from the parser virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel); }; --- 27,77 ---- #define WP6HLLISTENER_H #include "WPXHLListener.h" #include "WP6FileStructure.h" #include <vector> + #include "WP6PrefixDataPacket.h" ! class WPXString; ! class WP6DefaultInitialFontPacket; ! class WP6PrefixData; ! ! enum WP6OutlineLocation { paragraphGroup, indexHeader }; ! ! class WP6HLListener : public WPXHLListener { public: WP6HLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl); + virtual void setDate(const uint16_t year, const uint8_t month, const uint8_t day, + const uint8_t hour, const uint8_t minute, const uint8_t second, + const uint8_t dayOfWeek, const uint8_t timeZone, const uint8_t unused) = 0; + virtual void setExtendedInformation(const uint16_t type, const WPXString &data) = 0; + virtual void characterColorChange(const uint8_t red, const uint8_t green, const uint8_t blue) = 0; + virtual void characterShadingChange(const uint8_t shading) = 0; + virtual void highlightChange(const bool isOn, const RGBSColor color) = 0; + virtual void fontChange(const uint16_t matchedFontPointSize, const uint16_t fontPID) = 0; + virtual void updateOutlineDefinition(const WP6OutlineLocation outlineLocation, const uint16_t outlineHash, + const uint8_t *numberingMethods, const uint8_t tabBehaviourFlag) = 0; + virtual void paragraphNumberOn(const uint16_t outlineHash, const uint8_t level, const uint8_t flag) = 0; + virtual void paragraphNumberOff() = 0; + virtual void displayNumberReferenceGroupOn(const uint8_t subGroup, const uint8_t level) = 0; + virtual void displayNumberReferenceGroupOff(const uint8_t subGroup) = 0; + virtual void styleGroupOn(const uint8_t subGroup) = 0; + virtual void styleGroupOff(const uint8_t subGroup) = 0; + virtual void globalOn(const uint8_t systemStyle) = 0; + virtual void globalOff() = 0; + virtual void noteOn(const uint16_t textPID) = 0; + virtual void noteOff(const WPXNoteType noteType) = 0; + virtual void headerFooterGroup(const uint8_t headerFooterType, const uint8_t occurenceBits, const uint16_t textPID) = 0; + virtual void suppressPageCharacteristics(const uint8_t suppressCode) = 0; + + void setPrefixData(WP6PrefixData *prefixData) { m_prefixData = prefixData; } + const WP6PrefixDataPacket * getPrefixDataPacket(const int prefixID) const; // for getting low-level messages from the parser virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel); + + private: + WP6PrefixData *m_prefixData; }; Index: WP6UnsupportedFixedLengthGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6UnsupportedFixedLengthGroup.cpp,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** WP6UnsupportedFixedLengthGroup.cpp 3 Jun 2004 00:06:00 -0000 1.4 --- WP6UnsupportedFixedLengthGroup.cpp 9 Nov 2005 12:27:45 -0000 1.4.4.1 *************** *** 25,29 **** #include "WP6UnsupportedFixedLengthGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 25,28 ---- Index: WP5Part.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5Part.h,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** WP5Part.h 3 Jun 2004 00:06:00 -0000 1.5 --- WP5Part.h 9 Nov 2005 12:27:45 -0000 1.5.4.1 *************** *** 31,36 **** #include "WP5HLListener.h" - class WP5LLListener; - class WP5Part { --- 31,34 ---- Index: WP6HLListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6HLListener.cpp,v retrieving revision 1.48 retrieving revision 1.48.4.1 diff -C2 -d -r1.48 -r1.48.4.1 *** WP6HLListener.cpp 8 Feb 2005 16:03:03 -0000 1.48 --- WP6HLListener.cpp 9 Nov 2005 12:27:45 -0000 1.48.4.1 *************** *** 30,37 **** #include "WPXFileStructure.h" #include "libwpd_internal.h" WP6HLListener::WP6HLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl) : WPXHLListener(pageList, listenerImpl), ! WP6LLListener() { } --- 30,40 ---- #include "WPXFileStructure.h" #include "libwpd_internal.h" + #include "WP6PrefixData.h" + #include "WP6FontDescriptorPacket.h" + #include "WP6DefaultInitialFontPacket.h" WP6HLListener::WP6HLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl) : WPXHLListener(pageList, listenerImpl), ! m_prefixData(NULL) { } *************** *** 44,45 **** --- 47,53 ---- m_isUndoOn = false; } + + const WP6PrefixDataPacket * WP6HLListener::getPrefixDataPacket(const int prefixID) const + { + return m_prefixData->getPrefixDataPacket(prefixID); + } Index: WP6GeneralTextPacket.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6GeneralTextPacket.h,v retrieving revision 1.7 retrieving revision 1.7.4.1 diff -C2 -d -r1.7 -r1.7.4.1 *** WP6GeneralTextPacket.h 3 Jun 2004 00:06:00 -0000 1.7 --- WP6GeneralTextPacket.h 9 Nov 2005 12:27:45 -0000 1.7.4.1 *************** *** 28,32 **** #include "WP6PrefixDataPacket.h" #include "WP6FileStructure.h" - #include "WP6LLListener.h" #include "WPXMemoryStream.h" --- 28,31 ---- Index: WP6Parser.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6Parser.cpp,v retrieving revision 1.37 retrieving revision 1.37.4.1 diff -C2 -d -r1.37 -r1.37.4.1 *** WP6Parser.cpp 8 Feb 2005 16:03:04 -0000 1.37 --- WP6Parser.cpp 9 Nov 2005 12:27:45 -0000 1.37.4.1 *************** *** 24,28 **** */ - #include "WP6LLListener.h" #include "WP6HLStylesListener.h" #include "WP6HLContentListener.h" --- 24,27 ---- Index: WP6HighlightGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6HighlightGroup.cpp,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** WP6HighlightGroup.cpp 3 Jun 2004 00:06:00 -0000 1.4 --- WP6HighlightGroup.cpp 9 Nov 2005 12:27:45 -0000 1.4.4.1 *************** *** 26,30 **** #include "WP6HighlightGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 26,29 ---- Index: WP3SingleByteFunction.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3SingleByteFunction.cpp,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** WP3SingleByteFunction.cpp 6 Aug 2004 11:43:24 -0000 1.3 --- WP3SingleByteFunction.cpp 9 Nov 2005 12:27:45 -0000 1.3.4.1 *************** *** 26,30 **** #include "WP3SingleByteFunction.h" - #include "WP3LLListener.h" #include "libwpd_internal.h" --- 26,29 ---- Index: WP3HLListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3HLListener.cpp,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -C2 -d -r1.14 -r1.14.2.1 *** WP3HLListener.cpp 25 Aug 2005 14:34:42 -0000 1.14 --- WP3HLListener.cpp 9 Nov 2005 12:27:45 -0000 1.14.2.1 *************** *** 39,43 **** WP3HLListener::WP3HLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl) : WPXHLListener(pageList, listenerImpl), - WP3LLListener(), m_parseState(new WP3ParsingState) { --- 39,42 ---- Index: WP42HLListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP42HLListener.cpp,v retrieving revision 1.29 retrieving revision 1.29.2.1 diff -C2 -d -r1.29 -r1.29.2.1 *** WP42HLListener.cpp 25 Aug 2005 14:34:42 -0000 1.29 --- WP42HLListener.cpp 9 Nov 2005 12:27:45 -0000 1.29.2.1 *************** *** 30,35 **** WP42HLListener::WP42HLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl) : ! WPXHLListener(pageList, listenerImpl), ! WP42LLListener() { m_textBuffer.clear(); --- 30,34 ---- WP42HLListener::WP42HLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl) : ! WPXHLListener(pageList, listenerImpl) { m_textBuffer.clear(); Index: WP6HLContentListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6HLContentListener.cpp,v retrieving revision 1.83 retrieving revision 1.83.2.1 diff -C2 -d -r1.83 -r1.83.2.1 *** WP6HLContentListener.cpp 3 Oct 2005 12:16:42 -0000 1.83 --- WP6HLContentListener.cpp 9 Nov 2005 12:27:45 -0000 1.83.2.1 *************** *** 621,625 **** { const WP6FontDescriptorPacket *fontDescriptorPacket = NULL; ! if (fontDescriptorPacket = dynamic_cast<const WP6FontDescriptorPacket *>(WP6LLListener::getPrefixDataPacket(fontPID))) { m_ps->m_fontName->sprintf("%s", fontDescriptorPacket->getFontName()); } --- 621,625 ---- { const WP6FontDescriptorPacket *fontDescriptorPacket = NULL; ! if (fontDescriptorPacket = dynamic_cast<const WP6FontDescriptorPacket *>(WP6HLListener::getPrefixDataPacket(fontPID))) { m_ps->m_fontName->sprintf("%s", fontDescriptorPacket->getFontName()); } *************** *** 1231,1235 **** if (textPID) ! WP6LLListener::getPrefixDataPacket(textPID)->parse(this); else _openSpan(); --- 1231,1235 ---- if (textPID) ! WP6HLListener::getPrefixDataPacket(textPID)->parse(this); else _openSpan(); Index: WP5PageFormatGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5PageFormatGroup.cpp,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** WP5PageFormatGroup.cpp 10 Aug 2004 14:53:49 -0000 1.4 --- WP5PageFormatGroup.cpp 9 Nov 2005 12:27:45 -0000 1.4.4.1 *************** *** 27,31 **** #include "WP5PageFormatGroup.h" #include "WP5FileStructure.h" - #include "WP5LLListener.h" #include "libwpd_internal.h" --- 27,30 ---- --- WPXLLListener.h DELETED --- Index: WP6TabGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6TabGroup.cpp,v retrieving revision 1.18 retrieving revision 1.18.2.1 diff -C2 -d -r1.18 -r1.18.2.1 *** WP6TabGroup.cpp 25 Aug 2005 14:34:42 -0000 1.18 --- WP6TabGroup.cpp 9 Nov 2005 12:27:45 -0000 1.18.2.1 *************** *** 26,30 **** #include "WP6TabGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" #include "WPXFileStructure.h" --- 26,29 ---- Index: WP3UnsupportedFixedLengthGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3UnsupportedFixedLengthGroup.cpp,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** WP3UnsupportedFixedLengthGroup.cpp 19 Jul 2004 12:53:47 -0000 1.1 --- WP3UnsupportedFixedLengthGroup.cpp 9 Nov 2005 12:27:45 -0000 1.1.4.1 *************** *** 24,28 **** #include "WP3UnsupportedFixedLengthGroup.h" - #include "WP3LLListener.h" #include "libwpd_internal.h" --- 24,27 ---- --- WP5LLListener.h DELETED --- Index: WP6PageGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6PageGroup.cpp,v retrieving revision 1.15 retrieving revision 1.15.4.1 diff -C2 -d -r1.15 -r1.15.4.1 *** WP6PageGroup.cpp 10 Aug 2004 14:53:50 -0000 1.15 --- WP6PageGroup.cpp 9 Nov 2005 12:27:45 -0000 1.15.4.1 *************** *** 26,30 **** #include "WP6PageGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 26,29 ---- Index: WP3Part.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3Part.h,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** WP3Part.h 19 Jul 2004 12:53:47 -0000 1.1 --- WP3Part.h 9 Nov 2005 12:27:45 -0000 1.1.4.1 *************** *** 30,35 **** #include "WP3HLListener.h" - class WP3LLListener; - class WP3Part { --- 30,33 ---- Index: WP5FormatGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5FormatGroup.cpp,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** WP5FormatGroup.cpp 22 Mar 2004 05:43:27 -0000 1.2 --- WP5FormatGroup.cpp 9 Nov 2005 12:27:45 -0000 1.2.4.1 *************** *** 24,28 **** #include "WP5FormatGroup.h" - #include "WP5LLListener.h" #include "WPXHLListener.h" #include "libwpd_internal.h" --- 24,27 ---- Index: WP6FootnoteEndnoteGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6FootnoteEndnoteGroup.cpp,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** WP6FootnoteEndnoteGroup.cpp 22 Mar 2004 05:43:27 -0000 1.8 --- WP6FootnoteEndnoteGroup.cpp 9 Nov 2005 12:27:45 -0000 1.8.4.1 *************** *** 25,29 **** #include "WP6FootnoteEndnoteGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 25,28 ---- Index: WP3HLListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3HLListener.h,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -C2 -d -r1.17 -r1.17.2.1 *** WP3HLListener.h 3 Oct 2005 12:16:42 -0000 1.17 --- WP3HLListener.h 9 Nov 2005 12:27:45 -0000 1.17.2.1 *************** *** 26,30 **** #define WP3HLLISTENER_H - #include "WP3LLListener.h" #include "WPXHLListener.h" #include "WPXHLListenerImpl.h" --- 26,29 ---- *************** *** 38,42 **** ! class WP3HLListener : public WPXHLListener, public WP3LLListener { public: --- 37,41 ---- ! class WP3HLListener : public WPXHLListener { public: Index: WP5DefinitionGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5DefinitionGroup.cpp,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** WP5DefinitionGroup.cpp 3 Oct 2005 12:16:42 -0000 1.1 --- WP5DefinitionGroup.cpp 9 Nov 2005 12:27:45 -0000 1.1.2.1 *************** *** 24,28 **** #include "WP5DefinitionGroup.h" - #include "WP5LLListener.h" #include "WPXHLListener.h" #include "libwpd_internal.h" --- 24,27 ---- Index: WPXParser.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXParser.h,v retrieving revision 1.16 retrieving revision 1.16.4.1 diff -C2 -d -r1.16 -r1.16.4.1 *** WPXParser.h 1 Aug 2004 20:10:52 -0000 1.16 --- WPXParser.h 9 Nov 2005 12:27:45 -0000 1.16.4.1 *************** *** 28,32 **** #include "WPXHeader.h" ! #include "WPXLLListener.h" class WPXHLListenerImpl; --- 28,32 ---- #include "WPXHeader.h" ! //#include "WPXHLListener.h" class WPXHLListenerImpl; *************** *** 46,50 **** private: WPXInputStream * m_input; ! WPXLLListener * m_llListener; WPXHeader * m_header; --- 46,50 ---- private: WPXInputStream * m_input; ! // WPXHLListener * m_hlListener; WPXHeader * m_header; Index: WP6StyleGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6StyleGroup.cpp,v retrieving revision 1.13 retrieving revision 1.13.4.1 diff -C2 -d -r1.13 -r1.13.4.1 *** WP6StyleGroup.cpp 1 Aug 2004 20:10:52 -0000 1.13 --- WP6StyleGroup.cpp 9 Nov 2005 12:27:45 -0000 1.13.4.1 *************** *** 25,29 **** #include "WP6StyleGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 25,28 ---- Index: WP3UndoGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3UndoGroup.cpp,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** WP3UndoGroup.cpp 4 Aug 2004 14:29:08 -0000 1.1 --- WP3UndoGroup.cpp 9 Nov 2005 12:27:45 -0000 1.1.4.1 *************** *** 26,30 **** #include "WP3UndoGroup.h" - #include "WP3LLListener.h" #include "libwpd_internal.h" --- 26,29 ---- Index: WP6FillStylePacket.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6FillStylePacket.h,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** WP6FillStylePacket.h 3 Jun 2004 00:06:00 -0000 1.5 --- WP6FillStylePacket.h 9 Nov 2005 12:27:45 -0000 1.5.4.1 *************** *** 28,32 **** #include "WP6PrefixDataPacket.h" #include "WP6FileStructure.h" ! #include "WP6LLListener.h" struct _RGBSColor; --- 28,32 ---- #include "WP6PrefixDataPacket.h" #include "WP6FileStructure.h" ! #include "libwpd_internal.h" struct _RGBSColor; Index: WPXHLListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXHLListener.h,v retrieving revision 1.64 retrieving revision 1.64.2.1 diff -C2 -d -r1.64 -r1.64.2.1 *** WPXHLListener.h 8 Oct 2005 18:24:54 -0000 1.64 --- WPXHLListener.h 9 Nov 2005 12:27:45 -0000 1.64.2.1 *************** *** 28,35 **** #define WPXHLLISTENER_H - #include "WPXLLListener.h" #include "WPXHLListenerImpl.h" #include "WPXTable.h" #include "WPXPropertyListVector.h" #include <set> --- 28,36 ---- #define WPXHLLISTENER_H #include "WPXHLListenerImpl.h" #include "WPXTable.h" #include "WPXPropertyListVector.h" + #include "libwpd_internal.h" + #include <vector> #include <set> *************** *** 160,164 **** }; ! class WPXHLListener : public WPXLLListener { public: --- 161,165 ---- }; ! class WPXHLListener { public: *************** *** 166,174 **** ~WPXHLListener(); ! void startDocument(); void handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice); virtual void insertBreak(const uint8_t breakType); virtual void lineSpacingChange(const float lineSpacing); virtual void justificationChange(const uint8_t justification); WPXParsingState *m_ps; // parse state --- 167,204 ---- ~WPXHLListener(); ! virtual void startDocument(); void handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice); virtual void insertBreak(const uint8_t breakType); virtual void lineSpacingChange(const float lineSpacing); virtual void justificationChange(const uint8_t justification); + virtual void setAlignmentCharacter(const uint16_t character) = 0; + virtual void setLeaderCharacter(const uint16_t character, const uint8_t numberOfSpaces) = 0; + virtual void defineTabStops(const bool isRelative, const std::vector<WPXTabStop> &tabStops, + const std::vector<bool> &usePreWP9LeaderMethods) = 0; + virtual void insertCharacter(const uint16_t character) = 0; + virtual void insertTab(const uint8_t tabType, const float tabPosition) = 0; + virtual void handleLineBreak() = 0; + virtual void insertEOL() = 0; + virtual void attributeChange(const bool isOn, const uint8_t attribute) = 0; + virtual void spacingAfterParagraphChange(const float spacingRelative, const float spacingAbsolute) = 0; + virtual void pageMarginChange(const uint8_t side, const uint16_t margin) = 0; + virtual void pageFormChange(const uint16_t length, const uint16_t width, const WPXFormOrientation orientation, + const bool isPersistent) = 0; + virtual void marginChange(const uint8_t side, const uint16_t margin) = 0; + virtual void paragraphMarginChange(const uint8_t side, const int16_t margin) = 0; + virtual void indentFirstLineChange(const int16_t offset) = 0; + virtual void columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth, + const std::vector<bool> &isFixedWidth) = 0; + virtual void endDocument() = 0; + + virtual void defineTable(uint8_t position, uint16_t leftOffset) = 0; + virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) = 0; + virtual void startTable() = 0; + virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) = 0; + virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, + const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, + const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, + const bool useCellAttributes, const uint32_t cellAttributes) = 0; + virtual void endTable() = 0; WPXParsingState *m_ps; // parse state Index: WP3MiscellaneousGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3MiscellaneousGroup.cpp,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** WP3MiscellaneousGroup.cpp 5 Oct 2005 19:07:42 -0000 1.5 --- WP3MiscellaneousGroup.cpp 9 Nov 2005 12:27:45 -0000 1.5.2.1 *************** *** 28,32 **** #include "WP3MiscellaneousGroup.h" #include "WP3FileStructure.h" - #include "WP3LLListener.h" #include "WPXFileStructure.h" #include "libwpd_internal.h" --- 28,31 ---- Index: WP6PrefixData.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6PrefixData.cpp,v retrieving revision 1.18 retrieving revision 1.18.4.1 diff -C2 -d -r1.18 -r1.18.4.1 *** WP6PrefixData.cpp 8 Feb 2005 16:03:04 -0000 1.18 --- WP6PrefixData.cpp 9 Nov 2005 12:27:45 -0000 1.18.4.1 *************** *** 29,33 **** #include "WP6FontDescriptorPacket.h" #include "WP6DefaultInitialFontPacket.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 29,32 ---- Index: WP3TablesGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3TablesGroup.cpp,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** WP3TablesGroup.cpp 5 Oct 2005 19:07:42 -0000 1.1 --- WP3TablesGroup.cpp 9 Nov 2005 12:27:45 -0000 1.1.2.1 *************** *** 26,30 **** #include "WP3TablesGroup.h" #include "WP3FileStructure.h" ! #include "WP3LLListener.h" #include "WPXFileStructure.h" #include "libwpd_internal.h" --- 26,30 ---- #include "WP3TablesGroup.h" #include "WP3FileStructure.h" ! #include "WP3HLListener.h" #include "WPXFileStructure.h" #include "libwpd_internal.h" Index: WP6AttributeGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6AttributeGroup.cpp,v retrieving revision 1.17 retrieving revision 1.17.4.1 diff -C2 -d -r1.17 -r1.17.4.1 *** WP6AttributeGroup.cpp 7 Feb 2005 00:06:24 -0000 1.17 --- WP6AttributeGroup.cpp 9 Nov 2005 12:27:45 -0000 1.17.4.1 *************** *** 25,29 **** #include "WP6AttributeGroup.h" - #include "WP6LLListener.h" #include "libwpd_internal.h" --- 25,28 ---- Index: WP3AttributeGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3AttributeGroup.cpp,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** WP3AttributeGroup.cpp 12 Aug 2004 14:32:50 -0000 1.2 --- WP3AttributeGroup.cpp 9 Nov 2005 12:27:45 -0000 1.2.4.1 *************** *** 25,29 **** #include "WP3AttributeGroup.h" - #include "WP3LLListener.h" #include "libwpd_internal.h" --- 25,28 ---- Index: WP6EOLGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6EOLGroup.cpp,v retrieving revision 1.46 retrieving revision 1.46.2.1 diff -C2 -d -r1.46 -r1.46.2.1 *** WP6EOLGroup.cpp 3 Oct 2005 12:16:42 -0000 1.46 --- WP6EOLGroup.cpp 9 Nov 2005 12:27:45 -0000 1.46.2.1 *************** *** 27,31 **** #include "WP6EOLGroup.h" - #include "WP6LLListener.h" #include "WPXHLListener.h" #include "libwpd_internal.h" --- 27,30 ---- Index: WP5UnsupportedFixedLengthGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5UnsupportedFixedLengthGroup.cpp,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** WP5UnsupportedFixedLengthGroup.cpp 3 Jun 2004 00:06:00 -0000 1.4 --- WP5UnsupportedFixedLengthGroup.cpp 9 Nov 2005 12:27:45 -0000 1.4.4.1 *************** *** 25,29 **** #include "WP5UnsupportedFixedLengthGroup.h" - #include "WP5LLListener.h" #include "libwpd_internal.h" --- 25,28 ---- |
From: Fridrich S. <str...@us...> - 2005-10-26 11:30:37
|
Update of /cvsroot/libwpd/libwpd-www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23942 Modified Files: download.html news.html Log Message: wpd2sxw & writerperfect release Index: download.html =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/download.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** download.html 23 Oct 2005 17:26:24 -0000 1.2 --- download.html 26 Oct 2005 11:30:28 -0000 1.3 *************** *** 114,123 **** </tr> <tr> ! <td style="vertical-align: top;">writerperfect 0.7.0 (source tarball)<small><span style="color: rgb(255, 0, 0);">*</span></small></td> ! <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/writerperfect-0.7.0.tar.gz?download">writerperfect-0.7.0.tar.gz</a></td> </tr> <tr> ! <td style="vertical-align: top;">writerperfect 0.7.0 (Windows Standalone Installer)<small><span style="color: rgb(255, 0, 0);">**</span></small><small></small></td> ! <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/WriterPerfect-0.7.0-setup.exe?download">WriterPerfect-0.7.0-setup.exe</a></td> </tr> </tbody> --- 114,123 ---- </tr> <tr> ! <td style="vertical-align: top;">writerperfect 0.7.1 (source tarball)<small><span style="color: rgb(255, 0, 0);">*</span></small></td> ! <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/writerperfect-0.7.1.tar.gz?download">writerperfect-0.7.1.tar.gz</a></td> </tr> <tr> ! <td style="vertical-align: top;">writerperfect 0.7.1 (Windows Standalone Installer)<small><span style="color: rgb(255, 0, 0);">**</span></small><small></small></td> ! <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/WriterPerfect-0.7.1-setup.exe?download">WriterPerfect-0.7.1-setup.exe</a></td> </tr> </tbody> *************** *** 137,154 **** </tr> <tr> ! <td style="vertical-align: top;">wpd2sxw 0.7.0 (source RPM)</td> ! <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/wpd2sxw-0.7.0-1.src.rpm?download">wpd2sxw-0.7.0-1.src.rpm</a></td> ! </tr> ! <tr> ! <td style="vertical-align: top;">wpd2sxw 0.7.0 (Fedora Core 3 RPM)</td> ! <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/wpd2sxw-0.7.0-1.fc3.i386.rpm?download">wpd2sxw-0.7.0-1.fc3.i386.rpm</a></td> ! </tr> ! <tr> ! <td style="vertical-align: top;">wpd2sxw 0.7.0 (RedHat Enterprise Linux 3 RPM)</td> ! <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/wpd2sxw-0.7.0-1.rhel3.i386.rpm?download">wpd2sxw-0.7.0-1.rhel3.i386.rpm</a></td> </tr> <tr> ! <td style="vertical-align: top;">wpd2sxw 0.7.0 (Windows executable ZIP)<small><span style="color: rgb(255, 0, 0);">*</span></small></td> ! <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/wpd2sxw-0.7.0-20050901.zip?download">wpd2sxw-0.7.0-20050901.zip</a></td> </tr> </tbody> --- 137,146 ---- </tr> <tr> ! <td style="vertical-align: top;">wpd2sxw 0.7.1 (source RPM)</td> ! <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/wpd2sxw-0.7.1-1.src.rpm?download">wpd2sxw-0.7.1-1.src.rpm</a></td> </tr> <tr> ! <td style="vertical-align: top;">wpd2sxw 0.7.1 (Windows executable ZIP)<small><span style="color: rgb(255, 0, 0);">*</span></small></td> ! <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/wpd2sxw-0.7.1.zip?download">wpd2sxw-0.7.1.zip</a></td> </tr> </tbody> *************** *** 300,303 **** --- 292,299 ---- </tr> <tr> + <td style="vertical-align: top;">writerperfect-0.7.0 (source tarball)<span style="font-weight: bold;"> </span></td> + <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/writerperfect-0.7.0.tar.gz?download">writerperfect-0.7.0.tar.gz</a></td> + </tr> + <tr> <td style="vertical-align: top;">writerperfect-0.2.1 (source tarball)<span style="font-weight: bold;"> </span></td> <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/writerperfect-0.2.1.tar.gz?download">writerperfect-0.2.1.tar.gz</a></td> Index: news.html =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/news.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** news.html 23 Oct 2005 17:52:47 -0000 1.3 --- news.html 26 Oct 2005 11:30:28 -0000 1.4 *************** *** 67,70 **** --- 67,74 ---- <td style="vertical-align: top; width: 100%;"> <h3>News</h3> + <p><strong>Tuesday, October 25 2005</strong>: <strong>writerperfect/wpd2sxw</strong> 0.7.1 has + been released. This versions contains just small fixes and makes users fully profit from the changes in libwpd-0.8.3. It is also + the last release of our add-on WordPerfect<sup>tm</sup> import filter for those that are for any reason still using OpenOffice.org + 1.1.x series.</p> <p><strong>Sunday, October 23 2005</strong>: <strong>OpenOffice.org</strong> 2.0 has been released. This versions has libwpd-based WordPerfect import built in, eliminating the need |
From: Fridrich S. <str...@us...> - 2005-10-24 11:25:27
|
Update of /cvsroot/libwpd/writerperfect In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20146 Modified Files: CHANGES Log Message: Update the changelog Index: CHANGES =================================================================== RCS file: /cvsroot/libwpd/writerperfect/CHANGES,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CHANGES 4 Jul 2005 16:42:18 -0000 1.3 --- CHANGES 24 Oct 2005 11:25:19 -0000 1.4 *************** *** 1,6 **** CHANGES: 0.7.0 -> 0.7.1 ! - Use fribidi to reorder strings so that they are displayed correctly ! in OOo (Fridrich Strba) 0.6.1 -> 0.7.0 --- 1,10 ---- CHANGES: 0.7.0 -> 0.7.1 ! - Convert table in foot/endnote into normal text because OOo is not ! supporting tables in foot/endnotes (Fridrich Strba) ! - Improved lists conversion. Use additional information output by ! libwpd-0.8.3 (Fridrich Strba) ! - Unreference g_objects that should be unreferenced in our add-on ! UNO component (Jody Goldberg) 0.6.1 -> 0.7.0 |
From: Fridrich S. <str...@us...> - 2005-10-24 10:52:15
|
Update of /cvsroot/libwpd/writerperfect/ooo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10602/ooo Modified Files: WordPerfectImportFilter.cxx Log Message: Pre-release cleaning Index: WordPerfectImportFilter.cxx =================================================================== RCS file: /cvsroot/libwpd/writerperfect/ooo/WordPerfectImportFilter.cxx,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** WordPerfectImportFilter.cxx 3 Oct 2005 13:29:29 -0000 1.5 --- WordPerfectImportFilter.cxx 24 Oct 2005 10:52:03 -0000 1.6 *************** *** 141,145 **** gsf_init(); GsfInput *pGsfInput; ! pGsfInput = static_cast<GsfInput *>(gsf_input_oo_new (xInputStream, NULL)); GSFInputStream input(pGsfInput); g_object_unref(G_OBJECT(pGsfInput)); --- 141,145 ---- gsf_init(); GsfInput *pGsfInput; ! pGsfInput = GSF_INPUT(gsf_input_oo_new (xInputStream, NULL)); GSFInputStream input(pGsfInput); g_object_unref(G_OBJECT(pGsfInput)); *************** *** 148,152 **** collector.filter(); ! // gsf_shutdown(); return true; --- 148,152 ---- collector.filter(); ! gsf_shutdown(); return true; *************** *** 219,223 **** GsfInput *pGsfInput; ! pGsfInput = static_cast<GsfInput *>(gsf_input_oo_new (xInputStream, NULL)); if (pGsfInput != NULL) --- 219,223 ---- GsfInput *pGsfInput; ! pGsfInput = GSF_INPUT(gsf_input_oo_new (xInputStream, NULL)); if (pGsfInput != NULL) *************** *** 229,235 **** confidence = WPDocument::isFileFormatSupported(&input, false); ! } ! ! // gsf_shutdown(); if (confidence == WPD_CONFIDENCE_EXCELLENT) --- 229,235 ---- confidence = WPDocument::isFileFormatSupported(&input, false); ! } ! ! gsf_shutdown(); if (confidence == WPD_CONFIDENCE_EXCELLENT) |
From: Will L. <lac...@us...> - 2005-10-23 17:59:23
|
Update of /cvsroot/libwpd/libwpd-www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11593 Modified Files: index.html sync-me.sh Log Message: sync-me now sets permissions of all uploaded files to group-writable. Index: sync-me.sh =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/sync-me.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sync-me.sh 17 Sep 2005 22:46:10 -0000 1.1 --- sync-me.sh 23 Oct 2005 17:59:15 -0000 1.2 *************** *** 4,5 **** --- 4,6 ---- scp ./*html ./*png ./*jpg ./*css ./*dia $UN...@li...:/home/groups/l/li/libwpd/htdocs + ssh $UN...@li... chmod g+w /home/groups/l/li/libwpd/htdocs/* Index: index.html =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/index.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.html 23 Oct 2005 17:52:47 -0000 1.3 --- index.html 23 Oct 2005 17:59:15 -0000 1.4 *************** *** 81,85 **** <a href="ftp://ftp.gnome.org/pub/gnome/sources/libgsf"><span style="font-weight: bold;">libgsf</span></a>), you gain the ability to import OLE-embedded ! WordPerfect documents as well.<br> </p> <h3 >Programs that use libwpd</h3> --- 81,85 ---- <a href="ftp://ftp.gnome.org/pub/gnome/sources/libgsf"><span style="font-weight: bold;">libgsf</span></a>), you gain the ability to import OLE-embedded ! WordPerfect documents.<br> </p> <h3 >Programs that use libwpd</h3> |
From: Will L. <lac...@us...> - 2005-10-23 17:52:56
|
Update of /cvsroot/libwpd/libwpd-www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10376 Modified Files: index.html news.html Log Message: Fix typo, edit description of libwpd a little. Index: index.html =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.html 23 Oct 2005 17:26:24 -0000 1.2 --- index.html 23 Oct 2005 17:52:47 -0000 1.3 *************** *** 73,84 **** - a library for importing WordPerfect (tm) documents</span></h2> <h3 >Introduction</h3> ! <p>libwpd is a library designed to help process WordPerfect documents. It exposes a simple ! callback-based API (similar to SAX), allowing it to be easily plugged into any application which might ! need to handle this type of document.</p> ! <p >libwpd is written in C++ and strictly depends only on the STL. By plugging ! in a library which abstracts the Microsoft OLE format (such as <a ! href="ftp://ftp.gnome.org/pub/gnome/sources/libgsf"><span style="font-weight: bold;">libgsf</span></a>), you gain the ability to import OLE-embedded ! WordPerfect documents.<br> </p> <h3 >Programs that use libwpd</h3> --- 73,85 ---- - a library for importing WordPerfect (tm) documents</span></h2> <h3 >Introduction</h3> ! <p>libwpd is a C++ library designed to help process WordPerfect documents. It is most commonly used to ! import WordPerfect documents into other word processors (see below), but may be useful in other cases as ! well.</p> ! <p>libwpd exposes a simple callback-based API (similar to SAX), allowing it to be easily ! plugged into any C or C++ application. It strictly depends only on an implementation of the STL, ! although by interfacing with a library which abstracts the Microsoft OLE format (such as ! <a href="ftp://ftp.gnome.org/pub/gnome/sources/libgsf"><span style="font-weight: bold;">libgsf</span></a>), you gain the ability to import OLE-embedded ! WordPerfect documents as well.<br> </p> <h3 >Programs that use libwpd</h3> Index: news.html =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/news.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** news.html 23 Oct 2005 17:26:24 -0000 1.2 --- news.html 23 Oct 2005 17:52:47 -0000 1.3 *************** *** 67,71 **** <td style="vertical-align: top; width: 100%;"> <h3>News</h3> ! <p><strong>Wednesday, August 31 2005</strong>: <strong>OpenOffice.org</strong> 2.0 has been released. This versions has libwpd-based WordPerfect import built in, eliminating the need for most users to download the WriterPerfect package.</p> --- 67,71 ---- <td style="vertical-align: top; width: 100%;"> <h3>News</h3> ! <p><strong>Sunday, October 23 2005</strong>: <strong>OpenOffice.org</strong> 2.0 has been released. This versions has libwpd-based WordPerfect import built in, eliminating the need for most users to download the WriterPerfect package.</p> |
From: Will L. <lac...@us...> - 2005-10-23 17:26:34
|
Update of /cvsroot/libwpd/libwpd-www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5661 Modified Files: development.html download.html features.html index.html links.html news.html Log Message: Minor updates to website.. (all over the place) Index: download.html =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/download.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** download.html 17 Sep 2005 22:25:27 -0000 1.1 --- download.html 23 Oct 2005 17:26:24 -0000 1.2 *************** *** 80,144 **** <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-0.8.3.x86.package?download">libwpd-0.8.3.x86.package</a></td> </tr> - <!-- <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (Fedora Core 1 RPM)</td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-0.8.2-1.fc1.i386.rpm?download">libwpd-0.8.2-1.fc1.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (Fedora Core 1 Development RPM)</td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-devel-0.8.2-1.fc1.i386.rpm?download">libwpd-devel-0.8.2-1.fc1.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (Fedora Core 1 Tools RPM)<small><span style="color: rgb(255, 0, 0);">*</span></small></td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-tools-0.8.2-1.fc1.i386.rpm?download">libwpd-tools-0.8.2-1.fc1.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (Fedora Core 2 RPM)</td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-0.8.2-1.fc2.i386.rpm?download">libwpd-0.8.2-1.fc2.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (Fedora Core 2 Development RPM)</td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-devel-0.8.2-1.i386.fc2.rpm?download">libwpd-devel-0.8.2-1.fc2.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (Fedora Core 2 Tools RPM)<small><span style="color: rgb(255, 0, 0);">*</span></small></td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-tools-0.8.2-1.i386.fc2.rpm?download">libwpd-tools-0.8.2-1.fc2.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (Fedora Core 3 RPM)</td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-0.8.2-1.fc3.i386.rpm?download">libwpd-0.8.2-1.fc3.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (Fedora Core 3 Development RPM)</td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-devel-0.8.2-1.fc3.i386.rpm?download">libwpd-devel-0.8.2-1.fc3.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (Fedora Core 3 Tools RPM)<small><span style="color: rgb(255, 0, 0);">*</span></small></td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-tools-0.8.2-1.fc3.i386.rpm?download">libwpd-tools-0.8.2-1.fc3.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (RedHat 9 RPM)</td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-0.8.2-1.rh9.i386.rpm?download">libwpd-0.8.2-1.rh9.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (RedHat 9 Development RPM)</td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-devel-0.8.2-1.rh9.i386.rpm?download">libwpd-devel-0.8.2-1.rh9.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (RedHat 9 Tools RPM)<small><span style="color: rgb(255, 0, 0);">*</span></small></td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-tools-0.8.2-1.rh9.i386.rpm?download">libwpd-tools-0.8.2-1.rh9.i386.rpm</a></td> - </tr> <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (RedHat Enterprise Linux 3 RPM)</td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-0.8.2-1.rhel3.i386.rpm?download">libwpd-0.8.2-1.rhel3.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (RedHat Enterprise Linux 3 Development RPM)</td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-devel-0.8.2-1.rhel3.i386.rpm?download">libwpd-devel-0.8.2-1.rhel3.i386.rpm</a></td> - </tr> - <tr> - <td style="vertical-align: top;">libwpd v0.8.2 (RedHat Enterprise Linux 3 Tools RPM)<small><span style="color: rgb(255, 0, 0);">*</span></small></td> - <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-tools-0.8.2-1.rhel3.i386.rpm?download">libwpd-tools-0.8.2-1.rhel3.i386.rpm</a></td> - </tr> - <tr> --> <td style="vertical-align: top;">libwpd v0.8.3 (Win32 DLLs ZIP [built with MinGW])</td> <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/libwpd-0.8.3-MinGW.zip?download">libwpd-0.8.3-MinGW.zip</a> </td> --- 80,84 ---- *************** *** 164,173 **** <br/> - <small> <span style="color: rgb(255, 0, 0);">*</span> The Tools package includes <span style="font-weight: bold;">wpd2html</span> and <span style="font-weight: bold;">wpd2text</span><br> - <!-- <span style="color: rgb(255, 0, 0);">**</span> This package includes <span style="font-weight: bold;">wpd2html</span>, <span - style="font-weight: bold;">wpd2raw</span>, <span style="font-weight: bold;">wpd2text</span> and <span style="font-weight: bold;">wpd2sxw</span> - executables - --> </small> <p><span style="font-weight: bold;">WriterPerfect - Latest release</span></p> --- 104,108 ---- *************** *** 183,187 **** </tr> <tr> ! <td style="vertical-align: top;">writerperfect 0.7.0 (Windows Standalone Installer)<small></small></td> <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/WriterPerfect-0.7.0-setup.exe?download">WriterPerfect-0.7.0-setup.exe</a></td> </tr> --- 118,122 ---- </tr> <tr> ! <td style="vertical-align: top;">writerperfect 0.7.0 (Windows Standalone Installer)<small><span style="color: rgb(255, 0, 0);">**</span></small><small></small></td> <td style="vertical-align: top;"><a href="http://prdownloads.sourceforge.net/libwpd/WriterPerfect-0.7.0-setup.exe?download">WriterPerfect-0.7.0-setup.exe</a></td> </tr> *************** *** 189,193 **** </table> ! <br/><small><span style="color: rgb(255, 0, 0);">*</span> <b>wpd2sxw</b> is now included with the <b>WriterPerfect</b> source tarball (and is the default build target)</small> <p><b>wpd2sxw - Latest release</b></p> --- 124,131 ---- </table> ! <br/><span style="color: rgb(255, 0, 0);">*</span> <b>wpd2sxw</b> is now included with the <b>WriterPerfect</b> source tarball (and is the default build target) ! ! <br/><br/><span style="color: rgb(255, 0, 0);">**</span> <b>WriterPerfect</b> is built ! into OpenOffice.org 2.0 and above. You only want this package if you are still using OpenOffice.org 1.1. <p><b>wpd2sxw - Latest release</b></p> *************** *** 217,225 **** </table> <br/> - <small> <span style="color: rgb(255, 0, 0);">*</span> The <span style="font-weight: bold;">wpd2sxw.exe</span> executable is statically linked with libwpd-0.8.3 and its dependencies<br> - </small> ! <br/><small>If you need to do mass document WordPerfect->OpenOffice.org conversions, you might find <a href="wpd2sxwbatch.pl">wpd2sxwbatch.pl</a> useful (<a href="http://www.perl.org">perl</a> required). It converts entire directories at a time.</small><br> <p><span style="font-weight: bold;">lib<span style="font-weight: bold;">wpd</span></span><span style="font-weight: bold;"> - Older releases</span></p> --- 155,161 ---- </table> <br/> <span style="color: rgb(255, 0, 0);">*</span> The <span style="font-weight: bold;">wpd2sxw.exe</span> executable is statically linked with libwpd-0.8.3 and its dependencies<br> ! <br/>If you need to do mass document WordPerfect->OpenOffice.org conversions, you might find <a href="wpd2sxwbatch.pl">wpd2sxwbatch.pl</a> useful (<a href="http://www.perl.org">perl</a> required). It converts entire directories at a time.<br> <p><span style="font-weight: bold;">lib<span style="font-weight: bold;">wpd</span></span><span style="font-weight: bold;"> - Older releases</span></p> Index: index.html =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/index.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** index.html 17 Sep 2005 21:44:04 -0000 1.1.1.1 --- index.html 23 Oct 2005 17:26:24 -0000 1.2 *************** *** 73,100 **** - a library for importing WordPerfect (tm) documents</span></h2> <h3 >Introduction</h3> ! <p >libwpd is a ! general purpose library for reading (or, interpreting data from) WordPerfect files. The library is <b>not</b> a ! stand-alone utility: it is designed to be used by another program (e.g.: ! a word processor) as an in-process component.</p> ! <p >libwpd is ! written in C++ using the <a href="http://www.gtk.org" ! style="font-weight: bold;">glib-2.0</a> and <a href="ftp://ftp.gnome.org/pub/gnome/sources/libgsf"><span ! style="font-weight: bold;">libgsf</span></a> libraries. An out-of-date ! document on the design of <b>libwpd</b> is <a href="design.html">available</a>.<br> </p> <h3 >Programs that use libwpd</h3> ! <p >libwpd-based ! import filters have been written for <a href="http://www.abisource.com">AbiWord</a> ! (available in AbiWord CVS) and <a href="http://www.openoffice.org">OpenOffice.org ! Writer</a> (available for download at this site); libwpd forms the basis of ! <a href="http://koffice.kde.org">KWord</a>'s WordPerfect support starting with KOffice 1.4.<br> </p> ! <p >Some ! stand-alone utilities are also available to demonstrate the use of <b>libwpd</b>. ! There are the conversion utilities <b>wpd2html</b>, <b>wpd2text</b> ! (included with the main libwpd distribution), and <b>wpd2sxw</b> ! (available in a seperate package) which convert WordPerfect Documents to ! html, text, and ooWriter documents respectively.</p> <p > </p> <p --- 73,95 ---- - a library for importing WordPerfect (tm) documents</span></h2> <h3 >Introduction</h3> ! <p>libwpd is a library designed to help process WordPerfect documents. It exposes a simple ! callback-based API (similar to SAX), allowing it to be easily plugged into any application which might ! need to handle this type of document.</p> ! <p >libwpd is written in C++ and strictly depends only on the STL. By plugging ! in a library which abstracts the Microsoft OLE format (such as <a href="ftp://ftp.gnome.org/pub/gnome/sources/libgsf"><span ! style="font-weight: bold;">libgsf</span></a>), you gain the ability to import OLE-embedded ! WordPerfect documents.<br> </p> <h3 >Programs that use libwpd</h3> ! <p>libwpd is used by <a href="http://www.abisource.com">AbiWord</a> ! (starting with version 2.2), <a href="http://www.openoffice.org">OpenOffice.org</a> ! (starting with version 2.0), and <a href="http://koffice.kde.org">KOffice</a> ! (starting with version 1.4). </p> ! <p >In addition, some stand-alone utilities are also available to demonstrate the use of ! <b>libwpd</b>. <b>wpd2html</b>, <b>wpd2text</b> (included with the main libwpd distribution), and ! <b>wpd2sxw</b> (available in a seperate package) convert WordPerfect Documents to html, text, and ! OpenOffice.org Writer documents respectively.</p> <p > </p> <p Index: development.html =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/development.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** development.html 17 Sep 2005 22:25:27 -0000 1.1 --- development.html 23 Oct 2005 17:26:24 -0000 1.2 *************** *** 68,71 **** --- 68,73 ---- to file your report. Note that you need to have a bug reporting account, which you can create there as well. This allows us to contact you when we need additional information about your report.</p> + <p>Bugs which specifically (only) deal with OpenOffice.org should be filed in their <a href="http://www.openoffice.org/">issue tracking database</a> instead. When in doubt, please file in + ours.</p> <strong>Getting the source from CVS</strong> <p>Please visit our <a href="http://www.sf.net/projects/libwpd">project *************** *** 73,83 **** CVS. The CVS modules of greatest interested are <span style="font-style: italic;">libwpd2</span> (the latest iteration of ! libwpd) and <span style="font-style: italic;">wpd2sxw</span> (the ! utility for converting WordPerfect files to the OpenOffice.org file ! format).</p> <strong>Documentation</strong> <p>The libwpd API specification as well as the libwpd library documentation can be found <a href="http://abiword.snt.utwente.nl/~uwog/libwpd/">here</a>. A no frames version can be found <a href="http://abiword.snt.utwente.nl/~uwog/libwpd/main.html">here</a>.</p> <strong>Quality control</strong> <p>To make sure that future releases only get better and not break already working things, an --- 75,88 ---- CVS. The CVS modules of greatest interested are <span style="font-style: italic;">libwpd2</span> (the latest iteration of ! libwpd) and <span style="font-style: italic;">writerperfect</span>.</p> <strong>Documentation</strong> <p>The libwpd API specification as well as the libwpd library documentation can be found <a href="http://abiword.snt.utwente.nl/~uwog/libwpd/">here</a>. A no frames version can be found <a href="http://abiword.snt.utwente.nl/~uwog/libwpd/main.html">here</a>.</p> + <p>The <a + href="http://apps.corel.com/partners_developers/csp/wordperfect_developer.htm">Corel + Developer SDK</a> is the best resource available for reverse engineering + WordPerfect Office documents. It contains comprehensive documentation of + WordPerfect internal file structure.</p> <strong>Quality control</strong> <p>To make sure that future releases only get better and not break already working things, an *************** *** 86,90 **** <strong>Mailinglist</strong> <p>If you want to participate in the discussion of <span style="font-weight: bold;">libwpd</span>'s development, please join ! our <a href="http://sourceforge.net/mail/?group_id=62662">mailing list</a>.</p> <h3>Supporting libwpd development</h3> <p>The easiest way to support <b>libwpd</b> development is by submitting patches to the --- 91,98 ---- <strong>Mailinglist</strong> <p>If you want to participate in the discussion of <span style="font-weight: bold;">libwpd</span>'s development, please join ! the <a href="http://sourceforge.net/mail/?group_id=62662">libwpd-devel</a> mailing list.</p> ! <p><a href="http://sourceforge.net/mail/?group_id=44937">libwpd-cvs</a>, ! a list devoted exclusively to tracking recent commits to the <b>libwpd</b> source repository is also ! available.</p> <h3>Supporting libwpd development</h3> <p>The easiest way to support <b>libwpd</b> development is by submitting patches to the Index: links.html =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/links.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** links.html 17 Sep 2005 22:25:27 -0000 1.1 --- links.html 23 Oct 2005 17:26:24 -0000 1.2 *************** *** 5,9 **** (tm) documents</title> <link rel="stylesheet" type="text/css" href="style.css" media="screen"> - <base href="http://libwpd.sourceforge.net/links.html"> </head> <body style="color: rgb(0, 0, 0);" link="#000099" vlink="#000099" --- 5,8 ---- *************** *** 71,86 **** <p> <b></b></p> <p> </p> - <p><a href="http://www.abisource.com">AbiWord</a>: A free word-processor and one of our target applications. - Light, fast, and sleek.</p> - <p><a href="http://www.openoffice.org">OpenOffice.org</a>: A heavier suite of full-featured office applications. - Its word-processor, OpenWriter is our other target application.</p> <p><a href="http://www.penguin.cz/%7Efojtik/wp2latex/wp2latex.htm">wp2latex</a>: A utility for converting WordPerfect documents, focused on the LaTeX format.</p> ! <p><a ! href="http://apps.corel.com/partners_developers/csp/wordperfect_developer.htm">Corel ! Developer SDK</a>: The best resource available for reverse engineering ! WordPerfect Office documents. Contains comprehensive documentation of ! WordPerfect internal file structure.</p> <br> </td> --- 70,77 ---- <p> <b></b></p> <p> </p> <p><a href="http://www.penguin.cz/%7Efojtik/wp2latex/wp2latex.htm">wp2latex</a>: A utility for converting WordPerfect documents, focused on the LaTeX format.</p> ! <br> </td> Index: news.html =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/news.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** news.html 17 Sep 2005 22:25:27 -0000 1.1 --- news.html 23 Oct 2005 17:26:24 -0000 1.2 *************** *** 67,70 **** --- 67,73 ---- <td style="vertical-align: top; width: 100%;"> <h3>News</h3> + <p><strong>Wednesday, August 31 2005</strong>: <strong>OpenOffice.org</strong> 2.0 has + been released. This versions has libwpd-based WordPerfect import built in, eliminating the need + for most users to download the WriterPerfect package.</p> <p><strong>Wednesday, August 31 2005</strong>: <strong>libwpd</strong> 0.8.3 has been released. This version improves mainly the handling of list styles, the conversion of paragraph numbering and of counters, as well as the extraction of position information from tabulator function. Index: features.html =================================================================== RCS file: /cvsroot/libwpd/libwpd-www/features.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** features.html 17 Sep 2005 22:25:27 -0000 1.1 --- features.html 23 Oct 2005 17:26:24 -0000 1.2 *************** *** 74,83 **** <p><b>WordPerfect 5 import:</b></p> <p ><list> ! <li>Basic support for plain text import</li> </list></p> <p /> <p><b>WordPerfect 4 import:</b></p> <p ><list> ! <li>Basic support for text properties for text spans</li> </list></p> <h3 >Planned Features</h3> --- 74,83 ---- <p><b>WordPerfect 5 import:</b></p> <p ><list> ! <li>Text import with basic formatting (bold, underline, etc.)</li> </list></p> <p /> <p><b>WordPerfect 4 import:</b></p> <p ><list> ! <li>Text import with basic formatting (bold, underline, etc.)</li> </list></p> <h3 >Planned Features</h3> |
From: Fridrich S. <str...@us...> - 2005-10-08 18:25:03
|
Update of /cvsroot/libwpd/libwpd2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19562 Modified Files: CHANGES Log Message: Build fix for gcc >= 4.1.0. Patch Stephan Kulow Index: CHANGES =================================================================== RCS file: /cvsroot/libwpd/libwpd2/CHANGES,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** CHANGES 29 Aug 2005 14:59:45 -0000 1.59 --- CHANGES 8 Oct 2005 18:24:54 -0000 1.60 *************** *** 1,3 **** --- 1,7 ---- CHANGES: + 0.8.3 -> 0.8.4 + - Fix compilation with gcc >= 4.1.0 (Stephan Kulow) + - Initial support for tables in WP5.x format (Fridrich Strba) + 0.8.2 -> 0.8.3 - Make parser follow closer the document stream, simplify the _flushText() |
From: Fridrich S. <str...@us...> - 2005-10-08 18:25:03
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19562/src/lib Modified Files: WP3FixedLengthGroup.h WP3SingleByteFunction.h WP5FixedLengthGroup.h WP5SingleByteFunction.h WP6FixedLengthGroup.h WP6SingleByteFunction.h WP6VariableLengthGroup.h WPXHLListener.h Log Message: Build fix for gcc >= 4.1.0. Patch Stephan Kulow Index: WP5SingleByteFunction.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5SingleByteFunction.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WP5SingleByteFunction.h 10 Aug 2004 14:53:49 -0000 1.2 --- WP5SingleByteFunction.h 8 Oct 2005 18:24:54 -0000 1.3 *************** *** 33,37 **** { public: ! static WP5SingleByteFunction * WP5SingleByteFunction::constructSingleByteFunction(WPXInputStream *input, uint8_t groupID); }; --- 33,37 ---- { public: ! static WP5SingleByteFunction * constructSingleByteFunction(WPXInputStream *input, uint8_t groupID); }; Index: WP5FixedLengthGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5FixedLengthGroup.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** WP5FixedLengthGroup.h 19 Jul 2004 12:53:47 -0000 1.6 --- WP5FixedLengthGroup.h 8 Oct 2005 18:24:54 -0000 1.7 *************** *** 32,37 **** { public: ! WP5FixedLengthGroup::WP5FixedLengthGroup(int groupID); ! static WP5FixedLengthGroup * WP5FixedLengthGroup::constructFixedLengthGroup(WPXInputStream *input, uint8_t groupID); const uint8_t getGroup() const { return m_group; } --- 32,37 ---- { public: ! WP5FixedLengthGroup(int groupID); ! static WP5FixedLengthGroup * constructFixedLengthGroup(WPXInputStream *input, uint8_t groupID); const uint8_t getGroup() const { return m_group; } Index: WP6FixedLengthGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6FixedLengthGroup.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** WP6FixedLengthGroup.h 3 Jun 2004 00:06:00 -0000 1.10 --- WP6FixedLengthGroup.h 8 Oct 2005 18:24:54 -0000 1.11 *************** *** 33,37 **** public: WP6FixedLengthGroup(uint8_t groupID); ! static WP6FixedLengthGroup * WP6FixedLengthGroup::constructFixedLengthGroup(WPXInputStream *input, uint8_t groupID); const uint8_t getGroup() const { return m_group; } --- 33,37 ---- public: WP6FixedLengthGroup(uint8_t groupID); ! static WP6FixedLengthGroup * constructFixedLengthGroup(WPXInputStream *input, uint8_t groupID); const uint8_t getGroup() const { return m_group; } Index: WP6VariableLengthGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6VariableLengthGroup.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** WP6VariableLengthGroup.h 3 Jun 2004 00:06:00 -0000 1.16 --- WP6VariableLengthGroup.h 8 Oct 2005 18:24:54 -0000 1.17 *************** *** 42,46 **** virtual ~WP6VariableLengthGroup(); ! static WP6VariableLengthGroup * WP6VariableLengthGroup::constructVariableLengthGroup(WPXInputStream *input, uint8_t groupID); protected: --- 42,46 ---- virtual ~WP6VariableLengthGroup(); ! static WP6VariableLengthGroup * constructVariableLengthGroup(WPXInputStream *input, uint8_t groupID); protected: Index: WP3FixedLengthGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3FixedLengthGroup.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WP3FixedLengthGroup.h 19 Jul 2004 12:53:47 -0000 1.1 --- WP3FixedLengthGroup.h 8 Oct 2005 18:24:54 -0000 1.2 *************** *** 31,36 **** { public: ! WP3FixedLengthGroup::WP3FixedLengthGroup(int groupID); ! static WP3FixedLengthGroup * WP3FixedLengthGroup::constructFixedLengthGroup(WPXInputStream *input, uint8_t groupID); const uint8_t getGroup() const { return m_group; } --- 31,36 ---- { public: ! WP3FixedLengthGroup(int groupID); ! static WP3FixedLengthGroup * constructFixedLengthGroup(WPXInputStream *input, uint8_t groupID); const uint8_t getGroup() const { return m_group; } Index: WPXHLListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXHLListener.h,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** WPXHLListener.h 3 Oct 2005 12:16:42 -0000 1.63 --- WPXHLListener.h 8 Oct 2005 18:24:54 -0000 1.64 *************** *** 164,168 **** public: WPXHLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl); ! WPXHLListener::~WPXHLListener(); void startDocument(); --- 164,168 ---- public: WPXHLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl); ! ~WPXHLListener(); void startDocument(); Index: WP6SingleByteFunction.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6SingleByteFunction.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** WP6SingleByteFunction.h 23 Aug 2004 10:33:25 -0000 1.11 --- WP6SingleByteFunction.h 8 Oct 2005 18:24:54 -0000 1.12 *************** *** 32,36 **** { public: ! static WP6SingleByteFunction * WP6SingleByteFunction::constructSingleByteFunction(WPXInputStream *input, uint8_t groupID); }; --- 32,36 ---- { public: ! static WP6SingleByteFunction * constructSingleByteFunction(WPXInputStream *input, uint8_t groupID); }; Index: WP3SingleByteFunction.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3SingleByteFunction.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WP3SingleByteFunction.h 4 Aug 2004 14:29:07 -0000 1.2 --- WP3SingleByteFunction.h 8 Oct 2005 18:24:54 -0000 1.3 *************** *** 33,37 **** { public: ! static WP3SingleByteFunction * WP3SingleByteFunction::constructSingleByteFunction(WPXInputStream *input, uint8_t groupID); }; --- 33,37 ---- { public: ! static WP3SingleByteFunction * constructSingleByteFunction(WPXInputStream *input, uint8_t groupID); }; |
From: Fridrich S. <str...@us...> - 2005-10-05 19:07:51
|
Update of /cvsroot/libwpd/libwpd2/autopackage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16004/autopackage Modified Files: Makefile.am Log Message: Extract some frequently used duplicate code into a separate function; Remove autopackage specs like discussed with Rob; Start implementing tables in WP3 parser Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/autopackage/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 25 Jun 2005 10:40:51 -0000 1.1 --- Makefile.am 5 Oct 2005 19:07:41 -0000 1.2 *************** *** 1,3 **** EXTRA_DIST = \ ! default.apspec.in \ ! default.apspec --- 1,2 ---- EXTRA_DIST = \ ! default.apspec.in |
From: Fridrich S. <str...@us...> - 2005-10-05 19:07:51
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16004/src/lib Modified Files: Makefile.am WP3FileStructure.h WP3MiscellaneousGroup.cpp WP3PageFormatGroup.cpp WP3VariableLengthGroup.cpp libwpd_internal.cpp libwpd_internal.h Added Files: WP3TablesGroup.cpp WP3TablesGroup.h Log Message: Extract some frequently used duplicate code into a separate function; Remove autopackage specs like discussed with Rob; Start implementing tables in WP3 parser Index: WP3FileStructure.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3FileStructure.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** WP3FileStructure.h 26 Aug 2004 08:08:10 -0000 1.8 --- WP3FileStructure.h 5 Oct 2005 19:07:42 -0000 1.9 *************** *** 1,5 **** /* libwpd * Copyright (C) 2004 Marc Maurer (j.m...@st...) ! * Copyright (C) 2004 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or --- 1,5 ---- /* libwpd * Copyright (C) 2004 Marc Maurer (j.m...@st...) ! * Copyright (C) 2004-2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or *************** *** 46,49 **** --- 46,51 ---- #define WP3_END_OF_LINE_PAGE_GROUP 0xDC + #define WP3_TABLES_GROUP 0xE2 + /* Attribute Group */ #define WP3_ATTRIBUTE_BOLD 0 *************** *** 76,78 **** --- 78,97 ---- #define WP3_MISCELLANEOUS_GROUP_PAGE_SIZE_OVERRIDE 0x04 + /* Tables Group */ + + #define WP3_TABLES_GROUP_TABLE_FUNCTION 0x01 + #define WP3_TABLES_GROUP_SET_TABLE_CELL_SPAN 0x02 + #define WP3_TABLES_GROUP_SET_TABLE_CELL_TOP_LINE 0x03 + #define WP3_TABLES_GROUP_SET_TABLE_CELL_LEFT_LINE 0x04 + #define WP3_TABLES_GROUP_SET_TABLE_CELL_BOTTOM_LINE 0x05 + #define WP3_TABLES_GROUP_SET_TABLE_CELL_RIGHT_LINE 0x06 + #define WP3_TABLES_GROUP_SET_TABLE_CELL_TOP_LINE_COLOR 0x07 + #define WP3_TABLES_GROUP_SET_TABLE_CELL_LEFT_LINE_COLOR 0x08 + #define WP3_TABLES_GROUP_SET_TABLE_CELL_BOTTOM_LINE_COLOR 0x09 + #define WP3_TABLES_GROUP_SET_TABLE_CELL_RIGHT_LINE_COLOR 0x0A + #define WP3_TABLES_GROUP_SET_TABLE_CELL_FILL_COLOR_PATTERN 0x0B + #define WP3_TABLES_GROUP_SET_TABLE_CELL_VERTICAL_ALIGNMENT 0x0C + #define WP3_TABLES_GROUP_SET_TABLE_CELL_MODE 0x0D + #define WP3_TABLES_GROUP_SET_TABLE_ROW_MODE 0x0E + #endif /* WP3FILESTRUCTURE_H */ Index: libwpd_internal.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** libwpd_internal.h 3 Oct 2005 12:16:42 -0000 1.16 --- libwpd_internal.h 5 Oct 2005 19:07:42 -0000 1.17 *************** *** 82,85 **** --- 82,87 ---- const uint16_t **chars); + uint16_t fixedPointToWPUs(const uint32_t fixedPointNumber); + enum WPXFileType { WP6_DOCUMENT, WP5_DOCUMENT, WP42_DOCUMENT, OTHER }; enum WPXNumberingType { ARABIC, LOWERCASE, UPPERCASE, LOWERCASE_ROMAN, UPPERCASE_ROMAN }; Index: WP3MiscellaneousGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3MiscellaneousGroup.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WP3MiscellaneousGroup.cpp 20 Oct 2004 10:33:38 -0000 1.4 --- WP3MiscellaneousGroup.cpp 5 Oct 2005 19:07:42 -0000 1.5 *************** *** 31,35 **** #include "WPXFileStructure.h" #include "libwpd_internal.h" - #include "libwpd_math.h" WP3MiscellaneousGroup::WP3MiscellaneousGroup(WPXInputStream *input) : --- 31,34 ---- *************** *** 54,59 **** { case WP3_MISCELLANEOUS_GROUP_PAGE_SIZE_OVERRIDE: - uint32_t tmpPageWidth; - uint32_t tmpPageHeight; uint16_t tmpPageOrientation; --- 53,56 ---- *************** *** 63,68 **** // read the new values tmpPageOrientation = readU16(input, true); ! tmpPageWidth = readU32(input, true); ! tmpPageHeight = readU32(input, true); // determine whether the orientation lasts only one page or is persistent --- 60,65 ---- // read the new values tmpPageOrientation = readU16(input, true); ! m_pageWidth = fixedPointToWPUs(readU32(input, true)); ! m_pageHeight = fixedPointToWPUs(readU32(input, true)); // determine whether the orientation lasts only one page or is persistent *************** *** 77,90 **** else m_pageOrientation = LANDSCAPE; ! ! // compute page dimensions in WPUs ! { ! int16_t pageWidthIntegerPart = (int16_t)((tmpPageWidth & 0xFFFF0000) >> 16); ! float pageWidthFractionalPart = (float)(tmpPageWidth & 0xFFFF)/(float)0xFFFF; ! m_pageWidth = (uint16_t)rint((((float)pageWidthIntegerPart + pageWidthFractionalPart)*50)/3); ! int16_t pageHeightIntegerPart = (int16_t)((tmpPageHeight & 0xFFFF0000) >> 16); ! float pageHeightFractionalPart = (float)(tmpPageHeight & 0xFFFF)/(float)0xFFFF; ! m_pageHeight = (uint16_t)rint((((float)pageHeightIntegerPart + pageHeightFractionalPart)*50)/3); ! } break; --- 74,78 ---- else m_pageOrientation = LANDSCAPE; ! break; Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Makefile.am,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** Makefile.am 3 Oct 2005 12:16:42 -0000 1.60 --- Makefile.am 5 Oct 2005 19:07:42 -0000 1.61 *************** *** 53,56 **** --- 53,57 ---- WP3Part.cpp \ WP3SingleByteFunction.cpp \ + WP3TablesGroup.cpp \ WP3UndoGroup.cpp \ WP3UnsupportedFixedLengthGroup.cpp \ *************** *** 151,154 **** --- 152,156 ---- WP3Part.h \ WP3SingleByteFunction.h \ + WP3TablesGroup.h \ WP3UndoGroup.h \ WP3UnsupportedFixedLengthGroup.h \ Index: libwpd_internal.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** libwpd_internal.cpp 3 Oct 2005 12:16:42 -0000 1.18 --- libwpd_internal.cpp 5 Oct 2005 19:07:42 -0000 1.19 *************** *** 916,919 **** --- 916,929 ---- } + #include "WPXFileStructure.h" + #include "libwpd_math.h" + + uint16_t fixedPointToWPUs(const uint32_t fixedPointNumber) + { + int16_t fixedPointNumberIntegerPart = (int16_t)((fixedPointNumber & 0xFFFF0000) >> 16); + float fixedPointNumberFractionalPart = (float)((double)(fixedPointNumber & 0x0000FFFF)/(double)0xFFFF); + uint16_t numberWPU = (uint16_t)rint((((float)fixedPointNumberIntegerPart + fixedPointNumberFractionalPart)*50)/3); + return numberWPU; + } _RGBSColor::_RGBSColor(uint8_t r, uint8_t g, uint8_t b, uint8_t s) --- NEW FILE: WP3TablesGroup.h --- /* libwpd * Copyright (C) 2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For further information visit http://libwpd.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #ifndef WP3TABLESGROUP_H #define WP3TABLESGROUP_H #include "WP3VariableLengthGroup.h" class WP3TablesGroup : public WP3VariableLengthGroup { public: WP3TablesGroup(WPXInputStream *input); virtual ~WP3TablesGroup(); virtual void _readContents(WPXInputStream *input); virtual void parse(WP3HLListener *listener); private: // variables needed for subgroup 1 (Table Function) uint8_t m_tableMode; uint32_t m_offsetFromLeftEdge; uint32_t m_topGutterSpacing; uint32_t m_leftGutterSpacing; uint32_t m_bottomGutterSpacing; uint32_t m_rightGutterSpacing; uint8_t m_numColumns; uint8_t m_columnMode[32]; uint8_t m_numberFormat[32]; uint32_t m_columnWidth[32]; uint32_t m_rightOffsetForDecimalAlign[32]; // variables needed for subgroup 2 (Set Table Cell Span) uint8_t m_colSpan; uint8_t m_rowSpan; }; #endif /* WP3TABLESGROUP_H */ --- NEW FILE: WP3TablesGroup.cpp --- /* libwpd * Copyright (C) 2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For further information visit http://libwpd.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #include <math.h> #include "WP3TablesGroup.h" #include "WP3FileStructure.h" #include "WP3LLListener.h" #include "WPXFileStructure.h" #include "libwpd_internal.h" #include "libwpd_math.h" WP3TablesGroup::WP3TablesGroup(WPXInputStream *input) : m_tableMode(0), m_offsetFromLeftEdge(0), m_topGutterSpacing(0), m_leftGutterSpacing(0), m_bottomGutterSpacing(0), m_rightGutterSpacing(0), m_numColumns(0) { _read(input); } WP3TablesGroup::~WP3TablesGroup() { } void WP3TablesGroup::_readContents(WPXInputStream *input) { // this group can contain different kinds of data, thus we need to read // the contents accordingly switch (getSubGroup()) { case WP3_TABLES_GROUP_TABLE_FUNCTION: input->seek(71, WPX_SEEK_CUR); m_tableMode = readU8(input); m_offsetFromLeftEdge = readU32(input, true); m_topGutterSpacing = readU32(input, true); m_leftGutterSpacing = readU32(input, true); m_bottomGutterSpacing = readU32(input, true); m_rightGutterSpacing = readU32(input, true); m_numColumns = readU8(input); for (uint8_t i=0; i<m_numColumns; i++) { m_columnMode[i] = readU8(input); m_numberFormat[i] = readU8(input); m_columnWidth[i] = readU32(input, true); m_rightOffsetForDecimalAlign[i] = readU32(input, true); } break; case WP3_TABLES_GROUP_SET_TABLE_CELL_SPAN: m_colSpan = readU8(input); m_rowSpan = readU8(input); break; case WP3_TABLES_GROUP_SET_TABLE_CELL_TOP_LINE: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_LEFT_LINE: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_BOTTOM_LINE: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_RIGHT_LINE: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_TOP_LINE_COLOR: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_LEFT_LINE_COLOR: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_BOTTOM_LINE_COLOR: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_RIGHT_LINE_COLOR: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_FILL_COLOR_PATTERN: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_VERTICAL_ALIGNMENT: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_MODE: break; case WP3_TABLES_GROUP_SET_TABLE_ROW_MODE: break; default: /* something else we don't support, since it isn't in the docs */ break; } } void WP3TablesGroup::parse(WP3HLListener *listener) { WPD_DEBUG_MSG(("WordPerfect: handling a Tables group\n")); switch (getSubGroup()) { case WP3_TABLES_GROUP_TABLE_FUNCTION: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_SPAN: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_TOP_LINE: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_LEFT_LINE: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_BOTTOM_LINE: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_RIGHT_LINE: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_TOP_LINE_COLOR: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_LEFT_LINE_COLOR: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_BOTTOM_LINE_COLOR: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_RIGHT_LINE_COLOR: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_FILL_COLOR_PATTERN: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_VERTICAL_ALIGNMENT: break; case WP3_TABLES_GROUP_SET_TABLE_CELL_MODE: break; case WP3_TABLES_GROUP_SET_TABLE_ROW_MODE: break; default: // something else we don't support, since it isn't in the docs break; } } Index: WP3PageFormatGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3PageFormatGroup.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WP3PageFormatGroup.cpp 20 Oct 2004 10:33:38 -0000 1.3 --- WP3PageFormatGroup.cpp 5 Oct 2005 19:07:42 -0000 1.4 *************** *** 110,128 **** if (m_leftMargin != 0x80000000) { ! int16_t leftMarginIntegerPart = (int16_t)((m_leftMargin & 0xFFFF0000) >> 16); ! float leftMarginFractionalPart = (float)((double)(m_leftMargin & 0xFFFF)/(double)0xFFFF); ! uint16_t leftMarginWPU = (uint16_t)rint((((float)leftMarginIntegerPart + leftMarginFractionalPart)*50)/3); ! listener->marginChange(WPX_LEFT, leftMarginWPU); ! WPD_DEBUG_MSG(("WordPerfect: Page format group left margin - integer part: %i fractional part: %f WPUs: %i (original value: %i)\n", ! leftMarginIntegerPart, leftMarginFractionalPart, leftMarginWPU, m_leftMargin)); } if (m_rightMargin != 0x8000000) { ! int16_t rightMarginIntegerPart = (int16_t)((m_rightMargin & 0xFFFF0000) >> 16); ! float rightMarginFractionalPart = (float)((double)(m_rightMargin & 0xFFFF)/(double)0xFFFF); ! uint16_t rightMarginWPU = (uint16_t)rint((((float)rightMarginIntegerPart + rightMarginFractionalPart)*50)/3); ! WPD_DEBUG_MSG(("WordPerfect: Page format group right margin - integer part: %i fractional part: %f WPUs: %i (original value: %i)\n", ! rightMarginIntegerPart, rightMarginFractionalPart, rightMarginWPU, m_rightMargin)); ! listener->marginChange(WPX_RIGHT, rightMarginWPU); } break; --- 110,122 ---- if (m_leftMargin != 0x80000000) { ! listener->marginChange(WPX_LEFT, fixedPointToWPUs(m_leftMargin)); ! WPD_DEBUG_MSG(("WordPerfect: Page format group left margin - WPUs: %i (original value: %i)\n", ! fixedPointToWPUs(m_leftMargin), m_leftMargin)); } if (m_rightMargin != 0x8000000) { ! listener->marginChange(WPX_RIGHT, fixedPointToWPUs(m_rightMargin)); ! WPD_DEBUG_MSG(("WordPerfect: Page format group right margin - integer part: WPUs: %i (original value: %i)\n", ! fixedPointToWPUs(m_rightMargin), m_rightMargin)); } break; *************** *** 135,151 **** case WP3_PAGE_FORMAT_GROUP_VERTICAL_MARGINS: if (m_topMargin != 0x80000000) ! { ! int16_t topMarginIntegerPart = (int16_t)((m_topMargin & 0xFFFF0000) >> 16); ! float topMarginFractionalPart = (float)((double)(m_topMargin & 0xFFFF)/(double)0xFFFF); ! uint16_t topMarginWPU = (uint16_t)rint((((float)topMarginIntegerPart + topMarginFractionalPart)*50)/3); ! listener->pageMarginChange(WPX_TOP, topMarginWPU); ! } if (m_bottomMargin != 0x80000000) ! { ! int16_t bottomMarginIntegerPart = (int16_t)((m_bottomMargin & 0xFFFF0000) >> 16); ! float bottomMarginFractionalPart = (float)((double)(m_bottomMargin & 0xFFFF)/(double)0xFFFF); ! uint16_t bottomMarginWPU = (uint16_t)rint((((float)bottomMarginIntegerPart + bottomMarginFractionalPart)*50)/3); ! listener->pageMarginChange(WPX_BOTTOM, bottomMarginWPU); ! } break; --- 129,135 ---- case WP3_PAGE_FORMAT_GROUP_VERTICAL_MARGINS: if (m_topMargin != 0x80000000) ! listener->pageMarginChange(WPX_TOP, fixedPointToWPUs(m_topMargin)); if (m_bottomMargin != 0x80000000) ! listener->pageMarginChange(WPX_BOTTOM, fixedPointToWPUs(m_bottomMargin)); break; *************** *** 155,164 **** case WP3_PAGE_FORMAT_GROUP_INDENT_AT_BEGINNING_OF_PARAGRAPH: ! { ! int16_t indentIntegerPart = (int16_t)((m_indent & 0xFFFF0000) >> 16); ! float indentFractionalPart = (float)((double)(m_indent & 0xFFFF)/(double)0xFFFF); ! uint16_t indentWPU = (int16_t)rint((((float)indentIntegerPart + indentFractionalPart)*50)/3); ! listener->indentFirstLineChange(indentWPU); ! } break; --- 139,143 ---- case WP3_PAGE_FORMAT_GROUP_INDENT_AT_BEGINNING_OF_PARAGRAPH: ! listener->indentFirstLineChange(fixedPointToWPUs(m_indent)); break; Index: WP3VariableLengthGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3VariableLengthGroup.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WP3VariableLengthGroup.cpp 10 Aug 2004 14:53:49 -0000 1.3 --- WP3VariableLengthGroup.cpp 5 Oct 2005 19:07:42 -0000 1.4 *************** *** 30,33 **** --- 30,34 ---- #include "WP3MiscellaneousGroup.h" #include "WP3PageFormatGroup.h" + #include "WP3TablesGroup.h" #include "libwpd_internal.h" *************** *** 46,49 **** --- 47,52 ---- case WP3_MISCELLANEOUS_GROUP: return new WP3MiscellaneousGroup(input); + case WP3_TABLES_GROUP: + return new WP3TablesGroup(input); default: // this is an unhandled group, just skip it |
From: Fridrich S. <str...@us...> - 2005-10-03 13:29:37
|
Update of /cvsroot/libwpd/writerperfect/ooo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31406/ooo Modified Files: WordPerfectImportFilter.cxx Log Message: Unreference what needs to be unreferenced (patch Jody Goldberg) Hopefully, this solves the "locking" on windows. Index: WordPerfectImportFilter.cxx =================================================================== RCS file: /cvsroot/libwpd/writerperfect/ooo/WordPerfectImportFilter.cxx,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WordPerfectImportFilter.cxx 10 Jun 2005 06:32:23 -0000 1.4 --- WordPerfectImportFilter.cxx 3 Oct 2005 13:29:29 -0000 1.5 *************** *** 140,150 **** gsf_init(); ! GsfInput *pGsfInput = GSF_INPUT(gsf_input_oo_new (xInputStream, NULL)); GSFInputStream input(pGsfInput); WordPerfectCollector collector(&input, &xHandler); collector.filter(); ! gsf_shutdown(); return true; --- 140,152 ---- gsf_init(); ! GsfInput *pGsfInput; ! pGsfInput = static_cast<GsfInput *>(gsf_input_oo_new (xInputStream, NULL)); GSFInputStream input(pGsfInput); + g_object_unref(G_OBJECT(pGsfInput)); WordPerfectCollector collector(&input, &xHandler); collector.filter(); ! // gsf_shutdown(); return true; *************** *** 217,230 **** GsfInput *pGsfInput; ! pGsfInput = GSF_INPUT(gsf_input_oo_new (xInputStream, NULL)); if (pGsfInput != NULL) { GSFInputStream input(pGsfInput); confidence = WPDocument::isFileFormatSupported(&input, false); } ! gsf_shutdown(); if (confidence == WPD_CONFIDENCE_EXCELLENT) --- 219,235 ---- GsfInput *pGsfInput; ! pGsfInput = static_cast<GsfInput *>(gsf_input_oo_new (xInputStream, NULL)); if (pGsfInput != NULL) { GSFInputStream input(pGsfInput); + + g_object_unref(G_OBJECT(pGsfInput)); confidence = WPDocument::isFileFormatSupported(&input, false); + } ! // gsf_shutdown(); if (confidence == WPD_CONFIDENCE_EXCELLENT) |
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16145/src/lib Modified Files: Makefile.am WP3HLListener.h WP3HLStylesListener.cpp WP3HLStylesListener.h WP42HLListener.h WP42HLStylesListener.cpp WP42HLStylesListener.h WP5FileStructure.h WP5HLListener.cpp WP5HLListener.h WP5HLStylesListener.cpp WP5HLStylesListener.h WP5VariableLengthGroup.cpp WP5VariableLengthGroup.h WP6CharacterGroup.cpp WP6CharacterGroup.h WP6EOLGroup.cpp WP6FileStructure.cpp WP6HLContentListener.cpp WP6HLContentListener.h WP6HLStylesListener.cpp WP6HLStylesListener.h WP6SingleByteFunction.cpp WPXHLListener.cpp WPXHLListener.h WPXLLListener.h libwpd_internal.cpp libwpd_internal.h Added Files: WP5DefinitionGroup.cpp WP5DefinitionGroup.h WP5TableEOLGroup.cpp WP5TableEOLGroup.h WP5TableEOPGroup.cpp WP5TableEOPGroup.h Log Message: Initial table implementation in WP5 parser + fix a memory leak that was not triggered for the while in our testset. Index: WP5HLStylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5HLStylesListener.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** WP5HLStylesListener.cpp 8 Feb 2005 16:02:52 -0000 1.12 --- WP5HLStylesListener.cpp 3 Oct 2005 12:16:42 -0000 1.13 *************** *** 177,182 **** void WP5HLStylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes) { if (/*!isUndoOn() &&*/ m_currentTable != NULL) --- 177,182 ---- void WP5HLStylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes) { if (/*!isUndoOn() &&*/ m_currentTable != NULL) Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Makefile.am,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** Makefile.am 14 Feb 2005 11:27:05 -0000 1.59 --- Makefile.am 3 Oct 2005 12:16:42 -0000 1.60 *************** *** 66,69 **** --- 66,70 ---- WP42VariableLengthGroup.cpp \ WP5AttributeGroup.cpp \ + WP5DefinitionGroup.cpp \ WP5ExtendedCharacterGroup.cpp \ WP5FileStructure.cpp \ *************** *** 77,80 **** --- 78,83 ---- WP5Part.cpp \ WP5SingleByteFunction.cpp \ + WP5TableEOLGroup.cpp \ + WP5TableEOPGroup.cpp \ WP5UnsupportedFixedLengthGroup.cpp \ WP5UnsupportedVariableLengthGroup.cpp \ *************** *** 162,165 **** --- 165,169 ---- WP42VariableLengthGroup.h \ WP5AttributeGroup.h \ + WP5DefinitionGroup.h \ WP5ExtendedCharacterGroup.h \ WP5FileStructure.h \ *************** *** 174,177 **** --- 178,183 ---- WP5Parser.h \ WP5SingleByteFunction.h \ + WP5TableEOLGroup.h \ + WP5TableEOPGroup.h \ WP5UnsupportedFixedLengthGroup.h \ WP5UnsupportedVariableLengthGroup.h \ Index: WP6HLStylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6HLStylesListener.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** WP6HLStylesListener.cpp 13 Apr 2005 14:09:50 -0000 1.29 --- WP6HLStylesListener.cpp 3 Oct 2005 12:16:42 -0000 1.30 *************** *** 207,212 **** void WP6HLStylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes) { if (!isUndoOn() && m_currentTable != NULL) --- 207,212 ---- void WP6HLStylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes) { if (!isUndoOn() && m_currentTable != NULL) --- NEW FILE: WP5TableEOPGroup.cpp --- /* libwpd * Copyright (C) 2002 William Lachance (wil...@sy...) * Copyright (C) 2002 Marc Maurer (j.m...@st...) * Copyright (C) 2004 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For further information visit http://libwpd.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #include "WP5TableEOPGroup.h" #include "WP5FileStructure.h" #include "WP5LLListener.h" #include "libwpd_internal.h" WP5TableEOPGroup::WP5TableEOPGroup(WPXInputStream *input) : WP5VariableLengthGroup() { _read(input); } WP5TableEOPGroup::~WP5TableEOPGroup() { } void WP5TableEOPGroup::_readContents(WPXInputStream *input) { switch (getSubGroup()) { case WP5_TABLE_EOP_GROUP_BEGINNING_OF_ROW_AT_EOP: break; case WP5_TABLE_EOP_GROUP_TABLE_OFF_AT_EOP: break; case WP5_TABLE_EOP_GROUP_BEGINNING_OF_ROW_AT_HARD_EOP: break; default: /* something else we don't support, since it isn't in the docs */ break; } } void WP5TableEOPGroup::parse(WP5HLListener *listener) { WPD_DEBUG_MSG(("WordPerfect: handling a Page group\n")); switch (getSubGroup()) { case WP5_TABLE_EOP_GROUP_BEGINNING_OF_ROW_AT_EOP: listener->insertRow(0, true, false); break; case WP5_TABLE_EOP_GROUP_TABLE_OFF_AT_EOP: listener->endTable(); break; case WP5_TABLE_EOP_GROUP_BEGINNING_OF_ROW_AT_HARD_EOP: listener->insertRow(0, true, false); break; default: // something else we don't support, since it isn't in the docs break; } } Index: WP42HLListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP42HLListener.h,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** WP42HLListener.h 25 Aug 2005 14:34:42 -0000 1.35 --- WP42HLListener.h 3 Oct 2005 12:16:42 -0000 1.36 *************** *** 58,68 **** virtual void defineTable(uint8_t position, uint16_t leftOffset) {}; ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter) {}; virtual void startTable() {}; virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) {}; virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes) {}; virtual void endTable() {}; --- 58,68 ---- virtual void defineTable(uint8_t position, uint16_t leftOffset) {}; ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) {}; virtual void startTable() {}; virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) {}; virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes) {}; virtual void endTable() {}; Index: WP5FileStructure.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5FileStructure.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** WP5FileStructure.h 21 Jun 2005 10:09:14 -0000 1.10 --- WP5FileStructure.h 3 Oct 2005 12:16:42 -0000 1.11 *************** *** 2,5 **** --- 2,6 ---- * Copyright (C) 2003 William Lachance (wil...@sy...) * Copyright (C) 2003 Marc Maurer (j.m...@st...) + * Copyright (C) 2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or *************** *** 27,31 **** #define WP5FILESTRUCTURE_H ! // size of the fixed length functiongroups 0xC0 to 0xCF extern int WP5_FIXED_LENGTH_FUNCTION_GROUP_SIZE[16]; --- 28,32 ---- #define WP5FILESTRUCTURE_H ! /* size of the fixed length functiongroups 0xC0 to 0xCF */ extern int WP5_FIXED_LENGTH_FUNCTION_GROUP_SIZE[16]; *************** *** 54,58 **** --- 55,62 ---- #define WP5_TOP_PAGE_FORMAT_GROUP 0xD0 #define WP5_TOP_FONT_GROUP 0xD1 + #define WP5_TOP_DEFINITION_GROUP 0xD2 #define WP5_TOP_FORMAT_GROUP 0xD4 + #define WP5_TOP_TABLE_EOL_GROUP 0xDC + #define WP5_TOP_TABLE_EOP_GROUP 0xDD /* Page Format Group */ *************** *** 70,73 **** --- 74,90 ---- #define WP5_FORMAT_GROUP_END_OF_PAGE 0x00 + /* Definition Group */ + #define WP5_TOP_DEFINITION_GROUP_DEFINE_TABLES 0x0B + + /* Table EOL Group */ + #define WP5_TABLE_EOL_GROUP_BEGINNING_OF_COLUMN_AT_EOL 0x00 + #define WP5_TABLE_EOL_GROUP_BEGINNING_OF_ROW_AT_EOL 0x01 + #define WP5_TABLE_EOL_GROUP_TABLE_OFF_AT_EOL 0x02 + + /* Table EOP Group */ + #define WP5_TABLE_EOP_GROUP_BEGINNING_OF_ROW_AT_EOP 0x01 + #define WP5_TABLE_EOP_GROUP_TABLE_OFF_AT_EOP 0x02 + #define WP5_TABLE_EOP_GROUP_BEGINNING_OF_ROW_AT_HARD_EOP 0x03 + /* Extended Character */ #define WP5_INTERNATIONAL_1_CHARACTER_SET 1 Index: WPXHLListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXHLListener.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** WPXHLListener.cpp 31 Aug 2005 16:26:51 -0000 1.63 --- WPXHLListener.cpp 3 Oct 2005 12:16:42 -0000 1.64 *************** *** 31,39 **** #include "WPXProperty.h" #ifdef _MSC_VER ! #include <minmax.h> ! #define LIBWPD_MIN min ! #define LIBWPD_MAX max ! #else ! #define LIBWPD_MIN std::min #define LIBWPD_MAX std::max #endif --- 31,39 ---- #include "WPXProperty.h" #ifdef _MSC_VER ! #include <minmax.h> ! #define LIBWPD_MIN min ! #define LIBWPD_MAX max ! #else ! #define LIBWPD_MIN std::min #define LIBWPD_MAX std::max #endif *************** *** 68,72 **** m_wasHeaderRow(false), m_isCellWithoutParagraph(false), ! m_cellAttributeBits(0), m_paragraphJustificationBeforeTable(WPX_PARAGRAPH_JUSTIFICATION_LEFT), --- 68,72 ---- m_wasHeaderRow(false), m_isCellWithoutParagraph(false), ! m_cellAttributeBits(0x00000000), m_paragraphJustificationBeforeTable(WPX_PARAGRAPH_JUSTIFICATION_LEFT), Index: WP5VariableLengthGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5VariableLengthGroup.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** WP5VariableLengthGroup.cpp 6 Aug 2004 11:43:25 -0000 1.9 --- WP5VariableLengthGroup.cpp 3 Oct 2005 12:16:42 -0000 1.10 *************** *** 29,32 **** --- 29,35 ---- #include "libwpd_internal.h" #include "WP5FormatGroup.h" + #include "WP5DefinitionGroup.h" + #include "WP5TableEOLGroup.h" + #include "WP5TableEOPGroup.h" WP5VariableLengthGroup::WP5VariableLengthGroup() *************** *** 40,45 **** --- 43,54 ---- case WP5_TOP_FORMAT_GROUP: return new WP5FormatGroup(input); + case WP5_TOP_DEFINITION_GROUP: + return new WP5DefinitionGroup(input); case WP5_TOP_PAGE_FORMAT_GROUP: return new WP5PageFormatGroup(input); + case WP5_TOP_TABLE_EOL_GROUP: + return new WP5TableEOLGroup(input); + case WP5_TOP_TABLE_EOP_GROUP: + return new WP5TableEOPGroup(input); default: // this is an unhandled group, just skip it Index: WP3HLListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3HLListener.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** WP3HLListener.h 25 Aug 2005 14:34:42 -0000 1.16 --- WP3HLListener.h 3 Oct 2005 12:16:42 -0000 1.17 *************** *** 64,74 **** virtual void defineTable(uint8_t position, uint16_t leftOffset) {}; ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter) {}; virtual void startTable() {}; virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) {}; virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes) {}; virtual void endTable() {}; virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel); --- 64,74 ---- virtual void defineTable(uint8_t position, uint16_t leftOffset) {}; ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) {}; virtual void startTable() {}; virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) {}; virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes) {}; virtual void endTable() {}; virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel); --- NEW FILE: WP5TableEOLGroup.cpp --- /* libwpd * Copyright (C) 2002 William Lachance (wil...@sy...) * Copyright (C) 2002 Marc Maurer (j.m...@st...) * Copyright (C) 2004 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For further information visit http://libwpd.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #include "WP5TableEOLGroup.h" #include "WP5FileStructure.h" #include "WP5LLListener.h" #include "libwpd_internal.h" WP5TableEOLGroup::WP5TableEOLGroup(WPXInputStream *input) : WP5VariableLengthGroup(), m_cellVerticalAlignment(0), m_useCellAttributes(false), m_useCellJustification(false), m_columnNumber(0), m_colSpan(0), m_rowSpan(0), m_spannedFromAbove(false), m_cellAttributes(0), m_cellJustification(0) { _read(input); } WP5TableEOLGroup::~WP5TableEOLGroup() { } void WP5TableEOLGroup::_readContents(WPXInputStream *input) { uint8_t tmpFlags, tmpColumnSpanning; switch (getSubGroup()) { case WP5_TABLE_EOL_GROUP_BEGINNING_OF_COLUMN_AT_EOL: tmpFlags = readU8(input); if ((tmpFlags & 0x01) == 0x01) m_useCellJustification = true; if ((tmpFlags & 0x02) == 0x02) m_useCellAttributes = true; m_cellVerticalAlignment = ((tmpFlags & 0x0C) >> 2); m_columnNumber = readU8(input); tmpColumnSpanning = readU8(input); m_colSpan = tmpColumnSpanning & 0x3F; if ((tmpColumnSpanning & 0x80) == 0x80) m_spannedFromAbove = true; m_rowSpan = readU8(input); input->seek(4, WPX_SEEK_CUR); m_cellAttributes = readU16(input); m_cellJustification = readU8(input); break; case WP5_TABLE_EOL_GROUP_BEGINNING_OF_ROW_AT_EOL: break; case WP5_TABLE_EOL_GROUP_TABLE_OFF_AT_EOL: break; default: /* something else we don't support, since it isn't in the docs */ break; } } void WP5TableEOLGroup::parse(WP5HLListener *listener) { WPD_DEBUG_MSG(("WordPerfect: handling a Table EOL group\n")); switch (getSubGroup()) { case WP5_TABLE_EOL_GROUP_BEGINNING_OF_COLUMN_AT_EOL: { RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); listener->insertCell(m_colSpan, m_rowSpan, false, m_spannedFromAbove, 0x00, NULL, NULL, &tmpCellBorderColor , TOP, m_useCellAttributes, m_cellAttributes); } break; case WP5_TABLE_EOL_GROUP_BEGINNING_OF_ROW_AT_EOL: listener->insertRow(0, true, false); break; case WP5_TABLE_EOL_GROUP_TABLE_OFF_AT_EOL: listener->endTable(); break; default: // something else we don't support, since it isn't in the docs break; } } Index: WP6HLContentListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6HLContentListener.h,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** WP6HLContentListener.h 25 Aug 2005 14:34:42 -0000 1.45 --- WP6HLContentListener.h 3 Oct 2005 12:16:42 -0000 1.46 *************** *** 178,188 **** virtual void defineTable(uint8_t position, uint16_t leftOffset); ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter); virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes); virtual void endTable(); --- 178,188 ---- virtual void defineTable(uint8_t position, uint16_t leftOffset); ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment); virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes); virtual void endTable(); Index: libwpd_internal.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** libwpd_internal.h 25 Aug 2005 14:34:42 -0000 1.15 --- libwpd_internal.h 3 Oct 2005 12:16:42 -0000 1.16 *************** *** 166,169 **** --- 166,177 ---- }; + typedef struct _WPXColumnProperties WPXColumnProperties; + struct _WPXColumnProperties + { + _WPXColumnProperties(); + uint32_t m_attributes; + uint8_t m_alignment; + }; + typedef struct _WPXTabStop WPXTabStop; struct _WPXTabStop Index: WP6SingleByteFunction.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6SingleByteFunction.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** WP6SingleByteFunction.cpp 2 Sep 2004 13:53:10 -0000 1.15 --- WP6SingleByteFunction.cpp 3 Oct 2005 12:16:42 -0000 1.16 *************** *** 153,157 **** // would use the multi-byte variant of this function listener->insertRow(0x0000, true, false); ! listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, new RGBSColor(0x00, 0x00, 0x00, 0x64), TOP, 0x00000000); } --- 153,158 ---- // would use the multi-byte variant of this function listener->insertRow(0x0000, true, false); ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, false, 0x00000000); } *************** *** 159,163 **** { // default values ! listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, new RGBSColor(0x00, 0x00, 0x00, 0x64), TOP, 0x00000000); } --- 160,165 ---- { // default values ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, false, 0x00000000); } Index: WP5HLListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5HLListener.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** WP5HLListener.h 25 Aug 2005 14:34:42 -0000 1.36 --- WP5HLListener.h 3 Oct 2005 12:16:42 -0000 1.37 *************** *** 64,76 **** virtual void endDocument(); ! virtual void defineTable(uint8_t position, uint16_t leftOffset) {}; ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter) {}; ! virtual void startTable() {}; ! virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) {}; virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes) {}; ! virtual void endTable() {}; protected: --- 64,76 ---- virtual void endDocument(); ! virtual void defineTable(uint8_t position, uint16_t leftOffset); ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment); ! virtual void startTable(); ! virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes); ! virtual void endTable(); protected: Index: WP42HLStylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP42HLStylesListener.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** WP42HLStylesListener.cpp 8 Feb 2005 16:02:50 -0000 1.10 --- WP42HLStylesListener.cpp 3 Oct 2005 12:16:42 -0000 1.11 *************** *** 161,166 **** void WP42HLStylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes) { if (/*!isUndoOn() &&*/ m_currentTable != NULL) --- 161,166 ---- void WP42HLStylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes) { if (/*!isUndoOn() &&*/ m_currentTable != NULL) Index: WP5HLListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5HLListener.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** WP5HLListener.cpp 25 Aug 2005 14:34:42 -0000 1.33 --- WP5HLListener.cpp 3 Oct 2005 12:16:42 -0000 1.34 *************** *** 90,93 **** --- 90,94 ---- _closeSpan(); _closeParagraph(); + _closeTable(); _closeSection(); _closePageSpan(); *************** *** 95,98 **** --- 96,212 ---- } + void WP5HLListener::defineTable(uint8_t position, uint16_t leftOffset) + { + if (!isUndoOn()) + { + switch (position & 0x07) + { + case 0: + m_ps->m_tableDefinition.m_positionBits = WPX_TABLE_POSITION_ALIGN_WITH_LEFT_MARGIN; + break; + case 1: + m_ps->m_tableDefinition.m_positionBits = WPX_TABLE_POSITION_ALIGN_WITH_RIGHT_MARGIN; + break; + case 2: + m_ps->m_tableDefinition.m_positionBits = WPX_TABLE_POSITION_CENTER_BETWEEN_MARGINS; + break; + case 3: + m_ps->m_tableDefinition.m_positionBits = WPX_TABLE_POSITION_FULL; + break; + case 4: + m_ps->m_tableDefinition.m_positionBits = WPX_TABLE_POSITION_ABSOLUTE_FROM_LEFT_MARGIN; + break; + default: + // should not happen + break; + } + // Note: WordPerfect has an offset from the left edge of the page. We translate it to the offset from the left margin + m_ps->m_tableDefinition.m_leftOffset = (float)((double)leftOffset / (double)WPX_NUM_WPUS_PER_INCH) - m_ps->m_paragraphMarginLeft; + + // remove all the old column information + m_ps->m_tableDefinition.columns.clear(); + m_ps->m_tableDefinition.columnsProperties.clear(); + } + } + + void WP5HLListener::addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) + { + if (!isUndoOn()) + { + // define the new column + WPXColumnDefinition colDef; + colDef.m_width = (float)((double)width / (double)WPX_NUM_WPUS_PER_INCH); + colDef.m_leftGutter = (float)((double)width / (double)WPX_NUM_WPUS_PER_INCH); + colDef.m_rightGutter = (float)((double)width / (double)WPX_NUM_WPUS_PER_INCH); + + // add the new column definition to our table definition + m_ps->m_tableDefinition.columns.push_back(colDef); + + WPXColumnProperties colProp; + colProp.m_attributes = attributes; + colProp.m_alignment = alignment; + + m_ps->m_tableDefinition.columnsProperties.push_back(colProp); + } + } + + void WP5HLListener::startTable() + { + if (!isUndoOn()) + { + // save the justification information. We will need it after the table ends. + m_ps->m_paragraphJustificationBeforeTable = m_ps->m_paragraphJustification; + if (m_ps->m_sectionAttributesChanged && !m_ps->m_isTableOpened) + { + _closeSection(); + _openSection(); + m_ps->m_sectionAttributesChanged = false; + } + _openTable(); + } + } + + void WP5HLListener::insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) + { + if (!isUndoOn()) + { + _flushText(); + float rowHeightInch = (float)((double) rowHeight / (double)WPX_NUM_WPUS_PER_INCH); + _openTableRow(rowHeightInch, isMinimumHeight, isHeaderRow); + } + } + + void WP5HLListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, + const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, + const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, + const bool useCellAttributes, const uint32_t cellAttributes) + { + if (!isUndoOn()) + { + if (m_ps->m_currentTableRow < 0) // cell without a row, invalid + throw ParseException(); + _flushText(); + _openTableCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, borderBits, + cellFgColor, cellBgColor, cellBorderColor, cellVerticalAlignment); + m_ps->m_isCellWithoutParagraph = true; + if (useCellAttributes) + m_ps->m_cellAttributeBits = cellAttributes; + else + m_ps->m_cellAttributeBits = m_ps->m_tableDefinition.columnsProperties[m_ps->m_currentTableCol-1].m_attributes; + justificationChange(m_ps->m_tableDefinition.columnsProperties[m_ps->m_currentTableCol-1].m_alignment); + } + } + + void WP5HLListener::endTable() + { + if (!isUndoOn()) + { + _flushText(); + _closeTable(); + // restore the justification that was there before the table. + m_ps->m_paragraphJustification = m_ps->m_paragraphJustificationBeforeTable; + } + } + /**************************************** Index: WP5HLStylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5HLStylesListener.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** WP5HLStylesListener.h 8 Feb 2005 16:02:52 -0000 1.22 --- WP5HLStylesListener.h 3 Oct 2005 12:16:42 -0000 1.23 *************** *** 60,70 **** virtual void defineTable(uint8_t position, uint16_t leftOffset){} ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter){} virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes); virtual void endTable() {} --- 60,70 ---- virtual void defineTable(uint8_t position, uint16_t leftOffset){} ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment){} virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes); virtual void endTable() {} Index: libwpd_internal.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** libwpd_internal.cpp 25 Aug 2005 14:34:42 -0000 1.17 --- libwpd_internal.cpp 3 Oct 2005 12:16:42 -0000 1.18 *************** *** 955,956 **** --- 955,962 ---- { } + + _WPXColumnProperties::_WPXColumnProperties() + : m_attributes(0x00000000), + m_alignment(0x00) + { + } Index: WP6FileStructure.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6FileStructure.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WP6FileStructure.cpp 2 Apr 2004 07:31:17 -0000 1.4 --- WP6FileStructure.cpp 3 Oct 2005 12:16:42 -0000 1.5 *************** *** 24,27 **** --- 24,29 ---- */ + #include "WP6FileStructure.h" + // size of the fixed length functiongroups 0xF0 to 0xFF int WP6_FIXED_LENGTH_FUNCTION_GROUP_SIZE[16] = Index: WP5VariableLengthGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5VariableLengthGroup.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** WP5VariableLengthGroup.h 3 Jun 2004 00:06:00 -0000 1.6 --- WP5VariableLengthGroup.h 3 Oct 2005 12:16:42 -0000 1.7 *************** *** 29,32 **** --- 29,39 ---- #include "WP5Part.h" + class WP5VariableLengthGroup_SubGroup + { + public: + virtual ~WP5VariableLengthGroup_SubGroup() {} + virtual void parse(WP5HLListener *listener) = 0; + }; + class WP5VariableLengthGroup : public WP5Part { Index: WP6CharacterGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6CharacterGroup.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** WP6CharacterGroup.h 3 Jun 2004 00:06:00 -0000 1.14 --- WP6CharacterGroup.h 3 Oct 2005 12:16:42 -0000 1.15 *************** *** 132,137 **** uint16_t m_leftGutter; uint16_t m_rigthGutter; ! uint16_t m_attribWord1; ! uint16_t m_attribWord2; uint8_t m_alignment; uint16_t m_absPosFromRight; --- 132,136 ---- uint16_t m_leftGutter; uint16_t m_rigthGutter; ! uint32_t m_attributes; uint8_t m_alignment; uint16_t m_absPosFromRight; Index: WP3HLStylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3HLStylesListener.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** WP3HLStylesListener.cpp 8 Feb 2005 16:02:49 -0000 1.10 --- WP3HLStylesListener.cpp 3 Oct 2005 12:16:42 -0000 1.11 *************** *** 177,182 **** void WP3HLStylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes) { if (!isUndoOn() && m_currentTable != NULL) --- 177,182 ---- void WP3HLStylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes) { if (!isUndoOn() && m_currentTable != NULL) Index: WP3HLStylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3HLStylesListener.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** WP3HLStylesListener.h 8 Feb 2005 16:02:49 -0000 1.9 --- WP3HLStylesListener.h 3 Oct 2005 12:16:42 -0000 1.10 *************** *** 59,69 **** virtual void defineTable(uint8_t position, uint16_t leftOffset){} ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter){} virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes); virtual void endTable() {} --- 59,69 ---- virtual void defineTable(uint8_t position, uint16_t leftOffset){} ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment){} virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes); virtual void endTable() {} Index: WPXLLListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXLLListener.h,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** WPXLLListener.h 8 Feb 2005 16:03:05 -0000 1.44 --- WPXLLListener.h 3 Oct 2005 12:16:42 -0000 1.45 *************** *** 59,69 **** virtual void defineTable(uint8_t position, uint16_t leftOffset) = 0; ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter) = 0; virtual void startTable() = 0; virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) = 0; virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes) = 0; virtual void endTable() = 0; }; --- 59,69 ---- virtual void defineTable(uint8_t position, uint16_t leftOffset) = 0; ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) = 0; virtual void startTable() = 0; virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) = 0; virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes) = 0; virtual void endTable() = 0; }; --- NEW FILE: WP5DefinitionGroup.cpp --- /* libwpd * Copyright (C) 2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For further information visit http://libwpd.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #include "WP5DefinitionGroup.h" #include "WP5LLListener.h" #include "WPXHLListener.h" #include "libwpd_internal.h" WP5DefinitionGroup_DefineTablesSubGroup::WP5DefinitionGroup_DefineTablesSubGroup(WPXInputStream *input) : WP5VariableLengthGroup_SubGroup(), m_position(0), m_numColumns(0), m_leftGutter(0), m_rightGutter(0), m_leftOffset(0) { // Skip useless old values to read the old column number input->seek(2, WPX_SEEK_CUR); m_numColumns = readU16(input); // Skip to new values input->seek(20+(5*m_numColumns), WPX_SEEK_CUR); // Read the new values uint8_t tmpFlags = readU8(input); m_position = tmpFlags & 0x07; input->seek(1, WPX_SEEK_CUR); m_numColumns = readU16(input); input->seek(4, WPX_SEEK_CUR); m_leftGutter = readU16(input); m_rightGutter = readU16(input); input->seek(10, WPX_SEEK_CUR); m_leftOffset = readU16(input); int i; for (i=0; i < m_numColumns; i++) m_columnWidth[i] = readU16(input); for (i=0; i < m_numColumns; i++) m_attributeBits[i] = readU16(input); for (i=0; i < m_numColumns; i++) m_columnAlignment[i] = readU8(input); } void WP5DefinitionGroup_DefineTablesSubGroup::parse(WP5HLListener *listener) { listener->defineTable(m_position, m_leftOffset); for (int i=0; i < m_numColumns; i++) { listener->addTableColumnDefinition(m_columnWidth[i], m_leftGutter, m_rightGutter, m_attributeBits[i], m_columnAlignment[i]); } listener->startTable(); } WP5DefinitionGroup::WP5DefinitionGroup(WPXInputStream *input) : WP5VariableLengthGroup(), m_subGroupData(NULL) { _read(input); } WP5DefinitionGroup::~WP5DefinitionGroup() { delete m_subGroupData; } void WP5DefinitionGroup::_readContents(WPXInputStream *input) { switch(getSubGroup()) { case WP5_TOP_DEFINITION_GROUP_DEFINE_TABLES: m_subGroupData = new WP5DefinitionGroup_DefineTablesSubGroup(input); break; default: break; } } void WP5DefinitionGroup::parse(WP5HLListener *listener) { WPD_DEBUG_MSG(("WordPerfect: handling a Definition group\n")); switch(getSubGroup()) { case WP5_TOP_DEFINITION_GROUP_DEFINE_TABLES: m_subGroupData->parse(listener); break; default: break; } } Index: WP6CharacterGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6CharacterGroup.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** WP6CharacterGroup.cpp 15 Jun 2005 12:18:27 -0000 1.23 --- WP6CharacterGroup.cpp 3 Oct 2005 12:16:42 -0000 1.24 *************** *** 168,172 **** WP6CharacterGroup_TableDefinitionOffSubGroup::WP6CharacterGroup_TableDefinitionOffSubGroup(WPXInputStream *input) { - } --- 168,171 ---- *************** *** 188,194 **** m_leftGutter = readU16(input); m_rigthGutter = readU16(input); ! m_attribWord1 = readU16(input); ! m_attribWord2 = readU16(input); ! m_alignment = readU8(input); m_absPosFromRight = readU16(input); m_numberType = readU16(input); --- 187,192 ---- m_leftGutter = readU16(input); m_rigthGutter = readU16(input); ! m_attributes = (readU32(input) & 0x0003FFFF); ! m_alignment = (readU8(input) & 0x07); m_absPosFromRight = readU16(input); m_numberType = readU16(input); *************** *** 198,202 **** void WP6CharacterGroup_TableColumnSubGroup::parse(WP6HLListener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const { ! listener->addTableColumnDefinition(m_width, m_leftGutter, m_rigthGutter); } --- 196,200 ---- void WP6CharacterGroup_TableColumnSubGroup::parse(WP6HLListener *listener, const uint8_t numPrefixIDs, uint16_t const *prefixIDs) const { ! listener->addTableColumnDefinition(m_width, m_leftGutter, m_rigthGutter, m_attributes, m_alignment); } --- NEW FILE: WP5TableEOPGroup.h --- /* libwpd * Copyright (C) 2002 William Lachance (wil...@sy...) * Copyright (C) 2002 Marc Maurer (j.m...@st...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For further information visit http://libwpd.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #ifndef WP5TABLEEOPGROUP_H #define WP5TABLEEOPGROUP_H #include "WP5VariableLengthGroup.h" class WP5TableEOPGroup : public WP5VariableLengthGroup { public: WP5TableEOPGroup(WPXInputStream *input); virtual ~WP5TableEOPGroup(); virtual void _readContents(WPXInputStream *input); virtual void parse(WP5HLListener *listener); }; #endif /* WP5TABLEEOPGROUP_H */ Index: WP6HLStylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6HLStylesListener.h,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** WP6HLStylesListener.h 25 Aug 2005 14:34:42 -0000 1.39 --- WP6HLStylesListener.h 3 Oct 2005 12:16:42 -0000 1.40 *************** *** 88,98 **** virtual void defineTable(uint8_t position, uint16_t leftOffset); ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter) {} virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes); virtual void endTable(); --- 88,98 ---- virtual void defineTable(uint8_t position, uint16_t leftOffset); ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) {} virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes); virtual void endTable(); Index: WP42HLStylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP42HLStylesListener.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** WP42HLStylesListener.h 8 Feb 2005 16:02:50 -0000 1.23 --- WP42HLStylesListener.h 3 Oct 2005 12:16:42 -0000 1.24 *************** *** 61,71 **** virtual void defineTable(uint8_t position, uint16_t leftOffset){} ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter){} virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes); virtual void endTable() {} --- 61,71 ---- virtual void defineTable(uint8_t position, uint16_t leftOffset){} ! virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment){} virtual void startTable(); virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow); virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes); virtual void endTable() {} Index: WPXHLListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXHLListener.h,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** WPXHLListener.h 25 Aug 2005 14:34:42 -0000 1.62 --- WPXHLListener.h 3 Oct 2005 12:16:42 -0000 1.63 *************** *** 56,59 **** --- 56,60 ---- float m_leftOffset; std::vector < WPXColumnDefinition > columns; + std::vector < WPXColumnProperties > columnsProperties; }; Index: WP6HLContentListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6HLContentListener.cpp,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** WP6HLContentListener.cpp 31 Aug 2005 16:26:51 -0000 1.82 --- WP6HLContentListener.cpp 3 Oct 2005 12:16:42 -0000 1.83 *************** *** 1116,1119 **** --- 1116,1120 ---- // remove all the old column information m_ps->m_tableDefinition.columns.clear(); + m_ps->m_tableDefinition.columnsProperties.clear(); // pull a table definition off of our stack *************** *** 1123,1127 **** } ! void WP6HLContentListener::addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter) { if (!isUndoOn()) --- 1124,1128 ---- } ! void WP6HLContentListener::addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) { if (!isUndoOn()) *************** *** 1133,1138 **** --- 1134,1145 ---- colDef.m_rightGutter = (float)((double)width / (double)WPX_NUM_WPUS_PER_INCH); + WPXColumnProperties colProp; + colProp.m_attributes = attributes; + colProp.m_alignment = alignment; + // add the new column definition to our table definition m_ps->m_tableDefinition.columns.push_back(colDef); + + m_ps->m_tableDefinition.columnsProperties.push_back(colProp); } } *************** *** 1172,1177 **** void WP6HLContentListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, ! const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes) { if (!isUndoOn()) --- 1179,1184 ---- void WP6HLContentListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove, const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, ! const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, ! const bool useCellAttributes, const uint32_t cellAttributes) { if (!isUndoOn()) *************** *** 1184,1188 **** cellFgColor, cellBgColor, cellBorderColor, cellVerticalAlignment); m_ps->m_isCellWithoutParagraph = true; ! m_ps->m_cellAttributeBits = cellAttributes; } } --- 1191,1199 ---- cellFgColor, cellBgColor, cellBorderColor, cellVerticalAlignment); m_ps->m_isCellWithoutParagraph = true; ! if (useCellAttributes) ! m_ps->m_cellAttributeBits = cellAttributes; ! else ! m_ps->m_cellAttributeBits = m_ps->m_tableDefinition.columnsProperties[m_ps->m_currentTableCol-1].m_attributes; ! justificationChange(m_ps->m_tableDefinition.columnsProperties[m_ps->m_currentTableCol-1].m_alignment); } } --- NEW FILE: WP5DefinitionGroup.h --- /* libwpd * Copyright (C) 2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For further information visit http://libwpd.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #ifndef WP5DEFINITIONGROUP_H #define WP5DEFINITIONGROUP_H #include "WP5VariableLengthGroup.h" #include "WP5FileStructure.h" class WP5DefinitionGroup_DefineTablesSubGroup : public WP5VariableLengthGroup_SubGroup { public: WP5DefinitionGroup_DefineTablesSubGroup(WPXInputStream *input); virtual void parse(WP5HLListener *listener); private: uint8_t m_position; uint16_t m_numColumns; uint16_t m_leftOffset; uint16_t m_leftGutter; uint16_t m_rightGutter; uint16_t m_columnWidth[32]; uint16_t m_attributeBits[32]; uint8_t m_columnAlignment[32]; }; class WP5DefinitionGroup : public WP5VariableLengthGroup { public: WP5DefinitionGroup(WPXInputStream *input); ~WP5DefinitionGroup(); virtual void parse(WP5HLListener *listener); protected: virtual void _readContents(WPXInputStream *input); private: WP5VariableLengthGroup_SubGroup * m_subGroupData; }; #endif /* WP5DEFINITIONGROUP_H */ Index: WP6EOLGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6EOLGroup.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** WP6EOLGroup.cpp 4 Jul 2005 16:39:28 -0000 1.45 --- WP6EOLGroup.cpp 3 Oct 2005 12:16:42 -0000 1.46 *************** *** 126,130 **** WPD_DEBUG_MSG(("WordPerfect: EOL Group Embedded Sub-Function: CELL_INFORMATION\n")); numBytesToSkip = WP6_EOL_GROUP_CELL_INFORMATION_SIZE; ! uint8_t cellFlag, justification, tmpCellVerticalAlign; uint16_t attributeWord1, attributeWord2; cellFlag = readU8(input); --- 126,130 ---- WPD_DEBUG_MSG(("WordPerfect: EOL Group Embedded Sub-Function: CELL_INFORMATION\n")); numBytesToSkip = WP6_EOL_GROUP_CELL_INFORMATION_SIZE; ! uint8_t cellFlag, tmpCellVerticalAlign; uint16_t attributeWord1, attributeWord2; cellFlag = readU8(input); *************** *** 137,142 **** if ((cellFlag & 0x80) == 0x80) m_cellIsLocked = true; ! justification = readU8(input); ! m_cellJustification = (justification & 0x07); tmpCellVerticalAlign = readU8(input); switch (tmpCellVerticalAlign & 0x03) --- 137,141 ---- if ((cellFlag & 0x80) == 0x80) m_cellIsLocked = true; ! m_cellJustification = (readU8(input) & 0x07); tmpCellVerticalAlign = readU8(input); switch (tmpCellVerticalAlign & 0x03) *************** *** 302,308 **** case WP6_EOL_GROUP_TABLE_CELL: // Table Cell WPD_DEBUG_MSG(("WordPerfect: EOL group: table cell\n")); ! listener->insertCell(m_colSpan, m_rowSpan, m_boundFromLeft, m_boundFromAbove, ! m_cellBorders, cellFgColor, cellBgColor, cellBorderColor, m_cellVerticalAlign, m_cellAttributes); ! listener->justificationChange(m_cellJustification); break; case WP6_EOL_GROUP_TABLE_ROW_AND_CELL: --- 301,308 ---- case WP6_EOL_GROUP_TABLE_CELL: // Table Cell WPD_DEBUG_MSG(("WordPerfect: EOL group: table cell\n")); ! listener->insertCell(m_colSpan, m_rowSpan, m_boundFromLeft, m_boundFromAbove, m_cellBorders, cellFgColor, ! cellBgColor, cellBorderColor, m_cellVerticalAlign, m_useCellAttributes, m_cellAttributes); ! if (m_useCellJustification) ! listener->justificationChange(m_cellJustification); break; case WP6_EOL_GROUP_TABLE_ROW_AND_CELL: *************** *** 316,322 **** listener->insertRow(m_rowHeight, m_isMinimumHeight, m_isHeaderRow); // the cellBorders variable already represent the cell border bits as well ! listener->insertCell(m_colSpan, m_rowSpan, m_boundFromLeft, m_boundFromAbove, ! m_cellBorders, cellFgColor, cellBgColor, cellBorderColor, m_cellVerticalAlign, m_cellAttributes); ! listener->justificationChange(m_cellJustification); break; case WP6_EOL_GROUP_TABLE_OFF: --- 316,323 ---- listener->insertRow(m_rowHeight, m_isMinimumHeight, m_isHeaderRow); // the cellBorders variable already represent the cell border bits as well ! listener->insertCell(m_colSpan, m_rowSpan, m_boundFromLeft, m_boundFromAbove, m_cellBorders, cellFgColor, ! cellBgColor, cellBorderColor, m_cellVerticalAlign, m_useCellAttributes, m_cellAttributes); ! if (m_useCellJustification) ! listener->justificationChange(m_cellJustification); break; case WP6_EOL_GROUP_TABLE_OFF: --- NEW FILE: WP5TableEOLGroup.h --- /* libwpd * Copyright (C) 2002 William Lachance (wil...@sy...) * Copyright (C) 2002 Marc Maurer (j.m...@st...) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For further information visit http://libwpd.sourceforge.net */ /* "This product is not manufactured, approved, or supported by * Corel Corporation or Corel Corporation Limited." */ #ifndef WP5TABLEEOLGROUP_H #define WP5TABLEEOLGROUP_H #include "WP5VariableLengthGroup.h" class WP5TableEOLGroup : public WP5VariableLengthGroup { public: WP5TableEOLGroup(WPXInputStream *input); virtual ~WP5TableEOLGroup(); virtual void _readContents(WPXInputStream *input); virtual void parse(WP5HLListener *listener); private: // Beginning column sub-function uint8_t m_cellVerticalAlignment; bool m_useCellAttributes; bool m_useCellJustification; uint8_t m_columnNumber; uint8_t m_colSpan; uint8_t m_rowSpan; bool m_spannedFromAbove; uint16_t m_cellAttributes; uint8_t m_cellJustification; }; #endif /* WP5TABLEEOLGROUP_H */ |
From: Fridrich S. <str...@us...> - 2005-10-03 12:17:08
|
Update of /cvsroot/libwpd/libwpd2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16145 Modified Files: configure.in Log Message: Initial table implementation in WP5 parser + fix a memory leak that was not triggered for the while in our testset. Index: configure.in =================================================================== RCS file: /cvsroot/libwpd/libwpd2/configure.in,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** configure.in 25 Aug 2005 14:56:03 -0000 1.36 --- configure.in 3 Oct 2005 12:16:42 -0000 1.37 *************** *** 56,60 **** ) ! if test "x$test_stream" = xtrue ; then PKG_CHECK_MODULES(LIBWPD,[ glib-2.0 >= 2.0.0 --- 56,60 ---- ) ! if test "x$test_stream" = xtrue ; then PKG_CHECK_MODULES(LIBWPD,[ glib-2.0 >= 2.0.0 |
From: Will L. <lac...@us...> - 2005-09-17 22:46:17
|
Update of /cvsroot/libwpd/libwpd-www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20245 Added Files: sync-me.sh Log Message: Small script to upload everything to sourceforge website. --- NEW FILE: sync-me.sh --- #!/bin/bash [ -z $1 ] || UNAME=$1 scp ./*html ./*png ./*jpg ./*css ./*dia $UN...@li...:/home/groups/l/li/libwpd/htdocs |