1 /* AbiWord
2  * Copyright (C) 2000 AbiSource, Inc.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  * 02110-1301 USA.
18  */
19 
20 #ifndef AP_CONVERT_H
21 #define AP_CONVERT_H
22 
23 #include "ie_types.h"
24 #include "pd_Document.h"
25 #include "ut_string_class.h"
26 
27 //////////////////////////////////////////////////////////////////
28 
29 class GR_Graphics;
30 class PD_Document;
31 class ABI_EXPORT AP_Convert
32 {
33  public:
34 	AP_Convert(int verbose=1);
35 	~AP_Convert(void);
36 
37 	bool convertTo(const char * szSourceFilename,
38 		       IEFileType sourceFormat,
39 		       const char * szTargetFilename,
40 		       IEFileType targetFormat);
41 
42 	bool convertTo(const char * szFilename,
43 		       const char * szSourceSuffixOrMime,
44 		       const char * szTargetFilename,
45 		       const char * szTargetSuffixOrMime);
46 
47 	bool convertTo(const char * szSourceFilename,
48 		       const char * szSourceSuffixOrMime,
49 		       const char * szTargetSuffixOrMime);
50 
51 	void setVerbose(int level);
52 	void setMergeSource (const char * source);
53 
54 	bool print(const char * file, GR_Graphics * pGraphics, const char * szFileExtension = NULL);
55 	bool printFirstPage(GR_Graphics * pGraphics, PD_Document * pDoc);
56 
setImpProps(const char * props)57 	void setImpProps (const char * props) {
58 		m_impProps = props;
59 	}
60 
setExpProps(const char * props)61 	void setExpProps (const char * props) {
62 		m_expProps = props;
63 	}
64 
65  private:
66 	int m_iVerbose;
67 	UT_UTF8String m_mergeSource;
68 
69 	UT_UTF8String m_impProps;
70 	UT_UTF8String m_expProps;
71 };
72 
73 #endif /* AP_CONVERT_H */
74