LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dbaui::OHTMLReader Class Referencefinal

#include <HtmlReader.hxx>

Inheritance diagram for dbaui::OHTMLReader:
[legend]
Collaboration diagram for dbaui::OHTMLReader:
[legend]

Public Member Functions

 OHTMLReader (SvStream &rIn, const SharedConnection &_rxConnection, const css::uno::Reference< css::util::XNumberFormatter > &_rxNumberF, const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
 
 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)
 
virtual SvParserState CallParser () override
 
- Public Member Functions inherited from HTMLParser
 HTMLParser (SvStream &rIn, bool bReadNewDoc=true)
 
virtual SvParserState CallParser () override
 
bool IsNewDoc () const
 
bool IsInHeader () const
 
bool IsReadListing () const
 
bool IsReadXMP () const
 
bool IsReadPRE () const
 
bool IsReadScript () const
 
bool IsReadStyle () const
 
void StartPRE ()
 
void FinishPRE ()
 
HtmlTokenId FilterPRE (HtmlTokenId nToken)
 
void StartListing ()
 
void FinishListing ()
 
HtmlTokenId FilterListing (HtmlTokenId nToken)
 
void StartXMP ()
 
void FinishXMP ()
 
HtmlTokenId FilterXMP (HtmlTokenId nToken)
 
void FinishTextArea ()
 
void FinishPREListingXMP ()
 
HtmlTokenId FilterToken (HtmlTokenId nToken)
 
void ReadRawData (const OUString &rEndToken)
 
void UnescapeToken ()
 
const HTMLOptionsGetOptions (HtmlOptionId const *pNoConvertToken=nullptr)
 
virtual void Continue (HtmlTokenId nToken) override
 
virtual bool ParseMetaOptions (const css::uno::Reference< css::document::XDocumentProperties > &, SvKeyValueIterator *)
 
void ParseScriptOptions (OUString &rLangString, std::u16string_view rBaseURL, HTMLScriptLanguage &rLang, OUString &rSrc, OUString &rLibrary, OUString &rModule)
 
bool SetEncodingByHTTPHeader (SvKeyValueIterator *pHTTPHeader)
 
- Public Member Functions inherited from SvParser< HtmlTokenId >
 SvParser (SvStream &rIn, sal_uInt8 nStackSize=3)
 
virtual SvParserState CallParser ()=0
 
SvParserState GetStatus () const
 
sal_uInt32 GetLineNr () const
 
sal_uInt32 GetLinePos () const
 
void IncLineNr ()
 
sal_uInt32 IncLinePos ()
 
void SetLineNr (sal_uInt32 nlNum)
 
void SetLinePos (sal_uInt32 nlPos)
 
sal_uInt32 GetNextChar ()
 
void RereadLookahead ()
 
bool IsParserWorking () const
 
Link< LinkParamNone *, void > GetAsynchCallLink () const
 
void SaveState (T nToken)
 
void RestoreState ()
 
virtual void Continue (T nToken)
 
void SetSrcEncoding (rtl_TextEncoding eSrcEnc)
 
rtl_TextEncoding GetSrcEncoding () const
 
void SetSwitchToUCS2 (bool bSet)
 
bool IsSwitchToUCS2 () const
 
sal_uInt16 GetCharSize () const
 
GetSaveToken () const
 
- Public Member Functions inherited from dbaui::ODatabaseExport
 ODatabaseExport (const SharedConnection &_rxConnection, const css::uno::Reference< css::util::XNumberFormatter > &_rxNumberF, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, SvStream &_rInputStream)
 
 ODatabaseExport (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, SvStream &_rInputStream)
 
void SetColumnTypes (const TColumnVector *rList, const OTypeInfoMap *_pInfoMap)
 
void SetTableName (const OUString &_sTableName)
 
void enableCheckOnly ()
 
bool isCheckEnabled () const
 

Private Member Functions

virtual void NextToken (HtmlTokenId nToken) override
 
bool CreateTable (HtmlTokenId nToken)
 
virtual TypeSelectionPageFactory getTypeSelectionPageFactory () override
 
void TableDataOn (SvxCellHorJustify &eVal)
 
void TableFontOn (css::awt::FontDescriptor &_rFont, Color &_rTextColor)
 
sal_Int16 GetWidthPixel (const HTMLOption &rOption)
 
void setTextEncoding ()
 
