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 DBAUI_HTMLREADER_HXX
20 #define DBAUI_HTMLREADER_HXX
22 #include "DExport.hxx"
23 #include <svtools/parhtml.hxx>
24 #include <editeng/svxenum.hxx>
25 #include <tools/stream.hxx>
26 #include <com/sun/star/awt/FontDescriptor.hpp>
30 class OHTMLReader
: public HTMLParser
, public ODatabaseExport
33 sal_Int32 m_nTableCount
;
35 sal_Int16 m_nColumnWidth
; ///< maximum column width
36 sal_Bool m_bMetaOptions
; ///< true when we scanned the meta information
40 virtual void NextToken( int nToken
); // base class
41 virtual sal_Bool
CreateTable(int nToken
);
42 virtual TypeSelectionPageFactory
43 getTypeSelectionPageFactory();
45 void TableDataOn(SvxCellHorJustify
& eVal
);
46 void TableFontOn(::com::sun::star::awt::FontDescriptor
& _rFont
,sal_Int32
&_rTextColor
);
47 sal_Int16
GetWidthPixel( const HTMLOption
& rOption
);
48 void setTextEncoding();
50 virtual ~OHTMLReader();
53 OHTMLReader(SvStream
& rIn
,
54 const SharedConnection
& _rxConnection
,
55 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormatter
>& _rxNumberF
,
56 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
,
57 const TColumnVector
* rList
= 0,
58 const OTypeInfoMap
* _pInfoMap
= 0);
59 // required for automatic type recognition
60 OHTMLReader(SvStream
& rIn
,
62 const TPositions
&_rColumnPositions
,
63 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormatter
>& _rxNumberF
,
64 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
,
65 const TColumnVector
* rList
,
66 const OTypeInfoMap
* _pInfoMap
,
67 sal_Bool _bAutoIncrementEnabled
);
69 virtual SvParserState
CallParser();// base class
70 virtual void release();
71 ///< @attention recovers only valid data if 1. CTOR has been used
74 SV_DECL_IMPL_REF( OHTMLReader
);
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */