LibreOffice Module dbaccess (master) 1
HtmlReader.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
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>
26
27class SvStream;
28
29namespace dbaui
30{
31 class OHTMLReader final : public HTMLParser, public ODatabaseExport
32 {
33 OUString m_sCurrent;
34 sal_Int32 m_nTableCount;
35 sal_Int16 m_nColumnWidth;
36
37 virtual void NextToken( HtmlTokenId nToken ) override; // base class
38 bool CreateTable( HtmlTokenId nToken );
41
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;
48
49 public:
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
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);
63
64 virtual SvParserState CallParser() override;// base class
65 };
66}
67
68/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< std::pair< sal_Int32, sal_Int32 > > TPositions
Definition: DExport.hxx:59
std::vector< TColumns::const_iterator > TColumnVector
Definition: DExport.hxx:58
virtual TypeSelectionPageFactory getTypeSelectionPageFactory() override
Definition: HtmlReader.cxx:476
OHTMLReader(SvStream &rIn, const SharedConnection &_rxConnection, const css::uno::Reference< css::util::XNumberFormatter > &_rxNumberF, const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
sal_Int32 m_nTableCount
Definition: HtmlReader.hxx:34
OHTMLReader(SvStream &rIn, sal_Int32 nRows, TPositions &&_rColumnPositions, const css::uno::Reference< css::util::XNumberFormatter > &_rxNumberF, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const TColumnVector *rList, const OTypeInfoMap *_pInfoMap, bool _bAutoIncrementEnabled)
sal_Int16 m_nColumnWidth
maximum column width
Definition: HtmlReader.hxx:35
void TableDataOn(SvxCellHorJustify &eVal)
Definition: HtmlReader.cxx:268
bool CreateTable(HtmlTokenId nToken)
Definition: HtmlReader.cxx:361
sal_Int16 GetWidthPixel(const HTMLOption &rOption)
Definition: HtmlReader.cxx:341
virtual SvParserState CallParser() override
Definition: HtmlReader.cxx:87
void TableFontOn(css::awt::FontDescriptor &_rFont, Color &_rTextColor)
Definition: HtmlReader.cxx:293
virtual void NextToken(HtmlTokenId nToken) override
Definition: HtmlReader.cxx:99
virtual ~OHTMLReader() override
Definition: HtmlReader.cxx:83
HtmlTokenId
std::unique_ptr< OWizTypeSelect >(* TypeSelectionPageFactory)(weld::Container *, OCopyTableWizard *, SvStream &)
std::multimap< sal_Int32, TOTypeInfoSP > OTypeInfoMap
Definition: TypeInfo.hxx:100
SvParserState
SvxCellHorJustify