void fetchOptions ()
 
virtual ~OHTMLReader () override
 

Private Attributes

OUString m_sCurrent
 
sal_Int32 m_nTableCount
 
sal_Int16 m_nColumnWidth
 maximum column width More...
 

Additional Inherited Members

- Public Types inherited from dbaui::ODatabaseExport
typedef std::map< OUString, OFieldDescription *, ::comphelper::UStringMixLessTColumns
 
typedef std::vector< TColumns::const_iterator > TColumnVector
 
typedef std::vector< std::pair< sal_Int32, sal_Int32 > > TPositions
 
- Static Public Member Functions inherited from HTMLParser
static void RemoveSGMLComment (OUString &rString)
 
static bool InternalImgToPrivateURL (OUString &rURL)
 
static rtl_TextEncoding GetEncodingByHttpHeader (SvKeyValueIterator *pHTTPHeader)
 
- Static Public Member Functions inherited from dbaui::ODatabaseExport
static css::uno::Reference< css::sdbc::XPreparedStatement > createPreparedStatement (const css::uno::Reference< css::sdbc::XDatabaseMetaData > &_xMetaData, const css::uno::Reference< css::beans::XPropertySet > &_xDestTable, const TPositions &_rvColumnPositions)
 
- Protected Member Functions inherited from HTMLParser
HtmlTokenId ScanText (const sal_Unicode cBreak=0U)
 
HtmlTokenId GetNextRawToken ()
 
virtual HtmlTokenId GetNextToken_ () override
 
virtual ~HTMLParser () override
 
void FinishHeader ()
 
void SetNamespace (std::u16string_view rNamespace)
 
virtual void AddMetaUserDefined (OUString const &i_rMetaName)
 
- Protected Member Functions inherited from SvParser< HtmlTokenId >
SkipToken (short nCnt=-1)
 
TokenStackType * GetStackPtr (short nCnt)
 
GetNextToken ()
 
virtual T GetNextToken_ ()=0
 
virtual void NextToken (T nToken)=0
 
virtual ~SvParser () override
 
void ClearTxtConvContext ()
 
- Protected Member Functions inherited from dbaui::ODatabaseExport
virtual TypeSelectionPageFactory getTypeSelectionPageFactory ()=0
 
void CreateDefaultColumn (const OUString &_rColumnName)
 
sal_Int16 CheckString (const OUString &aToken, sal_Int16 _nOldNumberFormat)
 
void adjustFormat ()
 
void eraseTokens ()
 
void insertValueIntoColumn ()
 
void createRowSet ()
 
void showErrorDialog (const css::sdbc::SQLException &e)
 
void ensureFormatter ()
 
bool executeWizard (const OUString &_sTableName, const css::uno::Any &_aTextColor, const css::awt::FontDescriptor &_rFont)
 executeWizard calls a wizard to create/append data More...
 
virtual ~ODatabaseExport ()
 
- Static Protected Member Functions inherited from HTMLParser
static rtl_TextEncoding GetEncodingByMIME (const OUString &rMime)
 
- Protected Attributes inherited from HTMLParser
OUString sSaveToken
 
- Protected Attributes inherited from SvParser< HtmlTokenId >
SvStreamrInput
 
OUStringBuffer aToken
 
sal_uInt32 nlLineNr
 
sal_uInt32 nlLinePos
 
std::unique_ptr< SvParser_Impl< T > > pImplData
 
tools::Long m_nTokenIndex
 
tools::Long nTokenValue
 
bool bTokenHasValue
 
bool bFuzzing
 
SvParserState eState
 
rtl_TextEncoding eSrcEnc
 
sal_uInt64 nNextChPos
 
sal_uInt32 nNextCh
 
bool bSwitchToUCS2
 
bool bRTF_InTextRead
 
- Protected Attributes inherited from dbaui::ODatabaseExport
TPositions m_vColumnPositions
 columns to be used More...
 
std::vector< sal_Int32 > m_vColumnTypes
 ColumnTypes for faster access. More...
 
std::vector< sal_Int32 > m_vColumnSize
 
std::vector< sal_Int16 > m_vNumberFormat
 
css::lang::Locale m_aLocale
 
TColumns m_aDestColumns
 container for new created columns More...
 
TColumnVector m_vDestVector
 
css::uno::Reference< css::beans::XPropertySetm_xTable
 dest table More...
 
