1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_RTFREADER_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_RTFREADER_HXX
23 #include <svtools/parrtf.hxx>
24 #include "DExport.hxx"
25 #include <tools/stream.hxx>
29 class ORTFReader
: public SvRTFParser
, public ODatabaseExport
31 ::std::vector
<sal_Int32
> m_vecColor
;
34 virtual bool CreateTable(int nToken
) SAL_OVERRIDE
;
35 virtual void NextToken( int nToken
) SAL_OVERRIDE
; // base class
36 virtual TypeSelectionPageFactory
37 getTypeSelectionPageFactory() SAL_OVERRIDE
;
39 virtual ~ORTFReader();
42 ORTFReader( SvStream
& rIn
,
43 const SharedConnection
& _rxConnection
,
44 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormatter
>& _rxNumberF
,
45 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
,
46 const TColumnVector
* rList
= 0,
47 const OTypeInfoMap
* _pInfoMap
= 0);
48 // required for automatic type recognition
49 ORTFReader( SvStream
& rIn
,
51 const TPositions
&_rColumnPositions
,
52 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormatter
>& _rxNumberF
,
53 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
,
54 const TColumnVector
* rList
,
55 const OTypeInfoMap
* _pInfoMap
,
56 bool _bAutoIncrementEnabled
);
58 virtual SvParserState
CallParser() SAL_OVERRIDE
;// base class
59 /// @note Only recovers correct data if 2. CTOR has been used.
60 /// Otherwise, the SbaColumnList will be returned without changes
61 virtual void release() SAL_OVERRIDE
;
64 typedef tools::SvRef
<ORTFReader
> ORTFReaderRef
;
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */