bump product version to 4.1.6.2
[LibreOffice.git] / dbaccess / source / ui / inc / HtmlReader.hxx
blob941d15961452ff25e712811e2728345573a23ac8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
28 namespace dbaui
30 class OHTMLReader : public HTMLParser, public ODatabaseExport
32 String m_sCurrent;
33 sal_Int32 m_nTableCount;
34 sal_Int16 m_nWidth;
35 sal_Int16 m_nColumnWidth; ///< maximum column width
36 sal_Bool m_bMetaOptions; ///< true when we scanned the meta information
37 sal_Bool m_bSDNum;
39 protected:
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();
49 void fetchOptions();
50 virtual ~OHTMLReader();
52 public:
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,
61 sal_Int32 nRows,
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 );
76 #endif
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */