Bump version to 5.0-14
[LibreOffice.git] / dbaccess / source / ui / inc / HtmlReader.hxx
blob9c2eeb4fb27dbcb5ff2a55b551cdef605011877c
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 INCLUDED_DBACCESS_SOURCE_UI_INC_HTMLREADER_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_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>
27 #include <com/sun/star/uno/XComponentContext.hpp>
29 namespace dbaui
31 class OHTMLReader : public HTMLParser, public ODatabaseExport
33 OUString m_sCurrent;
34 sal_Int32 m_nTableCount;
35 sal_Int16 m_nWidth;
36 sal_Int16 m_nColumnWidth; ///< maximum column width
37 bool m_bMetaOptions; ///< true when we scanned the meta information
38 bool m_bSDNum;
40 protected:
41 virtual void NextToken( int nToken ) SAL_OVERRIDE; // base class
42 virtual bool CreateTable(int nToken) SAL_OVERRIDE;
43 virtual TypeSelectionPageFactory
44 getTypeSelectionPageFactory() SAL_OVERRIDE;
46 void TableDataOn(SvxCellHorJustify& eVal);
47 void TableFontOn(::com::sun::star::awt::FontDescriptor& _rFont,sal_Int32 &_rTextColor);
48 sal_Int16 GetWidthPixel( const HTMLOption& rOption );
49 void setTextEncoding();
50 void fetchOptions();
51 virtual ~OHTMLReader();
53 public:
54 OHTMLReader(SvStream& rIn,
55 const SharedConnection& _rxConnection,
56 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
57 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
58 const TColumnVector* rList = 0,
59 const OTypeInfoMap* _pInfoMap = 0);
60 // required for automatic type recognition
61 OHTMLReader(SvStream& rIn,
62 sal_Int32 nRows,
63 const TPositions &_rColumnPositions,
64 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
65 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
66 const TColumnVector* rList,
67 const OTypeInfoMap* _pInfoMap,
68 bool _bAutoIncrementEnabled);
70 virtual SvParserState CallParser() SAL_OVERRIDE;// base class
71 virtual void release() SAL_OVERRIDE;
72 ///< @attention recovers only valid data if 1. CTOR has been used
75 typedef tools::SvRef<OHTMLReader> OHTMLReaderRef;
77 #endif
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */