1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef DBAUI_RTFREADER_HXX
24 #define DBAUI_RTFREADER_HXX
25 
26 #ifndef _VECTOR_
27 #include <vector>
28 #endif
29 #ifndef _PARRTF_HXX //autogen
30 #include <svtools/parrtf.hxx>
31 #endif
32 #ifndef DBAUI_DATABASEEXPORT_HXX
33 #include "DExport.hxx"
34 #endif
35 #ifndef _STREAM_HXX
36 #include <tools/stream.hxx>
37 #endif
38 
39 namespace dbaui
40 {
41 	class ORTFReader : public SvRTFParser , public ODatabaseExport
42 	{
43 		::std::vector<sal_Int32>	m_vecColor;
44 
45 		//	void insertValueIntoColumn();
46 	protected:
47 		virtual sal_Bool		CreateTable(int nToken);
48 		virtual void			NextToken( int nToken ); // Basisklasse
49         virtual TypeSelectionPageFactory
50                                 getTypeSelectionPageFactory();
51 
52 		~ORTFReader();
53 	public:
54 		ORTFReader(	SvStream& rIn,
55 					const SharedConnection& _rxConnection,
56 					const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
57 					const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
58 					const TColumnVector* rList = 0,
59 					const OTypeInfoMap* _pInfoMap = 0);
60 		// wird f"ur auto. Typ-Erkennung gebraucht
61 		ORTFReader(	SvStream& rIn,
62 					sal_Int32 nRows,
63 					const TPositions &_rColumnPositions,
64 					const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
65 					const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
66 					const TColumnVector* rList,
67 					const OTypeInfoMap* _pInfoMap,
68                     sal_Bool _bAutoIncrementEnabled);
69 
70 		virtual	SvParserState	CallParser();// Basisklasse
71 		virtual void			release();
72 		// birgt nur korrekte Daten, wenn der 2. CTOR benutzt wurde
73 		// ansonsten wird die SbaColumnList ohne "Anderung zur"uckgegeben
74 	};
75 
76 	SV_DECL_IMPL_REF( ORTFReader );
77 }
78 #endif // DBAUI_RTFREADER_HXX
79 
80 
81