1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
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>
31 class OHTMLReader final
: public HTMLParser
, public ODatabaseExport
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();
47 virtual ~OHTMLReader() override
;
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
,
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: */