1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: HtmlReader.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef DBAUI_HTMLREADER_HXX
31 #define DBAUI_HTMLREADER_HXX
33 #ifndef DBAUI_DATABASEEXPORT_HXX
34 #include "DExport.hxx"
36 #ifndef _PARHTML_HXX //autogen
37 #include <svtools/parhtml.hxx>
39 #ifndef _SVX_SVXENUM_HXX
40 #include <svx/svxenum.hxx>
43 #include <tools/stream.hxx>
45 #ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
46 #include <com/sun/star/awt/FontDescriptor.hpp>
52 //===============================================================================================
54 //===============================================================================================
55 class OHTMLReader
: public HTMLParser
, public ODatabaseExport
58 sal_Int32 m_nTableCount
;
60 sal_Int16 m_nColumnWidth
; // max. Spaltenbreite
61 sal_Bool m_bMetaOptions
; // true when we scaned the meta information
65 virtual void NextToken( int nToken
); // Basisklasse
66 virtual sal_Bool
CreateTable(int nToken
);
67 virtual TypeSelectionPageFactory
68 getTypeSelectionPageFactory();
70 void TableDataOn(SvxCellHorJustify
& eVal
,int nToken
);
71 void TableFontOn(::com::sun::star::awt::FontDescriptor
& _rFont
,sal_Int32
&_rTextColor
);
72 sal_Int16
GetWidthPixel( const HTMLOption
* pOption
);
73 void setTextEncoding();
75 virtual ~OHTMLReader();
77 OHTMLReader(SvStream
& rIn
,
78 const SharedConnection
& _rxConnection
,
79 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormatter
>& _rxNumberF
,
80 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rM
,
81 const TColumnVector
* rList
= 0,
82 const OTypeInfoMap
* _pInfoMap
= 0);
83 // wird f"ur auto. Typ-Erkennung gebraucht
84 OHTMLReader(SvStream
& rIn
,
86 const TPositions
&_rColumnPositions
,
87 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormatter
>& _rxNumberF
,
88 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rM
,
89 const TColumnVector
* rList
,
90 const OTypeInfoMap
* _pInfoMap
,
91 sal_Bool _bAutoIncrementEnabled
);
93 virtual SvParserState
CallParser();// Basisklasse
94 virtual void release();
95 // birgt nur korrekte Daten, wenn der 1. CTOR benutzt wurde
98 SV_DECL_IMPL_REF( OHTMLReader
);
100 #endif // DBAUI_HTMLREADER_HXX