1*cdf0e10cSrcweir /* WordPerfectCollector: Collects sections and runs of text from a
2*cdf0e10cSrcweir  * wordperfect file (and styles to go along with them) and writes them
3*cdf0e10cSrcweir  * to a Writer target document
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * This program is free software; you can redistribute it and/or
8*cdf0e10cSrcweir  * modify it under the terms of the GNU Lesser General Public
9*cdf0e10cSrcweir  * License as published by the Free Software Foundation; either
10*cdf0e10cSrcweir  * version 2 of the License, or (at your option) any later version.
11*cdf0e10cSrcweir  *
12*cdf0e10cSrcweir  * This program is distributed in the hope that it will be useful,
13*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15*cdf0e10cSrcweir  * Library General Public License for more details.
16*cdf0e10cSrcweir  *
17*cdf0e10cSrcweir  * You should have received a copy of the GNU Library General Public
18*cdf0e10cSrcweir  * License along with this library; if not, write to the Free Software
19*cdf0e10cSrcweir  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * For further information visit http://libwpd.sourceforge.net
22*cdf0e10cSrcweir  *
23*cdf0e10cSrcweir  */
24*cdf0e10cSrcweir 
25*cdf0e10cSrcweir /* "This product is not manufactured, approved, or supported by
26*cdf0e10cSrcweir  * Corel Corporation or Corel Corporation Limited."
27*cdf0e10cSrcweir  */
28*cdf0e10cSrcweir 
29*cdf0e10cSrcweir #if defined _MSC_VER
30*cdf0e10cSrcweir #pragma warning( push, 1 )
31*cdf0e10cSrcweir #endif
32*cdf0e10cSrcweir #include "WordPerfectCollector.hxx"
33*cdf0e10cSrcweir #if defined _MSC_VER
34*cdf0e10cSrcweir #pragma warning( pop )
35*cdf0e10cSrcweir #endif
36*cdf0e10cSrcweir 
WordPerfectCollector(WPXInputStream * pInput,DocumentHandler * pHandler)37*cdf0e10cSrcweir WordPerfectCollector::WordPerfectCollector(WPXInputStream *pInput, DocumentHandler *pHandler) :
38*cdf0e10cSrcweir 	DocumentCollector(pInput, pHandler)
39*cdf0e10cSrcweir {
40*cdf0e10cSrcweir }
41*cdf0e10cSrcweir 
~WordPerfectCollector()42*cdf0e10cSrcweir WordPerfectCollector::~WordPerfectCollector()
43*cdf0e10cSrcweir {
44*cdf0e10cSrcweir }
45*cdf0e10cSrcweir 
parseSourceDocument(WPXInputStream & input)46*cdf0e10cSrcweir bool WordPerfectCollector::parseSourceDocument(WPXInputStream &input)
47*cdf0e10cSrcweir {
48*cdf0e10cSrcweir         WPDResult result = WPDocument::parse(&input, static_cast<WPXHLListenerImpl *>(this));
49*cdf0e10cSrcweir         if (result != WPD_OK)
50*cdf0e10cSrcweir                 return false;
51*cdf0e10cSrcweir 
52*cdf0e10cSrcweir 	return true;
53*cdf0e10cSrcweir }
54