css::uno::Reference< css::container::XNameAccess > m_xTables
 container More...
 
SharedConnection m_xConnection
 dest conn More...
 
std::shared_ptr< IUpdateHelperm_pUpdateHelper
 
css::uno::Reference< css::util::XNumberFormatter > m_xFormatter
 a number formatter working with the connection's NumberFormatsSupplier More...
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::util::Date m_aNullDate
 
SvNumberFormatterm_pFormatter
 
SvStreamm_rInputStream
 
OUString m_sDefaultTableName
 for saving the selected tablename More...
 
OUString m_sTextToken
 cell content More...
 
OUString m_sNumToken
 SDNUM value. More...
 
TOTypeInfoSP m_pTypeInfo
 contains the default type More...
 
const TColumnVectorm_pColumnList
 
const OTypeInfoMapm_pInfoMap
 
sal_Int32 m_nColumnPos
 current column position More...
 
sal_Int32 m_nRows
 number of rows to be searched More...
 
sal_Int32 m_nRowCount
 current count of rows More...
 
bool m_bError
 error and termination code More...
 
bool m_bInTbl
 true, if parser is in RTF table More...
 
bool m_bHead
 true, if the header hasn't been read yet More...
 
bool m_bDontAskAgain
 if there is an error when pasting, don't show it again More...
 
bool m_bIsAutoIncrement
 if PKey is set by user More...
 
bool m_bFoundTable
 set to true when a table was found More...
 
bool m_bCheckOnly
 
bool m_bAppendFirstLine
 

Detailed Description

Definition at line 31 of file HtmlReader.hxx.

Constructor & Destructor Documentation

◆ ~OHTMLReader()

OHTMLReader::~OHTMLReader ( )
overrideprivatevirtual

Definition at line 83 of file HtmlReader.cxx.

◆ OHTMLReader() [1/2]

dbaui::OHTMLReader::OHTMLReader ( SvStream rIn,
const SharedConnection _rxConnection,
const css::uno::Reference< css::util::XNumberFormatter > &  _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext 
)

◆ OHTMLReader() [2/2]

dbaui::OHTMLReader::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 
)

Member Function Documentation

◆ CallParser()

SvParserState OHTMLReader::CallParser ( )
overridevirtual

◆ CreateTable()

bool OHTMLReader::CreateTable ( HtmlTokenId  nToken)
private

◆ fetchOptions()

void OHTMLReader::fetchOptions ( )
private

◆ getTypeSelectionPageFactory()

TypeSelectionPageFactory OHTMLReader::getTypeSelectionPageFactory ( )
overrideprivatevirtual

Implements dbaui::ODatabaseExport.

Definition at line 476 of file HtmlReader.cxx.

References dbaui::OWizHTMLExtend::Create().

◆ GetWidthPixel()

sal_Int16 OHTMLReader::GetWidthPixel ( const HTMLOption rOption)
private

Definition at line 341 of file HtmlReader.cxx.

References HTMLOption::GetNumber(), HTMLOption::GetString(), and m_nColumnWidth.

Referenced by NextToken().

◆ NextToken()

void OHTMLReader::NextToken ( HtmlTokenId  nToken)
overrideprivatevirtual

◆ setTextEncoding()

void OHTMLReader::setTextEncoding ( )
private

Definition at line 471 of file HtmlReader.cxx.

References HTMLParser::ParseMetaOptions().

Referenced by NextToken().

◆ TableDataOn()

void OHTMLReader::TableDataOn ( SvxCellHorJustify eVal)
private

◆ TableFontOn()

void OHTMLReader::TableFontOn ( css::awt::FontDescriptor &  _rFont,
Color _rTextColor 
)
private

Member Data Documentation

◆ m_nColumnWidth

sal_Int16 dbaui::OHTMLReader::m_nColumnWidth
private

maximum column width

Definition at line 35 of file HtmlReader.hxx.

Referenced by GetWidthPixel(), and NextToken().

◆ m_nTableCount

sal_Int32 dbaui::OHTMLReader::m_nTableCount
private

Definition at line 34 of file HtmlReader.hxx.

Referenced by NextToken().

◆ m_sCurrent

OUString dbaui::OHTMLReader::m_sCurrent
private

Definition at line 33 of file HtmlReader.hxx.

Referenced by CreateTable(), and NextToken().


The documentation for this class was generated from the following files: