Gtk-WARNING gtktreestore.c:1047: Invalid column number 1 added to iter
[LibreOffice.git] / dbaccess / source / ui / inc / HtmlReader.hxx
blob5c4ddde13f4e36b2a17fb45f5a184d63474d1385
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 #pragma once
21 #include "DExport.hxx"
22 #include <svtools/parhtml.hxx>
23 #include <editeng/svxenum.hxx>
24 #include <com/sun/star/awt/FontDescriptor.hpp>
25 #include <com/sun/star/uno/XComponentContext.hpp>
27 class SvStream;
29 namespace dbaui
31 class OHTMLReader final : public HTMLParser, public ODatabaseExport
33 OUString m_sCurrent;
34 sal_Int32 m_nTableCount;
35 sal_Int16 m_nColumnWidth; ///< maximum column width
37 virtual void NextToken( HtmlTokenId nToken ) override; // base class
38 bool CreateTable( HtmlTokenId nToken );
39 virtual TypeSelectionPageFactory
40 getTypeSelectionPageFactory() override;
42 void TableDataOn(SvxCellHorJustify& eVal);
43 void TableFontOn(css::awt::FontDescriptor& _rFont, Color &_rTextColor);
44 sal_Int16 GetWidthPixel( const HTMLOption& rOption );
45 void setTextEncoding();
46 void fetchOptions();
47 virtual ~OHTMLReader() override;
49 public:
50 OHTMLReader(SvStream& rIn,
51 const SharedConnection& _rxConnection,
52 const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
53 const css::uno::Reference< css::uno::XComponentContext >& _rxContext);
54 // required for automatic type recognition
55 OHTMLReader(SvStream& rIn,
56 sal_Int32 nRows,
57 TPositions&& _rColumnPositions,
58 const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
59 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
60 const TColumnVector* rList,
61 const OTypeInfoMap* _pInfoMap,
62 bool _bAutoIncrementEnabled);
64 virtual SvParserState CallParser() override;// base class
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */