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-12-02 10:24:46
|
Update of /cvsroot/libwpd/libwpd2/src/conv/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11161/src/conv/text Modified Files: Makefile.am TextListenerImpl.h Log Message: Merging fs_refactoring2 into HEAD Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/text/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.am 28 Jan 2005 07:55:27 -0000 1.8 --- Makefile.am 2 Dec 2005 10:24:23 -0000 1.9 *************** *** 7,11 **** bin_PROGRAMS = $(target_wpd2text) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I../../lib/ wpd2text_LDFLAGS = -L../../lib/ --- 7,11 ---- bin_PROGRAMS = $(target_wpd2text) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I$(top_srcdir)/src/lib/ wpd2text_LDFLAGS = -L../../lib/ Index: TextListenerImpl.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/text/TextListenerImpl.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** TextListenerImpl.h 7 Feb 2005 00:06:24 -0000 1.23 --- TextListenerImpl.h 2 Dec 2005 10:24:23 -0000 1.24 *************** *** 29,33 **** #include <glib.h> #include "WPXHLListenerImpl.h" - #include "WPXHLListener.h" class TextListenerImpl : public WPXHLListenerImpl --- 29,32 ---- |
From: Fridrich S. <str...@us...> - 2005-12-02 10:24:46
|
Update of /cvsroot/libwpd/libwpd2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11161 Modified Files: CHANGES configure.in Log Message: Merging fs_refactoring2 into HEAD Index: CHANGES =================================================================== RCS file: /cvsroot/libwpd/libwpd2/CHANGES,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** CHANGES 8 Oct 2005 18:24:54 -0000 1.60 --- CHANGES 2 Dec 2005 10:24:23 -0000 1.61 *************** *** 3,6 **** --- 3,15 ---- - Fix compilation with gcc >= 4.1.0 (Stephan Kulow) - Initial support for tables in WP5.x format (Fridrich Strba) + - Fix compilation on MacOSX (Francis J. Franklin) + - Conversion of font name, size and colour for WP3.x format (Fridrich) + - Collapse the LL and HL Listeners into one classe each (Fridrich) + - Initial support of tables in WP3.x format including the cell background + colour (Fridrich Strba) + - Conversion of section with multiple columns in WP3.x format (Fridrich) + - Conversion of foot/endnotes in WP3.x format (Fridrich) + - Adding a proper assignment operator to WPXString class as well as trying + to make it much more a std::string wrapper (Fridrich) 0.8.2 -> 0.8.3 Index: configure.in =================================================================== RCS file: /cvsroot/libwpd/libwpd2/configure.in,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** configure.in 3 Oct 2005 12:16:42 -0000 1.37 --- configure.in 2 Dec 2005 10:24:23 -0000 1.38 *************** *** 5,9 **** WPD_MAJOR_VERSION=0 WPD_MINOR_VERSION=8 ! WPD_MICRO_VERSION=3 WPD_VERSION="$WPD_MAJOR_VERSION.$WPD_MINOR_VERSION.$WPD_MICRO_VERSION" --- 5,9 ---- WPD_MAJOR_VERSION=0 WPD_MINOR_VERSION=8 ! WPD_MICRO_VERSION=4 WPD_VERSION="$WPD_MAJOR_VERSION.$WPD_MINOR_VERSION.$WPD_MICRO_VERSION" *************** *** 124,127 **** --- 124,139 ---- AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = yes) + AC_MSG_CHECKING([for Darwin (Mac OS X) platform]) + case "$host" in + *-*-darwin*) + platform_darwin=yes + ;; + *) + platform_darwin=no + ;; + esac + AC_MSG_RESULT($platform_darwin) + AM_CONDITIONAL(PLATFORM_DARWIN, test "$platform_darwin" = yes) + AC_ARG_ENABLE(debug,[ --enable-debug Turn on debugging],[ case "${enableval}" in |
From: Fridrich S. <str...@us...> - 2005-12-02 10:24:40
|
Update of /cvsroot/libwpd/libwpd2/build/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11161/build/win32 Modified Files: libwpd.dsp Log Message: Merging fs_refactoring2 into HEAD Index: libwpd.dsp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/build/win32/libwpd.dsp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** libwpd.dsp 8 Feb 2005 16:02:48 -0000 1.8 --- libwpd.dsp 2 Dec 2005 10:24:23 -0000 1.9 *************** *** 98,101 **** --- 98,109 ---- # Begin Source File + SOURCE=..\..\src\lib\WP3DefinitionGroup.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3DisplayGroup.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP3EndOfLinePageGroup.cpp # End Source File *************** *** 114,126 **** # Begin Source File ! SOURCE=..\..\src\lib\WP3Header.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3HLListener.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3HLStylesListener.cpp # End Source File # Begin Source File --- 122,138 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP3FontGroup.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3FootnoteEndnoteGroup.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3Header.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP3Listener.cpp # End Source File # Begin Source File *************** *** 146,149 **** --- 158,173 ---- # Begin Source File + SOURCE=..\..\src\lib\WP3StylesListener.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3SubDocument.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3TablesGroup.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP3UndoGroup.cpp # End Source File *************** *** 170,186 **** # Begin Source File ! SOURCE=..\..\src\lib\WP42HLListener.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42HLStylesListener.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Parser.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Part.cpp # End Source File # Begin Source File --- 194,210 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP42Listener.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Parser.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Part.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42StylesListener.cpp # End Source File # Begin Source File *************** *** 198,201 **** --- 222,229 ---- # Begin Source File + SOURCE=..\..\src\lib\WP5DefinitionGroup.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP5ExtendedCharacterGroup.cpp # End Source File *************** *** 218,226 **** # Begin Source File ! SOURCE=..\..\src\lib\WP5HLListener.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP5HLStylesListener.cpp # End Source File # Begin Source File --- 246,250 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP5Listener.cpp # End Source File # Begin Source File *************** *** 242,245 **** --- 266,281 ---- # Begin Source File + SOURCE=..\..\src\lib\WP5StylesListener.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP5TableEOLGroup.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP5TableEOPGroup.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP5UnsupportedFixedLengthGroup.cpp # End Source File *************** *** 274,277 **** --- 310,317 ---- # Begin Source File + SOURCE=..\..\src\lib\WP6ContentListener.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP6DefaultInitialFontPacket.cpp # End Source File *************** *** 330,346 **** # Begin Source File ! SOURCE=..\..\src\lib\WP6HLContentListener.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6HLListener.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6HLStylesListener.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6LLListener.cpp # End Source File # Begin Source File --- 370,374 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP6Listener.cpp # End Source File # Begin Source File *************** *** 386,389 **** --- 414,425 ---- # Begin Source File + SOURCE=..\..\src\lib\WP6StylesListener.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP6SubDocument.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP6TabGroup.cpp # End Source File *************** *** 414,418 **** # Begin Source File ! SOURCE=..\..\src\lib\WPXHLListener.cpp # End Source File # Begin Source File --- 450,454 ---- # Begin Source File ! SOURCE=..\..\src\lib\WPXListener.cpp # End Source File # Begin Source File *************** *** 450,453 **** --- 486,493 ---- # Begin Source File + SOURCE=..\..\src\lib\WPXSubDocument.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WPXTable.cpp # End Source File *************** *** 478,481 **** --- 518,529 ---- # Begin Source File + SOURCE=..\..\src\lib\WP3DefinitionGroup.h + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3DisplayGroup.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP3EndOfLinePageGroup.h # End Source File *************** *** 494,510 **** # Begin Source File ! SOURCE=..\..\src\lib\WP3Header.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3HLListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3HLStylesListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3LLListener.h # End Source File # Begin Source File --- 542,558 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP3FontGroup.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3FootnoteEndnoteGroup.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3Header.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3Listener.h # End Source File # Begin Source File *************** *** 530,533 **** --- 578,593 ---- # Begin Source File + SOURCE=..\..\src\lib\WP3StylesListener.h + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3SubDocument.h + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3TablesGroup.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP3UndoGroup.h # End Source File *************** *** 554,574 **** # Begin Source File ! SOURCE=..\..\src\lib\WP42HLListener.h ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP42HLStylesListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42LLListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Parser.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Part.h # End Source File # Begin Source File --- 614,630 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP42Listener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Parser.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Part.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42StylesListener.h # End Source File # Begin Source File *************** *** 586,589 **** --- 642,649 ---- # Begin Source File + SOURCE=..\..\src\lib\WP5DefinitionGroup.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP5ExtendedCharacterGroup.h # End Source File *************** *** 606,634 **** # Begin Source File ! SOURCE=..\..\src\lib\WP5HLListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5HLStylesListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5LLListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5PageFormatGroup.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5Parser.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5Part.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5SingleByteFunction.h # End Source File # Begin Source File --- 666,698 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP5Listener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5PageFormatGroup.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5Parser.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5Part.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5SingleByteFunction.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5StylesListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5TableEOLGroup.h ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP5TableEOPGroup.h # End Source File # Begin Source File *************** *** 666,669 **** --- 730,737 ---- # Begin Source File + SOURCE=..\..\src\lib\WP6ContentListener.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP6DefaultInitialFontPacket.h # End Source File *************** *** 722,738 **** # Begin Source File ! SOURCE=..\..\src\lib\WP6HLContentListener.h ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6HLListener.h ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6HLStylesListener.h ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6LLListener.h # End Source File # Begin Source File --- 790,794 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP6Listener.h # End Source File # Begin Source File *************** *** 778,781 **** --- 834,845 ---- # Begin Source File + SOURCE=..\..\src\lib\WP6StylesListener.h + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP6SubDocument.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP6TabGroup.h # End Source File *************** *** 814,826 **** # Begin Source File - SOURCE=..\..\src\lib\WPXHLListener.h - # End Source File - # Begin Source File - SOURCE=..\..\src\lib\WPXHLListenerImpl.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WPXLLListener.h # End Source File # Begin Source File --- 878,886 ---- # Begin Source File SOURCE=..\..\src\lib\WPXHLListenerImpl.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WPXListener.h # End Source File # Begin Source File *************** *** 862,865 **** --- 922,929 ---- # Begin Source File + SOURCE=..\..\src\lib\WPXSubDocument.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WPXTable.h # End Source File |
From: Fridrich S. <str...@us...> - 2005-12-02 10:24:40
|
Update of /cvsroot/libwpd/libwpd2/src/conv/raw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11161/src/conv/raw Modified Files: Makefile.am RawListener.h Log Message: Merging fs_refactoring2 into HEAD Index: RawListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/raw/RawListener.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** RawListener.h 7 Feb 2005 00:06:24 -0000 1.42 --- RawListener.h 2 Dec 2005 10:24:23 -0000 1.43 *************** *** 52,56 **** public: RawListenerImpl(bool printCallgraphScore); ! ~RawListenerImpl(); virtual void setDocumentMetaData(const WPXPropertyList &propList); --- 52,56 ---- public: RawListenerImpl(bool printCallgraphScore); ! virtual ~RawListenerImpl(); virtual void setDocumentMetaData(const WPXPropertyList &propList); Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/raw/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.am 28 Jan 2005 07:55:11 -0000 1.5 --- Makefile.am 2 Dec 2005 10:24:23 -0000 1.6 *************** *** 7,11 **** bin_PROGRAMS = $(target_wpd2raw) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I../../lib/ wpd2raw_LDFLAGS = -L../../lib/ --- 7,11 ---- bin_PROGRAMS = $(target_wpd2raw) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I$(top_srcdir)/src/lib/ wpd2raw_LDFLAGS = -L../../lib/ |
From: Fridrich S. <str...@us...> - 2005-12-02 10:24:40
|
Update of /cvsroot/libwpd/libwpd2/src/conv/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11161/src/conv/html Modified Files: HtmlListenerImpl.cpp Makefile.am Log Message: Merging fs_refactoring2 into HEAD Index: HtmlListenerImpl.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/html/HtmlListenerImpl.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** HtmlListenerImpl.cpp 15 Apr 2005 20:08:26 -0000 1.62 --- HtmlListenerImpl.cpp 2 Dec 2005 10:24:23 -0000 1.63 *************** *** 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"); Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/html/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 28 Jan 2005 07:55:11 -0000 1.7 --- Makefile.am 2 Dec 2005 10:24:23 -0000 1.8 *************** *** 7,11 **** bin_PROGRAMS = $(target_wpd2html) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I../../lib/ wpd2html_LDFLAGS = -L../../lib/ --- 7,11 ---- bin_PROGRAMS = $(target_wpd2html) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I$(top_srcdir)/src/lib/ wpd2html_LDFLAGS = -L../../lib/ |
From: Fridrich S. <str...@us...> - 2005-12-02 10:05:22
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7827/src/lib Modified Files: Tag: fs_refactoring2 WP3Listener.cpp WPXString.cpp Log Message: Last minor changes before merger with head Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.16 retrieving revision 1.1.2.17 diff -C2 -d -r1.1.2.16 -r1.1.2.17 *** WP3Listener.cpp 1 Dec 2005 14:55:31 -0000 1.1.2.16 --- WP3Listener.cpp 2 Dec 2005 10:05:15 -0000 1.1.2.17 *************** *** 521,524 **** --- 521,525 ---- if (!isUndoOn()) { + _closeSpan(); m_ps->m_isNote = true; WPXNumberingType numberingType = _extractWPXNumberingTypeFromBuf(m_parseState->m_noteReference, ARABIC); Index: WPXString.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXString.cpp,v retrieving revision 1.5.4.3 retrieving revision 1.5.4.4 diff -C2 -d -r1.5.4.3 -r1.5.4.4 *** WPXString.cpp 1 Dec 2005 14:55:31 -0000 1.5.4.3 --- WPXString.cpp 2 Dec 2005 10:05:15 -0000 1.5.4.4 *************** *** 189,194 **** WPXString& WPXString::operator=(const WPXString &stringBuf) { ! delete static_cast<std::string*>(m_buf); ! m_buf = static_cast<void *>(new std::string(*static_cast<std::string*>(stringBuf.m_buf))); return *this; } --- 189,193 ---- WPXString& WPXString::operator=(const WPXString &stringBuf) { ! *static_cast<std::string*>(m_buf) = *static_cast<std::string*>(stringBuf.m_buf); return *this; } |
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8655/src/lib Modified Files: Tag: fs_refactoring2 GSFStream.cpp WP3FontGroup.cpp WP3Listener.cpp WP3PageFormatGroup.cpp WP3StylesListener.cpp WP42StylesListener.cpp WP5DefinitionGroup.cpp WP5Listener.cpp WP5PageFormatGroup.cpp WP5StylesListener.cpp WP6CharacterGroup.cpp WP6ColumnGroup.cpp WP6ContentListener.cpp WP6EOLGroup.cpp WP6EOLGroup.h WP6ExtendedDocumentSummaryPacket.cpp WP6FontDescriptorPacket.cpp WP6StylesListener.cpp WPXListener.cpp WPXListener.h WPXMemoryStream.cpp WPXPageSpan.cpp WPXString.cpp WPXTable.cpp libwpd_internal.cpp Log Message: Remove some unnecessary warnings when building with -Wall. Make sure that sections are never closed/opened inside tables + some small cleanup Index: WPXListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WPXListener.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 *** WPXListener.cpp 28 Nov 2005 13:00:30 -0000 1.1.2.4 --- WPXListener.cpp 1 Dec 2005 14:55:31 -0000 1.1.2.5 *************** *** 48,54 **** m_isParagraphColumnBreak(false), m_isParagraphPageBreak(false), - m_paragraphLineSpacing(1.0f), m_paragraphJustification(WPX_PARAGRAPH_JUSTIFICATION_LEFT), m_tempParagraphJustification(0), m_isDocumentStarted(false), --- 48,54 ---- m_isParagraphColumnBreak(false), m_isParagraphPageBreak(false), m_paragraphJustification(WPX_PARAGRAPH_JUSTIFICATION_LEFT), m_tempParagraphJustification(0), + m_paragraphLineSpacing(1.0f), m_isDocumentStarted(false), *************** *** 104,113 **** m_textIndentByTabs(0.0f), m_currentListLevel(0), - #if 0 - m_putativeListElementHasParagraphNumber(false), - m_putativeListElementHasDisplayReferenceNumber(false), - m_noteTextPID(0), - #endif m_alignmentCharacter('.'), m_isTabPositionRelative(false), --- 104,108 ---- *************** *** 125,131 **** WPXListener::WPXListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl) : - m_pageList(pageList), - m_listenerImpl(listenerImpl), m_ps(new WPXParsingState), m_isUndoOn(false) { --- 120,126 ---- WPXListener::WPXListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl) : m_ps(new WPXParsingState), + m_listenerImpl(listenerImpl), + m_pageList(pageList), m_isUndoOn(false) { *************** *** 190,194 **** void WPXListener::_closeSection() { ! if (m_ps->m_isSectionOpened) { if (m_ps->m_isParagraphOpened) --- 185,189 ---- void WPXListener::_closeSection() { ! if (m_ps->m_isSectionOpened && !m_ps->m_isTableOpened) { if (m_ps->m_isParagraphOpened) *************** *** 201,206 **** m_ps->m_sectionAttributesChanged = false; } - m_ps->m_isSectionOpened = false; } --- 196,201 ---- m_ps->m_sectionAttributesChanged = false; + m_ps->m_isSectionOpened = false; } } Index: WP6ColumnGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6ColumnGroup.cpp,v retrieving revision 1.18.4.2 retrieving revision 1.18.4.3 diff -C2 -d -r1.18.4.2 -r1.18.4.3 *** WP6ColumnGroup.cpp 10 Nov 2005 12:57:17 -0000 1.18.4.2 --- WP6ColumnGroup.cpp 1 Dec 2005 14:55:31 -0000 1.18.4.3 *************** *** 54,58 **** int16_t tmpRowSpacingIntegerPart = (int16_t)((tmpRowSpacing & 0xffff0000) >> 16); float tmpRowSpacingFractionalPart = (float)((double)(tmpRowSpacing & 0xffff)/(double)0x10000); ! m_rowSpacing = (float)tmpRowSpacingIntegerPart + tmpRowSpacing; m_numColumns = readU8(input); uint8_t tmpDefinition; --- 54,58 ---- int16_t tmpRowSpacingIntegerPart = (int16_t)((tmpRowSpacing & 0xffff0000) >> 16); float tmpRowSpacingFractionalPart = (float)((double)(tmpRowSpacing & 0xffff)/(double)0x10000); ! m_rowSpacing = (float)tmpRowSpacingIntegerPart + tmpRowSpacingFractionalPart; m_numColumns = readU8(input); uint8_t tmpDefinition; *************** *** 93,97 **** { WPD_DEBUG_MSG(("WordPerfect: handling a Column group\n")); ! switch (getSubGroup()) { --- 93,100 ---- { WPD_DEBUG_MSG(("WordPerfect: handling a Column group\n")); ! ! if (getFlags() & 0x40) // Ignore function flag ! return; ! switch (getSubGroup()) { Index: WP42StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP42StylesListener.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 *** WP42StylesListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.2 --- WP42StylesListener.cpp 1 Dec 2005 14:55:31 -0000 1.1.2.3 *************** *** 34,40 **** m_currentPage(new WPXPageSpan()), m_tableList(tableList), - m_currentPageHasContent(false), m_tempMarginLeft(1.0f), ! m_tempMarginRight(1.0f) { } --- 34,40 ---- m_currentPage(new WPXPageSpan()), m_tableList(tableList), m_tempMarginLeft(1.0f), ! m_tempMarginRight(1.0f), ! m_currentPageHasContent(false) { } Index: WPXString.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXString.cpp,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.3 diff -C2 -d -r1.5.4.2 -r1.5.4.3 *** WPXString.cpp 1 Dec 2005 09:06:55 -0000 1.5.4.2 --- WPXString.cpp 1 Dec 2005 14:55:31 -0000 1.5.4.3 *************** *** 354,358 **** { long len = 0; - const char *start = p; if (p == NULL) return 0; --- 354,357 ---- Index: WP6ExtendedDocumentSummaryPacket.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6ExtendedDocumentSummaryPacket.cpp,v retrieving revision 1.20.2.1 retrieving revision 1.20.2.2 diff -C2 -d -r1.20.2.1 -r1.20.2.2 *** WP6ExtendedDocumentSummaryPacket.cpp 10 Nov 2005 12:57:17 -0000 1.20.2.1 --- WP6ExtendedDocumentSummaryPacket.cpp 1 Dec 2005 14:55:31 -0000 1.20.2.2 *************** *** 51,55 **** void WP6ExtendedDocumentSummaryPacket::parse(WP6Listener *listener) const { - int k=0; uint16_t groupLength = 0; --- 51,54 ---- *************** *** 58,62 **** groupLength = readU16(m_stream); uint16_t tagID = readU16(m_stream); ! uint16_t flags = readU16(m_stream); WPXString name; --- 57,61 ---- groupLength = readU16(m_stream); uint16_t tagID = readU16(m_stream); ! m_stream->seek(2, WPX_SEEK_CUR); WPXString name; Index: WPXListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WPXListener.h,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -C2 -d -r1.1.2.7 -r1.1.2.8 *** WPXListener.h 29 Nov 2005 10:18:37 -0000 1.1.2.7 --- WPXListener.h 1 Dec 2005 14:55:31 -0000 1.1.2.8 *************** *** 67,78 **** ~_WPXParsingState(); - #if 0 - WPXString m_bodyText; - WPXString m_textBeforeNumber; - WPXString m_textBeforeDisplayReference; - WPXString m_numberText; - WPXString m_textAfterDisplayReference; - WPXString m_textAfterNumber; - #endif uint32_t m_textAttributeBits; float m_fontSize; --- 67,70 ---- *************** *** 144,157 **** uint8_t m_currentListLevel; - #if 0 - stack<int> m_listLevelStack; - uint16_t m_currentOutlineHash; // probably should replace Hash with Key in these sorts of cases - uint8_t m_oldListLevel; - WP6StyleStateSequence m_styleStateSequence; - bool m_putativeListElementHasParagraphNumber; - bool m_putativeListElementHasDisplayReferenceNumber; - - int m_noteTextPID; - #endif uint16_t m_alignmentCharacter; std::vector<WPXTabStop> m_tabStops; --- 136,139 ---- *************** *** 168,172 **** public: WPXListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl); ! ~WPXListener(); virtual void startDocument(); --- 150,154 ---- public: WPXListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl); ! virtual ~WPXListener(); virtual void startDocument(); Index: WP3StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3StylesListener.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 *** WP3StylesListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.3 --- WP3StylesListener.cpp 1 Dec 2005 14:55:31 -0000 1.1.2.4 *************** *** 33,39 **** m_currentPage(new WPXPageSpan()), m_tableList(tableList), - m_currentPageHasContent(false), m_tempMarginLeft(1.0f), ! m_tempMarginRight(1.0f) { } --- 33,39 ---- m_currentPage(new WPXPageSpan()), m_tableList(tableList), m_tempMarginLeft(1.0f), ! m_tempMarginRight(1.0f), ! m_currentPageHasContent(false) { } Index: WP5Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5Listener.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 *** WP5Listener.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.5 --- WP5Listener.cpp 1 Dec 2005 14:55:31 -0000 1.1.2.6 *************** *** 289,293 **** //{ float marginInch = (float)((double)margin/ (double)WPX_NUM_WPUS_PER_INCH); - bool marginChanged = false; switch(side) --- 289,292 ---- Index: WP6FontDescriptorPacket.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6FontDescriptorPacket.cpp,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -C2 -d -r1.22 -r1.22.2.1 *** WP6FontDescriptorPacket.cpp 25 Aug 2005 14:56:03 -0000 1.22 --- WP6FontDescriptorPacket.cpp 1 Dec 2005 14:55:31 -0000 1.22.2.1 *************** *** 125,129 **** for (int stringPosition=(tempLength-1); stringPosition>=0; stringPosition--) { ! int k; for (k=0; k<countElements(FONT_WEIGHT_STRINGS); k++) { --- 125,129 ---- for (int stringPosition=(tempLength-1); stringPosition>=0; stringPosition--) { ! unsigned int k; for (k=0; k<countElements(FONT_WEIGHT_STRINGS); k++) { Index: GSFStream.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/GSFStream.cpp,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** GSFStream.cpp 14 Apr 2005 13:48:05 -0000 1.8 --- GSFStream.cpp 1 Dec 2005 14:55:31 -0000 1.8.4.1 *************** *** 30,35 **** GSFInputStream::GSFInputStream(GsfInput *input) : - m_input(input), WPXInputStream(true), m_ole(NULL) { --- 30,35 ---- GSFInputStream::GSFInputStream(GsfInput *input) : WPXInputStream(true), + m_input(input), m_ole(NULL) { Index: libwpd_internal.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.cpp,v retrieving revision 1.19.2.5 retrieving revision 1.19.2.6 diff -C2 -d -r1.19.2.5 -r1.19.2.6 *** libwpd_internal.cpp 30 Nov 2005 09:27:59 -0000 1.19.2.5 --- libwpd_internal.cpp 1 Dec 2005 14:55:31 -0000 1.19.2.6 *************** *** 506,510 **** *chars = &multinationalWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 506,510 ---- *chars = &multinationalWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 513,517 **** *chars = &phoneticWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 513,517 ---- *chars = &phoneticWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 520,524 **** *chars = &boxdrawingWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 520,524 ---- *chars = &boxdrawingWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 527,531 **** *chars = &typographicWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 527,531 ---- *chars = &typographicWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 534,538 **** *chars = &iconicWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 534,538 ---- *chars = &iconicWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 541,545 **** *chars = &mathWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 541,545 ---- *chars = &mathWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 548,552 **** *chars = &mathextWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 548,552 ---- *chars = &mathextWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 555,559 **** *chars = &greekWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 555,559 ---- *chars = &greekWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 562,566 **** *chars = &hebrewWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 562,566 ---- *chars = &hebrewWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 569,573 **** *chars = &cyrillicWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 569,573 ---- *chars = &cyrillicWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 576,580 **** *chars = &japaneseWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 576,580 ---- *chars = &japaneseWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 587,591 **** } else { ! *chars = &asciiMap[' ']; return 1; } --- 587,591 ---- } else { ! *chars = &asciiMap[32]; return 1; } *************** *** 595,599 **** *chars = &arabicWP6[character]; else ! *chars = &asciiMap[' ']; return 1; --- 595,599 ---- *chars = &arabicWP6[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 602,611 **** *chars = &arabicScriptWP6[character]; else ! *chars = &asciiMap[' ']; return 1; } // last resort: return whitespace ! *chars = &asciiMap[' ']; return 1; } --- 602,611 ---- *chars = &arabicScriptWP6[character]; else ! *chars = &asciiMap[32]; return 1; } // last resort: return whitespace ! *chars = &asciiMap[32]; return 1; } *************** *** 849,853 **** *chars = &international1WP5[character]; else ! *chars = &asciiMap[' ']; return 1; --- 849,853 ---- *chars = &international1WP5[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 856,860 **** *chars = &international2WP5[character]; else ! *chars = &asciiMap[' ']; return 1; --- 856,860 ---- *chars = &international2WP5[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 863,867 **** *chars = &boxdrawingWP5[character]; else ! *chars = &asciiMap[' ']; return 1; --- 863,867 ---- *chars = &boxdrawingWP5[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 870,874 **** *chars = &typographicWP5[character]; else ! *chars = &asciiMap[' ']; return 1; --- 870,874 ---- *chars = &typographicWP5[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 877,881 **** *chars = &iconicWP5[character]; else ! *chars = &asciiMap[' ']; return 1; --- 877,881 ---- *chars = &iconicWP5[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 884,888 **** *chars = &mathWP5[character]; else ! *chars = &asciiMap[' ']; return 1; --- 884,888 ---- *chars = &mathWP5[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 891,895 **** *chars = &mathextWP5[character]; else ! *chars = &asciiMap[' ']; return 1; --- 891,895 ---- *chars = &mathextWP5[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 898,902 **** *chars = &greekWP5[character]; else ! *chars = &asciiMap[' ']; return 1; --- 898,902 ---- *chars = &greekWP5[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 905,909 **** *chars = &hebrewWP5[character]; else ! *chars = &asciiMap[' ']; return 1; --- 905,909 ---- *chars = &hebrewWP5[character]; else ! *chars = &asciiMap[32]; return 1; *************** *** 917,926 **** *chars = &japaneseWP5[character]; else ! *chars = &asciiMap[' ']; return 1; } // last resort: return whitespace ! *chars = &asciiMap[' ']; return 1; } --- 917,926 ---- *chars = &japaneseWP5[character]; else ! *chars = &asciiMap[32]; return 1; } // last resort: return whitespace ! *chars = &asciiMap[32]; return 1; } *************** *** 1036,1040 **** int currentSum = 0; int lastMark = 0; - int currentMark = 0; WPXString::Iter i(buf); for (i.rewind(); i.next();) --- 1036,1039 ---- Index: WP6ContentListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6ContentListener.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 *** WP6ContentListener.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.6 --- WP6ContentListener.cpp 1 Dec 2005 14:55:31 -0000 1.1.2.7 *************** *** 100,105 **** _WP6ParsingState::_WP6ParsingState(WPXTableList tableList, int nextTableIndice) : - m_paragraphMarginBottomAbsolute(0.0f), m_paragraphMarginBottomRelative(1.0f), m_numRemovedParagraphBreaks(0), --- 100,105 ---- _WP6ParsingState::_WP6ParsingState(WPXTableList tableList, int nextTableIndice) : m_paragraphMarginBottomRelative(1.0f), + m_paragraphMarginBottomAbsolute(0.0f), m_numRemovedParagraphBreaks(0), *************** *** 197,201 **** m_parseState->m_leaderCharacter = character; m_parseState->m_leaderNumSpaces = numSpaces; ! for (int i=0; i<m_ps->m_tabStops.size(); i++) { // change the leader information for those tab stops that use pre-WP9 leader method --- 197,201 ---- m_parseState->m_leaderCharacter = character; m_parseState->m_leaderNumSpaces = numSpaces; ! for (unsigned int i=0; i<m_ps->m_tabStops.size(); i++) { // change the leader information for those tab stops that use pre-WP9 leader method *************** *** 603,607 **** { float marginInch = (float)((double)margin/ (double)WPX_NUM_WPUS_PER_INCH); - bool marginChanged = false; switch(side) --- 603,606 ---- *************** *** 739,743 **** const uint8_t *numberingMethods, const uint8_t tabBehaviourFlag) { - WP6OutlineDefinition *tempListDefinition = NULL; WPD_DEBUG_MSG(("WordPerfect: Updating OutlineHash %i\n", outlineHash)); --- 738,741 ---- Index: WPXPageSpan.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXPageSpan.cpp,v retrieving revision 1.13.4.1 retrieving revision 1.13.4.2 diff -C2 -d -r1.13.4.1 -r1.13.4.2 *** WPXPageSpan.cpp 28 Nov 2005 13:00:30 -0000 1.13.4.1 --- WPXPageSpan.cpp 1 Dec 2005 14:55:31 -0000 1.13.4.2 *************** *** 111,116 **** m_marginTop(page.getMarginTop()), m_marginBottom(page.getMarginBottom()), ! m_pageSpan(page.getPageSpan()), ! m_headerFooterList(page.getHeaderFooterList()) { for (int i=0; i<WP6_NUM_HEADER_FOOTER_TYPES; i++) --- 111,116 ---- m_marginTop(page.getMarginTop()), m_marginBottom(page.getMarginBottom()), ! m_headerFooterList(page.getHeaderFooterList()), ! m_pageSpan(page.getPageSpan()) { for (int i=0; i<WP6_NUM_HEADER_FOOTER_TYPES; i++) Index: WPXMemoryStream.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXMemoryStream.cpp,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** WPXMemoryStream.cpp 16 Jan 2005 04:40:09 -0000 1.4 --- WPXMemoryStream.cpp 1 Dec 2005 14:55:31 -0000 1.4.4.1 *************** *** 6,11 **** WPXInputStream(false), m_offset(0), - m_data(data), m_size(size), m_tmpBuf(NULL) { --- 6,11 ---- WPXInputStream(false), m_offset(0), m_size(size), + m_data(data), m_tmpBuf(NULL) { Index: WP3FontGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3FontGroup.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 *** WP3FontGroup.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.5 --- WP3FontGroup.cpp 1 Dec 2005 14:55:31 -0000 1.1.2.6 *************** *** 31,36 **** WP3FontGroup::WP3FontGroup(WPXInputStream *input) : WP3VariableLengthGroup(), ! m_fontSize(0), ! m_fontColor() { _read(input); --- 31,36 ---- WP3FontGroup::WP3FontGroup(WPXInputStream *input) : WP3VariableLengthGroup(), ! m_fontColor(), ! m_fontSize(0) { _read(input); Index: WPXTable.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXTable.cpp,v retrieving revision 1.8.4.1 retrieving revision 1.8.4.2 diff -C2 -d -r1.8.4.1 -r1.8.4.2 *** WPXTable.cpp 23 Nov 2005 07:42:00 -0000 1.8.4.1 --- WPXTable.cpp 1 Dec 2005 14:55:31 -0000 1.8.4.2 *************** *** 136,140 **** std::vector<WPXTableCell *> * WPXTable::_getCellsRightAdjacent(int i, int j) { ! int rightAdjacentCol = j + (*m_tableRows[i])[j]->m_colSpan; std::vector<WPXTableCell *> * cellsRightAdjacent = new std::vector<WPXTableCell *>; --- 136,141 ---- std::vector<WPXTableCell *> * WPXTable::_getCellsRightAdjacent(int i, int j) { ! // int rightAdjacentCol = j + (*m_tableRows[i])[j]->m_colSpan; ! int rightAdjacentCol = j + 1; std::vector<WPXTableCell *> * cellsRightAdjacent = new std::vector<WPXTableCell *>; *************** *** 158,163 **** WPXTableList::WPXTableList() : ! m_refCount(new int), ! m_tableList(new std::vector<WPXTable *>) { (*m_refCount) = 1; --- 159,164 ---- WPXTableList::WPXTableList() : ! m_tableList(new std::vector<WPXTable *>), ! m_refCount(new int) { (*m_refCount) = 1; Index: WP6EOLGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6EOLGroup.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 *** WP6EOLGroup.h 10 Nov 2005 12:57:17 -0000 1.23.4.1 --- WP6EOLGroup.h 1 Dec 2005 14:55:31 -0000 1.23.4.2 *************** *** 38,50 **** private: bool m_useCellAttributes, m_useCellJustification; bool m_ignoreInCalculations, m_cellIsLocked; uint8_t m_cellJustification; WPXVerticalAlignment m_cellVerticalAlign; - uint32_t m_cellAttributes; - uint8_t m_colSpan, m_rowSpan; - bool m_boundFromLeft, m_boundFromAbove; - // cell forground and background color RGBSColor * m_cellFgColor; --- 38,50 ---- private: + uint8_t m_colSpan, m_rowSpan; + bool m_boundFromLeft, m_boundFromAbove; + bool m_useCellAttributes, m_useCellJustification; bool m_ignoreInCalculations, m_cellIsLocked; + uint32_t m_cellAttributes; uint8_t m_cellJustification; WPXVerticalAlignment m_cellVerticalAlign; // cell forground and background color RGBSColor * m_cellFgColor; Index: WP3PageFormatGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3PageFormatGroup.cpp,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.4 diff -C2 -d -r1.4.2.3 -r1.4.2.4 *** WP3PageFormatGroup.cpp 25 Nov 2005 12:42:53 -0000 1.4.2.3 --- WP3PageFormatGroup.cpp 1 Dec 2005 14:55:31 -0000 1.4.2.4 *************** *** 35,41 **** m_leftMargin(0), m_rightMargin(0), m_topMargin(0), m_bottomMargin(0), - m_lineSpacing(1.0f), m_justification(0), m_indent(0) --- 35,41 ---- m_leftMargin(0), m_rightMargin(0), + m_lineSpacing(1.0f), m_topMargin(0), m_bottomMargin(0), m_justification(0), m_indent(0) Index: WP5StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5StylesListener.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 *** WP5StylesListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.2 --- WP5StylesListener.cpp 1 Dec 2005 14:55:31 -0000 1.1.2.3 *************** *** 34,40 **** m_currentPage(new WPXPageSpan()), m_tableList(tableList), - m_currentPageHasContent(false), m_tempMarginLeft(1.0f), ! m_tempMarginRight(1.0f) { } --- 34,40 ---- m_currentPage(new WPXPageSpan()), m_tableList(tableList), m_tempMarginLeft(1.0f), ! m_tempMarginRight(1.0f), ! m_currentPageHasContent(false) { } Index: WP6StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6StylesListener.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 *** WP6StylesListener.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.5 --- WP6StylesListener.cpp 1 Dec 2005 14:55:31 -0000 1.1.2.6 *************** *** 38,44 **** m_currentPage(new WPXPageSpan()), m_tableList(tableList), - m_currentPageHasContent(false), m_tempMarginLeft(1.0f), m_tempMarginRight(1.0f), m_isTableDefined(false) { --- 38,44 ---- m_currentPage(new WPXPageSpan()), m_tableList(tableList), m_tempMarginLeft(1.0f), m_tempMarginRight(1.0f), + m_currentPageHasContent(false), m_isTableDefined(false) { Index: WP5PageFormatGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5PageFormatGroup.cpp,v retrieving revision 1.4.4.2 retrieving revision 1.4.4.3 diff -C2 -d -r1.4.4.2 -r1.4.4.3 *** WP5PageFormatGroup.cpp 10 Nov 2005 12:57:17 -0000 1.4.4.2 --- WP5PageFormatGroup.cpp 1 Dec 2005 14:55:31 -0000 1.4.4.3 *************** *** 33,40 **** m_leftMargin(0), m_rightMargin(0), m_topMargin(0), m_bottomMargin(0), ! m_lineSpacing(1.0f), ! m_justification(0) { _read(input); --- 33,42 ---- m_leftMargin(0), m_rightMargin(0), + m_lineSpacing(1.0f), m_topMargin(0), m_bottomMargin(0), ! m_justification(0), ! m_formLength(0), ! m_formWidth(0) { _read(input); Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.15 retrieving revision 1.1.2.16 diff -C2 -d -r1.1.2.15 -r1.1.2.16 *** WP3Listener.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.15 --- WP3Listener.cpp 1 Dec 2005 14:55:31 -0000 1.1.2.16 *************** *** 352,356 **** { float marginInch = (float)((double)margin/ (double)WPX_NUM_WPUS_PER_INCH); - bool marginChanged = false; switch(side) --- 352,355 ---- Index: WP5DefinitionGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5DefinitionGroup.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 *** WP5DefinitionGroup.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.2 --- WP5DefinitionGroup.cpp 1 Dec 2005 14:55:31 -0000 1.1.2.3 *************** *** 31,37 **** 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 --- 31,37 ---- m_position(0), m_numColumns(0), + m_leftOffset(0), m_leftGutter(0), ! m_rightGutter(0) { // Skip useless old values to read the old column number Index: WP6CharacterGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6CharacterGroup.cpp,v retrieving revision 1.24.2.2 retrieving revision 1.24.2.3 diff -C2 -d -r1.24.2.2 -r1.24.2.3 *** WP6CharacterGroup.cpp 10 Nov 2005 12:57:17 -0000 1.24.2.2 --- WP6CharacterGroup.cpp 1 Dec 2005 14:55:31 -0000 1.24.2.3 *************** *** 33,38 **** WP6CharacterGroup_SetAlignmentCharacterSubGroup::WP6CharacterGroup_SetAlignmentCharacterSubGroup(WPXInputStream *input) : ! m_characterSet(0), ! m_character(0) { uint16_t charWord = readU16(input); --- 33,38 ---- WP6CharacterGroup_SetAlignmentCharacterSubGroup::WP6CharacterGroup_SetAlignmentCharacterSubGroup(WPXInputStream *input) : ! m_character(0), ! m_characterSet(0) { uint16_t charWord = readU16(input); *************** *** 108,113 **** WP6CharacterGroup_SetDotLeaderCharactersSubGroup::WP6CharacterGroup_SetDotLeaderCharactersSubGroup(WPXInputStream *input) : - m_characterSet(0), m_character(0), m_numberOfSpaces(0) { --- 108,113 ---- WP6CharacterGroup_SetDotLeaderCharactersSubGroup::WP6CharacterGroup_SetDotLeaderCharactersSubGroup(WPXInputStream *input) : m_character(0), + m_characterSet(0), m_numberOfSpaces(0) { Index: WP6EOLGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6EOLGroup.cpp,v retrieving revision 1.46.2.3 retrieving revision 1.46.2.4 diff -C2 -d -r1.46.2.3 -r1.46.2.4 *** WP6EOLGroup.cpp 23 Nov 2005 07:42:00 -0000 1.46.2.3 --- WP6EOLGroup.cpp 1 Dec 2005 14:55:31 -0000 1.46.2.4 *************** *** 76,80 **** unsigned int startPosition = input->tell(); sizeDeletableSubFunctionData = readU16(input); ! WPD_DEBUG_MSG(("WordPerfect: EOL Group: Size of Deletable Sub-Function Data: %ld, Size of Deletable and Non-deletable sub-function data: %ld\n", (long) sizeDeletableSubFunctionData, getSizeNonDeletable())); input->seek(sizeDeletableSubFunctionData, WPX_SEEK_CUR); while (input->tell() < (startPosition + getSizeNonDeletable())) --- 76,80 ---- unsigned int startPosition = input->tell(); sizeDeletableSubFunctionData = readU16(input); ! WPD_DEBUG_MSG(("WordPerfect: EOL Group: Size of Deletable Sub-Function Data: %ld, Size of Deletable and Non-deletable sub-function data: %ld\n", (long) sizeDeletableSubFunctionData, (long) getSizeNonDeletable())); input->seek(sizeDeletableSubFunctionData, WPX_SEEK_CUR); while (input->tell() < (startPosition + getSizeNonDeletable())) *************** *** 167,171 **** numCellsSpannedVertically = readU8(input); WPD_DEBUG_MSG(("WordPerfect: num cells spanned (h:%ld, v:%ld)\n", ! numCellsSpannedHorizontally, numCellsSpannedVertically)); if (numCellsSpannedHorizontally >= 128) m_boundFromLeft = true; --- 167,171 ---- numCellsSpannedVertically = readU8(input); WPD_DEBUG_MSG(("WordPerfect: num cells spanned (h:%ld, v:%ld)\n", ! (long) numCellsSpannedHorizontally, (long) numCellsSpannedVertically)); if (numCellsSpannedHorizontally >= 128) m_boundFromLeft = true; |
From: Fridrich S. <str...@us...> - 2005-12-01 14:55:39
|
Update of /cvsroot/libwpd/libwpd2/src/conv/raw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8655/src/conv/raw Modified Files: Tag: fs_refactoring2 RawListener.h Log Message: Remove some unnecessary warnings when building with -Wall. Make sure that sections are never closed/opened inside tables + some small cleanup Index: RawListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/raw/RawListener.h,v retrieving revision 1.42 retrieving revision 1.42.4.1 diff -C2 -d -r1.42 -r1.42.4.1 *** RawListener.h 7 Feb 2005 00:06:24 -0000 1.42 --- RawListener.h 1 Dec 2005 14:55:31 -0000 1.42.4.1 *************** *** 52,56 **** public: RawListenerImpl(bool printCallgraphScore); ! ~RawListenerImpl(); virtual void setDocumentMetaData(const WPXPropertyList &propList); --- 52,56 ---- public: RawListenerImpl(bool printCallgraphScore); ! virtual ~RawListenerImpl(); virtual void setDocumentMetaData(const WPXPropertyList &propList); |
From: Fridrich S. <str...@us...> - 2005-12-01 11:01:40
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13776/src/lib Modified Files: Tag: fs_refactoring2 WPXHLListenerImpl.h Log Message: Complement the documentation Index: WPXHLListenerImpl.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXHLListenerImpl.h,v retrieving revision 1.65 retrieving revision 1.65.4.1 diff -C2 -d -r1.65 -r1.65.4.1 *** WPXHLListenerImpl.h 8 Feb 2005 18:20:23 -0000 1.65 --- WPXHLListenerImpl.h 1 Dec 2005 11:01:27 -0000 1.65.4.1 *************** *** 184,187 **** --- 184,188 ---- \li \c style:num-suffix Text that comes after the number in the list \li \c text:start-value The starting number of the list + \li \c text:min-label-width The distance between the list label and the actual text, stored in inches \li \c text:space-before The indentation level of the lists, stored in inches */ *************** *** 193,196 **** --- 194,198 ---- \li \c libwpd:level The level of the list in the hierarchy \li \c text:bullet-char The string that should be used as a bullet + \li \c text:min-label-width The distance between the bullet and the actual text, stored in inches \li \c text:space-before The indentation level of the lists, stored in inches */ |
From: Fridrich S. <str...@us...> - 2005-12-01 09:07:04
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23183/src/lib Modified Files: Tag: fs_refactoring2 WP42Listener.cpp WP42Listener.h WPXString.cpp makefile.mk Log Message: Further cleaning in view of merger into head Index: makefile.mk =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/makefile.mk,v retrieving revision 1.6.4.4 retrieving revision 1.6.4.5 diff -C2 -d -r1.6.4.4 -r1.6.4.5 *** makefile.mk 25 Nov 2005 12:42:53 -0000 1.6.4.4 --- makefile.mk 1 Dec 2005 09:06:55 -0000 1.6.4.5 *************** *** 18,118 **** SLOFILES= \ ! $(SLO)$/libwpd_internal.obj \ ! $(SLO)$/libwpd_math.obj \ ! $(SLO)$/WP3AttributeGroup.obj \ ! $(SLO)$/WP3DefinitionGroup.obj \ ! $(SLO)$/WP3DisplayGroup.obj \ ! $(SLO)$/WP3EndOfLinePageGroup.obj \ ! $(SLO)$/WP3ExtendedCharacterGroup.obj \ ! $(SLO)$/WP3FileStructure.obj \ ! $(SLO)$/WP3FixedLengthGroup.obj \ ! $(SLO)$/WP3FontGroup.obj \ ! $(SLO)$/WP3FootnoteEndnoteGroup \ ! $(SLO)$/WP3Header.obj \ ! $(SLO)$/WP3Listener.obj \ ! $(SLO)$/WP3MiscellaneousGroup.obj \ ! $(SLO)$/WP3PageFormatGroup.obj \ ! $(SLO)$/WP3Parser.obj \ ! $(SLO)$/WP3Part.obj \ ! $(SLO)$/WP3SingleByteFunction.obj \ ! $(SLO)$/WP3StylesListener.obj \ ! $(SLO)$/WP3UndoGroup.obj \ ! $(SLO)$/WP3UnsupportedFixedLengthGroup.obj \ ! $(SLO)$/WP3UnsupportedVariableLengthGroup.obj \ ! $(SLO)$/WP3VariableLengthGroup.obj \ ! $(SLO)$/WP42FileStructure.obj \ ! $(SLO)$/WP42Heuristics.obj \ ! $(SLO)$/WP42Listener.obj \ ! $(SLO)$/WP42Parser.obj \ ! $(SLO)$/WP42Part.obj \ ! $(SLO)$/WP42StylesListener.obj \ ! $(SLO)$/WP42UnsupportedVariableLengthGroup.obj \ ! $(SLO)$/WP42VariableLengthGroup.obj \ ! $(SLO)$/WP5AttributeGroup.obj \ ! $(SLO)$/WP5DefinitionGroup.obj \ ! $(SLO)$/WP5ExtendedCharacterGroup.obj \ ! $(SLO)$/WP5FileStructure.obj \ ! $(SLO)$/WP5FixedLengthGroup.obj \ ! $(SLO)$/WP5FormatGroup.obj \ ! $(SLO)$/WP5Header.obj \ ! $(SLO)$/WP5Listener.obj \ ! $(SLO)$/WP5PageFormatGroup.obj \ ! $(SLO)$/WP5Parser.obj \ ! $(SLO)$/WP5Part.obj \ ! $(SLO)$/WP5SingleByteFunction.obj \ ! $(SLO)$/WP5StylesListener.obj \ ! $(SLO)$/WP5TableEOLGroup.obj \ ! $(SLO)$/WP5TableEOPGroup.obj \ ! $(SLO)$/WP5UnsupportedFixedLengthGroup.obj \ ! $(SLO)$/WP5UnsupportedVariableLengthGroup.obj \ ! $(SLO)$/WP5VariableLengthGroup.obj \ ! $(SLO)$/WP60Header.obj \ ! $(SLO)$/WP61Header.obj \ ! $(SLO)$/WP6AttributeGroup.obj \ ! $(SLO)$/WP6CharacterGroup.obj \ ! $(SLO)$/WP6ColumnGroup.obj \ ! $(SLO)$/WP6ContentListener.obj \ ! $(SLO)$/WP6DefaultInitialFontPacket.obj \ ! $(SLO)$/WP6DisplayNumberReferenceGroup.obj \ ! $(SLO)$/WP6EOLGroup.obj \ ! $(SLO)$/WP6ExtendedCharacterGroup.obj \ ! $(SLO)$/WP6ExtendedDocumentSummaryPacket.obj \ ! $(SLO)$/WP6FileStructure.obj \ ! $(SLO)$/WP6FillStylePacket.obj \ ! $(SLO)$/WP6FixedLengthGroup.obj \ ! $(SLO)$/WP6FontDescriptorPacket.obj \ ! $(SLO)$/WP6FootnoteEndnoteGroup.obj \ ! $(SLO)$/WP6GeneralTextPacket.obj \ ! $(SLO)$/WP6Header.obj \ ! $(SLO)$/WP6HeaderFooterGroup.obj \ ! $(SLO)$/WP6HighlightGroup.obj \ ! $(SLO)$/WP6Listener.obj \ ! $(SLO)$/WP6OutlineStylePacket.obj \ ! $(SLO)$/WP6PageGroup.obj \ ! $(SLO)$/WP6ParagraphGroup.obj \ ! $(SLO)$/WP6Parser.obj \ ! $(SLO)$/WP6Part.obj \ ! $(SLO)$/WP6PrefixData.obj \ ! $(SLO)$/WP6PrefixDataPacket.obj \ ! $(SLO)$/WP6PrefixIndice.obj \ ! $(SLO)$/WP6SingleByteFunction.obj \ ! $(SLO)$/WP6StyleGroup.obj \ ! $(SLO)$/WP6StylesListener.obj \ ! $(SLO)$/WP6TabGroup.obj \ ! $(SLO)$/WP6UndoGroup.obj \ ! $(SLO)$/WP6UnsupportedFixedLengthGroup.obj \ ! $(SLO)$/WP6UnsupportedVariableLengthGroup.obj \ ! $(SLO)$/WP6VariableLengthGroup.obj \ ! $(SLO)$/WPDocument.obj \ ! $(SLO)$/WPXHeader.obj \ ! $(SLO)$/WPXListener.obj \ ! $(SLO)$/WPXMemoryStream.obj \ ! $(SLO)$/WPXPageSpan.obj \ ! $(SLO)$/WPXParser.obj \ ! $(SLO)$/WPXPart.obj \ ! $(SLO)$/WPXProperty.obj \ ! $(SLO)$/WPXPropertyList.obj \ ! $(SLO)$/WPXPropertyListVector.obj \ ! $(SLO)$/WPXString.obj \ $(SLO)$/WPXTable.obj --- 18,122 ---- SLOFILES= \ ! $(SLO)$/libwpd_internal.obj \ ! $(SLO)$/libwpd_math.obj \ ! $(SLO)$/WP3AttributeGroup.obj \ ! $(SLO)$/WP3DefinitionGroup.obj \ ! $(SLO)$/WP3DisplayGroup.obj \ ! $(SLO)$/WP3EndOfLinePageGroup.obj \ ! $(SLO)$/WP3ExtendedCharacterGroup.obj \ ! $(SLO)$/WP3FileStructure.obj \ ! $(SLO)$/WP3FixedLengthGroup.obj \ ! $(SLO)$/WP3FontGroup.obj \ ! $(SLO)$/WP3FootnoteEndnoteGroup.obj \ ! $(SLO)$/WP3Header.obj \ ! $(SLO)$/WP3Listener.obj \ ! $(SLO)$/WP3MiscellaneousGroup.obj \ ! $(SLO)$/WP3PageFormatGroup.obj \ ! $(SLO)$/WP3Parser.obj \ ! $(SLO)$/WP3Part.obj \ ! $(SLO)$/WP3SingleByteFunction.obj \ ! $(SLO)$/WP3StylesListener.obj \ ! $(SLO)$/WP3SubDocument.obj \ ! $(SLO)$/WP3TablesGroup.obj \ ! $(SLO)$/WP3UndoGroup.obj \ ! $(SLO)$/WP3UnsupportedFixedLengthGroup.obj \ ! $(SLO)$/WP3UnsupportedVariableLengthGroup.obj \ ! $(SLO)$/WP3VariableLengthGroup.obj \ ! $(SLO)$/WP42FileStructure.obj \ ! $(SLO)$/WP42Heuristics.obj \ ! $(SLO)$/WP42Listener.obj \ ! $(SLO)$/WP42Parser.obj \ ! $(SLO)$/WP42Part.obj \ ! $(SLO)$/WP42StylesListener.obj \ ! $(SLO)$/WP42UnsupportedVariableLengthGroup.obj \ ! $(SLO)$/WP42VariableLengthGroup.obj \ ! $(SLO)$/WP5AttributeGroup.obj \ ! $(SLO)$/WP5DefinitionGroup.obj \ ! $(SLO)$/WP5ExtendedCharacterGroup.obj \ ! $(SLO)$/WP5FileStructure.obj \ ! $(SLO)$/WP5FixedLengthGroup.obj \ ! $(SLO)$/WP5FormatGroup.obj \ ! $(SLO)$/WP5Header.obj \ ! $(SLO)$/WP5Listener.obj \ ! $(SLO)$/WP5PageFormatGroup.obj \ ! $(SLO)$/WP5Parser.obj \ ! $(SLO)$/WP5Part.obj \ ! $(SLO)$/WP5SingleByteFunction.obj \ ! $(SLO)$/WP5StylesListener.obj \ ! $(SLO)$/WP5TableEOLGroup.obj \ ! $(SLO)$/WP5TableEOPGroup.obj \ ! $(SLO)$/WP5UnsupportedFixedLengthGroup.obj \ ! $(SLO)$/WP5UnsupportedVariableLengthGroup.obj \ ! $(SLO)$/WP5VariableLengthGroup.obj \ ! $(SLO)$/WP60Header.obj \ ! $(SLO)$/WP61Header.obj \ ! $(SLO)$/WP6AttributeGroup.obj \ ! $(SLO)$/WP6CharacterGroup.obj \ ! $(SLO)$/WP6ColumnGroup.obj \ ! $(SLO)$/WP6ContentListener.obj \ ! $(SLO)$/WP6DefaultInitialFontPacket.obj \ ! $(SLO)$/WP6DisplayNumberReferenceGroup.obj \ ! $(SLO)$/WP6EOLGroup.obj \ ! $(SLO)$/WP6ExtendedCharacterGroup.obj \ ! $(SLO)$/WP6ExtendedDocumentSummaryPacket.obj \ ! $(SLO)$/WP6FileStructure.obj \ ! $(SLO)$/WP6FillStylePacket.obj \ ! $(SLO)$/WP6FixedLengthGroup.obj \ ! $(SLO)$/WP6FontDescriptorPacket.obj \ ! $(SLO)$/WP6FootnoteEndnoteGroup.obj \ ! $(SLO)$/WP6GeneralTextPacket.obj \ ! $(SLO)$/WP6Header.obj \ ! $(SLO)$/WP6HeaderFooterGroup.obj \ ! $(SLO)$/WP6HighlightGroup.obj \ ! $(SLO)$/WP6Listener.obj \ ! $(SLO)$/WP6OutlineStylePacket.obj \ ! $(SLO)$/WP6PageGroup.obj \ ! $(SLO)$/WP6ParagraphGroup.obj \ ! $(SLO)$/WP6Parser.obj \ ! $(SLO)$/WP6Part.obj \ ! $(SLO)$/WP6PrefixData.obj \ ! $(SLO)$/WP6PrefixDataPacket.obj \ ! $(SLO)$/WP6PrefixIndice.obj \ ! $(SLO)$/WP6SingleByteFunction.obj \ ! $(SLO)$/WP6StyleGroup.obj \ ! $(SLO)$/WP6StylesListener.obj \ ! $(SLO)$/WP6SubDocument.obj \ ! $(SLO)$/WP6TabGroup.obj \ ! $(SLO)$/WP6UndoGroup.obj \ ! $(SLO)$/WP6UnsupportedFixedLengthGroup.obj \ ! $(SLO)$/WP6UnsupportedVariableLengthGroup.obj \ ! $(SLO)$/WP6VariableLengthGroup.obj \ ! $(SLO)$/WPDocument.obj \ ! $(SLO)$/WPXHeader.obj \ ! $(SLO)$/WPXListener.obj \ ! $(SLO)$/WPXMemoryStream.obj \ ! $(SLO)$/WPXPageSpan.obj \ ! $(SLO)$/WPXParser.obj \ ! $(SLO)$/WPXPart.obj \ ! $(SLO)$/WPXProperty.obj \ ! $(SLO)$/WPXPropertyList.obj \ ! $(SLO)$/WPXPropertyListVector.obj \ ! $(SLO)$/WPXString.obj \ ! $(SLO)$/WPXSubDocument.obj \ $(SLO)$/WPXTable.obj Index: WP42Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP42Listener.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 *** WP42Listener.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP42Listener.cpp 1 Dec 2005 09:06:55 -0000 1.1.2.2 *************** *** 29,38 **** #include "libwpd_internal.h" ! WP42Listener::WP42Listener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl) : ! WPXListener(pageList, listenerImpl) { m_textBuffer.clear(); } /**************************************** public 'HLListenerImpl' functions --- 29,55 ---- #include "libwpd_internal.h" ! _WP42ParsingState::_WP42ParsingState() ! { ! m_textBuffer.clear(); ! } ! ! _WP42ParsingState::~_WP42ParsingState() { m_textBuffer.clear(); } + + WP42Listener::WP42Listener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl) : + WPXListener(pageList, listenerImpl), + m_parseState(new WP42ParsingState) + { + } + + WP42Listener::~WP42Listener() + { + delete m_parseState; + } + + /**************************************** public 'HLListenerImpl' functions *************** *** 43,47 **** if (m_ps->m_isSpanOpened) _openSpan(); ! appendUCS4(m_textBuffer, (uint32_t)character); } --- 60,64 ---- if (m_ps->m_isSpanOpened) _openSpan(); ! appendUCS4(m_parseState->m_textBuffer, (uint32_t)character); } *************** *** 139,144 **** void WP42Listener::_flushText() { ! if (m_textBuffer.len()) ! m_listenerImpl->insertText(m_textBuffer); ! m_textBuffer.clear(); } --- 156,161 ---- void WP42Listener::_flushText() { ! if (m_parseState->m_textBuffer.len()) ! m_listenerImpl->insertText(m_parseState->m_textBuffer); ! m_parseState->m_textBuffer.clear(); } Index: WPXString.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXString.cpp,v retrieving revision 1.5.4.1 retrieving revision 1.5.4.2 diff -C2 -d -r1.5.4.1 -r1.5.4.2 *** WPXString.cpp 30 Nov 2005 11:56:27 -0000 1.5.4.1 --- WPXString.cpp 1 Dec 2005 09:06:55 -0000 1.5.4.2 *************** *** 208,212 **** m_curChar(NULL) { ! m_buf = static_cast<void *>(new std::string(*static_cast<std::string*>(str.m_buf))); } --- 208,212 ---- m_curChar(NULL) { ! m_buf = static_cast<void *>(new std::string(str.cstr())); } Index: WP42Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP42Listener.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 *** WP42Listener.h 29 Nov 2005 10:18:37 -0000 1.1.2.4 --- WP42Listener.h 1 Dec 2005 09:06:55 -0000 1.1.2.5 *************** *** 30,37 **** --- 30,46 ---- #include "WPXHLListenerImpl.h" + typedef struct _WP42ParsingState WP42ParsingState; + struct _WP42ParsingState + { + _WP42ParsingState(); + ~_WP42ParsingState(); + WPXString m_textBuffer; + }; + class WP42Listener : public WPXListener { public: WP42Listener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl); + virtual ~WP42Listener(); virtual void setAlignmentCharacter(const uint16_t character) {}; *************** *** 74,78 **** void _changeList() {}; ! WPXString m_textBuffer; }; --- 83,87 ---- void _changeList() {}; ! WP42ParsingState *m_parseState; }; |
From: Fridrich S. <str...@us...> - 2005-11-30 11:56:34
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31395/src/lib Modified Files: Tag: fs_refactoring2 WPXString.cpp WPXString.h Log Message: Assignment operator in WPXString class + some modifications in WPXString implementation (trying to use as much as possible the std::string functions and operators Index: WPXString.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXString.h,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** WPXString.h 9 Feb 2005 21:52:26 -0000 1.4 --- WPXString.h 30 Nov 2005 11:56:27 -0000 1.4.4.1 *************** *** 44,47 **** --- 44,48 ---- void append(const char c); void clear(); + WPXString& operator=(const WPXString &); bool operator==(const char *); bool operator==(const WPXString &str); Index: WPXString.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXString.cpp,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** WPXString.cpp 14 Apr 2005 13:48:05 -0000 1.5 --- WPXString.cpp 30 Nov 2005 11:56:27 -0000 1.5.4.1 *************** *** 29,33 **** #include <string> #include <stdarg.h> ! #include <string.h> #include <stdio.h> --- 29,33 ---- #include <string> #include <stdarg.h> ! //#include <string.h> #include <stdio.h> *************** *** 66,80 **** WPXString::WPXString(const WPXString &stringBuf) { ! m_buf = static_cast<void *>(new std::string()); ! append(stringBuf); } WPXString::WPXString(const WPXString &stringBuf, bool escapeXML) { - m_buf = static_cast<void *>(new std::string()); if (escapeXML) { ! int len = strlen(stringBuf.cstr()); // want to use standard strlen const char *p = stringBuf.cstr(); const char *end = p + len; --- 66,79 ---- WPXString::WPXString(const WPXString &stringBuf) { ! m_buf = static_cast<void *>(new std::string(*static_cast<std::string*>(stringBuf.m_buf))); } WPXString::WPXString(const WPXString &stringBuf, bool escapeXML) { if (escapeXML) { ! m_buf = static_cast<void *>(new std::string()); ! int len = static_cast<std::string*>(stringBuf.m_buf)->length(); // strlen(stringBuf.cstr()); // want to use standard strlen const char *p = stringBuf.cstr(); const char *end = p + len; *************** *** 113,117 **** } else ! append(stringBuf); } --- 112,116 ---- } else ! m_buf = static_cast<void *>(new std::string(*static_cast<std::string*>(stringBuf.m_buf))); } *************** *** 165,169 **** void WPXString::append(const WPXString &s) { ! static_cast<std::string *>(m_buf)->append(s.cstr()); } --- 164,168 ---- void WPXString::append(const WPXString &s) { ! static_cast<std::string *>(m_buf)->append(*static_cast<std::string*>(s.m_buf)); } *************** *** 188,205 **** } ! bool WPXString::operator==(const char *str) { ! if (strcmp(str, cstr()) == 0) ! return true; ! return false; } bool WPXString::operator==(const WPXString &str) { ! if (strcmp(str.cstr(), cstr()) == 0) ! return true; ! ! return false; } --- 187,205 ---- } ! WPXString& WPXString::operator=(const WPXString &stringBuf) { ! delete static_cast<std::string*>(m_buf); ! m_buf = static_cast<void *>(new std::string(*static_cast<std::string*>(stringBuf.m_buf))); ! return *this; ! } ! bool WPXString::operator==(const char *str) ! { ! return (*static_cast<std::string*>(m_buf) == str); } bool WPXString::operator==(const WPXString &str) { ! return (*static_cast<std::string*>(m_buf) == *static_cast<std::string*>(str.m_buf)); } *************** *** 208,212 **** m_curChar(NULL) { ! m_buf = static_cast<void *>(new std::string(str.cstr())); } --- 208,212 ---- m_curChar(NULL) { ! m_buf = static_cast<void *>(new std::string(*static_cast<std::string*>(str.m_buf))); } |
From: Fridrich S. <str...@us...> - 2005-11-30 09:28:10
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31405/src/lib Modified Files: Tag: fs_refactoring2 WP3DefinitionGroup.cpp WP3DisplayGroup.cpp WP3FontGroup.cpp WP3Listener.cpp WP3Listener.h WP5Listener.cpp WP5Listener.h WP6ContentListener.cpp WP6StylesListener.cpp libwpd_internal.cpp Log Message: General code cleanup; Removing unnecessary casts; portability work (msvc6's std::string does not have push_back() member Index: WP5Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5Listener.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 *** WP5Listener.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.4 --- WP5Listener.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.5 *************** *** 32,39 **** --- 32,41 ---- _WP5ParsingState::_WP5ParsingState() { + m_textBuffer.clear(); } _WP5ParsingState::~_WP5ParsingState() { + m_textBuffer.clear(); } *************** *** 42,46 **** m_parseState(new WP5ParsingState) { - m_textBuffer.clear(); } --- 44,47 ---- *************** *** 59,63 **** if (!m_ps->m_isSpanOpened) _openSpan(); ! appendUCS4(m_textBuffer, (uint32_t)character); } --- 60,64 ---- if (!m_ps->m_isSpanOpened) _openSpan(); ! appendUCS4(m_parseState->m_textBuffer, (uint32_t)character); } *************** *** 316,322 **** void WP5Listener::_flushText() { ! if (m_textBuffer.len()) ! m_listenerImpl->insertText(m_textBuffer); ! m_textBuffer.clear(); } --- 317,323 ---- void WP5Listener::_flushText() { ! if (m_parseState->m_textBuffer.len()) ! m_listenerImpl->insertText(m_parseState->m_textBuffer); ! m_parseState->m_textBuffer.clear(); } Index: WP6StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6StylesListener.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 *** WP6StylesListener.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.4 --- WP6StylesListener.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.5 *************** *** 144,149 **** WPXTableList tableList; m_currentPage->setHeaderFooter(headerFooterType, occurenceBits, ! static_cast<WPXSubDocument *>(textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), tableList); ! _handleSubDocument(static_cast<WPXSubDocument *>(textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), true, tableList); } m_currentPageHasContent = tempCurrentPageHasContent; --- 144,149 ---- WPXTableList tableList; m_currentPage->setHeaderFooter(headerFooterType, occurenceBits, ! (textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), tableList); ! _handleSubDocument((textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), true, tableList); } m_currentPageHasContent = tempCurrentPageHasContent; *************** *** 224,228 **** { m_currentPageHasContent = true; ! _handleSubDocument(static_cast<WPXSubDocument *>(textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), false, m_tableList); } } --- 224,228 ---- { m_currentPageHasContent = true; ! _handleSubDocument((textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), false, m_tableList); } } Index: WP3FontGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3FontGroup.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 *** WP3FontGroup.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.4 --- WP3FontGroup.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.5 *************** *** 45,50 **** // this group can contain different kinds of data, thus we need to read // the contents accordingly - uint8_t tmpFontNameLength; - uint8_t i; switch (getSubGroup()) { --- 45,48 ---- Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.14 retrieving revision 1.1.2.15 diff -C2 -d -r1.1.2.14 -r1.1.2.15 *** WP3Listener.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.14 --- WP3Listener.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.15 *************** *** 36,41 **** { m_textBuffer.clear(); ! m_footNoteReference.clear(); ! m_endNoteReference.clear(); } --- 36,40 ---- { m_textBuffer.clear(); ! m_noteReference.clear(); } *************** *** 43,48 **** { m_textBuffer.clear(); ! m_footNoteReference.clear(); ! m_endNoteReference.clear(); DELETEP(m_cellFillColor); } --- 42,46 ---- { m_textBuffer.clear(); ! m_noteReference.clear(); DELETEP(m_cellFillColor); } *************** *** 512,523 **** } ! void WP3Listener::insertNoteReference(const WPXNoteType noteType, const std::string noteReference) { ! if (!isUndoOn() && (m_ps->m_inSubDocument)) { ! if (noteType == FOOTNOTE) ! m_parseState->m_footNoteReference.sprintf("%s", noteReference.c_str()); ! else ! m_parseState->m_footNoteReference.sprintf("%s", noteReference.c_str()); } } --- 510,518 ---- } ! void WP3Listener::insertNoteReference(const std::string noteReference) { ! if (!isUndoOn()) { ! m_parseState->m_noteReference.sprintf("%s", noteReference.c_str()); } } *************** *** 528,544 **** { m_ps->m_isNote = true; ! int number; ! if (noteType == FOOTNOTE) ! { ! WPXNumberingType numberingType = _extractWPXNumberingTypeFromBuf(m_parseState->m_footNoteReference, ARABIC); ! number = _extractDisplayReferenceNumberFromBuf(m_parseState->m_footNoteReference, numberingType); ! m_parseState->m_footNoteReference.clear(); ! } ! else ! { ! WPXNumberingType numberingType = _extractWPXNumberingTypeFromBuf(m_parseState->m_endNoteReference, ARABIC); ! number = _extractDisplayReferenceNumberFromBuf(m_parseState->m_endNoteReference, numberingType); ! m_parseState->m_endNoteReference.clear(); ! } WPXPropertyList propList; --- 523,529 ---- { m_ps->m_isNote = true; ! WPXNumberingType numberingType = _extractWPXNumberingTypeFromBuf(m_parseState->m_noteReference, ARABIC); ! int number = _extractDisplayReferenceNumberFromBuf(m_parseState->m_noteReference, numberingType); ! m_parseState->m_noteReference.clear(); WPXPropertyList propList; Index: WP6ContentListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6ContentListener.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 *** WP6ContentListener.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.5 --- WP6ContentListener.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.6 *************** *** 943,947 **** uint16_t textPID = m_parseState->m_noteTextPID; ! handleSubDocument(static_cast<WPXSubDocument *>(textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), false, m_parseState->m_tableList, m_parseState->m_nextTableIndice); --- 943,947 ---- uint16_t textPID = m_parseState->m_noteTextPID; ! handleSubDocument((textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), false, m_parseState->m_tableList, m_parseState->m_nextTableIndice); Index: WP5Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5Listener.h,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** WP5Listener.h 29 Nov 2005 10:18:37 -0000 1.1.2.5 --- WP5Listener.h 30 Nov 2005 09:27:59 -0000 1.1.2.6 *************** *** 35,38 **** --- 35,39 ---- _WP5ParsingState(); ~_WP5ParsingState(); + WPXString m_textBuffer; }; *************** *** 81,86 **** void _changeList() {}; - WPXString m_textBuffer; - WP5ParsingState *m_parseState; }; --- 82,85 ---- Index: WP3DefinitionGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3DefinitionGroup.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 *** WP3DefinitionGroup.cpp 25 Nov 2005 12:42:53 -0000 1.1.2.2 --- WP3DefinitionGroup.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.3 *************** *** 45,49 **** // this group can contain different kinds of data, thus we need to read // the contents accordingly - uint8_t tmpFontNameLength; switch (getSubGroup()) { --- 45,48 ---- Index: libwpd_internal.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.cpp,v retrieving revision 1.19.2.4 retrieving revision 1.19.2.5 diff -C2 -d -r1.19.2.4 -r1.19.2.5 *** libwpd_internal.cpp 29 Nov 2005 10:18:37 -0000 1.19.2.4 --- libwpd_internal.cpp 30 Nov 2005 09:27:59 -0000 1.19.2.5 *************** *** 80,84 **** std::string tmpString; for (int i=0; i<pascalStringLength; i++) ! tmpString.push_back((char)readU8(input)); return tmpString; } --- 80,84 ---- std::string tmpString; for (int i=0; i<pascalStringLength; i++) ! tmpString+=(char)readU8(input); return tmpString; } Index: WP3DisplayGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3DisplayGroup.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 *** WP3DisplayGroup.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.3 --- WP3DisplayGroup.cpp 30 Nov 2005 09:27:59 -0000 1.1.2.4 *************** *** 52,59 **** { case WP3_DISPLAY_GROUP_INSERT_FOOTNOTE_NUMBER: - listener->insertNoteReference(FOOTNOTE, m_noteReference); - break; case WP3_DISPLAY_GROUP_INSERT_ENDNOTE_NUMBER: ! listener->insertNoteReference(ENDNOTE, m_noteReference); break; default: // something else we don't support, since it isn't in the docs --- 52,57 ---- { case WP3_DISPLAY_GROUP_INSERT_FOOTNOTE_NUMBER: case WP3_DISPLAY_GROUP_INSERT_ENDNOTE_NUMBER: ! listener->insertNoteReference(m_noteReference); break; default: // something else we don't support, since it isn't in the docs Index: WP3Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.h,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -C2 -d -r1.1.2.11 -r1.1.2.12 *** WP3Listener.h 29 Nov 2005 10:18:37 -0000 1.1.2.11 --- WP3Listener.h 30 Nov 2005 09:27:59 -0000 1.1.2.12 *************** *** 40,45 **** WPXString m_textBuffer; RGBSColor * m_cellFillColor; ! WPXString m_footNoteReference; ! WPXString m_endNoteReference; WPXTableList m_tableList; --- 40,44 ---- WPXString m_textBuffer; RGBSColor * m_cellFillColor; ! WPXString m_noteReference; WPXTableList m_tableList; *************** *** 89,93 **** virtual void setTextFont(const std::string fontName); virtual void setFontSize(const uint16_t fontSize); ! virtual void insertNoteReference(const WPXNoteType noteType, const std::string noteReference); virtual void insertNote(const WPXNoteType noteType, const WP3SubDocument *subDocument); --- 88,92 ---- virtual void setTextFont(const std::string fontName); virtual void setFontSize(const uint16_t fontSize); ! virtual void insertNoteReference(const std::string noteReference); virtual void insertNote(const WPXNoteType noteType, const WP3SubDocument *subDocument); |
From: Fridrich S. <str...@us...> - 2005-11-29 18:52:50
|
Update of /cvsroot/libwpd/libwpd2/build/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26027 Modified Files: Tag: fs_refactoring2 libwpd.dsp Log Message: This win32 part did not work before Index: libwpd.dsp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/build/win32/libwpd.dsp,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** libwpd.dsp 8 Feb 2005 16:02:48 -0000 1.8 --- libwpd.dsp 29 Nov 2005 18:52:42 -0000 1.8.4.1 *************** *** 98,101 **** --- 98,109 ---- # Begin Source File + SOURCE=..\..\src\lib\WP3DefinitionGroup.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3DisplayGroup.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP3EndOfLinePageGroup.cpp # End Source File *************** *** 114,126 **** # Begin Source File ! SOURCE=..\..\src\lib\WP3Header.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3HLListener.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3HLStylesListener.cpp # End Source File # Begin Source File --- 122,138 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP3FontGroup.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3FootnoteEndnoteGroup.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3Header.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP3Listener.cpp # End Source File # Begin Source File *************** *** 146,149 **** --- 158,173 ---- # Begin Source File + SOURCE=..\..\src\lib\WP3StylesListener.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3SubDocument.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3TablesGroup.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP3UndoGroup.cpp # End Source File *************** *** 170,186 **** # Begin Source File ! SOURCE=..\..\src\lib\WP42HLListener.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42HLStylesListener.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Parser.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Part.cpp # End Source File # Begin Source File --- 194,210 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP42Listener.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Parser.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Part.cpp # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42StylesListener.cpp # End Source File # Begin Source File *************** *** 198,201 **** --- 222,229 ---- # Begin Source File + SOURCE=..\..\src\lib\WP5DefinitionGroup.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP5ExtendedCharacterGroup.cpp # End Source File *************** *** 218,226 **** # Begin Source File ! SOURCE=..\..\src\lib\WP5HLListener.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP5HLStylesListener.cpp # End Source File # Begin Source File --- 246,250 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP5Listener.cpp # End Source File # Begin Source File *************** *** 242,245 **** --- 266,281 ---- # Begin Source File + SOURCE=..\..\src\lib\WP5StylesListener.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP5TableEOLGroup.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP5TableEOPGroup.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP5UnsupportedFixedLengthGroup.cpp # End Source File *************** *** 274,277 **** --- 310,317 ---- # Begin Source File + SOURCE=..\..\src\lib\WP6ContentListener.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP6DefaultInitialFontPacket.cpp # End Source File *************** *** 330,346 **** # Begin Source File ! SOURCE=..\..\src\lib\WP6HLContentListener.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6HLListener.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6HLStylesListener.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6LLListener.cpp # End Source File # Begin Source File --- 370,374 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP6Listener.cpp # End Source File # Begin Source File *************** *** 386,389 **** --- 414,425 ---- # Begin Source File + SOURCE=..\..\src\lib\WP6StylesListener.cpp + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP6SubDocument.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP6TabGroup.cpp # End Source File *************** *** 414,418 **** # Begin Source File ! SOURCE=..\..\src\lib\WPXHLListener.cpp # End Source File # Begin Source File --- 450,454 ---- # Begin Source File ! SOURCE=..\..\src\lib\WPXListener.cpp # End Source File # Begin Source File *************** *** 450,453 **** --- 486,493 ---- # Begin Source File + SOURCE=..\..\src\lib\WPXSubDocument.cpp + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WPXTable.cpp # End Source File *************** *** 478,481 **** --- 518,529 ---- # Begin Source File + SOURCE=..\..\src\lib\WP3DefinitionGroup.h + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3DisplayGroup.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP3EndOfLinePageGroup.h # End Source File *************** *** 494,510 **** # Begin Source File ! SOURCE=..\..\src\lib\WP3Header.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3HLListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3HLStylesListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3LLListener.h # End Source File # Begin Source File --- 542,558 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP3FontGroup.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3FootnoteEndnoteGroup.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3Header.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP3Listener.h # End Source File # Begin Source File *************** *** 530,533 **** --- 578,593 ---- # Begin Source File + SOURCE=..\..\src\lib\WP3StylesListener.h + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3SubDocument.h + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP3TablesGroup.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP3UndoGroup.h # End Source File *************** *** 554,574 **** # Begin Source File ! SOURCE=..\..\src\lib\WP42HLListener.h ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP42HLStylesListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42LLListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Parser.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Part.h # End Source File # Begin Source File --- 614,630 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP42Listener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Parser.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42Part.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP42StylesListener.h # End Source File # Begin Source File *************** *** 586,589 **** --- 642,649 ---- # Begin Source File + SOURCE=..\..\src\lib\WP5DefinitionGroup.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP5ExtendedCharacterGroup.h # End Source File *************** *** 606,634 **** # Begin Source File ! SOURCE=..\..\src\lib\WP5HLListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5HLStylesListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5LLListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5PageFormatGroup.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5Parser.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5Part.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5SingleByteFunction.h # End Source File # Begin Source File --- 666,698 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP5Listener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5PageFormatGroup.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5Parser.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5Part.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5SingleByteFunction.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5StylesListener.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WP5TableEOLGroup.h ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP5TableEOPGroup.h # End Source File # Begin Source File *************** *** 666,669 **** --- 730,737 ---- # Begin Source File + SOURCE=..\..\src\lib\WP6ContentListener.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP6DefaultInitialFontPacket.h # End Source File *************** *** 722,738 **** # Begin Source File ! SOURCE=..\..\src\lib\WP6HLContentListener.h ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6HLListener.h ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6HLStylesListener.h ! # End Source File ! # Begin Source File ! ! SOURCE=..\..\src\lib\WP6LLListener.h # End Source File # Begin Source File --- 790,794 ---- # Begin Source File ! SOURCE=..\..\src\lib\WP6Listener.h # End Source File # Begin Source File *************** *** 778,781 **** --- 834,845 ---- # Begin Source File + SOURCE=..\..\src\lib\WP6StylesListener.h + # End Source File + # Begin Source File + + SOURCE=..\..\src\lib\WP6SubDocument.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WP6TabGroup.h # End Source File *************** *** 814,826 **** # Begin Source File - SOURCE=..\..\src\lib\WPXHLListener.h - # End Source File - # Begin Source File - SOURCE=..\..\src\lib\WPXHLListenerImpl.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WPXLLListener.h # End Source File # Begin Source File --- 878,886 ---- # Begin Source File SOURCE=..\..\src\lib\WPXHLListenerImpl.h # End Source File # Begin Source File ! SOURCE=..\..\src\lib\WPXListener.h # End Source File # Begin Source File *************** *** 862,865 **** --- 922,929 ---- # Begin Source File + SOURCE=..\..\src\lib\WPXSubDocument.h + # End Source File + # Begin Source File + SOURCE=..\..\src\lib\WPXTable.h # End Source File |
From: Fridrich S. <str...@us...> - 2005-11-29 11:31:54
|
Update of /cvsroot/libwpd/libwpd2/src/conv/raw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18074/src/conv/raw Modified Files: Tag: fs_refactoring2 Makefile.am Log Message: Build fix for MacOSX and some others (bug http://bugzilla.abisource.com/show_bug.cgi?id=9464) Patch Francis J. Franklin Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/raw/Makefile.am,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** Makefile.am 28 Jan 2005 07:55:11 -0000 1.5 --- Makefile.am 29 Nov 2005 11:31:39 -0000 1.5.4.1 *************** *** 7,11 **** bin_PROGRAMS = $(target_wpd2raw) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I../../lib/ wpd2raw_LDFLAGS = -L../../lib/ --- 7,11 ---- bin_PROGRAMS = $(target_wpd2raw) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I$(top_srcdir)/src/lib/ wpd2raw_LDFLAGS = -L../../lib/ |
From: Fridrich S. <str...@us...> - 2005-11-29 11:31:49
|
Update of /cvsroot/libwpd/libwpd2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18074 Modified Files: Tag: fs_refactoring2 configure.in Log Message: Build fix for MacOSX and some others (bug http://bugzilla.abisource.com/show_bug.cgi?id=9464) Patch Francis J. Franklin Index: configure.in =================================================================== RCS file: /cvsroot/libwpd/libwpd2/configure.in,v retrieving revision 1.37 retrieving revision 1.37.2.1 diff -C2 -d -r1.37 -r1.37.2.1 *** configure.in 3 Oct 2005 12:16:42 -0000 1.37 --- configure.in 29 Nov 2005 11:31:38 -0000 1.37.2.1 *************** *** 124,127 **** --- 124,139 ---- AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = yes) + AC_MSG_CHECKING([for Darwin (Mac OS X) platform]) + case "$host" in + *-*-darwin*) + platform_darwin=yes + ;; + *) + platform_darwin=no + ;; + esac + AC_MSG_RESULT($platform_darwin) + AM_CONDITIONAL(PLATFORM_DARWIN, test "$platform_darwin" = yes) + AC_ARG_ENABLE(debug,[ --enable-debug Turn on debugging],[ case "${enableval}" in |
From: Fridrich S. <str...@us...> - 2005-11-29 11:31:49
|
Update of /cvsroot/libwpd/libwpd2/src/conv/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18074/src/conv/text Modified Files: Tag: fs_refactoring2 Makefile.am Log Message: Build fix for MacOSX and some others (bug http://bugzilla.abisource.com/show_bug.cgi?id=9464) Patch Francis J. Franklin Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/text/Makefile.am,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** Makefile.am 28 Jan 2005 07:55:27 -0000 1.8 --- Makefile.am 29 Nov 2005 11:31:39 -0000 1.8.4.1 *************** *** 7,11 **** bin_PROGRAMS = $(target_wpd2text) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I../../lib/ wpd2text_LDFLAGS = -L../../lib/ --- 7,11 ---- bin_PROGRAMS = $(target_wpd2text) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I$(top_srcdir)/src/lib/ wpd2text_LDFLAGS = -L../../lib/ |
From: Fridrich S. <str...@us...> - 2005-11-29 11:31:49
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18074/src/lib Modified Files: Tag: fs_refactoring2 Makefile.am Log Message: Build fix for MacOSX and some others (bug http://bugzilla.abisource.com/show_bug.cgi?id=9464) Patch Francis J. Franklin Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Makefile.am,v retrieving revision 1.61.2.7 retrieving revision 1.61.2.8 diff -C2 -d -r1.61.2.7 -r1.61.2.8 *** Makefile.am 28 Nov 2005 13:00:29 -0000 1.61.2.7 --- Makefile.am 29 Nov 2005 11:31:39 -0000 1.61.2.8 *************** *** 2,7 **** --- 2,11 ---- no_undefined = -no-undefined else + if PLATFORM_DARWIN + no_undefined = -no-undefined + else no_undefined = endif + endif if OS_WIN32 *************** *** 31,34 **** --- 35,39 ---- WPXString.h WPXPropertyListVector.h WPDocument.h WPXHLListenerImpl.h + INCLUDES = -I$(srcdir) AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) |
From: Fridrich S. <str...@us...> - 2005-11-29 11:31:49
|
Update of /cvsroot/libwpd/libwpd2/src/conv/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18074/src/conv/html Modified Files: Tag: fs_refactoring2 Makefile.am Log Message: Build fix for MacOSX and some others (bug http://bugzilla.abisource.com/show_bug.cgi?id=9464) Patch Francis J. Franklin Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/conv/html/Makefile.am,v retrieving revision 1.7 retrieving revision 1.7.4.1 diff -C2 -d -r1.7 -r1.7.4.1 *** Makefile.am 28 Jan 2005 07:55:11 -0000 1.7 --- Makefile.am 29 Nov 2005 11:31:39 -0000 1.7.4.1 *************** *** 7,11 **** bin_PROGRAMS = $(target_wpd2html) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I../../lib/ wpd2html_LDFLAGS = -L../../lib/ --- 7,11 ---- bin_PROGRAMS = $(target_wpd2html) ! AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I$(top_srcdir)/src/lib/ wpd2html_LDFLAGS = -L../../lib/ |
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5142/src/lib Modified Files: Tag: fs_refactoring2 WP3DisplayGroup.cpp WP3DisplayGroup.h WP3FontGroup.cpp WP3FontGroup.h WP3Listener.cpp WP3Listener.h WP3StylesListener.h WP3TablesGroup.cpp WP42Listener.h WP42StylesListener.h WP5Listener.cpp WP5Listener.h WP5StylesListener.h WP6ContentListener.cpp WP6ContentListener.h WP6PrefixDataPacket.h WP6StylesListener.cpp WP6StylesListener.h WPXListener.h libwpd_internal.cpp libwpd_internal.h Log Message: Code clean-up in order to make it a bit more C++ standard compliant :-) use std::string instead of C-style string; use handleSubDocument in WP3 parser too. Index: WP5Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5Listener.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 *** WP5Listener.cpp 23 Nov 2005 12:44:49 -0000 1.1.2.3 --- WP5Listener.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.4 *************** *** 95,99 **** } ! void WP5Listener::defineTable(uint8_t position, uint16_t leftOffset) { if (!isUndoOn()) --- 95,99 ---- } ! void WP5Listener::defineTable(const uint8_t position, const uint16_t leftOffset) { if (!isUndoOn()) *************** *** 130,134 **** } ! void WP5Listener::addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) { if (!isUndoOn()) --- 130,135 ---- } ! void WP5Listener::addTableColumnDefinition(const uint32_t width, const uint32_t leftGutter, const uint32_t rightGutter, ! const uint32_t attributes, const uint8_t alignment) { if (!isUndoOn()) Index: WP3DisplayGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3DisplayGroup.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 *** WP3DisplayGroup.h 25 Nov 2005 20:55:06 -0000 1.1.2.2 --- WP3DisplayGroup.h 29 Nov 2005 10:18:37 -0000 1.1.2.3 *************** *** 37,41 **** private: ! char * m_noteReference; }; --- 37,41 ---- private: ! std::string m_noteReference; }; Index: WP6StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6StylesListener.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 *** WP6StylesListener.cpp 28 Nov 2005 13:00:30 -0000 1.1.2.3 --- WP6StylesListener.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.4 *************** *** 167,171 **** } ! void WP6StylesListener::defineTable(uint8_t position, uint16_t leftOffset) { if (!isUndoOn()) --- 167,171 ---- } ! void WP6StylesListener::defineTable(const uint8_t position, const uint16_t leftOffset) { if (!isUndoOn()) Index: WP3Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.h,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -C2 -d -r1.1.2.10 -r1.1.2.11 *** WP3Listener.h 28 Nov 2005 13:00:30 -0000 1.1.2.10 --- WP3Listener.h 29 Nov 2005 10:18:37 -0000 1.1.2.11 *************** *** 42,45 **** --- 42,47 ---- WPXString m_footNoteReference; WPXString m_endNoteReference; + + WPXTableList m_tableList; }; *************** *** 68,76 **** virtual void indentFirstLineChange(const int16_t offset); virtual void columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth, ! const std::vector<bool> &isFixedWidth); 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(); --- 70,79 ---- virtual void indentFirstLineChange(const int16_t offset); virtual void columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth, ! const std::vector<bool> &isFixedWidth); 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(); *************** *** 81,94 **** virtual void setTableCellFillColor(const RGBSColor * cellFillColor); virtual void endTable(); ! 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); ! virtual void insertNoteReference(const WPXNoteType noteType, const char* noteReference); virtual void insertNote(const WPXNoteType noteType, const WP3SubDocument *subDocument); protected: ! virtual void _handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {} virtual void _openParagraph(); --- 84,97 ---- virtual void setTableCellFillColor(const RGBSColor * cellFillColor); virtual void endTable(); ! 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 std::string fontName); virtual void setFontSize(const uint16_t fontSize); ! virtual void insertNoteReference(const WPXNoteType noteType, const std::string noteReference); virtual void insertNote(const WPXNoteType noteType, const WP3SubDocument *subDocument); protected: ! virtual void _handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0); virtual void _openParagraph(); Index: libwpd_internal.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.h,v retrieving revision 1.17.2.2 retrieving revision 1.17.2.3 diff -C2 -d -r1.17.2.2 -r1.17.2.3 *** libwpd_internal.h 25 Nov 2005 20:55:07 -0000 1.17.2.2 --- libwpd_internal.h 29 Nov 2005 10:18:37 -0000 1.17.2.3 *************** *** 28,31 **** --- 28,32 ---- #include "WPXStream.h" #include <stdio.h> + #include <string> #include "WPXString.h" *************** *** 72,75 **** --- 73,78 ---- uint32_t readU32(WPXInputStream *input, bool bigendian=false); + std::string readPascalString(WPXInputStream *input); + void appendUCS4(WPXString &str, uint32_t ucs4); Index: WP3FontGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3FontGroup.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 *** WP3FontGroup.cpp 25 Nov 2005 12:42:53 -0000 1.1.2.3 --- WP3FontGroup.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.4 *************** *** 31,35 **** WP3FontGroup::WP3FontGroup(WPXInputStream *input) : WP3VariableLengthGroup(), - m_fontName(NULL), m_fontSize(0), m_fontColor() --- 31,34 ---- *************** *** 40,44 **** WP3FontGroup::~WP3FontGroup() { - // fixme delete the font name } --- 39,42 ---- *************** *** 48,51 **** --- 46,50 ---- // the contents accordingly uint8_t tmpFontNameLength; + uint8_t i; switch (getSubGroup()) { *************** *** 61,69 **** 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: --- 60,64 ---- case WP3_FONT_GROUP_SET_TEXT_FONT: input->seek(12, WPX_SEEK_CUR); ! m_fontName = readPascalString(input); break; case WP3_FONT_GROUP_SET_FONT_SIZE: *************** *** 87,91 **** case WP3_FONT_GROUP_SET_TEXT_FONT: listener->setTextFont(m_fontName); - delete [] m_fontName; break; case WP3_FONT_GROUP_SET_FONT_SIZE: --- 82,85 ---- Index: WP6ContentListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6ContentListener.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 *** WP6ContentListener.h 28 Nov 2005 13:00:30 -0000 1.1.2.4 --- WP6ContentListener.h 29 Nov 2005 10:18:37 -0000 1.1.2.5 *************** *** 177,182 **** 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); --- 177,183 ---- 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); Index: WP6ContentListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6ContentListener.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 *** WP6ContentListener.cpp 28 Nov 2005 13:00:30 -0000 1.1.2.4 --- WP6ContentListener.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.5 *************** *** 970,974 **** } ! void WP6ContentListener::defineTable(uint8_t position, uint16_t leftOffset) { if (!isUndoOn()) --- 970,974 ---- } ! void WP6ContentListener::defineTable(const uint8_t position, const uint16_t leftOffset) { if (!isUndoOn()) *************** *** 1009,1013 **** } ! void WP6ContentListener::addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter, uint32_t attributes, uint8_t alignment) { if (!isUndoOn()) --- 1009,1014 ---- } ! void WP6ContentListener::addTableColumnDefinition(const uint32_t width, const uint32_t leftGutter, const uint32_t rightGutter, ! const uint32_t attributes, const uint8_t alignment) { if (!isUndoOn()) Index: WP42Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP42Listener.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 *** WP42Listener.h 28 Nov 2005 13:00:30 -0000 1.1.2.3 --- WP42Listener.h 29 Nov 2005 10:18:37 -0000 1.1.2.4 *************** *** 56,61 **** 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) {}; --- 56,62 ---- 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) {}; Index: WP5Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5Listener.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 *** WP5Listener.h 28 Nov 2005 13:00:30 -0000 1.1.2.4 --- WP5Listener.h 29 Nov 2005 10:18:37 -0000 1.1.2.5 *************** *** 47,51 **** virtual void setLeaderCharacter(const uint16_t character, const uint8_t numberOfSpaces) {}; virtual void defineTabStops(const bool isRelative, const std::vector<WPXTabStop> &tabStops, ! const std::vector<bool> &usePreWP9LeaderMethods) {}; virtual void insertCharacter(const uint16_t character); virtual void insertTab(const uint8_t tabType, const float tabPosition); --- 47,51 ---- virtual void setLeaderCharacter(const uint16_t character, const uint8_t numberOfSpaces) {}; virtual void defineTabStops(const bool isRelative, const std::vector<WPXTabStop> &tabStops, ! const std::vector<bool> &usePreWP9LeaderMethods) {}; virtual void insertCharacter(const uint16_t character); virtual void insertTab(const uint8_t tabType, const float tabPosition); *************** *** 60,68 **** virtual void indentFirstLineChange(const int16_t offset) {}; virtual void columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth, ! const std::vector<bool> &isFixedWidth) {}; 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); --- 60,69 ---- virtual void indentFirstLineChange(const int16_t offset) {}; virtual void columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth, ! const std::vector<bool> &isFixedWidth) {}; 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); Index: WP3TablesGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3TablesGroup.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 *** WP3TablesGroup.cpp 23 Nov 2005 12:44:49 -0000 1.1.2.6 --- WP3TablesGroup.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.7 *************** *** 51,54 **** --- 51,55 ---- // this group can contain different kinds of data, thus we need to read // the contents accordingly + uint8_t i; switch (getSubGroup()) { *************** *** 63,67 **** input->seek(3, WPX_SEEK_CUR); m_numColumns = readU8(input); ! for (uint8_t i=0; i<m_numColumns; i++) { m_columnMode[i] = readU8(input); --- 64,68 ---- input->seek(3, WPX_SEEK_CUR); m_numColumns = readU8(input); ! for (i=0; i<m_numColumns; i++) { m_columnMode[i] = readU8(input); *************** *** 115,123 **** WPD_DEBUG_MSG(("WordPerfect: handling a Tables group\n")); switch (getSubGroup()) { 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); --- 116,125 ---- WPD_DEBUG_MSG(("WordPerfect: handling a Tables group\n")); + uint8_t i; switch (getSubGroup()) { case WP3_TABLES_GROUP_TABLE_FUNCTION: listener->defineTable(m_tableMode, fixedPointToWPUs(m_offsetFromLeftEdge)); ! for (i=0; i<m_numColumns; i++) listener->addTableColumnDefinition(fixedPointToWPUs(m_columnWidth[i]), fixedPointToWPUs(m_leftGutterSpacing), fixedPointToWPUs(m_rightGutterSpacing), 0, LEFT); Index: WP3FontGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3FontGroup.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 *** WP3FontGroup.h 21 Nov 2005 13:43:49 -0000 1.1.2.2 --- WP3FontGroup.h 29 Nov 2005 10:18:37 -0000 1.1.2.3 *************** *** 40,44 **** RGBSColor m_fontColor; /* Set Text Font */ ! char* m_fontName; /* Set Font Size */ uint16_t m_fontSize; --- 40,44 ---- RGBSColor m_fontColor; /* Set Text Font */ ! std::string m_fontName; /* Set Font Size */ uint16_t m_fontSize; Index: libwpd_internal.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.cpp,v retrieving revision 1.19.2.3 retrieving revision 1.19.2.4 diff -C2 -d -r1.19.2.3 -r1.19.2.4 *** libwpd_internal.cpp 25 Nov 2005 20:55:07 -0000 1.19.2.3 --- libwpd_internal.cpp 29 Nov 2005 10:18:37 -0000 1.19.2.4 *************** *** 75,78 **** --- 75,87 ---- } + std::string readPascalString(WPXInputStream *input) + { + int pascalStringLength = readU8(input); + std::string tmpString; + for (int i=0; i<pascalStringLength; i++) + tmpString.push_back((char)readU8(input)); + return tmpString; + } + // the ascii map appears stupid, but we need the const 16-bit data for now static const uint16_t asciiMap[] = Index: WP3DisplayGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3DisplayGroup.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 *** WP3DisplayGroup.cpp 25 Nov 2005 20:55:06 -0000 1.1.2.2 --- WP3DisplayGroup.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.3 *************** *** 30,36 **** WP3DisplayGroup::WP3DisplayGroup(WPXInputStream *input) : ! WP3VariableLengthGroup(), ! m_noteReference(NULL) ! { _read(input); --- 30,34 ---- WP3DisplayGroup::WP3DisplayGroup(WPXInputStream *input) : ! WP3VariableLengthGroup() { _read(input); *************** *** 39,44 **** WP3DisplayGroup::~WP3DisplayGroup() { - if (m_noteReference) - delete [] m_noteReference; } --- 37,40 ---- *************** *** 46,54 **** { input->seek(4, WPX_SEEK_CUR); ! uint8_t tmpNoteReferenceLength = readU8(input); ! m_noteReference = new char[tmpNoteReferenceLength+1]; ! for (uint8_t i=0; i < tmpNoteReferenceLength; i++) ! m_noteReference[i]=readU8(input); ! m_noteReference[tmpNoteReferenceLength]='\0'; } --- 42,46 ---- { input->seek(4, WPX_SEEK_CUR); ! m_noteReference = readPascalString(input); } Index: WPXListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WPXListener.h,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** WPXListener.h 28 Nov 2005 13:00:30 -0000 1.1.2.6 --- WPXListener.h 29 Nov 2005 10:18:37 -0000 1.1.2.7 *************** *** 192,200 **** 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 endTable() = 0; --- 192,201 ---- 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(const uint8_t position, const uint16_t leftOffset) = 0; ! virtual void addTableColumnDefinition(const uint32_t width, const uint32_t leftGutter, const uint32_t rightGutter, ! const uint32_t attributes, const uint8_t alignment) = 0; virtual void startTable() = 0; virtual void endTable() = 0; Index: WP5StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5StylesListener.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 *** WP5StylesListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.3 --- WP5StylesListener.h 29 Nov 2005 10:18:37 -0000 1.1.2.4 *************** *** 59,64 **** 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); --- 59,65 ---- 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); Index: WP6PrefixDataPacket.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6PrefixDataPacket.h,v retrieving revision 1.15.4.2 retrieving revision 1.15.4.3 diff -C2 -d -r1.15.4.2 -r1.15.4.3 *** WP6PrefixDataPacket.h 28 Nov 2005 13:00:30 -0000 1.15.4.2 --- WP6PrefixDataPacket.h 29 Nov 2005 10:18:37 -0000 1.15.4.3 *************** *** 39,43 **** virtual ~WP6PrefixDataPacket() {} virtual void parse(WP6Listener *listener) const {} ! virtual WP6SubDocument * getSubDocument() const {} static WP6PrefixDataPacket * constructPrefixDataPacket(WPXInputStream * input, WP6PrefixIndice *prefixIndice); --- 39,43 ---- virtual ~WP6PrefixDataPacket() {} virtual void parse(WP6Listener *listener) const {} ! virtual WP6SubDocument * getSubDocument() const { return static_cast<WP6SubDocument *>(NULL); } static WP6PrefixDataPacket * constructPrefixDataPacket(WPXInputStream * input, WP6PrefixIndice *prefixIndice); Index: WP42StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP42StylesListener.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 *** WP42StylesListener.h 28 Nov 2005 13:00:30 -0000 1.1.2.4 --- WP42StylesListener.h 29 Nov 2005 10:18:37 -0000 1.1.2.5 *************** *** 57,65 **** virtual void indentFirstLineChange(const int16_t offset) {} virtual void columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth, ! const std::vector<bool> &isFixedWidth) {} 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); --- 57,66 ---- virtual void indentFirstLineChange(const int16_t offset) {} virtual void columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth, ! const std::vector<bool> &isFixedWidth) {} 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); Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -C2 -d -r1.1.2.13 -r1.1.2.14 *** WP3Listener.cpp 28 Nov 2005 13:00:30 -0000 1.1.2.13 --- WP3Listener.cpp 29 Nov 2005 10:18:37 -0000 1.1.2.14 *************** *** 120,124 **** } ! void WP3Listener::defineTable(uint8_t position, uint16_t leftOffset) { if (!isUndoOn()) --- 120,124 ---- } ! void WP3Listener::defineTable(const uint8_t position, const uint16_t leftOffset) { if (!isUndoOn()) *************** *** 492,496 **** } ! void WP3Listener::setTextFont(const char* fontName) { if (!isUndoOn()) --- 492,496 ---- } ! void WP3Listener::setTextFont(const std::string fontName) { if (!isUndoOn()) *************** *** 498,502 **** _closeSpan(); ! m_ps->m_fontName->sprintf("%s", fontName); } } --- 498,502 ---- _closeSpan(); ! m_ps->m_fontName->sprintf("%s", fontName.c_str()); } } *************** *** 512,523 **** } ! void WP3Listener::insertNoteReference(const WPXNoteType noteType, const char* noteReference) { if (!isUndoOn() && (m_ps->m_inSubDocument)) { if (noteType == FOOTNOTE) ! m_parseState->m_footNoteReference.sprintf("%s", noteReference); else ! m_parseState->m_footNoteReference.sprintf("%s", noteReference); } } --- 512,523 ---- } ! void WP3Listener::insertNoteReference(const WPXNoteType noteType, const std::string noteReference) { if (!isUndoOn() && (m_ps->m_inSubDocument)) { if (noteType == FOOTNOTE) ! m_parseState->m_footNoteReference.sprintf("%s", noteReference.c_str()); else ! m_parseState->m_footNoteReference.sprintf("%s", noteReference.c_str()); } } *************** *** 550,565 **** m_listenerImpl->openEndnote(propList); ! // save our old parsing state on our "stack" ! WPXParsingState *oldPS = m_ps; ! m_ps = new WPXParsingState(); ! // BEGIN: copy page properties into the new parsing state ! m_ps->m_pageFormWidth = oldPS->m_pageFormWidth; ! m_ps->m_pageMarginLeft = oldPS->m_pageMarginLeft; ! m_ps->m_pageMarginRight = oldPS->m_pageMarginRight; ! m_ps->m_subDocuments = oldPS->m_subDocuments; ! m_ps->m_isNote = oldPS->m_isNote; ! // END: copy page properties into the new parsing state ! m_ps->m_inSubDocument = true; // save our old parsing state on our "stack" WP3ParsingState *oldParseState = m_parseState; --- 550,565 ---- m_listenerImpl->openEndnote(propList); ! handleSubDocument(subDocument, false, m_parseState->m_tableList, 0); + if (noteType == FOOTNOTE) + m_listenerImpl->closeFootnote(); + else + m_listenerImpl->closeEndnote(); + m_ps->m_isNote = false; + } + } + + void WP3Listener::_handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice) + { // save our old parsing state on our "stack" WP3ParsingState *oldParseState = m_parseState; *************** *** 588,601 **** delete m_parseState; m_parseState = oldParseState; - - delete m_ps; - m_ps = oldPS; - - if (noteType == FOOTNOTE) - m_listenerImpl->closeFootnote(); - else - m_listenerImpl->closeEndnote(); - m_ps->m_isNote = false; - } } --- 588,591 ---- Index: WP6StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6StylesListener.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 *** WP6StylesListener.h 28 Nov 2005 13:00:30 -0000 1.1.2.4 --- WP6StylesListener.h 29 Nov 2005 10:18:37 -0000 1.1.2.5 *************** *** 89,94 **** 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); --- 89,95 ---- 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); Index: WP3StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3StylesListener.h,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** WP3StylesListener.h 25 Nov 2005 20:55:06 -0000 1.1.2.5 --- WP3StylesListener.h 29 Nov 2005 10:18:37 -0000 1.1.2.6 *************** *** 58,63 **** 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); --- 58,64 ---- 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); *************** *** 70,76 **** 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) {} ! virtual void insertNoteReference(const WPXNoteType noteType, const char* noteReference) {}; virtual void insertNote(const WPXNoteType noteType, const WP3SubDocument *subDocument) {}; --- 71,77 ---- virtual void setTableCellSpan(const uint16_t colSpan, const uint16_t rowSpan) {} virtual void endTable() {} ! virtual void setTextFont(const std::string fontName) {} virtual void setFontSize(const uint16_t fontSize) {} ! virtual void insertNoteReference(const WPXNoteType noteType, const std::string noteReference) {}; virtual void insertNote(const WPXNoteType noteType, const WP3SubDocument *subDocument) {}; |
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7294/src/lib Modified Files: Tag: fs_refactoring2 Makefile.am WP3FootnoteEndnoteGroup.cpp WP3Listener.cpp WP3Listener.h WP3SubDocument.cpp WP3SubDocument.h WP42Listener.h WP42StylesListener.h WP5Listener.h WP6ContentListener.cpp WP6ContentListener.h WP6GeneralTextPacket.cpp WP6GeneralTextPacket.h WP6PrefixDataPacket.h WP6StylesListener.cpp WP6StylesListener.h WPXListener.cpp WPXListener.h WPXPageSpan.cpp WPXPageSpan.h Added Files: Tag: fs_refactoring2 WP6SubDocument.cpp WP6SubDocument.h WPXSubDocument.cpp WPXSubDocument.h Log Message: Adding WP?SubDocument classes in order to cover differences between different WP file formats in the way they store sub-documents Index: WPXListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WPXListener.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 *** WPXListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.3 --- WPXListener.cpp 28 Nov 2005 13:00:30 -0000 1.1.2.4 *************** *** 290,294 **** m_listenerImpl->openFooter(propList); ! handleSubDocument((*iter).getTextPID(), true, (*iter).getTableList(), 0); if ((*iter).getType() == HEADER) m_listenerImpl->closeHeader(); --- 290,294 ---- m_listenerImpl->openFooter(propList); ! handleSubDocument((*iter).getSubDocument(), true, (*iter).getTableList(), 0); if ((*iter).getType() == HEADER) m_listenerImpl->closeHeader(); *************** *** 296,301 **** m_listenerImpl->closeFooter(); ! WPD_DEBUG_MSG(("Header Footer Element: type: %i occurence: %i pid: %i\n", ! (*iter).getType(), (*iter).getOccurence(), (*iter).getTextPID())); } } --- 296,301 ---- m_listenerImpl->closeFooter(); ! WPD_DEBUG_MSG(("Header Footer Element: type: %i occurence: %i\n", ! (*iter).getType(), (*iter).getOccurence())); } } *************** *** 900,904 **** Creates an new document state. Saves the old state on a "stack". */ ! void WPXListener::handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice) { // save our old parsing state on our "stack" --- 900,904 ---- Creates an new document state. Saves the old state on a "stack". */ ! void WPXListener::handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice) { // save our old parsing state on our "stack" *************** *** 909,921 **** m_ps->m_pageMarginLeft = oldPS->m_pageMarginLeft; m_ps->m_pageMarginRight = oldPS->m_pageMarginRight; ! m_ps->m_subDocumentTextPIDs = oldPS->m_subDocumentTextPIDs; m_ps->m_isNote = oldPS->m_isNote; // END: copy page properties into the new parsing state m_ps->m_inSubDocument = true; ! // Check whether the document is calling its own TextPID ! if ((m_ps->m_subDocumentTextPIDs.find(textPID) == m_ps->m_subDocumentTextPIDs.end()) || (!textPID)) { ! m_ps->m_subDocumentTextPIDs.insert(textPID); ! _handleSubDocument(textPID, isHeaderFooter, tableList, nextTableIndice); } --- 909,921 ---- m_ps->m_pageMarginLeft = oldPS->m_pageMarginLeft; m_ps->m_pageMarginRight = oldPS->m_pageMarginRight; ! m_ps->m_subDocuments = oldPS->m_subDocuments; m_ps->m_isNote = oldPS->m_isNote; // END: copy page properties into the new parsing state m_ps->m_inSubDocument = true; ! // Check whether the document is calling itself ! if ((m_ps->m_subDocuments.find(subDocument) == m_ps->m_subDocuments.end()) || (!subDocument)) { ! m_ps->m_subDocuments.insert(subDocument); ! _handleSubDocument(subDocument, isHeaderFooter, tableList, nextTableIndice); } Index: WP6ContentListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6ContentListener.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 *** WP6ContentListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.3 --- WP6ContentListener.h 28 Nov 2005 13:00:30 -0000 1.1.2.4 *************** *** 189,193 **** protected: ! virtual void _handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0); //void _handleLineBreakElementBegin(); --- 189,193 ---- protected: ! virtual void _handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0); //void _handleLineBreakElementBegin(); Index: WP6ContentListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6ContentListener.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 *** WP6ContentListener.cpp 25 Nov 2005 20:55:07 -0000 1.1.2.3 --- WP6ContentListener.cpp 28 Nov 2005 13:00:30 -0000 1.1.2.4 *************** *** 34,38 **** #include "WP6DefaultInitialFontPacket.h" #include "libwpd_internal.h" ! #include "WP6PrefixData.h" #include "WPXTable.h" --- 34,38 ---- #include "WP6DefaultInitialFontPacket.h" #include "libwpd_internal.h" ! #include "WP6SubDocument.h" #include "WP6PrefixData.h" #include "WPXTable.h" *************** *** 943,947 **** uint16_t textPID = m_parseState->m_noteTextPID; ! handleSubDocument(textPID, false, m_parseState->m_tableList, m_parseState->m_nextTableIndice); if (noteType == FOOTNOTE) --- 943,948 ---- uint16_t textPID = m_parseState->m_noteTextPID; ! handleSubDocument(static_cast<WPXSubDocument *>(textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), ! false, m_parseState->m_tableList, m_parseState->m_nextTableIndice); if (noteType == FOOTNOTE) *************** *** 1110,1114 **** // if textPID=0: Simply creates a blank paragraph // once finished, restores document state to what it was before ! void WP6ContentListener::_handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice) { // save our old parsing state on our "stack" --- 1111,1115 ---- // if textPID=0: Simply creates a blank paragraph // once finished, restores document state to what it was before ! void WP6ContentListener::_handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice) { // save our old parsing state on our "stack" *************** *** 1125,1130 **** } ! if (textPID) ! WP6Listener::getPrefixDataPacket(textPID)->parse(this); else _openSpan(); --- 1126,1131 ---- } ! if (subDocument) ! subDocument->parse(this); else _openSpan(); Index: WP42Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP42Listener.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 *** WP42Listener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 --- WP42Listener.h 28 Nov 2005 13:00:30 -0000 1.1.2.3 *************** *** 67,71 **** protected: ! virtual void _handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {} private: --- 67,71 ---- protected: ! virtual void _handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {} private: Index: WPXListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WPXListener.h,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** WPXListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.5 --- WPXListener.h 28 Nov 2005 13:00:30 -0000 1.1.2.6 *************** *** 32,35 **** --- 32,36 ---- #include "WPXPropertyListVector.h" #include "libwpd_internal.h" + #include "WPXSubDocument.h" #include <vector> #include <set> *************** *** 157,161 **** bool m_isTabPositionRelative; ! std::set <int> m_subDocumentTextPIDs; bool m_inSubDocument; --- 158,162 ---- bool m_isTabPositionRelative; ! std::set <const WPXSubDocument *> m_subDocuments; bool m_inSubDocument; *************** *** 170,174 **** 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); --- 171,175 ---- virtual void startDocument(); ! void handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice); virtual void insertBreak(const uint8_t breakType); virtual void lineSpacingChange(const float lineSpacing); *************** *** 205,209 **** protected: ! virtual void _handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice) = 0; virtual void _flushText() = 0; virtual void _changeList() = 0; --- 206,210 ---- protected: ! virtual void _handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice) = 0; virtual void _flushText() = 0; virtual void _changeList() = 0; Index: WP6PrefixDataPacket.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6PrefixDataPacket.h,v retrieving revision 1.15.4.1 retrieving revision 1.15.4.2 diff -C2 -d -r1.15.4.1 -r1.15.4.2 *** WP6PrefixDataPacket.h 10 Nov 2005 12:57:17 -0000 1.15.4.1 --- WP6PrefixDataPacket.h 28 Nov 2005 13:00:30 -0000 1.15.4.2 *************** *** 31,34 **** --- 31,35 ---- class WP6Listener; class WP6PrefixIndice; + class WP6SubDocument; class WP6PrefixDataPacket *************** *** 38,41 **** --- 39,43 ---- virtual ~WP6PrefixDataPacket() {} virtual void parse(WP6Listener *listener) const {} + virtual WP6SubDocument * getSubDocument() const {} static WP6PrefixDataPacket * constructPrefixDataPacket(WPXInputStream * input, WP6PrefixIndice *prefixIndice); Index: WP42StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP42StylesListener.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 *** WP42StylesListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.3 --- WP42StylesListener.h 28 Nov 2005 13:00:30 -0000 1.1.2.4 *************** *** 72,76 **** protected: ! virtual void _handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {} virtual void _openPageSpan() { /* FIXME: REMOVE ME WHEN IMPLEMENTED IN WPXListener */ }; --- 72,76 ---- protected: ! virtual void _handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {} virtual void _openPageSpan() { /* FIXME: REMOVE ME WHEN IMPLEMENTED IN WPXListener */ }; Index: WP3SubDocument.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3SubDocument.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 *** WP3SubDocument.h 25 Nov 2005 20:55:07 -0000 1.1.2.1 --- WP3SubDocument.h 28 Nov 2005 13:00:30 -0000 1.1.2.2 *************** *** 1,5 **** /* 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 --- 1,4 ---- /* libwpd ! * Copyright (C) 2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or *************** *** 28,43 **** #include "WPXMemoryStream.h" #include "WP3Listener.h" ! class WP3SubDocument { public: WP3SubDocument(WPXInputStream *input, int dataSize); ! virtual ~WP3SubDocument(); ! virtual void parse(WP3Listener *listener) const; - private: - WPXMemoryInputStream *m_stream; - }; #endif /* WP3SUBDOCUMENT_H */ --- 27,39 ---- #include "WPXMemoryStream.h" + #include "WPXSubDocument.h" #include "WP3Listener.h" ! class WP3SubDocument : public WPXSubDocument { public: WP3SubDocument(WPXInputStream *input, int dataSize); ! virtual void parse(WPXListener *listener) const; }; #endif /* WP3SUBDOCUMENT_H */ Index: WP3SubDocument.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3SubDocument.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 *** WP3SubDocument.cpp 25 Nov 2005 20:55:07 -0000 1.1.2.1 --- WP3SubDocument.cpp 28 Nov 2005 13:00:30 -0000 1.1.2.2 *************** *** 1,5 **** /* 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 --- 1,4 ---- /* libwpd ! * Copyright (C) 2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or *************** *** 29,33 **** WP3SubDocument::WP3SubDocument(WPXInputStream *input, int dataSize) : ! m_stream(NULL) { uint8_t *streamData = new uint8_t[dataSize]; --- 28,32 ---- WP3SubDocument::WP3SubDocument(WPXInputStream *input, int dataSize) : ! WPXSubDocument() { uint8_t *streamData = new uint8_t[dataSize]; *************** *** 39,50 **** } ! WP3SubDocument::~WP3SubDocument() ! { ! delete m_stream; ! } ! ! void WP3SubDocument::parse(WP3Listener *listener) const { m_stream->seek(0, WPX_SEEK_SET); ! WP3Parser::parseDocument(m_stream, listener); } --- 38,44 ---- } ! void WP3SubDocument::parse(WPXListener *listener) const { m_stream->seek(0, WPX_SEEK_SET); ! WP3Parser::parseDocument(m_stream, static_cast<WP3Listener *>(listener)); } Index: WP6GeneralTextPacket.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6GeneralTextPacket.cpp,v retrieving revision 1.18.4.1 retrieving revision 1.18.4.2 diff -C2 -d -r1.18.4.1 -r1.18.4.2 *** WP6GeneralTextPacket.cpp 10 Nov 2005 12:57:17 -0000 1.18.4.1 --- WP6GeneralTextPacket.cpp 28 Nov 2005 13:00:30 -0000 1.18.4.2 *************** *** 37,41 **** WP6GeneralTextPacket::~WP6GeneralTextPacket() { ! delete m_stream; delete [] m_blockSizes; } --- 37,41 ---- WP6GeneralTextPacket::~WP6GeneralTextPacket() { ! delete m_subDocument; delete [] m_blockSizes; } *************** *** 70,79 **** } ! m_stream = new WPXMemoryInputStream(streamData, totalSize); } void WP6GeneralTextPacket::parse(WP6Listener *listener) const { ! m_stream->seek(0, WPX_SEEK_SET); ! WP6Parser::parseDocument(m_stream, listener); } --- 70,78 ---- } ! m_subDocument = new WP6SubDocument(streamData, totalSize); } void WP6GeneralTextPacket::parse(WP6Listener *listener) const { ! m_subDocument->parse(static_cast<WPXListener *>(listener)); } Index: WP3FootnoteEndnoteGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3FootnoteEndnoteGroup.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 *** WP3FootnoteEndnoteGroup.cpp 25 Nov 2005 20:55:06 -0000 1.1.2.2 --- WP3FootnoteEndnoteGroup.cpp 28 Nov 2005 13:00:30 -0000 1.1.2.3 *************** *** 47,63 **** int tmpNumOfPages = readU16(input, true); tmpSizeOfNote -= 2; ! int i; ! for (i=0; i<tmpNumOfPages; i++) ! { ! input->seek(4, WPX_SEEK_CUR); ! tmpSizeOfNote -= 4; ! } int tmpNumBreakTableEntries = readU16(input, true); tmpSizeOfNote -= 2; ! for (i=0; i<tmpNumBreakTableEntries; i++) ! { ! input->seek(6, WPX_SEEK_CUR); ! tmpSizeOfNote -= 6; ! } // here we skipped all the useless junk and we are at the beginning of the // actual subdocument. tmpSizeOfNote should give the size in bytes of the --- 47,57 ---- int tmpNumOfPages = readU16(input, true); tmpSizeOfNote -= 2; ! input->seek(4*tmpNumOfPages, WPX_SEEK_CUR); ! tmpSizeOfNote -= 4*tmpNumOfPages; int tmpNumBreakTableEntries = readU16(input, true); tmpSizeOfNote -= 2; ! input->seek(6*tmpNumBreakTableEntries, WPX_SEEK_CUR); ! tmpSizeOfNote -= 6*tmpNumBreakTableEntries; ! // here we skipped all the useless junk and we are at the beginning of the // actual subdocument. tmpSizeOfNote should give the size in bytes of the Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Makefile.am,v retrieving revision 1.61.2.6 retrieving revision 1.61.2.7 diff -C2 -d -r1.61.2.6 -r1.61.2.7 *** Makefile.am 25 Nov 2005 20:55:06 -0000 1.61.2.6 --- Makefile.am 28 Nov 2005 13:00:29 -0000 1.61.2.7 *************** *** 121,124 **** --- 121,125 ---- WP6StyleGroup.cpp \ WP6StylesListener.cpp \ + WP6SubDocument.cpp \ WP6TabGroup.cpp \ WP6UndoGroup.cpp \ *************** *** 136,139 **** --- 137,141 ---- WPXPropertyList.cpp \ WPXString.cpp \ + WPXSubDocument.cpp \ WPXPropertyListVector.cpp \ WPDocument.cpp \ *************** *** 223,226 **** --- 225,229 ---- WP6StyleGroup.h \ WP6StylesListener.h \ + WP6SubDocument.h \ WP6TabGroup.h \ WP6TibetanMap.h \ *************** *** 241,244 **** --- 244,248 ---- WPXPropertyList.h \ WPXString.h \ + WPXSubDocument.h \ WPXTable.h \ WPXPropertyListVector.h Index: WPXPageSpan.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXPageSpan.h,v retrieving revision 1.10 retrieving revision 1.10.4.1 diff -C2 -d -r1.10 -r1.10.4.1 *** WPXPageSpan.h 8 Feb 2005 16:03:06 -0000 1.10 --- WPXPageSpan.h 28 Nov 2005 13:00:30 -0000 1.10.4.1 *************** *** 31,34 **** --- 31,35 ---- #include "WPXTable.h" #include "libwpd_internal.h" + #include "WPXSubDocument.h" // intermediate page representation class: for internal use only (by the high-level content/styles listeners). should not be exported. *************** *** 38,44 **** public: WPXHeaderFooter(const WPXHeaderFooterType headerFooterType, const WPXHeaderFooterOccurence occurence, ! const uint8_t internalType, const uint16_t textPID, WPXTableList tableList); WPXHeaderFooter(const WPXHeaderFooterType headerFooterType, const WPXHeaderFooterOccurence occurence, ! const uint8_t internalType, const uint16_t textPID); WPXHeaderFooter(const WPXHeaderFooter &headerFooter); ~WPXHeaderFooter(); --- 39,45 ---- public: WPXHeaderFooter(const WPXHeaderFooterType headerFooterType, const WPXHeaderFooterOccurence occurence, ! const uint8_t internalType, const WPXSubDocument * subDocument, WPXTableList tableList); WPXHeaderFooter(const WPXHeaderFooterType headerFooterType, const WPXHeaderFooterOccurence occurence, ! const uint8_t internalType, const WPXSubDocument * subDocument); WPXHeaderFooter(const WPXHeaderFooter &headerFooter); ~WPXHeaderFooter(); *************** *** 46,50 **** const WPXHeaderFooterOccurence getOccurence() const { return m_occurence; } const uint8_t getInternalType() const { return m_internalType; } ! const uint16_t getTextPID() const { return m_textPID; } WPXTableList getTableList() const { return m_tableList; } --- 47,51 ---- const WPXHeaderFooterOccurence getOccurence() const { return m_occurence; } const uint8_t getInternalType() const { return m_internalType; } ! const WPXSubDocument * getSubDocument() const { return m_subDocument; } WPXTableList getTableList() const { return m_tableList; } *************** *** 53,57 **** WPXHeaderFooterOccurence m_occurence; uint8_t m_internalType; // for suppression ! uint16_t m_textPID; // for the actual text WPXTableList m_tableList; }; --- 54,58 ---- WPXHeaderFooterOccurence m_occurence; uint8_t m_internalType; // for suppression ! const WPXSubDocument * m_subDocument; // for the actual text WPXTableList m_tableList; }; *************** *** 76,80 **** void setHeaderFooter(const uint8_t headerFooterType, const uint8_t occurenceBits, ! const uint16_t textPID, WPXTableList tableList); void setHeadFooterSuppression(const uint8_t headerFooterType, const bool suppress) { m_isHeaderFooterSuppressed[headerFooterType] = suppress; } void setFormLength(const float formLength) { m_formLength = formLength; } --- 77,81 ---- void setHeaderFooter(const uint8_t headerFooterType, const uint8_t occurenceBits, ! const WPXSubDocument * subDocument, WPXTableList tableList); void setHeadFooterSuppression(const uint8_t headerFooterType, const bool suppress) { m_isHeaderFooterSuppressed[headerFooterType] = suppress; } void setFormLength(const float formLength) { m_formLength = formLength; } Index: WP6StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6StylesListener.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 *** WP6StylesListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.3 --- WP6StylesListener.h 28 Nov 2005 13:00:30 -0000 1.1.2.4 *************** *** 36,39 **** --- 36,41 ---- #include "WPXTable.h" + class WPXSubDocument; + class WP6StylesListener : public WP6Listener { *************** *** 98,102 **** protected: ! virtual void _handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0); virtual void _flushText() {} --- 100,104 ---- protected: ! virtual void _handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0); virtual void _flushText() {} *************** *** 113,117 **** bool m_currentPageHasContent; bool m_isTableDefined; ! std::set <int> m_subDocumentTextPIDs; }; --- 115,119 ---- bool m_currentPageHasContent; bool m_isTableDefined; ! std::set <const WPXSubDocument *> m_subDocuments; }; Index: WP6GeneralTextPacket.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6GeneralTextPacket.h,v retrieving revision 1.7.4.2 retrieving revision 1.7.4.3 diff -C2 -d -r1.7.4.2 -r1.7.4.3 *** WP6GeneralTextPacket.h 10 Nov 2005 12:57:17 -0000 1.7.4.2 --- WP6GeneralTextPacket.h 28 Nov 2005 13:00:30 -0000 1.7.4.3 *************** *** 29,32 **** --- 29,34 ---- #include "WP6FileStructure.h" #include "WPXMemoryStream.h" + #include "WP6SubDocument.h" + #include "WP6Listener.h" class WP6GeneralTextPacket : public WP6PrefixDataPacket *************** *** 37,40 **** --- 39,43 ---- virtual void _readContents(WPXInputStream *input); virtual void parse(WP6Listener *listener) const; + virtual WP6SubDocument * getSubDocument() const { return m_subDocument;} private: *************** *** 43,47 **** uint32_t *m_blockSizes; ! WPXMemoryInputStream *m_stream; }; --- 46,50 ---- uint32_t *m_blockSizes; ! WP6SubDocument * m_subDocument; }; Index: WPXPageSpan.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXPageSpan.cpp,v retrieving revision 1.13 retrieving revision 1.13.4.1 diff -C2 -d -r1.13 -r1.13.4.1 *** WPXPageSpan.cpp 8 Feb 2005 16:03:06 -0000 1.13 --- WPXPageSpan.cpp 28 Nov 2005 13:00:30 -0000 1.13.4.1 *************** *** 55,63 **** WPXHeaderFooter::WPXHeaderFooter(const WPXHeaderFooterType headerFooterType, const WPXHeaderFooterOccurence occurence, ! const uint8_t internalType, const uint16_t textPID, WPXTableList tableList) : m_type(headerFooterType), m_occurence(occurence), m_internalType(internalType), ! m_textPID(textPID), m_tableList(tableList) { --- 55,63 ---- WPXHeaderFooter::WPXHeaderFooter(const WPXHeaderFooterType headerFooterType, const WPXHeaderFooterOccurence occurence, ! const uint8_t internalType, const WPXSubDocument * subDocument, WPXTableList tableList) : m_type(headerFooterType), m_occurence(occurence), m_internalType(internalType), ! m_subDocument(subDocument), m_tableList(tableList) { *************** *** 65,73 **** WPXHeaderFooter::WPXHeaderFooter(const WPXHeaderFooterType headerFooterType, const WPXHeaderFooterOccurence occurence, ! const uint8_t internalType, const uint16_t textPID) : m_type(headerFooterType), m_occurence(occurence), m_internalType(internalType), ! m_textPID(textPID) { } --- 65,73 ---- WPXHeaderFooter::WPXHeaderFooter(const WPXHeaderFooterType headerFooterType, const WPXHeaderFooterOccurence occurence, ! const uint8_t internalType, const WPXSubDocument * subDocument) : m_type(headerFooterType), m_occurence(occurence), m_internalType(internalType), ! m_subDocument(subDocument) { } *************** *** 77,81 **** m_occurence(headerFooter.getOccurence()), m_internalType(headerFooter.getInternalType()), ! m_textPID(headerFooter.getTextPID()), m_tableList(headerFooter.getTableList()) { --- 77,81 ---- m_occurence(headerFooter.getOccurence()), m_internalType(headerFooter.getInternalType()), ! m_subDocument(headerFooter.getSubDocument()), m_tableList(headerFooter.getTableList()) { *************** *** 84,87 **** --- 84,88 ---- WPXHeaderFooter::~WPXHeaderFooter() { + // delete m_subDocument; } *************** *** 123,131 **** void WPXPageSpan::setHeaderFooter(const uint8_t headerFooterType, const uint8_t occurenceBits, ! const uint16_t textPID, WPXTableList tableList) { WPXHeaderFooterType wpxType = _convertHeaderFooterType(headerFooterType); WPXHeaderFooterOccurence wpxOccurence = _convertHeaderFooterOccurence(occurenceBits); ! WPXHeaderFooter headerFooter(wpxType, wpxOccurence, headerFooterType, textPID, tableList); switch (wpxOccurence) { --- 124,132 ---- void WPXPageSpan::setHeaderFooter(const uint8_t headerFooterType, const uint8_t occurenceBits, ! const WPXSubDocument * subDocument, WPXTableList tableList) { WPXHeaderFooterType wpxType = _convertHeaderFooterType(headerFooterType); WPXHeaderFooterOccurence wpxOccurence = _convertHeaderFooterOccurence(occurenceBits); ! WPXHeaderFooter headerFooter(wpxType, wpxOccurence, headerFooterType, subDocument, tableList); switch (wpxOccurence) { *************** *** 228,237 **** for (iter2 = headerFooterList2.begin(); iter2 != headerFooterList2.end(); iter2++) { ! WPD_DEBUG_MSG(("WordPerfect: WPXPageSpan == header/footer comparison (%i, %i))\n", ! (*iter1).getTextPID(), (*iter2).getTextPID())); ! if ((*iter1).getType() == (*iter2).getType() && (*iter1).getTextPID() == (*iter2).getTextPID()) { ! WPD_DEBUG_MSG(("WordPerfect: WPXPageSpan == found same header/footer (%i, %i), breaking)\n", ! (*iter1).getTextPID(), (*iter2).getTextPID())); break; } --- 229,236 ---- for (iter2 = headerFooterList2.begin(); iter2 != headerFooterList2.end(); iter2++) { ! WPD_DEBUG_MSG(("WordPerfect: WPXPageSpan == header/footer comparison)\n")); ! if ((*iter1).getType() == (*iter2).getType() && (*iter1).getSubDocument() == (*iter2).getSubDocument()) { ! WPD_DEBUG_MSG(("WordPerfect: WPXPageSpan == found same header/footer, breaking)\n")); break; } Index: WP5Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5Listener.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 *** WP5Listener.h 23 Nov 2005 07:42:00 -0000 1.1.2.3 --- WP5Listener.h 28 Nov 2005 13:00:30 -0000 1.1.2.4 *************** *** 74,78 **** protected: ! virtual void _handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {} private: --- 74,78 ---- protected: ! virtual void _handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {} private: --- NEW FILE: WP6SubDocument.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 Library 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 "WP6SubDocument.h" #include "WP6Parser.h" #include "libwpd_internal.h" #include "WP6Listener.h" WP6SubDocument::WP6SubDocument(uint8_t * streamData, const int dataSize) : WPXSubDocument() { m_stream = new WPXMemoryInputStream(streamData, dataSize); } void WP6SubDocument::parse(WPXListener *listener) const { m_stream->seek(0, WPX_SEEK_SET); WP6Parser::parseDocument(m_stream, static_cast<WP6Listener *>(listener)); } Index: WP6StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6StylesListener.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 *** WP6StylesListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.2 --- WP6StylesListener.cpp 28 Nov 2005 13:00:30 -0000 1.1.2.3 *************** *** 29,32 **** --- 29,33 ---- #include "WPXFileStructure.h" #include "libwpd_internal.h" + #include "WP6SubDocument.h" // WP6StylesListener: creates intermediate table and page span representations, given a *************** *** 142,147 **** { WPXTableList tableList; ! m_currentPage->setHeaderFooter(headerFooterType, occurenceBits, textPID, tableList); ! _handleSubDocument(textPID, true, tableList); } m_currentPageHasContent = tempCurrentPageHasContent; --- 143,149 ---- { WPXTableList tableList; ! m_currentPage->setHeaderFooter(headerFooterType, occurenceBits, ! static_cast<WPXSubDocument *>(textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), tableList); ! _handleSubDocument(static_cast<WPXSubDocument *>(textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), true, tableList); } m_currentPageHasContent = tempCurrentPageHasContent; *************** *** 222,230 **** { m_currentPageHasContent = true; ! _handleSubDocument(textPID, false, m_tableList); } } ! void WP6StylesListener::_handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice) { // We don't want to actual insert anything in the case of a sub-document, but we --- 224,232 ---- { m_currentPageHasContent = true; ! _handleSubDocument(static_cast<WPXSubDocument *>(textPID ? WP6Listener::getPrefixDataPacket(textPID)->getSubDocument() : NULL), false, m_tableList); } } ! void WP6StylesListener::_handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice) { // We don't want to actual insert anything in the case of a sub-document, but we *************** *** 232,241 **** if (!isUndoOn()) { ! std::set <int> oldTextPIDs; ! oldTextPIDs = m_subDocumentTextPIDs; // prevent entering in an endless loop ! if ((textPID) && (oldTextPIDs.find(textPID) == oldTextPIDs.end())) { ! m_subDocumentTextPIDs.insert(textPID); if (isHeaderFooter) { --- 234,243 ---- if (!isUndoOn()) { ! std::set <const WPXSubDocument *> oldSubDocuments; ! oldSubDocuments = m_subDocuments; // prevent entering in an endless loop ! if ((subDocument) && (oldSubDocuments.find(subDocument) == oldSubDocuments.end())) { ! m_subDocuments.insert(subDocument); if (isHeaderFooter) { *************** *** 244,248 **** m_tableList = tableList; ! WP6Listener::getPrefixDataPacket(textPID)->parse(this); m_tableList = oldTableList; --- 246,250 ---- m_tableList = tableList; ! subDocument->parse(this); m_tableList = oldTableList; *************** *** 251,257 **** else { ! WP6Listener::getPrefixDataPacket(textPID)->parse(this); } ! m_subDocumentTextPIDs = oldTextPIDs; } --- 253,259 ---- else { ! subDocument->parse(this); } ! m_subDocuments = oldSubDocuments; } --- NEW FILE: WPXSubDocument.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 Library 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 WPXSUBDOCUMENT_H #define WPXSUBDOCUMENT_H #include "WPXMemoryStream.h" class WPXListener; class WPXSubDocument { public: WPXSubDocument(); virtual ~WPXSubDocument(); virtual void parse(WPXListener *listener) const = 0; protected: WPXMemoryInputStream *m_stream; }; #endif /* WP3SUBDOCUMENT_H */ Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.12 retrieving revision 1.1.2.13 diff -C2 -d -r1.1.2.12 -r1.1.2.13 *** WP3Listener.cpp 25 Nov 2005 20:55:06 -0000 1.1.2.12 --- WP3Listener.cpp 28 Nov 2005 13:00:30 -0000 1.1.2.13 *************** *** 557,561 **** m_ps->m_pageMarginLeft = oldPS->m_pageMarginLeft; m_ps->m_pageMarginRight = oldPS->m_pageMarginRight; ! m_ps->m_subDocumentTextPIDs = oldPS->m_subDocumentTextPIDs; m_ps->m_isNote = oldPS->m_isNote; // END: copy page properties into the new parsing state --- 557,561 ---- m_ps->m_pageMarginLeft = oldPS->m_pageMarginLeft; m_ps->m_pageMarginRight = oldPS->m_pageMarginRight; ! m_ps->m_subDocuments = oldPS->m_subDocuments; m_ps->m_isNote = oldPS->m_isNote; // END: copy page properties into the new parsing state --- NEW FILE: WP6SubDocument.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 Library 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 WP6SUBDOCUMENT_H #define WP6SUBDOCUMENT_H #include "WPXMemoryStream.h" #include "WPXSubDocument.h" #include "WPXListener.h" class WP6SubDocument : public WPXSubDocument { public: WP6SubDocument(uint8_t * streamData, const int dataSize); virtual void parse(WPXListener *listener) const; }; #endif /* WP6SUBDOCUMENT_H */ --- NEW FILE: WPXSubDocument.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 Library 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 "WPXSubDocument.h" #include "WP3Parser.h" #include "libwpd_internal.h" #include "WPXListener.h" WPXSubDocument::WPXSubDocument() : m_stream(NULL) { } WPXSubDocument::~WPXSubDocument() { delete m_stream; } Index: WP3Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.h,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -C2 -d -r1.1.2.9 -r1.1.2.10 *** WP3Listener.h 25 Nov 2005 20:55:06 -0000 1.1.2.9 --- WP3Listener.h 28 Nov 2005 13:00:30 -0000 1.1.2.10 *************** *** 90,94 **** protected: ! virtual void _handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {} virtual void _openParagraph(); --- 90,94 ---- protected: ! virtual void _handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {} virtual void _openParagraph(); |
From: Fridrich S. <str...@us...> - 2005-11-25 20:55:19
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9500/src/lib Modified Files: Tag: fs_refactoring2 Makefile.am WP3DisplayGroup.cpp WP3DisplayGroup.h WP3FootnoteEndnoteGroup.cpp WP3FootnoteEndnoteGroup.h WP3Listener.cpp WP3Listener.h WP3StylesListener.h WP6ContentListener.cpp libwpd_internal.cpp libwpd_internal.h Added Files: Tag: fs_refactoring2 WP3SubDocument.cpp WP3SubDocument.h Log Message: Footnote and Endnote implementation in WP3 parser Index: WP3DisplayGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3DisplayGroup.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 *** WP3DisplayGroup.h 25 Nov 2005 12:42:53 -0000 1.1.2.1 --- WP3DisplayGroup.h 25 Nov 2005 20:55:06 -0000 1.1.2.2 *************** *** 37,40 **** --- 37,41 ---- private: + char * m_noteReference; }; --- NEW FILE: WP3SubDocument.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 Library 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 WP3SUBDOCUMENT_H #define WP3SUBDOCUMENT_H #include "WPXMemoryStream.h" #include "WP3Listener.h" class WP3SubDocument { public: WP3SubDocument(WPXInputStream *input, int dataSize); virtual ~WP3SubDocument(); virtual void parse(WP3Listener *listener) const; private: WPXMemoryInputStream *m_stream; }; #endif /* WP3SUBDOCUMENT_H */ Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -C2 -d -r1.1.2.11 -r1.1.2.12 *** WP3Listener.cpp 24 Nov 2005 12:52:28 -0000 1.1.2.11 --- WP3Listener.cpp 25 Nov 2005 20:55:06 -0000 1.1.2.12 *************** *** 28,31 **** --- 28,32 ---- #include "WPXFileStructure.h" #include "libwpd_internal.h" + #include "WP3SubDocument.h" _WP3ParsingState::_WP3ParsingState(): *************** *** 35,38 **** --- 36,41 ---- { m_textBuffer.clear(); + m_footNoteReference.clear(); + m_endNoteReference.clear(); } *************** *** 40,43 **** --- 43,48 ---- { m_textBuffer.clear(); + m_footNoteReference.clear(); + m_endNoteReference.clear(); DELETEP(m_cellFillColor); } *************** *** 507,510 **** --- 512,603 ---- } + void WP3Listener::insertNoteReference(const WPXNoteType noteType, const char* noteReference) + { + if (!isUndoOn() && (m_ps->m_inSubDocument)) + { + if (noteType == FOOTNOTE) + m_parseState->m_footNoteReference.sprintf("%s", noteReference); + else + m_parseState->m_footNoteReference.sprintf("%s", noteReference); + } + } + + void WP3Listener::insertNote(const WPXNoteType noteType, const WP3SubDocument *subDocument) + { + if (!isUndoOn()) + { + m_ps->m_isNote = true; + int number; + if (noteType == FOOTNOTE) + { + WPXNumberingType numberingType = _extractWPXNumberingTypeFromBuf(m_parseState->m_footNoteReference, ARABIC); + number = _extractDisplayReferenceNumberFromBuf(m_parseState->m_footNoteReference, numberingType); + m_parseState->m_footNoteReference.clear(); + } + else + { + WPXNumberingType numberingType = _extractWPXNumberingTypeFromBuf(m_parseState->m_endNoteReference, ARABIC); + number = _extractDisplayReferenceNumberFromBuf(m_parseState->m_endNoteReference, numberingType); + m_parseState->m_endNoteReference.clear(); + } + + WPXPropertyList propList; + propList.insert("libwpd:number", number); + + if (noteType == FOOTNOTE) + m_listenerImpl->openFootnote(propList); + else + m_listenerImpl->openEndnote(propList); + + // save our old parsing state on our "stack" + WPXParsingState *oldPS = m_ps; + m_ps = new WPXParsingState(); + // BEGIN: copy page properties into the new parsing state + m_ps->m_pageFormWidth = oldPS->m_pageFormWidth; + m_ps->m_pageMarginLeft = oldPS->m_pageMarginLeft; + m_ps->m_pageMarginRight = oldPS->m_pageMarginRight; + m_ps->m_subDocumentTextPIDs = oldPS->m_subDocumentTextPIDs; + m_ps->m_isNote = oldPS->m_isNote; + // END: copy page properties into the new parsing state + m_ps->m_inSubDocument = true; + + // save our old parsing state on our "stack" + WP3ParsingState *oldParseState = m_parseState; + + m_parseState = new WP3ParsingState(); + + if (subDocument) + subDocument->parse(this); + else + _openSpan(); + + // Close the sub-document properly + if (m_ps->m_isParagraphOpened) + _closeParagraph(); + if (m_ps->m_isListElementOpened) + _closeListElement(); + + m_ps->m_currentListLevel = 0; + _changeList(); + + #if 0 + _closeSection(); + #endif + + // restore our old parsing state + delete m_parseState; + m_parseState = oldParseState; + + delete m_ps; + m_ps = oldPS; + + if (noteType == FOOTNOTE) + m_listenerImpl->closeFootnote(); + else + m_listenerImpl->closeEndnote(); + m_ps->m_isNote = false; + } + } + void WP3Listener::_openParagraph() { Index: WP6ContentListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6ContentListener.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 *** WP6ContentListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.2 --- WP6ContentListener.cpp 25 Nov 2005 20:55:07 -0000 1.1.2.3 *************** *** 43,163 **** #define WP6_DEFAULT_FONT_NAME "Times New Roman" - // HACK: this function is really cheesey - int _extractNumericValueFromRoman(const char romanChar) - { - switch (romanChar) - { - case 'I': - case 'i': - return 1; - case 'V': - case 'v': - return 5; - case 'X': - case 'x': - return 10; - default: - throw ParseException(); - } - return 1; - } - - // _extractDisplayReferenceNumberFromBuf: given a nuWP6_DEFAULT_FONT_SIZEmber string in UCS2 represented - // as letters, numbers, or roman numerals.. return an integer value representing its number - // HACK: this function is really cheesey - // NOTE: if the input is not valid, the output is unspecified - int _extractDisplayReferenceNumberFromBuf(const WPXString &buf, const WPXNumberingType listType) - { - if (listType == LOWERCASE_ROMAN || listType == UPPERCASE_ROMAN) - { - int currentSum = 0; - int lastMark = 0; - int currentMark = 0; - WPXString::Iter i(buf); - for (i.rewind(); i.next();) - { - int currentMark = _extractNumericValueFromRoman(*(i())); - if (lastMark < currentMark) { - currentSum = currentMark - lastMark; - } - else - currentSum+=currentMark; - lastMark = currentMark; - } - return currentSum; - } - else if (listType == LOWERCASE || listType == UPPERCASE) - { - // FIXME: what happens to a lettered list that goes past z? ah - // the sweet mysteries of life - if (buf.len()==0) - throw ParseException(); - char c = buf.cstr()[0]; - if (listType==LOWERCASE) - c = toupper(c); - return (c - 64); - } - else if (listType == ARABIC) - { - int currentSum = 0; - WPXString::Iter i(buf); - for (i.rewind(); i.next();) - { - currentSum *= 10; - currentSum+=(*(i())-48); - } - return currentSum; - } - - return 1; - } - - WPXNumberingType _extractWPXNumberingTypeFromBuf(const WPXString &buf, const WPXNumberingType putativeWPXNumberingType) - { - WPXString::Iter i(buf); - for (i.rewind(); i.next();) - { - if ((*(i()) == 'I' || *(i()) == 'V' || *(i()) == 'X') && - (putativeWPXNumberingType == LOWERCASE_ROMAN || putativeWPXNumberingType == UPPERCASE_ROMAN)) - return UPPERCASE_ROMAN; - else if ((*(i()) == 'i' || *(i()) == 'v' || *(i()) == 'x') && - (putativeWPXNumberingType == LOWERCASE_ROMAN || putativeWPXNumberingType == UPPERCASE_ROMAN)) - return LOWERCASE_ROMAN; - else if (*(i()) >= 'A' && *(i()) <= 'Z') - return UPPERCASE; - else if (*(i()) >= 'a' && *(i()) <= 'z') - return LOWERCASE; - } - - return ARABIC; - } - - WPXString _numberingTypeToString(WPXNumberingType t) - { - WPXString sListTypeSymbol("1"); - switch (t) - { - case ARABIC: - sListTypeSymbol.sprintf("1"); - break; - case LOWERCASE: - sListTypeSymbol.sprintf("a"); - break; - case UPPERCASE: - sListTypeSymbol.sprintf("A"); - break; - case LOWERCASE_ROMAN: - sListTypeSymbol.sprintf("i"); - break; - case UPPERCASE_ROMAN: - sListTypeSymbol.sprintf("I"); - break; - } - - return sListTypeSymbol; - } - - - WP6OutlineDefinition::WP6OutlineDefinition(const WP6OutlineLocation outlineLocation, const uint8_t *numberingMethods, const uint8_t tabBehaviourFlag) { --- 43,46 ---- --- NEW FILE: WP3SubDocument.cpp --- /* 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 Library 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 "WP3SubDocument.h" #include "WP3Parser.h" #include "libwpd_internal.h" WP3SubDocument::WP3SubDocument(WPXInputStream *input, int dataSize) : m_stream(NULL) { uint8_t *streamData = new uint8_t[dataSize]; for (int i=0; i<dataSize; i++) { streamData[i] = readU8(input); } m_stream = new WPXMemoryInputStream(streamData, dataSize); } WP3SubDocument::~WP3SubDocument() { delete m_stream; } void WP3SubDocument::parse(WP3Listener *listener) const { m_stream->seek(0, WPX_SEEK_SET); WP3Parser::parseDocument(m_stream, listener); } Index: WP3StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3StylesListener.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 *** WP3StylesListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.4 --- WP3StylesListener.h 25 Nov 2005 20:55:06 -0000 1.1.2.5 *************** *** 72,75 **** --- 72,77 ---- virtual void setTextFont(const char* fontName) {} virtual void setFontSize(const uint16_t fontSize) {} + virtual void insertNoteReference(const WPXNoteType noteType, const char* noteReference) {}; + virtual void insertNote(const WPXNoteType noteType, const WP3SubDocument *subDocument) {}; protected: Index: WP3FootnoteEndnoteGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3FootnoteEndnoteGroup.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 *** WP3FootnoteEndnoteGroup.cpp 25 Nov 2005 12:42:53 -0000 1.1.2.1 --- WP3FootnoteEndnoteGroup.cpp 25 Nov 2005 20:55:06 -0000 1.1.2.2 *************** *** 30,34 **** WP3FootnoteEndnoteGroup::WP3FootnoteEndnoteGroup(WPXInputStream *input) : WP3VariableLengthGroup(), ! m_stream(NULL) { _read(input); --- 30,34 ---- WP3FootnoteEndnoteGroup::WP3FootnoteEndnoteGroup(WPXInputStream *input) : WP3VariableLengthGroup(), ! m_subDocument(NULL) { _read(input); *************** *** 37,46 **** WP3FootnoteEndnoteGroup::~WP3FootnoteEndnoteGroup() { ! delete m_stream; } void WP3FootnoteEndnoteGroup::_readContents(WPXInputStream *input) { ! int tmpSizeOfNote = getSize() - 6; input->seek(25, WPX_SEEK_CUR); tmpSizeOfNote -= 25; --- 37,46 ---- WP3FootnoteEndnoteGroup::~WP3FootnoteEndnoteGroup() { ! delete m_subDocument; } void WP3FootnoteEndnoteGroup::_readContents(WPXInputStream *input) { ! int tmpSizeOfNote = getSize() - 8; input->seek(25, WPX_SEEK_CUR); tmpSizeOfNote -= 25; *************** *** 64,84 **** // subdocument ! uint8_t *streamData = new uint8_t[tmpSizeOfNote]; ! for (i=0; i<tmpSizeOfNote; i++) ! { ! streamData[i] = readU8(input); ! } ! m_stream = new WPXMemoryInputStream(streamData, tmpSizeOfNote); ! } void WP3FootnoteEndnoteGroup::parse(WP3Listener *listener) { WPD_DEBUG_MSG(("WordPerfect: handling a Footnote/Endnote group\n")); - m_stream->seek(0, WPX_SEEK_SET); switch (getSubGroup()) { case WP3_FOOTNOTE_ENDNOTE_GROUP_FOOTNOTE_FUNCTION: break; case WP3_FOOTNOTE_ENDNOTE_GROUP_ENDNOTE_FUNCTION: break; default: // something else we don't support, since it isn't in the docs --- 64,80 ---- // subdocument ! m_subDocument = new WP3SubDocument(input, tmpSizeOfNote); ! } void WP3FootnoteEndnoteGroup::parse(WP3Listener *listener) { WPD_DEBUG_MSG(("WordPerfect: handling a Footnote/Endnote group\n")); switch (getSubGroup()) { case WP3_FOOTNOTE_ENDNOTE_GROUP_FOOTNOTE_FUNCTION: + listener->insertNote(FOOTNOTE, m_subDocument); break; case WP3_FOOTNOTE_ENDNOTE_GROUP_ENDNOTE_FUNCTION: + listener->insertNote(ENDNOTE, m_subDocument); break; default: // something else we don't support, since it isn't in the docs Index: WP3FootnoteEndnoteGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3FootnoteEndnoteGroup.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 *** WP3FootnoteEndnoteGroup.h 25 Nov 2005 12:42:53 -0000 1.1.2.1 --- WP3FootnoteEndnoteGroup.h 25 Nov 2005 20:55:06 -0000 1.1.2.2 *************** *** 28,31 **** --- 28,32 ---- #include "WP3VariableLengthGroup.h" #include "WPXMemoryStream.h" + #include "WP3SubDocument.h" class WP3FootnoteEndnoteGroup : public WP3VariableLengthGroup *************** *** 38,42 **** private: ! WPXMemoryInputStream *m_stream; }; --- 39,43 ---- private: ! WP3SubDocument *m_subDocument; }; Index: libwpd_internal.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.cpp,v retrieving revision 1.19.2.2 retrieving revision 1.19.2.3 diff -C2 -d -r1.19.2.2 -r1.19.2.3 *** libwpd_internal.cpp 23 Nov 2005 12:44:49 -0000 1.19.2.2 --- libwpd_internal.cpp 25 Nov 2005 20:55:07 -0000 1.19.2.3 *************** *** 25,28 **** --- 25,29 ---- #include "libwpd_internal.h" #include "WPXStream.h" + #include <ctype.h> uint8_t readU8(WPXInputStream *input) *************** *** 995,996 **** --- 996,1113 ---- { } + + // HACK: this function is really cheesey + int _extractNumericValueFromRoman(const char romanChar) + { + switch (romanChar) + { + case 'I': + case 'i': + return 1; + case 'V': + case 'v': + return 5; + case 'X': + case 'x': + return 10; + default: + throw ParseException(); + } + return 1; + } + + // _extractDisplayReferenceNumberFromBuf: given a nuWP6_DEFAULT_FONT_SIZEmber string in UCS2 represented + // as letters, numbers, or roman numerals.. return an integer value representing its number + // HACK: this function is really cheesey + // NOTE: if the input is not valid, the output is unspecified + int _extractDisplayReferenceNumberFromBuf(const WPXString &buf, const WPXNumberingType listType) + { + if (listType == LOWERCASE_ROMAN || listType == UPPERCASE_ROMAN) + { + int currentSum = 0; + int lastMark = 0; + int currentMark = 0; + WPXString::Iter i(buf); + for (i.rewind(); i.next();) + { + int currentMark = _extractNumericValueFromRoman(*(i())); + if (lastMark < currentMark) { + currentSum = currentMark - lastMark; + } + else + currentSum+=currentMark; + lastMark = currentMark; + } + return currentSum; + } + else if (listType == LOWERCASE || listType == UPPERCASE) + { + // FIXME: what happens to a lettered list that goes past z? ah + // the sweet mysteries of life + if (buf.len()==0) + throw ParseException(); + char c = buf.cstr()[0]; + if (listType==LOWERCASE) + c = toupper(c); + return (c - 64); + } + else if (listType == ARABIC) + { + int currentSum = 0; + WPXString::Iter i(buf); + for (i.rewind(); i.next();) + { + currentSum *= 10; + currentSum+=(*(i())-48); + } + return currentSum; + } + + return 1; + } + + WPXNumberingType _extractWPXNumberingTypeFromBuf(const WPXString &buf, const WPXNumberingType putativeWPXNumberingType) + { + WPXString::Iter i(buf); + for (i.rewind(); i.next();) + { + if ((*(i()) == 'I' || *(i()) == 'V' || *(i()) == 'X') && + (putativeWPXNumberingType == LOWERCASE_ROMAN || putativeWPXNumberingType == UPPERCASE_ROMAN)) + return UPPERCASE_ROMAN; + else if ((*(i()) == 'i' || *(i()) == 'v' || *(i()) == 'x') && + (putativeWPXNumberingType == LOWERCASE_ROMAN || putativeWPXNumberingType == UPPERCASE_ROMAN)) + return LOWERCASE_ROMAN; + else if (*(i()) >= 'A' && *(i()) <= 'Z') + return UPPERCASE; + else if (*(i()) >= 'a' && *(i()) <= 'z') + return LOWERCASE; + } + + return ARABIC; + } + + WPXString _numberingTypeToString(WPXNumberingType t) + { + WPXString sListTypeSymbol("1"); + switch (t) + { + case ARABIC: + sListTypeSymbol.sprintf("1"); + break; + case LOWERCASE: + sListTypeSymbol.sprintf("a"); + break; + case UPPERCASE: + sListTypeSymbol.sprintf("A"); + break; + case LOWERCASE_ROMAN: + sListTypeSymbol.sprintf("i"); + break; + case UPPERCASE_ROMAN: + sListTypeSymbol.sprintf("I"); + break; + } + + return sListTypeSymbol; + } + Index: WP3DisplayGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3DisplayGroup.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 *** WP3DisplayGroup.cpp 25 Nov 2005 12:42:53 -0000 1.1.2.1 --- WP3DisplayGroup.cpp 25 Nov 2005 20:55:06 -0000 1.1.2.2 *************** *** 30,34 **** WP3DisplayGroup::WP3DisplayGroup(WPXInputStream *input) : ! WP3VariableLengthGroup() { _read(input); --- 30,36 ---- WP3DisplayGroup::WP3DisplayGroup(WPXInputStream *input) : ! WP3VariableLengthGroup(), ! m_noteReference(NULL) ! { _read(input); *************** *** 37,56 **** WP3DisplayGroup::~WP3DisplayGroup() { ! // fixme delete the font name } void WP3DisplayGroup::_readContents(WPXInputStream *input) { ! // this group can contain different kinds of data, thus we need to read ! // the contents accordingly ! switch (getSubGroup()) ! { ! case WP3_DISPLAY_GROUP_INSERT_FOOTNOTE_NUMBER: ! break; ! case WP3_DISPLAY_GROUP_INSERT_ENDNOTE_NUMBER: ! break; ! default: /* something else we don't support, since it isn't in the docs */ ! break; ! } } --- 39,54 ---- WP3DisplayGroup::~WP3DisplayGroup() { ! if (m_noteReference) ! delete [] m_noteReference; } void WP3DisplayGroup::_readContents(WPXInputStream *input) { ! input->seek(4, WPX_SEEK_CUR); ! uint8_t tmpNoteReferenceLength = readU8(input); ! m_noteReference = new char[tmpNoteReferenceLength+1]; ! for (uint8_t i=0; i < tmpNoteReferenceLength; i++) ! m_noteReference[i]=readU8(input); ! m_noteReference[tmpNoteReferenceLength]='\0'; } *************** *** 62,70 **** --- 60,73 ---- { case WP3_DISPLAY_GROUP_INSERT_FOOTNOTE_NUMBER: + listener->insertNoteReference(FOOTNOTE, m_noteReference); break; case WP3_DISPLAY_GROUP_INSERT_ENDNOTE_NUMBER: + listener->insertNoteReference(ENDNOTE, m_noteReference); break; default: // something else we don't support, since it isn't in the docs break; } + + // if (m_noteReference) + // delete [] m_noteReference; } Index: libwpd_internal.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.h,v retrieving revision 1.17.2.1 retrieving revision 1.17.2.2 diff -C2 -d -r1.17.2.1 -r1.17.2.2 *** libwpd_internal.h 21 Nov 2005 13:43:49 -0000 1.17.2.1 --- libwpd_internal.h 25 Nov 2005 20:55:07 -0000 1.17.2.2 *************** *** 216,218 **** --- 216,226 ---- }; + // Various usefull, but cheesey functions + + int _extractNumericValueFromRoman(const char romanChar); + int _extractDisplayReferenceNumberFromBuf(const WPXString &buf, const WPXNumberingType listType); + WPXNumberingType _extractWPXNumberingTypeFromBuf(const WPXString &buf, const WPXNumberingType putativeWPXNumberingType); + WPXString _numberingTypeToString(WPXNumberingType t); + + #endif /* LIBWPD_INTERNAL_H */ Index: WP3Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.h,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -C2 -d -r1.1.2.8 -r1.1.2.9 *** WP3Listener.h 24 Nov 2005 12:52:29 -0000 1.1.2.8 --- WP3Listener.h 25 Nov 2005 20:55:06 -0000 1.1.2.9 *************** *** 1,4 **** --- 1,5 ---- /* libwpd * Copyright (C) 2004 Marc Maurer (j.m...@st...) + * Copyright (C) 2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or *************** *** 39,44 **** --- 40,48 ---- WPXString m_textBuffer; RGBSColor * m_cellFillColor; + WPXString m_footNoteReference; + WPXString m_endNoteReference; }; + class WP3SubDocument; class WP3Listener : public WPXListener *************** *** 82,85 **** --- 86,91 ---- virtual void setTextFont(const char* fontName); virtual void setFontSize(const uint16_t fontSize); + virtual void insertNoteReference(const WPXNoteType noteType, const char* noteReference); + virtual void insertNote(const WPXNoteType noteType, const WP3SubDocument *subDocument); protected: Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Makefile.am,v retrieving revision 1.61.2.5 retrieving revision 1.61.2.6 diff -C2 -d -r1.61.2.5 -r1.61.2.6 *** Makefile.am 25 Nov 2005 12:42:53 -0000 1.61.2.5 --- Makefile.am 25 Nov 2005 20:55:06 -0000 1.61.2.6 *************** *** 57,60 **** --- 57,61 ---- WP3SingleByteFunction.cpp \ WP3StylesListener.cpp \ + WP3SubDocument.cpp \ WP3TablesGroup.cpp \ WP3UndoGroup.cpp \ *************** *** 158,161 **** --- 159,163 ---- WP3SingleByteFunction.h \ WP3StylesListener.h \ + WP3SubDocument.h \ WP3TablesGroup.h \ WP3UndoGroup.h \ |
From: Fridrich S. <str...@us...> - 2005-11-25 12:43:01
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30907/src/lib Modified Files: Tag: fs_refactoring2 Makefile.am WP3DefinitionGroup.cpp WP3FileStructure.h WP3FontGroup.cpp WP3PageFormatGroup.cpp WP3VariableLengthGroup.cpp WP3VariableLengthGroup.h WP5TableEOPGroup.cpp makefile.mk Added Files: Tag: fs_refactoring2 WP3DisplayGroup.cpp WP3DisplayGroup.h WP3FootnoteEndnoteGroup.cpp WP3FootnoteEndnoteGroup.h Log Message: Beginning to work on Foot/Notes for WP3 file format. Nothing converted for the while though ;-) --- NEW FILE: WP3DisplayGroup.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 WP3DISPLAYGROUP_H #define WP3DISPLAYGROUP_H #include "WP3VariableLengthGroup.h" class WP3DisplayGroup : public WP3VariableLengthGroup { public: WP3DisplayGroup(WPXInputStream *input); virtual ~WP3DisplayGroup(); virtual void _readContents(WPXInputStream *input); virtual void parse(WP3Listener *listener); private: }; #endif /* WP3DISPLAYGROUP_H */ Index: makefile.mk =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/makefile.mk,v retrieving revision 1.6.4.3 retrieving revision 1.6.4.4 diff -C2 -d -r1.6.4.3 -r1.6.4.4 *** makefile.mk 24 Nov 2005 12:52:30 -0000 1.6.4.3 --- makefile.mk 25 Nov 2005 12:42:53 -0000 1.6.4.4 *************** *** 22,29 **** --- 22,32 ---- $(SLO)$/WP3AttributeGroup.obj \ $(SLO)$/WP3DefinitionGroup.obj \ + $(SLO)$/WP3DisplayGroup.obj \ $(SLO)$/WP3EndOfLinePageGroup.obj \ $(SLO)$/WP3ExtendedCharacterGroup.obj \ $(SLO)$/WP3FileStructure.obj \ $(SLO)$/WP3FixedLengthGroup.obj \ + $(SLO)$/WP3FontGroup.obj \ + $(SLO)$/WP3FootnoteEndnoteGroup \ $(SLO)$/WP3Header.obj \ $(SLO)$/WP3Listener.obj \ *************** *** 59,62 **** --- 62,67 ---- $(SLO)$/WP5SingleByteFunction.obj \ $(SLO)$/WP5StylesListener.obj \ + $(SLO)$/WP5TableEOLGroup.obj \ + $(SLO)$/WP5TableEOPGroup.obj \ $(SLO)$/WP5UnsupportedFixedLengthGroup.obj \ $(SLO)$/WP5UnsupportedVariableLengthGroup.obj \ Index: WP3FileStructure.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3FileStructure.h,v retrieving revision 1.9.2.3 retrieving revision 1.9.2.4 diff -C2 -d -r1.9.2.3 -r1.9.2.4 *** WP3FileStructure.h 24 Nov 2005 12:52:28 -0000 1.9.2.3 --- WP3FileStructure.h 25 Nov 2005 12:42:53 -0000 1.9.2.4 *************** *** 27,31 **** #define WP3FILESTRUCTURE_H ! // size of the fixed length functiongroups 0xC0 to 0xCF extern int WP3_FIXED_LENGTH_FUNCTION_GROUP_SIZE[16]; --- 27,31 ---- #define WP3FILESTRUCTURE_H ! // size of the fixed length function groups 0xC0 to 0xCF extern int WP3_FIXED_LENGTH_FUNCTION_GROUP_SIZE[16]; *************** *** 43,46 **** --- 43,49 ---- #define WP3_DEFINITION_GROUP 0xD2 + #define WP3_FOOTNOTE_ENDNOTE_GROUP 0xD6 + + #define WP3_DISPLAY_GROUP 0xD8 #define WP3_MISCELLANEOUS_GROUP 0xD9 #define WP3_WINDOW_GROUP 0xDA *************** *** 84,87 **** --- 87,98 ---- #define WP3_DEFINITION_GROUP_SET_COLUMNS 0x01 + /* Footnote/Endnote Group */ + #define WP3_FOOTNOTE_ENDNOTE_GROUP_FOOTNOTE_FUNCTION 0x00 + #define WP3_FOOTNOTE_ENDNOTE_GROUP_ENDNOTE_FUNCTION 0x01 + + /* Display Group */ + #define WP3_DISPLAY_GROUP_INSERT_FOOTNOTE_NUMBER 0x07 + #define WP3_DISPLAY_GROUP_INSERT_ENDNOTE_NUMBER 0x08 + /* Miscellaneous Group */ Index: WP3FontGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3FontGroup.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 *** WP3FontGroup.cpp 21 Nov 2005 13:43:49 -0000 1.1.2.2 --- WP3FontGroup.cpp 25 Nov 2005 12:42:53 -0000 1.1.2.3 *************** *** 78,82 **** void WP3FontGroup::parse(WP3Listener *listener) { ! WPD_DEBUG_MSG(("WordPerfect: handling a Page group\n")); switch (getSubGroup()) --- 78,82 ---- void WP3FontGroup::parse(WP3Listener *listener) { ! WPD_DEBUG_MSG(("WordPerfect: handling a Font group\n")); switch (getSubGroup()) Index: WP5TableEOPGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5TableEOPGroup.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 *** WP5TableEOPGroup.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.2 --- WP5TableEOPGroup.cpp 25 Nov 2005 12:42:53 -0000 1.1.2.3 *************** *** 56,60 **** void WP5TableEOPGroup::parse(WP5Listener *listener) { ! WPD_DEBUG_MSG(("WordPerfect: handling a Page group\n")); switch (getSubGroup()) --- 56,60 ---- void WP5TableEOPGroup::parse(WP5Listener *listener) { ! WPD_DEBUG_MSG(("WordPerfect: handling a Table EOP group\n")); switch (getSubGroup()) --- NEW FILE: WP3FootnoteEndnoteGroup.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 "WP3FootnoteEndnoteGroup.h" #include "WP3FileStructure.h" #include "WP3Parser.h" WP3FootnoteEndnoteGroup::WP3FootnoteEndnoteGroup(WPXInputStream *input) : WP3VariableLengthGroup(), m_stream(NULL) { _read(input); } WP3FootnoteEndnoteGroup::~WP3FootnoteEndnoteGroup() { delete m_stream; } void WP3FootnoteEndnoteGroup::_readContents(WPXInputStream *input) { int tmpSizeOfNote = getSize() - 6; input->seek(25, WPX_SEEK_CUR); tmpSizeOfNote -= 25; int tmpNumOfPages = readU16(input, true); tmpSizeOfNote -= 2; int i; for (i=0; i<tmpNumOfPages; i++) { input->seek(4, WPX_SEEK_CUR); tmpSizeOfNote -= 4; } int tmpNumBreakTableEntries = readU16(input, true); tmpSizeOfNote -= 2; for (i=0; i<tmpNumBreakTableEntries; i++) { input->seek(6, WPX_SEEK_CUR); tmpSizeOfNote -= 6; } // here we skipped all the useless junk and we are at the beginning of the // actual subdocument. tmpSizeOfNote should give the size in bytes of the // subdocument uint8_t *streamData = new uint8_t[tmpSizeOfNote]; for (i=0; i<tmpSizeOfNote; i++) { streamData[i] = readU8(input); } m_stream = new WPXMemoryInputStream(streamData, tmpSizeOfNote); } void WP3FootnoteEndnoteGroup::parse(WP3Listener *listener) { WPD_DEBUG_MSG(("WordPerfect: handling a Footnote/Endnote group\n")); m_stream->seek(0, WPX_SEEK_SET); switch (getSubGroup()) { case WP3_FOOTNOTE_ENDNOTE_GROUP_FOOTNOTE_FUNCTION: break; case WP3_FOOTNOTE_ENDNOTE_GROUP_ENDNOTE_FUNCTION: break; default: // something else we don't support, since it isn't in the docs break; } } --- NEW FILE: WP3FootnoteEndnoteGroup.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 WP3FOOTNOTEENDNOTEGROUP_H #define WP3FOOTNOTEENDNOTEGROUP_H #include "WP3VariableLengthGroup.h" #include "WPXMemoryStream.h" class WP3FootnoteEndnoteGroup : public WP3VariableLengthGroup { public: WP3FootnoteEndnoteGroup(WPXInputStream *input); virtual ~WP3FootnoteEndnoteGroup(); virtual void _readContents(WPXInputStream *input); virtual void parse(WP3Listener *listener); private: WPXMemoryInputStream *m_stream; }; #endif /* WP3FOOTNOTEENDNOTEGROUP_H */ Index: WP3VariableLengthGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3VariableLengthGroup.h,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** WP3VariableLengthGroup.h 19 Jul 2004 12:53:47 -0000 1.1 --- WP3VariableLengthGroup.h 25 Nov 2005 12:42:53 -0000 1.1.4.1 *************** *** 1,4 **** --- 1,5 ---- /* libwpd * Copyright (C) 2004 Marc Maurer (j.m...@st...) + * Copyright (C) 2005 Fridrich Strba (fri...@bl...) * * This library is free software; you can redistribute it and/or *************** *** 41,44 **** --- 42,46 ---- const uint8_t getSubGroup() const { return m_subGroup; } + const uint16_t getSize() const { return m_size;} private: Index: WP3DefinitionGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3DefinitionGroup.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 *** WP3DefinitionGroup.cpp 24 Nov 2005 12:52:28 -0000 1.1.2.1 --- WP3DefinitionGroup.cpp 25 Nov 2005 12:42:53 -0000 1.1.2.2 *************** *** 96,100 **** void WP3DefinitionGroup::parse(WP3Listener *listener) { ! WPD_DEBUG_MSG(("WordPerfect: handling a Page group\n")); switch (getSubGroup()) --- 96,100 ---- void WP3DefinitionGroup::parse(WP3Listener *listener) { ! WPD_DEBUG_MSG(("WordPerfect: handling a Definition group\n")); switch (getSubGroup()) --- NEW FILE: WP3DisplayGroup.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 "WP3DisplayGroup.h" #include "WP3FileStructure.h" #include "libwpd_internal.h" #include "libwpd_math.h" WP3DisplayGroup::WP3DisplayGroup(WPXInputStream *input) : WP3VariableLengthGroup() { _read(input); } WP3DisplayGroup::~WP3DisplayGroup() { // fixme delete the font name } void WP3DisplayGroup::_readContents(WPXInputStream *input) { // this group can contain different kinds of data, thus we need to read // the contents accordingly switch (getSubGroup()) { case WP3_DISPLAY_GROUP_INSERT_FOOTNOTE_NUMBER: break; case WP3_DISPLAY_GROUP_INSERT_ENDNOTE_NUMBER: break; default: /* something else we don't support, since it isn't in the docs */ break; } } void WP3DisplayGroup::parse(WP3Listener *listener) { WPD_DEBUG_MSG(("WordPerfect: handling a Display group\n")); switch (getSubGroup()) { case WP3_DISPLAY_GROUP_INSERT_FOOTNOTE_NUMBER: break; case WP3_DISPLAY_GROUP_INSERT_ENDNOTE_NUMBER: 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.4.2.2 retrieving revision 1.4.2.3 diff -C2 -d -r1.4.2.2 -r1.4.2.3 *** WP3PageFormatGroup.cpp 10 Nov 2005 12:57:17 -0000 1.4.2.2 --- WP3PageFormatGroup.cpp 25 Nov 2005 12:42:53 -0000 1.4.2.3 *************** *** 102,106 **** void WP3PageFormatGroup::parse(WP3Listener *listener) { ! WPD_DEBUG_MSG(("WordPerfect: handling a Page group\n")); switch (getSubGroup()) --- 102,106 ---- void WP3PageFormatGroup::parse(WP3Listener *listener) { ! WPD_DEBUG_MSG(("WordPerfect: handling a Page Format group\n")); switch (getSubGroup()) Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Makefile.am,v retrieving revision 1.61.2.4 retrieving revision 1.61.2.5 diff -C2 -d -r1.61.2.4 -r1.61.2.5 *** Makefile.am 24 Nov 2005 12:52:26 -0000 1.61.2.4 --- Makefile.am 25 Nov 2005 12:42:53 -0000 1.61.2.5 *************** *** 42,45 **** --- 42,46 ---- WP3AttributeGroup.cpp \ WP3DefinitionGroup.cpp \ + WP3DisplayGroup.cpp \ WP3EndOfLinePageGroup.cpp \ WP3ExtendedCharacterGroup.cpp \ *************** *** 47,50 **** --- 48,52 ---- WP3FixedLengthGroup.cpp \ WP3FontGroup.cpp \ + WP3FootnoteEndnoteGroup.cpp \ WP3Header.cpp \ WP3Listener.cpp \ *************** *** 141,144 **** --- 143,147 ---- WP3AttributeGroup.h \ WP3DefinitionGroup.h \ + WP3DisplayGroup.h \ WP3EndOfLinePageGroup.h \ WP3ExtendedCharacterGroup.h \ *************** *** 146,149 **** --- 149,153 ---- WP3FixedLengthGroup.h \ WP3FontGroup.h \ + WP3FootnoteEndnoteGroup.h \ WP3Header.h \ WP3Listener.h \ Index: WP3VariableLengthGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3VariableLengthGroup.cpp,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -C2 -d -r1.4.2.2 -r1.4.2.3 *** WP3VariableLengthGroup.cpp 24 Nov 2005 12:52:30 -0000 1.4.2.2 --- WP3VariableLengthGroup.cpp 25 Nov 2005 12:42:53 -0000 1.4.2.3 *************** *** 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 *************** *** 32,35 **** --- 32,37 ---- #include "WP3FontGroup.h" #include "WP3DefinitionGroup.h" + #include "WP3DisplayGroup.h" + #include "WP3FootnoteEndnoteGroup.h" #include "WP3TablesGroup.h" #include "libwpd_internal.h" *************** *** 55,58 **** --- 57,64 ---- case WP3_DEFINITION_GROUP: return new WP3DefinitionGroup(input); + case WP3_FOOTNOTE_ENDNOTE_GROUP: + return new WP3FootnoteEndnoteGroup(input); + case WP3_DISPLAY_GROUP: + return new WP3DisplayGroup(input); default: // this is an unhandled group, just skip it |
From: Fridrich S. <str...@us...> - 2005-11-24 12:52:40
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10893/src/lib Modified Files: Tag: fs_refactoring2 Makefile.am WP3EndOfLinePageGroup.cpp WP3FileStructure.h WP3Listener.cpp WP3Listener.h WP3VariableLengthGroup.cpp makefile.mk Added Files: Tag: fs_refactoring2 WP3DefinitionGroup.cpp WP3DefinitionGroup.h Log Message: Add multiple columns support into the WP3 parser. Seems that the feature tests are now having all the features converted Index: makefile.mk =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/makefile.mk,v retrieving revision 1.6.4.2 retrieving revision 1.6.4.3 diff -C2 -d -r1.6.4.2 -r1.6.4.3 *** makefile.mk 10 Nov 2005 12:57:17 -0000 1.6.4.2 --- makefile.mk 24 Nov 2005 12:52:30 -0000 1.6.4.3 *************** *** 21,24 **** --- 21,25 ---- $(SLO)$/libwpd_math.obj \ $(SLO)$/WP3AttributeGroup.obj \ + $(SLO)$/WP3DefinitionGroup.obj \ $(SLO)$/WP3EndOfLinePageGroup.obj \ $(SLO)$/WP3ExtendedCharacterGroup.obj \ *************** *** 26,31 **** $(SLO)$/WP3FixedLengthGroup.obj \ $(SLO)$/WP3Header.obj \ ! $(SLO)$/WP3Listener.obj \ ! $(SLO)$/WP3StylesListener.obj \ $(SLO)$/WP3MiscellaneousGroup.obj \ $(SLO)$/WP3PageFormatGroup.obj \ --- 27,31 ---- $(SLO)$/WP3FixedLengthGroup.obj \ $(SLO)$/WP3Header.obj \ ! $(SLO)$/WP3Listener.obj \ $(SLO)$/WP3MiscellaneousGroup.obj \ $(SLO)$/WP3PageFormatGroup.obj \ *************** *** 33,36 **** --- 33,37 ---- $(SLO)$/WP3Part.obj \ $(SLO)$/WP3SingleByteFunction.obj \ + $(SLO)$/WP3StylesListener.obj \ $(SLO)$/WP3UndoGroup.obj \ $(SLO)$/WP3UnsupportedFixedLengthGroup.obj \ *************** *** 40,49 **** $(SLO)$/WP42Heuristics.obj \ $(SLO)$/WP42Listener.obj \ - $(SLO)$/WP42StylesListener.obj \ $(SLO)$/WP42Parser.obj \ $(SLO)$/WP42Part.obj \ $(SLO)$/WP42UnsupportedVariableLengthGroup.obj \ $(SLO)$/WP42VariableLengthGroup.obj \ $(SLO)$/WP5AttributeGroup.obj \ $(SLO)$/WP5ExtendedCharacterGroup.obj \ $(SLO)$/WP5FileStructure.obj \ --- 41,51 ---- $(SLO)$/WP42Heuristics.obj \ $(SLO)$/WP42Listener.obj \ $(SLO)$/WP42Parser.obj \ $(SLO)$/WP42Part.obj \ + $(SLO)$/WP42StylesListener.obj \ $(SLO)$/WP42UnsupportedVariableLengthGroup.obj \ $(SLO)$/WP42VariableLengthGroup.obj \ $(SLO)$/WP5AttributeGroup.obj \ + $(SLO)$/WP5DefinitionGroup.obj \ $(SLO)$/WP5ExtendedCharacterGroup.obj \ $(SLO)$/WP5FileStructure.obj \ *************** *** 51,66 **** $(SLO)$/WP5FormatGroup.obj \ $(SLO)$/WP5Header.obj \ ! $(SLO)$/WP5Listener.obj \ ! $(SLO)$/WP5StylesListener.obj \ $(SLO)$/WP5PageFormatGroup.obj \ $(SLO)$/WP5Parser.obj \ $(SLO)$/WP5Part.obj \ $(SLO)$/WP5SingleByteFunction.obj \ $(SLO)$/WP5UnsupportedFixedLengthGroup.obj \ $(SLO)$/WP5UnsupportedVariableLengthGroup.obj \ $(SLO)$/WP5VariableLengthGroup.obj \ $(SLO)$/WP6AttributeGroup.obj \ $(SLO)$/WP6CharacterGroup.obj \ $(SLO)$/WP6ColumnGroup.obj \ $(SLO)$/WP6DefaultInitialFontPacket.obj \ $(SLO)$/WP6DisplayNumberReferenceGroup.obj \ --- 53,71 ---- $(SLO)$/WP5FormatGroup.obj \ $(SLO)$/WP5Header.obj \ ! $(SLO)$/WP5Listener.obj \ $(SLO)$/WP5PageFormatGroup.obj \ $(SLO)$/WP5Parser.obj \ $(SLO)$/WP5Part.obj \ $(SLO)$/WP5SingleByteFunction.obj \ + $(SLO)$/WP5StylesListener.obj \ $(SLO)$/WP5UnsupportedFixedLengthGroup.obj \ $(SLO)$/WP5UnsupportedVariableLengthGroup.obj \ $(SLO)$/WP5VariableLengthGroup.obj \ + $(SLO)$/WP60Header.obj \ + $(SLO)$/WP61Header.obj \ $(SLO)$/WP6AttributeGroup.obj \ $(SLO)$/WP6CharacterGroup.obj \ $(SLO)$/WP6ColumnGroup.obj \ + $(SLO)$/WP6ContentListener.obj \ $(SLO)$/WP6DefaultInitialFontPacket.obj \ $(SLO)$/WP6DisplayNumberReferenceGroup.obj \ *************** *** 75,95 **** $(SLO)$/WP6GeneralTextPacket.obj \ $(SLO)$/WP6Header.obj \ - $(SLO)$/WP60Header.obj \ - $(SLO)$/WP61Header.obj \ $(SLO)$/WP6HeaderFooterGroup.obj \ $(SLO)$/WP6HighlightGroup.obj \ ! $(SLO)$/WP6ContentListener.obj \ ! $(SLO)$/WP6Listener.obj \ ! $(SLO)$/WP6StylesListener.obj \ ! $(SLO)$/WP6Parser.obj \ $(SLO)$/WP6OutlineStylePacket.obj \ $(SLO)$/WP6PageGroup.obj \ $(SLO)$/WP6ParagraphGroup.obj \ $(SLO)$/WP6Part.obj \ $(SLO)$/WP6PrefixData.obj \ - $(SLO)$/WP6PrefixIndice.obj \ $(SLO)$/WP6PrefixDataPacket.obj \ $(SLO)$/WP6SingleByteFunction.obj \ $(SLO)$/WP6StyleGroup.obj \ $(SLO)$/WP6TabGroup.obj \ $(SLO)$/WP6UndoGroup.obj \ --- 80,97 ---- $(SLO)$/WP6GeneralTextPacket.obj \ $(SLO)$/WP6Header.obj \ $(SLO)$/WP6HeaderFooterGroup.obj \ $(SLO)$/WP6HighlightGroup.obj \ ! $(SLO)$/WP6Listener.obj \ $(SLO)$/WP6OutlineStylePacket.obj \ $(SLO)$/WP6PageGroup.obj \ $(SLO)$/WP6ParagraphGroup.obj \ + $(SLO)$/WP6Parser.obj \ $(SLO)$/WP6Part.obj \ $(SLO)$/WP6PrefixData.obj \ $(SLO)$/WP6PrefixDataPacket.obj \ + $(SLO)$/WP6PrefixIndice.obj \ $(SLO)$/WP6SingleByteFunction.obj \ $(SLO)$/WP6StyleGroup.obj \ + $(SLO)$/WP6StylesListener.obj \ $(SLO)$/WP6TabGroup.obj \ $(SLO)$/WP6UndoGroup.obj \ *************** *** 97,112 **** $(SLO)$/WP6UnsupportedVariableLengthGroup.obj \ $(SLO)$/WP6VariableLengthGroup.obj \ ! $(SLO)$/WPXPageSpan.obj \ $(SLO)$/WPXHeader.obj \ $(SLO)$/WPXListener.obj \ $(SLO)$/WPXMemoryStream.obj \ ! $(SLO)$/WPXTable.obj \ $(SLO)$/WPXParser.obj \ $(SLO)$/WPXPart.obj \ $(SLO)$/WPXProperty.obj \ $(SLO)$/WPXPropertyList.obj \ - $(SLO)$/WPXString.obj \ $(SLO)$/WPXPropertyListVector.obj \ ! $(SLO)$/WPDocument.obj LIB1ARCHIV=$(LB)$/libwpdlib.a --- 99,114 ---- $(SLO)$/WP6UnsupportedVariableLengthGroup.obj \ $(SLO)$/WP6VariableLengthGroup.obj \ ! $(SLO)$/WPDocument.obj \ $(SLO)$/WPXHeader.obj \ $(SLO)$/WPXListener.obj \ $(SLO)$/WPXMemoryStream.obj \ ! $(SLO)$/WPXPageSpan.obj \ $(SLO)$/WPXParser.obj \ $(SLO)$/WPXPart.obj \ $(SLO)$/WPXProperty.obj \ $(SLO)$/WPXPropertyList.obj \ $(SLO)$/WPXPropertyListVector.obj \ ! $(SLO)$/WPXString.obj \ ! $(SLO)$/WPXTable.obj LIB1ARCHIV=$(LB)$/libwpdlib.a --- NEW FILE: WP3DefinitionGroup.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 WP3DEFINITIONGROUP_H #define WP3DEFINITIONGROUP_H #include "WP3VariableLengthGroup.h" class WP3DefinitionGroup : public WP3VariableLengthGroup { public: WP3DefinitionGroup(WPXInputStream *input); virtual ~WP3DefinitionGroup(); virtual void _readContents(WPXInputStream *input); virtual void parse(WP3Listener *listener); private: /* Variables used for subgroup 0x01 Set Columns On/Off */ uint8_t m_colType; uint8_t m_numColumns; std::vector<bool> m_isFixedWidth; std::vector<float> m_columnWidth; }; #endif /* WP3DefinitionGroup_H */ Index: WP3EndOfLinePageGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3EndOfLinePageGroup.cpp,v retrieving revision 1.2.4.4 retrieving revision 1.2.4.5 diff -C2 -d -r1.2.4.4 -r1.2.4.5 *** WP3EndOfLinePageGroup.cpp 17 Nov 2005 15:34:13 -0000 1.2.4.4 --- WP3EndOfLinePageGroup.cpp 24 Nov 2005 12:52:28 -0000 1.2.4.5 *************** *** 96,101 **** --- 96,103 ---- break; case 0x08: // Hard End of Column + listener->insertBreak(WPX_COLUMN_BREAK); break; case 0x09: // Hard End of Column/Soft End of Page + listener->insertBreak(WPX_COLUMN_BREAK); break; case 0x0A: // Hard End of Line (Hard EOC not in columns) *************** *** 126,131 **** --- 128,135 ---- break; case 0x14: // Temporary Hard End of Column + listener->insertBreak(WPX_COLUMN_BREAK); break; case 0x15: // Temporary Hard End of Column/Soft EOP + listener->insertBreak(WPX_COLUMN_BREAK); break; case 0x16: // Hard End of Table Cell Index: WP3FileStructure.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3FileStructure.h,v retrieving revision 1.9.2.2 retrieving revision 1.9.2.3 diff -C2 -d -r1.9.2.2 -r1.9.2.3 *** WP3FileStructure.h 21 Nov 2005 13:43:49 -0000 1.9.2.2 --- WP3FileStructure.h 24 Nov 2005 12:52:28 -0000 1.9.2.3 *************** *** 41,44 **** --- 41,45 ---- #define WP3_PAGE_FORMAT_GROUP 0xD0 #define WP3_FONT_GROUP 0xD1 + #define WP3_DEFINITION_GROUP 0xD2 #define WP3_MISCELLANEOUS_GROUP 0xD9 *************** *** 80,83 **** --- 81,87 ---- #define WP3_FONT_GROUP_SET_FONT_SIZE 0x02 + /* Definition Group */ + #define WP3_DEFINITION_GROUP_SET_COLUMNS 0x01 + /* Miscellaneous Group */ *************** *** 101,103 **** --- 105,114 ---- #define WP3_TABLES_GROUP_SET_TABLE_ROW_MODE 0x0E + /* Column Types */ + + #define WP3_COLUMN_TYPE_COLLUMNS_OFF 0x01 + #define WP3_COLUMN_TYPE_NEWSPAPER 0x01 + #define WP3_COLUMN_TYPE_PARALLEL 0x02 + #define WP3_COLUMN_TYPE_EXTENDED 0x03 + #endif /* WP3FILESTRUCTURE_H */ Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -C2 -d -r1.1.2.10 -r1.1.2.11 *** WP3Listener.cpp 23 Nov 2005 12:44:49 -0000 1.1.2.10 --- WP3Listener.cpp 24 Nov 2005 12:52:28 -0000 1.1.2.11 *************** *** 415,418 **** --- 415,480 ---- } + void WP3Listener::columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth, + const std::vector<bool> &isFixedWidth) + { + if (!isUndoOn()) + { + // In WP, the last column ends with a hard column break code. + // In this case, we do not really want to insert any column break + m_ps->m_isParagraphColumnBreak = false; + m_ps->m_isTextColumnWithoutParagraph = false; + + float remainingSpace = m_ps->m_pageFormWidth - m_ps->m_pageMarginLeft - m_ps->m_pageMarginRight + - m_ps->m_leftMarginByPageMarginChange - m_ps->m_rightMarginByPageMarginChange; + // determine the space that is to be divided between columns whose width is expressed in percentage of remaining space + std::vector<WPXColumnDefinition> tmpColumnDefinition; + tmpColumnDefinition.clear(); + if (numColumns > 1) + { + int i; + for (i=0; i<columnWidth.size(); i++) + { + if (isFixedWidth[i]) + remainingSpace -= columnWidth[i]; + } + WPXColumnDefinition tmpColumn; + for (i=0; i<numColumns; i++) + { + if (i == 0) + tmpColumn.m_leftGutter = 0.0f; + else if (isFixedWidth[2*i-1]) + tmpColumn.m_leftGutter = 0.5f * columnWidth[2*i-1]; + else + tmpColumn.m_leftGutter = 0.5f * remainingSpace * columnWidth[2*i-1]; + + if (i >= (numColumns - 1)) + tmpColumn.m_rightGutter = 0.0f; + else if (isFixedWidth[2*i+1]) + tmpColumn.m_rightGutter = 0.5f * columnWidth[2*i+1]; + else + tmpColumn.m_rightGutter = 0.5f * remainingSpace * columnWidth[2*i+1]; + + if (isFixedWidth[2*i]) + tmpColumn.m_width = columnWidth[2*i]; + else + tmpColumn.m_width = remainingSpace * columnWidth[2*i]; + + tmpColumn.m_width += tmpColumn.m_leftGutter + tmpColumn.m_rightGutter; + + tmpColumnDefinition.push_back(tmpColumn); + } + } + + if (!m_ps->m_inSubDocument && !m_ps->m_isTableOpened) + _closeSection(); + else + m_ps->m_sectionAttributesChanged = true; + m_ps->m_numColumns = numColumns; + m_ps->m_textColumns = tmpColumnDefinition; + m_ps->m_isTextColumnWithoutParagraph = true; + } + } + + void WP3Listener::setTextColor(const RGBSColor *fontColor) { --- NEW FILE: WP3DefinitionGroup.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 "WP3DefinitionGroup.h" #include "WP3FileStructure.h" #include "WPXFileStructure.h" #include "libwpd_internal.h" #include "libwpd_math.h" WP3DefinitionGroup::WP3DefinitionGroup(WPXInputStream *input) : WP3VariableLengthGroup() { _read(input); } WP3DefinitionGroup::~WP3DefinitionGroup() { // fixme delete the font name } void WP3DefinitionGroup::_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_DEFINITION_GROUP_SET_COLUMNS: { uint8_t tmpColType = readU8(input); if (tmpColType) { uint8_t tmpNumColumns = readU8(input); if (tmpNumColumns) input->seek(((2*tmpNumColumns) - 1), WPX_SEEK_CUR); } m_colType = readU8(input); if (!m_colType) { m_numColumns = 1; m_isFixedWidth.clear(); m_columnWidth.clear(); } else { m_numColumns = readU8(input); if (m_numColumns > 1) { for (int i=0; i<((2*m_numColumns)-1); i++) { if (i%2) { uint32_t tmpSpaceBetweenColumns = readU32(input, true); m_isFixedWidth.push_back(true); m_columnWidth.push_back((float)((double)fixedPointToWPUs(tmpSpaceBetweenColumns)/(double)WPX_NUM_WPUS_PER_INCH)); } else { uint16_t tmpSizeOfColumn = readU16(input, true); m_isFixedWidth.push_back(false); m_columnWidth.push_back((float)((double)tmpSizeOfColumn/(double)0x10000)); } } } } } break; default: /* something else we don't support, since it isn't in the docs */ break; } } void WP3DefinitionGroup::parse(WP3Listener *listener) { WPD_DEBUG_MSG(("WordPerfect: handling a Page group\n")); switch (getSubGroup()) { case WP3_DEFINITION_GROUP_SET_COLUMNS: // number of columns = {0,1} means columns off if ((m_numColumns <= 1)) { listener->columnChange(NEWSPAPER, 1, m_columnWidth, m_isFixedWidth); // the value "1" is bugus, the false bool gives you all the information you need here } else { switch (m_colType) { case WP3_COLUMN_TYPE_NEWSPAPER: listener->columnChange(NEWSPAPER, m_numColumns, m_columnWidth, m_isFixedWidth); break; case WP3_COLUMN_TYPE_PARALLEL: listener->columnChange(PARALLEL, m_numColumns, m_columnWidth, m_isFixedWidth); break; case WP3_COLUMN_TYPE_EXTENDED: listener->columnChange(PARALLEL_PROTECT, m_numColumns, m_columnWidth, m_isFixedWidth); break; default: // something else we don't support, since it isn't in the docs break; } } break; default: // something else we don't support, since it isn't in the docs break; } } Index: WP3Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.h,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.h 23 Nov 2005 12:44:49 -0000 1.1.2.7 --- WP3Listener.h 24 Nov 2005 12:52:29 -0000 1.1.2.8 *************** *** 64,68 **** virtual void indentFirstLineChange(const int16_t offset); virtual void columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth, ! const std::vector<bool> &isFixedWidth) {}; virtual void endDocument(); --- 64,68 ---- virtual void indentFirstLineChange(const int16_t offset); virtual void columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth, ! const std::vector<bool> &isFixedWidth); virtual void endDocument(); Index: Makefile.am =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Makefile.am,v retrieving revision 1.61.2.3 retrieving revision 1.61.2.4 diff -C2 -d -r1.61.2.3 -r1.61.2.4 *** Makefile.am 17 Nov 2005 15:34:13 -0000 1.61.2.3 --- Makefile.am 24 Nov 2005 12:52:26 -0000 1.61.2.4 *************** *** 41,44 **** --- 41,45 ---- libwpd_math.cpp \ WP3AttributeGroup.cpp \ + WP3DefinitionGroup.cpp \ WP3EndOfLinePageGroup.cpp \ WP3ExtendedCharacterGroup.cpp \ *************** *** 48,52 **** WP3Header.cpp \ WP3Listener.cpp \ - WP3StylesListener.cpp \ WP3MiscellaneousGroup.cpp \ WP3PageFormatGroup.cpp \ --- 49,52 ---- *************** *** 54,57 **** --- 54,58 ---- WP3Part.cpp \ WP3SingleByteFunction.cpp \ + WP3StylesListener.cpp \ WP3TablesGroup.cpp \ WP3UndoGroup.cpp \ *************** *** 62,68 **** WP42Heuristics.cpp \ WP42Listener.cpp \ - WP42StylesListener.cpp \ WP42Parser.cpp \ WP42Part.cpp \ WP42UnsupportedVariableLengthGroup.cpp \ WP42VariableLengthGroup.cpp \ --- 63,69 ---- WP42Heuristics.cpp \ WP42Listener.cpp \ WP42Parser.cpp \ WP42Part.cpp \ + WP42StylesListener.cpp \ WP42UnsupportedVariableLengthGroup.cpp \ WP42VariableLengthGroup.cpp \ *************** *** 74,83 **** WP5FormatGroup.cpp \ WP5Header.cpp \ ! WP5Listener.cpp \ ! WP5StylesListener.cpp \ WP5PageFormatGroup.cpp \ WP5Parser.cpp \ WP5Part.cpp \ WP5SingleByteFunction.cpp \ WP5TableEOLGroup.cpp \ WP5TableEOPGroup.cpp \ --- 75,84 ---- WP5FormatGroup.cpp \ WP5Header.cpp \ ! WP5Listener.cpp \ WP5PageFormatGroup.cpp \ WP5Parser.cpp \ WP5Part.cpp \ WP5SingleByteFunction.cpp \ + WP5StylesListener.cpp \ WP5TableEOLGroup.cpp \ WP5TableEOPGroup.cpp \ *************** *** 88,91 **** --- 89,93 ---- WP6CharacterGroup.cpp \ WP6ColumnGroup.cpp \ + WP6ContentListener.cpp \ WP6DefaultInitialFontPacket.cpp \ WP6DisplayNumberReferenceGroup.cpp \ *************** *** 104,110 **** WP6HeaderFooterGroup.cpp \ WP6HighlightGroup.cpp \ - WP6ContentListener.cpp \ WP6Listener.cpp \ - WP6StylesListener.cpp \ WP6Parser.cpp \ WP6OutlineStylePacket.cpp \ --- 106,110 ---- *************** *** 117,120 **** --- 117,121 ---- WP6SingleByteFunction.cpp \ WP6StyleGroup.cpp \ + WP6StylesListener.cpp \ WP6TabGroup.cpp \ WP6UndoGroup.cpp \ *************** *** 139,142 **** --- 140,144 ---- libwpd_types.h \ WP3AttributeGroup.h \ + WP3DefinitionGroup.h \ WP3EndOfLinePageGroup.h \ WP3ExtendedCharacterGroup.h \ *************** *** 146,150 **** WP3Header.h \ WP3Listener.h \ - WP3StylesListener.h \ WP3MiscellaneousGroup.h \ WP3PageFormatGroup.h \ --- 148,151 ---- *************** *** 152,155 **** --- 153,157 ---- WP3Part.h \ WP3SingleByteFunction.h \ + WP3StylesListener.h \ WP3TablesGroup.h \ WP3UndoGroup.h \ *************** *** 160,166 **** WP42Heuristics.h \ WP42Listener.h \ - WP42StylesListener.h \ WP42Part.h \ WP42Parser.h \ WP42UnsupportedVariableLengthGroup.h \ WP42VariableLengthGroup.h \ --- 162,168 ---- WP42Heuristics.h \ WP42Listener.h \ WP42Part.h \ WP42Parser.h \ + WP42StylesListener.h \ WP42UnsupportedVariableLengthGroup.h \ WP42VariableLengthGroup.h \ *************** *** 173,181 **** WP5Header.h \ WP5Listener.h \ - WP5StylesListener.h \ WP5PageFormatGroup.h \ WP5Part.h \ WP5Parser.h \ WP5SingleByteFunction.h \ WP5TableEOLGroup.h \ WP5TableEOPGroup.h \ --- 175,183 ---- WP5Header.h \ WP5Listener.h \ WP5PageFormatGroup.h \ WP5Part.h \ WP5Parser.h \ WP5SingleByteFunction.h \ + WP5StylesListener.h \ WP5TableEOLGroup.h \ WP5TableEOPGroup.h \ *************** *** 187,190 **** --- 189,193 ---- WP6CharacterGroup.h \ WP6ColumnGroup.h \ + WP6ContentListener.h \ WP6DefaultInitialFontPacket.h \ WP6DisplayNumberReferenceGroup.h \ *************** *** 202,208 **** WP6HeaderFooterGroup.h \ WP6HighlightGroup.h \ - WP6ContentListener.h \ WP6Listener.h \ - WP6StylesListener.h \ WP6OutlineStylePacket.h \ WP6PageGroup.h \ --- 205,209 ---- *************** *** 215,218 **** --- 216,220 ---- WP6SingleByteFunction.h \ WP6StyleGroup.h \ + WP6StylesListener.h \ WP6TabGroup.h \ WP6TibetanMap.h \ *************** *** 224,229 **** WPDocument.h \ WPXFileStructure.h \ - WPXListener.h \ WPXHLListenerImpl.h \ WPXMemoryStream.h \ WPXPageSpan.h \ --- 226,231 ---- WPDocument.h \ WPXFileStructure.h \ WPXHLListenerImpl.h \ + WPXListener.h \ WPXMemoryStream.h \ WPXPageSpan.h \ Index: WP3VariableLengthGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3VariableLengthGroup.cpp,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** WP3VariableLengthGroup.cpp 17 Nov 2005 15:34:13 -0000 1.4.2.1 --- WP3VariableLengthGroup.cpp 24 Nov 2005 12:52:30 -0000 1.4.2.2 *************** *** 31,34 **** --- 31,35 ---- #include "WP3PageFormatGroup.h" #include "WP3FontGroup.h" + #include "WP3DefinitionGroup.h" #include "WP3TablesGroup.h" #include "libwpd_internal.h" *************** *** 52,55 **** --- 53,58 ---- case WP3_FONT_GROUP: return new WP3FontGroup(input); + case WP3_DEFINITION_GROUP: + return new WP3DefinitionGroup(input); default: // this is an unhandled group, just skip it |
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24565/src/lib Modified Files: Tag: fs_refactoring2 WP3Listener.cpp WP3Listener.h WP3TablesGroup.cpp WP3TablesGroup.h WP5Listener.cpp libwpd_internal.cpp Log Message: Add some color for the tables in WP3 parser and fix problems with paragraph margins in WP3 and WP5 Index: WP5Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5Listener.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 *** WP5Listener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.2 --- WP5Listener.cpp 23 Nov 2005 12:44:49 -0000 1.1.2.3 *************** *** 304,307 **** --- 304,308 ---- break; } + m_ps->m_listReferencePosition = m_ps->m_paragraphMarginLeft + m_ps->m_paragraphTextIndent; //} } Index: WP3Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.h,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.h 23 Nov 2005 07:42:00 -0000 1.1.2.6 --- WP3Listener.h 23 Nov 2005 12:44:49 -0000 1.1.2.7 *************** *** 28,31 **** --- 28,32 ---- #include "WPXListener.h" #include "WPXHLListenerImpl.h" + #include "libwpd_internal.h" typedef struct _WP3ParsingState WP3ParsingState; *************** *** 37,40 **** --- 38,42 ---- uint16_t m_rowSpan; WPXString m_textBuffer; + RGBSColor * m_cellFillColor; }; *************** *** 73,76 **** --- 75,79 ---- virtual void closeRow(); virtual void setTableCellSpan(const uint16_t colSpan, const uint16_t rowSpan); + virtual void setTableCellFillColor(const RGBSColor * cellFillColor); virtual void endTable(); virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel); Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -C2 -d -r1.1.2.9 -r1.1.2.10 *** WP3Listener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.9 --- WP3Listener.cpp 23 Nov 2005 12:44:49 -0000 1.1.2.10 *************** *** 31,35 **** _WP3ParsingState::_WP3ParsingState(): m_colSpan(1), ! m_rowSpan(1) { m_textBuffer.clear(); --- 31,36 ---- _WP3ParsingState::_WP3ParsingState(): m_colSpan(1), ! m_rowSpan(1), ! m_cellFillColor(NULL) { m_textBuffer.clear(); *************** *** 39,42 **** --- 40,44 ---- { m_textBuffer.clear(); + DELETEP(m_cellFillColor); } *************** *** 200,207 **** throw ParseException(); ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); _openTableCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, 0x00000000, ! NULL, NULL, &tmpCellBorderColor, TOP); ! m_parseState->m_colSpan--; m_ps->m_isCellWithoutParagraph = true; m_ps->m_cellAttributeBits = 0x00000000; --- 202,210 ---- throw ParseException(); ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); _openTableCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, 0x00000000, ! m_parseState->m_cellFillColor, NULL, &tmpCellBorderColor, TOP); ! DELETEP(m_parseState->m_cellFillColor); ! m_ps->m_isCellWithoutParagraph = true; m_ps->m_cellAttributeBits = 0x00000000; *************** *** 239,242 **** --- 242,255 ---- } + void WP3Listener::setTableCellFillColor(const RGBSColor * cellFillColor) + { + if (!isUndoOn()) + { + if (m_parseState->m_cellFillColor) + DELETEP(m_parseState->m_cellFillColor); + m_parseState->m_cellFillColor = new RGBSColor(*cellFillColor); + } + } + void WP3Listener::endTable() { *************** *** 353,356 **** --- 366,370 ---- break; } + m_ps->m_listReferencePosition = m_ps->m_paragraphMarginLeft + m_ps->m_paragraphTextIndent; } } *************** *** 397,400 **** --- 411,415 ---- m_ps->m_paragraphTextIndent = m_ps->m_textIndentByParagraphIndentChange + m_ps->m_textIndentByTabs; + m_ps->m_listReferencePosition = m_ps->m_paragraphMarginLeft + m_ps->m_paragraphTextIndent; } } Index: libwpd_internal.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.cpp,v retrieving revision 1.19.2.1 retrieving revision 1.19.2.2 diff -C2 -d -r1.19.2.1 -r1.19.2.2 *** libwpd_internal.cpp 21 Nov 2005 13:43:49 -0000 1.19.2.1 --- libwpd_internal.cpp 23 Nov 2005 12:44:49 -0000 1.19.2.2 *************** *** 951,955 **** minRGB = blue; ! if (minRGB >= 255) { m_r = 255; --- 951,955 ---- minRGB = blue; ! if (minRGB >= 65535) { m_r = 255; Index: WP3TablesGroup.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3TablesGroup.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 *** WP3TablesGroup.h 15 Nov 2005 14:46:51 -0000 1.1.2.2 --- WP3TablesGroup.h 23 Nov 2005 12:44:49 -0000 1.1.2.3 *************** *** 27,30 **** --- 27,31 ---- #include "WP3VariableLengthGroup.h" + #include "libwpd_internal.h" class WP3TablesGroup : public WP3VariableLengthGroup *************** *** 53,56 **** --- 54,60 ---- uint16_t m_colSpan; uint16_t m_rowSpan; + + // variables needed for subgroup 0x0B (Set Table Cell Fill Color/Patern) + RGBSColor m_cellFillColor; }; Index: WP3TablesGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3TablesGroup.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 *** WP3TablesGroup.cpp 17 Nov 2005 15:34:13 -0000 1.1.2.5 --- WP3TablesGroup.cpp 23 Nov 2005 12:44:49 -0000 1.1.2.6 *************** *** 93,96 **** --- 93,102 ---- break; case WP3_TABLES_GROUP_SET_TABLE_CELL_FILL_COLOR_PATTERN: + { + uint16_t tmpRed = readU16(input, true); + uint16_t tmpGreen = readU16(input, true); + uint16_t tmpBlue = readU16(input, true); + m_cellFillColor = RGBSColor(tmpRed, tmpGreen, tmpBlue); + } break; case WP3_TABLES_GROUP_SET_TABLE_CELL_VERTICAL_ALIGNMENT: *************** *** 138,141 **** --- 144,148 ---- break; case WP3_TABLES_GROUP_SET_TABLE_CELL_FILL_COLOR_PATTERN: + listener->setTableCellFillColor(&m_cellFillColor); break; case WP3_TABLES_GROUP_SET_TABLE_CELL_VERTICAL_ALIGNMENT: |
Update of /cvsroot/libwpd/libwpd2/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10132/src/lib Modified Files: Tag: fs_refactoring2 WP3Listener.cpp WP3Listener.h WP3StylesListener.cpp WP3StylesListener.h WP42StylesListener.cpp WP42StylesListener.h WP5Listener.cpp WP5Listener.h WP5StylesListener.cpp WP5StylesListener.h WP5TableEOLGroup.cpp WP6ContentListener.cpp WP6ContentListener.h WP6EOLGroup.cpp WP6Listener.h WP6SingleByteFunction.cpp WP6StylesListener.cpp WP6StylesListener.h WPXListener.cpp WPXListener.h WPXTable.cpp WPXTable.h Log Message: Solution without using covered cells. Remains to adapt the _makeBorderConsistent function in WPXTable Index: WPXListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WPXListener.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 *** WPXListener.cpp 21 Nov 2005 13:43:49 -0000 1.1.2.2 --- WPXListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.3 *************** *** 63,66 **** --- 63,67 ---- m_currentTableCol(0), m_currentTableRow(0), + m_currentTableCellNumberInRow(0), m_isTableOpened(false), m_isTableRowOpened(false), *************** *** 707,710 **** --- 708,712 ---- m_ps->m_currentTableRow = (-1); m_ps->m_currentTableCol = (-1); + m_ps->m_currentTableCellNumberInRow = (-1); } *************** *** 721,724 **** --- 723,727 ---- m_ps->m_currentTableRow = (-1); m_ps->m_currentTableCol = (-1); + m_ps->m_currentTableCellNumberInRow = (-1); m_ps->m_isTableOpened = false; m_ps->m_wasHeaderRow = false; *************** *** 742,745 **** --- 745,750 ---- m_ps->m_currentTableCol = 0; + m_ps->m_currentTableCellNumberInRow = 0; + WPXPropertyList propList; *************** *** 769,772 **** --- 774,787 ---- if (m_ps->m_isTableRowOpened) { + while (m_ps->m_currentTableCol < m_ps->m_numRowsToSkip.size()) + { + if (!m_ps->m_numRowsToSkip[m_ps->m_currentTableCol]) // This case should not happen, so if it does it means that we did something wrong + { + throw ParseException(); + } + m_ps->m_numRowsToSkip[m_ps->m_currentTableCol]--; + m_ps->m_currentTableCol++; + } + if (m_ps->m_isTableCellOpened) _closeTableCell(); *************** *** 806,853 **** } ! void WPXListener::_openTableCell(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) { _closeTableCell(); WPXPropertyList propList; propList.insert("libwpd:column", m_ps->m_currentTableCol); propList.insert("libwpd:row", m_ps->m_currentTableRow); ! if (!boundFromLeft && !boundFromAbove) ! { ! propList.insert("table:number-columns-spanned", colSpan); ! propList.insert("table:number-rows-spanned", rowSpan); ! WPXString borderColor = _colorToString(cellBorderColor); ! addBorderProps("left", !(borderBits & WPX_TABLE_CELL_LEFT_BORDER_OFF), borderColor, propList); ! addBorderProps("right", !(borderBits & WPX_TABLE_CELL_RIGHT_BORDER_OFF), borderColor, propList); ! addBorderProps("top", !(borderBits & WPX_TABLE_CELL_TOP_BORDER_OFF), borderColor, propList); ! addBorderProps("bottom", !(borderBits & WPX_TABLE_CELL_BOTTOM_BORDER_OFF), borderColor, propList); ! switch (cellVerticalAlignment) { ! case TOP: ! propList.insert("fo:vertical-align", "top"); ! break; ! case MIDDLE: ! propList.insert("fo:vertical-align", "middle"); ! break; ! case BOTTOM: ! propList.insert("fo:vertical-align", "bottom"); ! break; ! case FULL: // full not in XSL-fo? ! default: ! break; } ! propList.insert("fo:background-color", _mergeColorsToString(cellFgColor, cellBgColor)); ! m_listenerImpl->openTableCell(propList); ! m_ps->m_isTableCellOpened = true; } - else - m_listenerImpl->insertCoveredTableCell(propList); - - m_ps->m_currentTableCol++; } --- 821,881 ---- } ! void WPXListener::_openTableCell(const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment) { + uint8_t tmpColSpan = colSpan; _closeTableCell(); + while (m_ps->m_currentTableCol < m_ps->m_numRowsToSkip.size() && m_ps->m_numRowsToSkip[m_ps->m_currentTableCol]) + { + m_ps->m_numRowsToSkip[m_ps->m_currentTableCol]--; + m_ps->m_currentTableCol++; + } + WPXPropertyList propList; propList.insert("libwpd:column", m_ps->m_currentTableCol); propList.insert("libwpd:row", m_ps->m_currentTableRow); ! propList.insert("table:number-columns-spanned", colSpan); ! propList.insert("table:number-rows-spanned", rowSpan); ! WPXString borderColor = _colorToString(cellBorderColor); ! addBorderProps("left", !(borderBits & WPX_TABLE_CELL_LEFT_BORDER_OFF), borderColor, propList); ! addBorderProps("right", !(borderBits & WPX_TABLE_CELL_RIGHT_BORDER_OFF), borderColor, propList); ! addBorderProps("top", !(borderBits & WPX_TABLE_CELL_TOP_BORDER_OFF), borderColor, propList); ! addBorderProps("bottom", !(borderBits & WPX_TABLE_CELL_BOTTOM_BORDER_OFF), borderColor, propList); ! switch (cellVerticalAlignment) ! { ! case TOP: ! propList.insert("fo:vertical-align", "top"); ! break; ! case MIDDLE: ! propList.insert("fo:vertical-align", "middle"); ! break; ! case BOTTOM: ! propList.insert("fo:vertical-align", "bottom"); ! break; ! case FULL: // full not in XSL-fo? ! default: ! break; ! } ! propList.insert("fo:background-color", _mergeColorsToString(cellFgColor, cellBgColor)); ! m_listenerImpl->openTableCell(propList); ! m_ps->m_currentTableCellNumberInRow++; ! m_ps->m_isTableCellOpened = true; ! ! while ((m_ps->m_currentTableCol < m_ps->m_numRowsToSkip.size()) && (tmpColSpan > 0)) ! { ! if (m_ps->m_numRowsToSkip[m_ps->m_currentTableCol]) // This case should not happen, so if it does it means that we did something wrong { ! m_ps->m_numRowsToSkip[m_ps->m_currentTableCol]=0; ! //throw ParseException(); } ! m_ps->m_numRowsToSkip[m_ps->m_currentTableCol] += (rowSpan - 1); ! m_ps->m_currentTableCol++; ! tmpColSpan--; } } Index: WP6ContentListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6ContentListener.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 *** WP6ContentListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 --- WP6ContentListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.3 *************** *** 181,186 **** 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); --- 181,186 ---- 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 uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes); Index: WP6ContentListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6ContentListener.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 *** WP6ContentListener.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP6ContentListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.2 *************** *** 1121,1124 **** --- 1121,1125 ---- m_parseState->m_currentTable = m_parseState->m_tableList[m_parseState->m_nextTableIndice++]; m_parseState->m_currentTable->makeBordersConsistent(); + m_ps->m_numRowsToSkip.clear(); } } *************** *** 1142,1145 **** --- 1143,1149 ---- m_ps->m_tableDefinition.columnsProperties.push_back(colProp); + + // initialize the variable that tells us how many columns to skip + m_ps->m_numRowsToSkip.push_back(0); } } *************** *** 1177,1182 **** } ! void WP6ContentListener::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) --- 1181,1186 ---- } ! void WP6ContentListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes) *************** *** 1187,1193 **** throw ParseException(); _flushText(); ! _openTableCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, ! m_parseState->m_currentTable->getCell(m_ps->m_currentTableRow, m_ps->m_currentTableCol)->m_borderBits, ! cellFgColor, cellBgColor, cellBorderColor, cellVerticalAlignment); m_ps->m_isCellWithoutParagraph = true; if (useCellAttributes) --- 1191,1204 ---- throw ParseException(); _flushText(); ! WPD_DEBUG_MSG(("Balise 1\n")); ! _openTableCell(colSpan, rowSpan, m_parseState->m_currentTable->getCell(m_ps->m_currentTableRow, ! m_ps->m_currentTableCellNumberInRow)->m_borderBits, cellFgColor, cellBgColor, ! cellBorderColor, cellVerticalAlignment); ! #if 0 ! _openTableCell(colSpan, rowSpan, borderBits, cellFgColor, cellBgColor, ! cellBorderColor, cellVerticalAlignment); ! #endif ! ! WPD_DEBUG_MSG(("Balise 2\n")); m_ps->m_isCellWithoutParagraph = true; if (useCellAttributes) *************** *** 1205,1208 **** --- 1216,1220 ---- _flushText(); _closeTable(); + m_ps->m_numRowsToSkip.clear(); // restore the justification that was there before the table. m_ps->m_paragraphJustification = m_ps->m_paragraphJustificationBeforeTable; Index: WP42StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP42StylesListener.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 *** WP42StylesListener.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP42StylesListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.2 *************** *** 159,164 **** } ! void WP42StylesListener::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) --- 159,164 ---- } ! void WP42StylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes) *************** *** 167,171 **** { m_currentPageHasContent = true; ! m_currentTable->insertCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, borderBits); } } --- 167,171 ---- { m_currentPageHasContent = true; ! m_currentTable->insertCell(colSpan, rowSpan, borderBits); } } Index: WPXListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WPXListener.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 *** WPXListener.h 21 Nov 2005 13:43:49 -0000 1.1.2.4 --- WPXListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.5 *************** *** 95,101 **** --- 95,103 ---- bool m_isListElementOpened; + std::vector<unsigned int> m_numRowsToSkip; WPXTableDefinition m_tableDefinition; int m_currentTableCol; int m_currentTableRow; + int m_currentTableCellNumberInRow; bool m_isTableOpened; bool m_isTableRowOpened; *************** *** 230,235 **** void _openTableRow(const float height, const bool isMinimumHeight, const bool isHeaderRow); void _closeTableRow(); ! void _openTableCell(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); --- 232,237 ---- void _openTableRow(const float height, const bool isMinimumHeight, const bool isHeaderRow); void _closeTableRow(); ! void _openTableCell(const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment); Index: WP42StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP42StylesListener.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 *** WP42StylesListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 --- WP42StylesListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.3 *************** *** 64,69 **** 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); --- 64,69 ---- 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 uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes); Index: WP5Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5Listener.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 *** WP5Listener.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP5Listener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.2 *************** *** 126,129 **** --- 126,130 ---- m_ps->m_tableDefinition.columns.clear(); m_ps->m_tableDefinition.columnsProperties.clear(); + m_ps->m_numRowsToSkip.clear(); } } *************** *** 147,150 **** --- 148,154 ---- m_ps->m_tableDefinition.columnsProperties.push_back(colProp); + + // initialize the variable that tells us how many columns to skip + m_ps->m_numRowsToSkip.push_back(0); } } *************** *** 176,181 **** } ! void WP5Listener::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) --- 180,185 ---- } ! void WP5Listener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes) *************** *** 186,191 **** throw ParseException(); _flushText(); ! _openTableCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, borderBits, ! cellFgColor, cellBgColor, cellBorderColor, cellVerticalAlignment); m_ps->m_isCellWithoutParagraph = true; if (useCellAttributes) --- 190,195 ---- throw ParseException(); _flushText(); ! _openTableCell(colSpan, rowSpan, borderBits, cellFgColor, cellBgColor, ! cellBorderColor, cellVerticalAlignment); m_ps->m_isCellWithoutParagraph = true; if (useCellAttributes) Index: WPXTable.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXTable.h,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** WPXTable.h 8 Feb 2005 16:03:06 -0000 1.8 --- WPXTable.h 23 Nov 2005 07:42:00 -0000 1.8.4.1 *************** *** 42,49 **** struct _WPXTableCell { ! _WPXTableCell(uint8_t colSpan, uint8_t rowSpan, bool boundFromLeft, bool boundFromAbove, uint8_t borderBits); uint8_t m_colSpan; uint8_t m_rowSpan; - bool m_boundFromLeft, m_boundFromAbove; uint8_t m_borderBits; }; --- 42,48 ---- struct _WPXTableCell { ! _WPXTableCell(uint8_t colSpan, uint8_t rowSpan, uint8_t borderBits); uint8_t m_colSpan; uint8_t m_rowSpan; uint8_t m_borderBits; }; *************** *** 55,59 **** ~WPXTable(); void insertRow(); ! void insertCell(uint8_t colSpan, uint8_t rowSpan, bool boundFromLeft, bool boundFromAbove, uint8_t borderBits); const WPXTableCell * getCell(int i, int j) { return (*m_tableRows[i])[j]; } void makeBordersConsistent(); --- 54,58 ---- ~WPXTable(); void insertRow(); ! void insertCell(uint8_t colSpan, uint8_t rowSpan, uint8_t borderBits); const WPXTableCell * getCell(int i, int j) { return (*m_tableRows[i])[j]; } void makeBordersConsistent(); Index: WP5TableEOLGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5TableEOLGroup.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 *** WP5TableEOLGroup.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.2 --- WP5TableEOLGroup.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.3 *************** *** 62,66 **** m_columnNumber = readU8(input); tmpColumnSpanning = readU8(input); ! m_colSpan = tmpColumnSpanning & 0x3F; if ((tmpColumnSpanning & 0x80) == 0x80) m_spannedFromAbove = true; --- 62,66 ---- m_columnNumber = readU8(input); tmpColumnSpanning = readU8(input); ! m_colSpan = tmpColumnSpanning & 0x7F; if ((tmpColumnSpanning & 0x80) == 0x80) m_spannedFromAbove = true; *************** *** 86,92 **** { 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); } --- 86,93 ---- { case WP5_TABLE_EOL_GROUP_BEGINNING_OF_COLUMN_AT_EOL: + if (!m_spannedFromAbove) { ! RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(m_colSpan, m_rowSpan, 0x00, NULL, NULL, &tmpCellBorderColor , TOP, m_useCellAttributes, m_cellAttributes); } Index: WP6SingleByteFunction.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6SingleByteFunction.cpp,v retrieving revision 1.16.2.2 retrieving revision 1.16.2.3 diff -C2 -d -r1.16.2.2 -r1.16.2.3 *** WP6SingleByteFunction.cpp 10 Nov 2005 12:57:17 -0000 1.16.2.2 --- WP6SingleByteFunction.cpp 23 Nov 2005 07:42:00 -0000 1.16.2.3 *************** *** 153,157 **** listener->insertRow(0x0000, true, false); RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, false, 0x00000000); } --- 153,157 ---- listener->insertRow(0x0000, true, false); RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(1, 1, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, false, 0x00000000); } *************** *** 160,164 **** // default values RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(1, 1, false, false, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, false, 0x00000000); } --- 160,164 ---- // default values RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! listener->insertCell(1, 1, 0x00, NULL, NULL, &tmpCellBorderColor, TOP, false, 0x00000000); } Index: WP5StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5StylesListener.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 *** WP5StylesListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 --- WP5StylesListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.3 *************** *** 63,68 **** 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); --- 63,68 ---- 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 uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes); Index: WP6StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6StylesListener.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 *** WP6StylesListener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 --- WP6StylesListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.3 *************** *** 91,96 **** 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); --- 91,96 ---- 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 uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes); Index: WPXTable.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXTable.cpp,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** WPXTable.cpp 8 Feb 2005 16:03:06 -0000 1.8 --- WPXTable.cpp 23 Nov 2005 07:42:00 -0000 1.8.4.1 *************** *** 30,38 **** typedef std::vector< std::vector<WPXTableCell *> * >::iterator VVTCIter; ! _WPXTableCell::_WPXTableCell(uint8_t colSpan, uint8_t rowSpan, bool boundFromAbove, bool boundFromLeft, uint8_t borderBits) : m_colSpan(colSpan), m_rowSpan(rowSpan), - m_boundFromAbove(boundFromAbove), - m_boundFromLeft(boundFromLeft), m_borderBits(borderBits) { --- 30,36 ---- typedef std::vector< std::vector<WPXTableCell *> * >::iterator VVTCIter; ! _WPXTableCell::_WPXTableCell(uint8_t colSpan, uint8_t rowSpan, uint8_t borderBits) : m_colSpan(colSpan), m_rowSpan(rowSpan), m_borderBits(borderBits) { *************** *** 58,64 **** } ! void WPXTable::insertCell(uint8_t colSpan, uint8_t rowSpan, bool boundFromLeft, bool boundFromAbove, uint8_t borderBits) { ! m_tableRows[(m_tableRows.size()-1)]->push_back(new WPXTableCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, borderBits)); } --- 56,62 ---- } ! void WPXTable::insertCell(uint8_t colSpan, uint8_t rowSpan, uint8_t borderBits) { ! m_tableRows[(m_tableRows.size()-1)]->push_back(new WPXTableCell(colSpan, rowSpan, borderBits)); } *************** *** 73,92 **** for (int j=0; j<m_tableRows[i]->size(); j++) { ! if (!(*m_tableRows[i])[j]->m_boundFromLeft && !(*m_tableRows[i])[j]->m_boundFromAbove) { ! if (i < (m_tableRows.size()-1)) ! { ! std::vector<WPXTableCell *> *cellsBottomAdjacent = _getCellsBottomAdjacent(i, j); ! _makeCellBordersConsistent((*m_tableRows[i])[j], cellsBottomAdjacent, ! WPX_TABLE_CELL_BOTTOM_BORDER_OFF, WPX_TABLE_CELL_TOP_BORDER_OFF); ! delete cellsBottomAdjacent; ! } ! if (j < (m_tableRows[i]->size()-1)) ! { ! std::vector<WPXTableCell *> *cellsRightAdjacent = _getCellsRightAdjacent(i, j); ! _makeCellBordersConsistent((*m_tableRows[i])[j], cellsRightAdjacent, ! WPX_TABLE_CELL_RIGHT_BORDER_OFF, WPX_TABLE_CELL_LEFT_BORDER_OFF); ! delete cellsRightAdjacent; ! } } } --- 71,87 ---- for (int j=0; j<m_tableRows[i]->size(); j++) { ! if (i < (m_tableRows.size()-1)) { ! std::vector<WPXTableCell *> *cellsBottomAdjacent = _getCellsBottomAdjacent(i, j); ! _makeCellBordersConsistent((*m_tableRows[i])[j], cellsBottomAdjacent, ! WPX_TABLE_CELL_BOTTOM_BORDER_OFF, WPX_TABLE_CELL_TOP_BORDER_OFF); ! delete cellsBottomAdjacent; ! } ! if (j < (m_tableRows[i]->size()-1)) ! { ! std::vector<WPXTableCell *> *cellsRightAdjacent = _getCellsRightAdjacent(i, j); ! _makeCellBordersConsistent((*m_tableRows[i])[j], cellsRightAdjacent, ! WPX_TABLE_CELL_RIGHT_BORDER_OFF, WPX_TABLE_CELL_LEFT_BORDER_OFF); ! delete cellsRightAdjacent; } } *************** *** 129,135 **** for (int j1=0; j1<m_tableRows[bottomAdjacentRow]->size(); j1++) { ! if (!(*m_tableRows[bottomAdjacentRow])[j1]->m_boundFromAbove && ! !(*m_tableRows[bottomAdjacentRow])[j1]->m_boundFromLeft && ! ((j1 + (*m_tableRows[bottomAdjacentRow])[j1]->m_colSpan) > j) && (j1 < (j + (*m_tableRows[i])[j]->m_colSpan))) { --- 124,128 ---- for (int j1=0; j1<m_tableRows[bottomAdjacentRow]->size(); j1++) { ! if (((j1 + (*m_tableRows[bottomAdjacentRow])[j1]->m_colSpan) > j) && (j1 < (j + (*m_tableRows[i])[j]->m_colSpan))) { *************** *** 153,159 **** if ((*m_tableRows[i1]).size() > rightAdjacentCol) // ignore cases where the right adjacent column { // pushes us beyond table borders (FIXME: good idea?) ! if (!(*m_tableRows[i1])[rightAdjacentCol]->m_boundFromAbove && ! !(*m_tableRows[i1])[rightAdjacentCol]->m_boundFromLeft && ! ((i1 + (*m_tableRows[i1])[rightAdjacentCol]->m_rowSpan) > i) && (i1 < (i + (*m_tableRows[i])[j]->m_rowSpan))) { --- 146,150 ---- if ((*m_tableRows[i1]).size() > rightAdjacentCol) // ignore cases where the right adjacent column { // pushes us beyond table borders (FIXME: good idea?) ! if (((i1 + (*m_tableRows[i1])[rightAdjacentCol]->m_rowSpan) > i) && (i1 < (i + (*m_tableRows[i])[j]->m_rowSpan))) { Index: WP5Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5Listener.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 *** WP5Listener.h 12 Nov 2005 10:50:36 -0000 1.1.2.2 --- WP5Listener.h 23 Nov 2005 07:42:00 -0000 1.1.2.3 *************** *** 67,72 **** 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); --- 67,72 ---- 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 uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes); Index: WP3StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3StylesListener.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 *** WP3StylesListener.cpp 17 Nov 2005 15:34:13 -0000 1.1.2.2 --- WP3StylesListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.3 *************** *** 175,180 **** } ! void WP3StylesListener::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) --- 175,180 ---- } ! void WP3StylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes) *************** *** 183,187 **** { m_currentPageHasContent = true; ! m_currentTable->insertCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, borderBits); } } --- 183,187 ---- { m_currentPageHasContent = true; ! m_currentTable->insertCell(colSpan, rowSpan, borderBits); } } Index: WP5StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP5StylesListener.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 *** WP5StylesListener.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP5StylesListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.2 *************** *** 175,180 **** } ! void WP5StylesListener::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) --- 175,180 ---- } ! void WP5StylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes) *************** *** 183,187 **** { m_currentPageHasContent = true; ! m_currentTable->insertCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, borderBits); } } --- 183,187 ---- { m_currentPageHasContent = true; ! m_currentTable->insertCell(colSpan, rowSpan, borderBits); } } Index: WP6StylesListener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6StylesListener.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 *** WP6StylesListener.cpp 10 Nov 2005 12:57:17 -0000 1.1.2.1 --- WP6StylesListener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.2 *************** *** 205,210 **** } ! void WP6StylesListener::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) --- 205,210 ---- } ! void WP6StylesListener::insertCell(const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes) *************** *** 213,217 **** { m_currentPageHasContent = true; ! m_currentTable->insertCell(colSpan, rowSpan, boundFromLeft, boundFromAbove, borderBits); } } --- 213,217 ---- { m_currentPageHasContent = true; ! m_currentTable->insertCell(colSpan, rowSpan, borderBits); } } Index: WP3Listener.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.cpp,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -C2 -d -r1.1.2.8 -r1.1.2.9 *** WP3Listener.cpp 21 Nov 2005 14:18:26 -0000 1.1.2.8 --- WP3Listener.cpp 23 Nov 2005 07:42:00 -0000 1.1.2.9 *************** *** 144,148 **** m_ps->m_tableDefinition.columns.clear(); m_ps->m_tableDefinition.columnsProperties.clear(); ! m_parseState->m_numColumnsToSkip.clear(); } } --- 144,148 ---- m_ps->m_tableDefinition.columns.clear(); m_ps->m_tableDefinition.columnsProperties.clear(); ! m_ps->m_numRowsToSkip.clear(); } } *************** *** 168,172 **** // initialize the variable that tells us how many columns to skip ! m_parseState->m_numColumnsToSkip.push_back(0); } } --- 168,172 ---- // initialize the variable that tells us how many columns to skip ! m_ps->m_numRowsToSkip.push_back(0); } } *************** *** 200,211 **** throw ParseException(); - 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); 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--; --- 200,205 ---- throw ParseException(); RGBSColor tmpCellBorderColor(0x00, 0x00, 0x00, 0x64); ! _openTableCell((uint8_t)m_parseState->m_colSpan, (uint8_t)m_parseState->m_rowSpan, 0x00000000, NULL, NULL, &tmpCellBorderColor, TOP); m_parseState->m_colSpan--; *************** *** 221,235 **** insertEOL(); _closeTableCell(); - 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; - } } --- 215,220 ---- *************** *** 241,251 **** closeCell(); - 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(); } --- 226,229 ---- Index: WP3StylesListener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3StylesListener.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 *** WP3StylesListener.h 17 Nov 2005 15:34:13 -0000 1.1.2.3 --- WP3StylesListener.h 23 Nov 2005 07:42:00 -0000 1.1.2.4 *************** *** 62,67 **** 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); --- 62,67 ---- 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 uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes); Index: WP6Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP6Listener.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 *** WP6Listener.h 21 Nov 2005 13:43:49 -0000 1.1.2.3 --- WP6Listener.h 23 Nov 2005 07:42:00 -0000 1.1.2.4 *************** *** 66,71 **** 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; --- 66,71 ---- 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 uint8_t borderBits, ! const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const uint32_t cellAttributes) = 0; Index: WP3Listener.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/Attic/WP3Listener.h,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.h 21 Nov 2005 13:43:49 -0000 1.1.2.5 --- WP3Listener.h 23 Nov 2005 07:42:00 -0000 1.1.2.6 *************** *** 37,41 **** uint16_t m_rowSpan; WPXString m_textBuffer; - std::vector<unsigned int> m_numColumnsToSkip; }; --- 37,40 ---- Index: WP6EOLGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6EOLGroup.cpp,v retrieving revision 1.46.2.2 retrieving revision 1.46.2.3 diff -C2 -d -r1.46.2.2 -r1.46.2.3 *** WP6EOLGroup.cpp 10 Nov 2005 12:57:17 -0000 1.46.2.2 --- WP6EOLGroup.cpp 23 Nov 2005 07:42:00 -0000 1.46.2.3 *************** *** 300,307 **** 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: --- 300,310 ---- case WP6_EOL_GROUP_TABLE_CELL: // Table Cell WPD_DEBUG_MSG(("WordPerfect: EOL group: table cell\n")); ! if (!m_boundFromLeft && !m_boundFromAbove) ! { ! listener->insertCell(m_colSpan, m_rowSpan, 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: *************** *** 315,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_useCellAttributes, m_cellAttributes); ! if (m_useCellJustification) ! listener->justificationChange(m_cellJustification); break; case WP6_EOL_GROUP_TABLE_OFF: --- 318,328 ---- listener->insertRow(m_rowHeight, m_isMinimumHeight, m_isHeaderRow); // the cellBorders variable already represent the cell border bits as well ! if (!m_boundFromLeft && !m_boundFromAbove) ! { ! listener->insertCell(m_colSpan, m_rowSpan, 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: |