xref: /trunk/main/dbaccess/source/ui/inc/RtfReader.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef DBAUI_RTFREADER_HXX
28 #define DBAUI_RTFREADER_HXX
29 
30 #ifndef _VECTOR_
31 #include <vector>
32 #endif
33 #ifndef _PARRTF_HXX //autogen
34 #include <svtools/parrtf.hxx>
35 #endif
36 #ifndef DBAUI_DATABASEEXPORT_HXX
37 #include "DExport.hxx"
38 #endif
39 #ifndef _STREAM_HXX
40 #include <tools/stream.hxx>
41 #endif
42 
43 namespace dbaui
44 {
45 	class ORTFReader : public SvRTFParser , public ODatabaseExport
46 	{
47 		::std::vector<sal_Int32>	m_vecColor;
48 
49 		//	void insertValueIntoColumn();
50 	protected:
51 		virtual sal_Bool		CreateTable(int nToken);
52 		virtual void			NextToken( int nToken ); // Basisklasse
53         virtual TypeSelectionPageFactory
54                                 getTypeSelectionPageFactory();
55 
56 		~ORTFReader();
57 	public:
58 		ORTFReader(	SvStream& rIn,
59 					const SharedConnection& _rxConnection,
60 					const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
61 					const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
62 					const TColumnVector* rList = 0,
63 					const OTypeInfoMap* _pInfoMap = 0);
64 		// wird f"ur auto. Typ-Erkennung gebraucht
65 		ORTFReader(	SvStream& rIn,
66 					sal_Int32 nRows,
67 					const TPositions &_rColumnPositions,
68 					const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
69 					const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
70 					const TColumnVector* rList,
71 					const OTypeInfoMap* _pInfoMap,
72                     sal_Bool _bAutoIncrementEnabled);
73 
74 		virtual	SvParserState	CallParser();// Basisklasse
75 		virtual void			release();
76 		// birgt nur korrekte Daten, wenn der 2. CTOR benutzt wurde
77 		// ansonsten wird die SbaColumnList ohne "Anderung zur"uckgegeben
78 	};
79 
80 	SV_DECL_IMPL_REF( ORTFReader );
81 }
82 #endif // DBAUI_RTFREADER_HXX
83 
84 
85