2010-10-27 12:33:13 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2020-09-13 12:06:53 +00:00
|
|
|
#pragma once
|
2001-02-16 14:54:09 +00:00
|
|
|
|
|
|
|
#include "DExport.hxx"
|
|
|
|
#include <svtools/parhtml.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/svxenum.hxx>
|
2001-02-23 14:02:06 +00:00
|
|
|
#include <com/sun/star/awt/FontDescriptor.hpp>
|
2014-01-02 23:52:37 +01:00
|
|
|
#include <com/sun/star/uno/XComponentContext.hpp>
|
2001-02-16 14:54:09 +00:00
|
|
|
|
2015-10-11 18:21:11 +02:00
|
|
|
class SvStream;
|
|
|
|
|
2001-02-16 14:54:09 +00:00
|
|
|
namespace dbaui
|
|
|
|
{
|
2017-11-06 11:11:04 +02:00
|
|
|
class OHTMLReader final : public HTMLParser, public ODatabaseExport
|
2001-02-16 14:54:09 +00:00
|
|
|
{
|
2013-09-26 12:17:53 +02:00
|
|
|
OUString m_sCurrent;
|
2001-02-16 14:54:09 +00:00
|
|
|
sal_Int32 m_nTableCount;
|
2012-08-12 18:22:40 +02:00
|
|
|
sal_Int16 m_nColumnWidth; ///< maximum column width
|
2007-11-21 14:59:31 +00:00
|
|
|
|
2017-04-21 14:31:00 +02:00
|
|
|
virtual void NextToken( HtmlTokenId nToken ) override; // base class
|
|
|
|
bool CreateTable( HtmlTokenId nToken );
|
2008-01-30 07:46:52 +00:00
|
|
|
virtual TypeSelectionPageFactory
|
2015-10-12 16:04:04 +02:00
|
|
|
getTypeSelectionPageFactory() override;
|
2002-01-22 06:22:37 +00:00
|
|
|
|
2011-01-27 11:24:16 +00:00
|
|
|
void TableDataOn(SvxCellHorJustify& eVal);
|
2018-03-07 08:45:49 +02:00
|
|
|
void TableFontOn(css::awt::FontDescriptor& _rFont, Color &_rTextColor);
|
2011-07-22 16:04:43 -04:00
|
|
|
sal_Int16 GetWidthPixel( const HTMLOption& rOption );
|
2001-02-23 14:02:06 +00:00
|
|
|
void setTextEncoding();
|
2006-05-04 07:42:52 +00:00
|
|
|
void fetchOptions();
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~OHTMLReader() override;
|
2012-08-12 18:38:58 +02:00
|
|
|
|
2001-02-16 14:54:09 +00:00
|
|
|
public:
|
|
|
|
OHTMLReader(SvStream& rIn,
|
2005-09-23 11:33:23 +00:00
|
|
|
const SharedConnection& _rxConnection,
|
2015-08-03 09:14:58 +02:00
|
|
|
const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
|
2016-09-12 12:56:25 +02:00
|
|
|
const css::uno::Reference< css::uno::XComponentContext >& _rxContext);
|
2012-08-10 21:24:32 +02:00
|
|
|
// required for automatic type recognition
|
2001-02-16 14:54:09 +00:00
|
|
|
OHTMLReader(SvStream& rIn,
|
|
|
|
sal_Int32 nRows,
|
2021-10-11 10:45:50 +02:00
|
|
|
TPositions&& _rColumnPositions,
|
2015-08-03 09:14:58 +02:00
|
|
|
const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
|
|
|
|
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
|
2006-05-04 07:42:52 +00:00
|
|
|
const TColumnVector* rList,
|
|
|
|
const OTypeInfoMap* _pInfoMap,
|
2014-04-17 11:16:55 +02:00
|
|
|
bool _bAutoIncrementEnabled);
|
2001-02-16 14:54:09 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual SvParserState CallParser() override;// base class
|
2001-02-16 14:54:09 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2010-10-27 12:33:13 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|