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