Files
libreoffice/dbaccess/source/ui/misc/HtmlReader.cxx

545 lines
19 KiB
C++
Raw Normal View History

/* -*- 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 .
*/
2001-02-27 14:31:17 +00:00
#include "HtmlReader.hxx"
2001-02-16 14:54:09 +00:00
#include <connectivity/dbconversion.hxx>
#include <connectivity/dbtools.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/tenccvt.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/string.hxx>
2002-08-19 07:01:32 +00:00
#include "dbu_misc.hrc"
2001-02-16 14:54:09 +00:00
#include "dbustrings.hrc"
#include <sfx2/sfxhtml.hxx>
2011-02-03 00:33:36 +01:00
#include <osl/diagnose.h>
2001-02-16 14:54:09 +00:00
#include "moduledbu.hxx"
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XAppend.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/awt/FontStrikeout.hpp>
#include <com/sun/star/awt/FontSlant.hpp>
#include <com/sun/star/awt/FontUnderline.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
#include <tools/color.hxx>
2001-02-23 14:13:25 +00:00
#include "WCopyTable.hxx"
#include "WExtendPages.hxx"
#include "WNameMatch.hxx"
#include "WColumnSelect.hxx"
#include "QEnumTypes.hxx"
#include "WCPage.hxx"
#include <tools/inetmime.hxx>
#include <svl/inettype.hxx>
2001-02-23 14:13:25 +00:00
#include <rtl/tencinfo.h>
#include "UITools.hxx"
#include <vcl/svapp.hxx>
2001-02-16 14:54:09 +00:00
using namespace dbaui;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::awt;
#define DBAUI_HTML_FONTSIZES 8 // like export, HTML-Options
2001-02-23 14:13:25 +00:00
2001-02-16 14:54:09 +00:00
// OHTMLReader
OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection,
2001-02-23 14:13:25 +00:00
const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const TColumnVector* pList,
const OTypeInfoMap* _pInfoMap)
: HTMLParser(rIn)
, ODatabaseExport( _rxConnection, _rxNumberF, _rxContext, pList, _pInfoMap, rIn )
, m_nTableCount(0)
, m_nWidth(0)
, m_nColumnWidth(87)
, m_bMetaOptions(sal_False)
, m_bSDNum(sal_False)
2001-02-16 14:54:09 +00:00
{
SAL_INFO("dbaccess.ui", "OHTMLReader::OHTMLReader" );
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
// If the file starts with a BOM, switch to UCS2.
SetSwitchToUCS2( sal_True );
2001-02-16 14:54:09 +00:00
}
2001-02-16 14:54:09 +00:00
OHTMLReader::OHTMLReader(SvStream& rIn,
sal_Int32 nRows,
2002-05-23 11:03:56 +00:00
const TPositions &_rColumnPositions,
2001-02-23 14:13:25 +00:00
const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
const TColumnVector* pList,
const OTypeInfoMap* _pInfoMap,
sal_Bool _bAutoIncrementEnabled)
: HTMLParser(rIn)
, ODatabaseExport( nRows, _rColumnPositions, _rxNumberF, _rxContext, pList, _pInfoMap, _bAutoIncrementEnabled, rIn )
, m_nTableCount(0)
, m_nWidth(0)
, m_nColumnWidth(87)
, m_bMetaOptions(sal_False)
, m_bSDNum(sal_False)
2001-02-16 14:54:09 +00:00
{
SAL_INFO("dbaccess.ui", "OHTMLReader::OHTMLReader" );
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
// If the file starts with a BOM, switch to UCS2.
SetSwitchToUCS2( sal_True );
2001-02-16 14:54:09 +00:00
}
2001-02-16 14:54:09 +00:00
OHTMLReader::~OHTMLReader()
{
}
2001-02-16 14:54:09 +00:00
SvParserState OHTMLReader::CallParser()
{
SAL_INFO("dbaccess.ui", "OHTMLReader::CallParser" );
2001-02-16 14:54:09 +00:00
rInput.Seek(STREAM_SEEK_TO_BEGIN);
rInput.ResetError();
SvParserState eParseState = HTMLParser::CallParser();
SetColumnTypes(m_pColumnList,m_pInfoMap);
return m_bFoundTable ? eParseState : SVPAR_ERROR;
2001-02-16 14:54:09 +00:00
}
2001-02-16 14:54:09 +00:00
void OHTMLReader::NextToken( int nToken )
{
SAL_INFO("dbaccess.ui", "OHTMLReader::NextToken" );
if(m_bError || !m_nRows) // if there is an error or no more rows to check, return immediatelly
2001-02-16 14:54:09 +00:00
return;
if ( nToken == HTML_META )
setTextEncoding();
2001-02-16 14:54:09 +00:00
if(m_xConnection.is()) // names, which CTOR was called and hence, if a table should be created
2001-02-16 14:54:09 +00:00
{
switch(nToken)
{
case HTML_TABLE_ON:
++m_nTableCount;
{ // can also be TD or TH, if there was no TABLE before
const HTMLOptions& rHtmlOptions = GetOptions();
for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i)
2001-02-16 14:54:09 +00:00
{
const HTMLOption& rOption = rHtmlOptions[i];
switch( rOption.GetToken() )
2001-02-16 14:54:09 +00:00
{
case HTML_O_WIDTH:
{ // percentage: of document width respectively outer cell
m_nColumnWidth = GetWidthPixel( rOption );
2001-02-16 14:54:09 +00:00
}
break;
}
}
}
case HTML_THEAD_ON:
case HTML_TBODY_ON:
{
sal_uInt32 nTell = rInput.Tell(); // perhaps alters position of the stream
if ( !m_xTable.is() )
{// use first line as header
m_bError = !CreateTable(nToken);
if ( m_bAppendFirstLine )
rInput.Seek(nTell);
}
}
2001-02-16 14:54:09 +00:00
break;
case HTML_TABLE_OFF:
if(!--m_nTableCount)
{
m_xTable = NULL;
}
break;
case HTML_TABLEROW_ON:
if ( m_pUpdateHelper.get() )
{
try
{
m_pUpdateHelper->moveToInsertRow(); // otherwise append new line
}
catch(SQLException& e)
// handling update failure
{
showErrorDialog(e);
}
}
2002-07-05 12:55:05 +00:00
else
m_bError = sal_True;
2001-02-16 14:54:09 +00:00
break;
case HTML_TEXTTOKEN:
case HTML_SINGLECHAR:
if ( m_bInTbl ) //&& !m_bSDNum ) // important, as otherwise we also get the names of the fonts
2001-02-16 14:54:09 +00:00
m_sTextToken += aToken;
break;
case HTML_PARABREAK_OFF:
m_sCurrent += m_sTextToken;
break;
case HTML_PARABREAK_ON:
m_sTextToken = "";
break;
2001-02-16 14:54:09 +00:00
case HTML_TABLEDATA_ON:
fetchOptions();
2001-02-16 14:54:09 +00:00
break;
case HTML_TABLEDATA_OFF:
{
if ( !m_sCurrent.isEmpty() )
m_sTextToken = m_sCurrent;
try
{
insertValueIntoColumn();
}
catch(SQLException& e)
// handling update failure
{
showErrorDialog(e);
}
m_sCurrent = "";
2001-02-16 14:54:09 +00:00
m_nColumnPos++;
eraseTokens();
m_bSDNum = m_bInTbl = sal_False;
2001-02-16 14:54:09 +00:00
}
break;
case HTML_TABLEROW_OFF:
if ( !m_pUpdateHelper.get() )
2002-07-05 12:55:05 +00:00
{
m_bError = sal_True;
break;
}
2001-02-16 14:54:09 +00:00
try
{
m_nRowCount++;
if (m_bIsAutoIncrement) // if bSetAutoIncrement then I have to set the autoincrement
m_pUpdateHelper->updateInt(1,m_nRowCount);
m_pUpdateHelper->insertRow();
2001-02-16 14:54:09 +00:00
}
catch(SQLException& e)
// handling update failure
2001-02-16 14:54:09 +00:00
{
showErrorDialog(e);
2001-02-16 14:54:09 +00:00
}
m_nColumnPos = 0;
break;
}
}
else // branch only valid for type checking
2001-02-16 14:54:09 +00:00
{
switch(nToken)
{
case HTML_THEAD_ON:
case HTML_TBODY_ON:
// The head of the column is not included
2001-02-16 14:54:09 +00:00
if(m_bHead)
{
do
{}
while(GetNextToken() != HTML_TABLEROW_OFF);
m_bHead = sal_False;
}
break;
case HTML_TABLEDATA_ON:
case HTML_TABLEHEADER_ON:
fetchOptions();
2001-02-16 14:54:09 +00:00
break;
case HTML_TEXTTOKEN:
case HTML_SINGLECHAR:
if ( m_bInTbl ) // && !m_bSDNum ) // important, as otherwise we also get the names of the fonts
2001-02-16 14:54:09 +00:00
m_sTextToken += aToken;
break;
case HTML_PARABREAK_OFF:
m_sCurrent += m_sTextToken;
break;
case HTML_PARABREAK_ON:
m_sTextToken = "";
break;
2001-02-16 14:54:09 +00:00
case HTML_TABLEDATA_OFF:
if ( !m_sCurrent.isEmpty() )
m_sTextToken = m_sCurrent;
adjustFormat();
2001-02-16 14:54:09 +00:00
m_nColumnPos++;
m_bSDNum = m_bInTbl = sal_False;
m_sCurrent = "";
2001-02-16 14:54:09 +00:00
break;
case HTML_TABLEROW_OFF:
if ( !m_sCurrent.isEmpty() )
m_sTextToken = m_sCurrent;
adjustFormat();
2001-02-16 14:54:09 +00:00
m_nColumnPos = 0;
m_nRows--;
m_sCurrent = "";
2001-02-16 14:54:09 +00:00
break;
}
}
}
void OHTMLReader::fetchOptions()
{
SAL_INFO("dbaccess.ui", "OHTMLReader::fetchOptions" );
m_bInTbl = sal_True;
const HTMLOptions& options = GetOptions();
for (size_t i = 0, n = options.size(); i < n; ++i)
{
const HTMLOption& rOption = options[i];
switch( rOption.GetToken() )
{
case HTML_O_SDVAL:
{
m_sValToken = rOption.GetString();
m_bSDNum = sal_True;
}
break;
case HTML_O_SDNUM:
m_sNumToken = rOption.GetString();
break;
}
}
}
2011-01-27 11:24:16 +00:00
void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
2001-02-16 14:54:09 +00:00
{
SAL_INFO("dbaccess.ui", "OHTMLReader::TableDataOn" );
const HTMLOptions& rHtmlOptions = GetOptions();
for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i)
2001-02-16 14:54:09 +00:00
{
const HTMLOption& rOption = rHtmlOptions[i];
switch( rOption.GetToken() )
2001-02-16 14:54:09 +00:00
{
case HTML_O_ALIGN:
{
const OUString& rOptVal = rOption.GetString();
if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_right ))
2001-02-16 14:54:09 +00:00
eVal = SVX_HOR_JUSTIFY_RIGHT;
else if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_center ))
2001-02-16 14:54:09 +00:00
eVal = SVX_HOR_JUSTIFY_CENTER;
else if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_left ))
2001-02-16 14:54:09 +00:00
eVal = SVX_HOR_JUSTIFY_LEFT;
else
eVal = SVX_HOR_JUSTIFY_STANDARD;
}
break;
case HTML_O_WIDTH:
m_nWidth = GetWidthPixel( rOption );
2001-02-16 14:54:09 +00:00
break;
}
}
}
2001-02-23 14:13:25 +00:00
void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
2001-02-16 14:54:09 +00:00
{
SAL_INFO("dbaccess.ui", "OHTMLReader::TableFontOn" );
const HTMLOptions& rHtmlOptions = GetOptions();
for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i)
2001-02-16 14:54:09 +00:00
{
const HTMLOption& rOption = rHtmlOptions[i];
switch( rOption.GetToken() )
2001-02-16 14:54:09 +00:00
{
case HTML_O_COLOR:
{
Color aColor;
rOption.GetColor( aColor );
2001-02-23 14:13:25 +00:00
_rTextColor = aColor.GetRGBColor();
2001-02-16 14:54:09 +00:00
}
break;
case HTML_O_FACE :
{
const OUString& rFace = rOption.GetString();
OUString aFontName;
sal_Int32 nPos = 0;
while( nPos != -1 )
{
// list fo fonts, VCL: semicolon as separator, HTML: comma
OUString aFName = rFace.getToken( 0, ',', nPos );
aFName = comphelper::string::strip(aFName, ' ');
if( !aFontName.isEmpty() )
aFontName += ";";
2001-02-16 14:54:09 +00:00
aFontName += aFName;
}
if ( !aFontName.isEmpty() )
_rFont.Name = aFontName;
2001-02-16 14:54:09 +00:00
}
break;
case HTML_O_SIZE :
{
sal_Int16 nSize = (sal_Int16) rOption.GetNumber();
2001-02-16 14:54:09 +00:00
if ( nSize == 0 )
nSize = 1;
else if ( nSize < DBAUI_HTML_FONTSIZES )
2001-02-16 14:54:09 +00:00
nSize = DBAUI_HTML_FONTSIZES;
2001-02-23 14:13:25 +00:00
_rFont.Height = nSize;
2001-02-16 14:54:09 +00:00
}
break;
}
}
}
sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption& rOption )
2001-02-16 14:54:09 +00:00
{
SAL_INFO("dbaccess.ui", "OHTMLReader::GetWidthPixel" );
const OUString& rOptVal = rOption.GetString();
if ( rOptVal.indexOf('%') != -1 )
{ // percentage
2011-02-03 00:33:36 +01:00
OSL_ENSURE( m_nColumnWidth, "WIDTH Option: m_nColumnWidth==0 und Width%" );
return (sal_Int16)((rOption.GetNumber() * m_nColumnWidth) / 100);
2001-02-16 14:54:09 +00:00
}
else
{
if ( rOptVal.indexOf('*') != -1 )
{ // relativ to what?!?
//TODO: collect ColArray of all relevant values and then MakeCol
2001-02-16 14:54:09 +00:00
return 0;
}
else
return (sal_Int16)rOption.GetNumber(); // pixel
2001-02-16 14:54:09 +00:00
}
}
2001-02-16 14:54:09 +00:00
sal_Bool OHTMLReader::CreateTable(int nToken)
{
SAL_INFO("dbaccess.ui", "OHTMLReader::CreateTable" );
OUString aTempName(ModuleRes(STR_TBL_TITLE));
aTempName = aTempName.getToken(0,' ');
aTempName = ::dbtools::createUniqueName(m_xTables, aTempName);
2001-02-16 14:54:09 +00:00
int nTmpToken2 = nToken;
sal_Bool bCaption = sal_False;
sal_Bool bTableHeader = sal_False;
OUString aColumnName;
2001-02-16 14:54:09 +00:00
SvxCellHorJustify eVal;
OUString aTableName;
FontDescriptor aFont = VCLUnoHelper::CreateFontDescriptor(Application::GetSettings().GetStyleSettings().GetAppFont());
2001-02-23 14:13:25 +00:00
sal_Int32 nTextColor = 0;
2001-02-16 14:54:09 +00:00
do
{
switch(nTmpToken2)
{
case HTML_TEXTTOKEN:
case HTML_SINGLECHAR:
if(bTableHeader)
aColumnName += aToken;
if(bCaption)
aTableName += aToken;
break;
case HTML_PARABREAK_OFF:
m_sCurrent += aColumnName;
break;
case HTML_PARABREAK_ON:
m_sTextToken = "";
break;
2001-02-16 14:54:09 +00:00
case HTML_TABLEDATA_ON:
case HTML_TABLEHEADER_ON:
2011-01-27 11:24:16 +00:00
TableDataOn(eVal);
bTableHeader = sal_True;
2001-02-16 14:54:09 +00:00
break;
case HTML_TABLEDATA_OFF:
case HTML_TABLEHEADER_OFF:
{
aColumnName = comphelper::string::strip(aColumnName, ' ' );
if (aColumnName.isEmpty() || m_bAppendFirstLine )
aColumnName = ModuleRes(STR_COLUMN_NAME);
else if ( !m_sCurrent.isEmpty() )
aColumnName = m_sCurrent;
2001-02-16 14:54:09 +00:00
aColumnName = comphelper::string::strip(aColumnName, ' ');
2001-02-16 14:54:09 +00:00
CreateDefaultColumn(aColumnName);
aColumnName = "";
m_sCurrent = "";
2001-02-16 14:54:09 +00:00
eVal = SVX_HOR_JUSTIFY_STANDARD;
bTableHeader = sal_False;
}
break;
case HTML_TITLE_ON:
case HTML_CAPTION_ON:
bCaption = sal_True;
2001-02-16 14:54:09 +00:00
break;
case HTML_TITLE_OFF:
case HTML_CAPTION_OFF:
aTableName = comphelper::string::strip(aTableName, ' ');
if(aTableName.isEmpty())
aTableName = ::dbtools::createUniqueName(m_xTables, aTableName);
2001-02-23 14:13:25 +00:00
else
aTableName = aTempName;
2001-02-16 14:54:09 +00:00
bCaption = sal_False;
break;
case HTML_FONT_ON:
2001-02-23 14:13:25 +00:00
TableFontOn(aFont,nTextColor);
2001-02-16 14:54:09 +00:00
break;
case HTML_BOLD_ON:
2001-02-23 14:13:25 +00:00
aFont.Weight = ::com::sun::star::awt::FontWeight::BOLD;
2001-02-16 14:54:09 +00:00
break;
case HTML_ITALIC_ON:
2001-02-23 14:13:25 +00:00
aFont.Slant = ::com::sun::star::awt::FontSlant_ITALIC;
2001-02-16 14:54:09 +00:00
break;
case HTML_UNDERLINE_ON:
2001-02-23 14:13:25 +00:00
aFont.Underline = ::com::sun::star::awt::FontUnderline::SINGLE;
2001-02-16 14:54:09 +00:00
break;
case HTML_STRIKE_ON:
2001-02-23 14:13:25 +00:00
aFont.Strikeout = ::com::sun::star::awt::FontStrikeout::SINGLE;
2001-02-16 14:54:09 +00:00
break;
}
}
while((nTmpToken2 = GetNextToken()) != HTML_TABLEROW_OFF);
if ( !m_sCurrent.isEmpty() )
aColumnName = m_sCurrent;
aColumnName = comphelper::string::strip(aColumnName, ' ');
if(!aColumnName.isEmpty())
2001-02-16 14:54:09 +00:00
CreateDefaultColumn(aColumnName);
2002-05-28 07:41:41 +00:00
if ( m_vDestVector.empty() )
return sal_False;
if(aTableName.isEmpty())
2001-07-05 11:19:25 +00:00
aTableName = aTempName;
2001-02-16 14:54:09 +00:00
m_bInTbl = sal_False;
m_bFoundTable = sal_True;
2001-02-16 14:54:09 +00:00
2002-05-28 07:41:41 +00:00
if ( isCheckEnabled() )
return sal_True;
2002-01-22 06:22:37 +00:00
return !executeWizard(aTableName,makeAny(nTextColor),aFont) && m_xTable.is();
2001-02-23 14:13:25 +00:00
}
2001-02-23 14:13:25 +00:00
void OHTMLReader::setTextEncoding()
{
SAL_INFO("dbaccess.ui", "OHTMLReader::setTextEncoding" );
2001-02-23 14:13:25 +00:00
m_bMetaOptions = sal_True;
CWS-TOOLING: integrate CWS fwk103 2009-05-26 12:44:25 +0200 mst r272292 : #i100727# - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx: + fix warning: rename method to prevent overloading 2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment 2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly 2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly 2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo 2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros 2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros 2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros 2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored 2009-05-06 17:43:38 +0200 mst r271607 : #i100727# - svtools/source/svhtml/parhtml.cxx: + adapt code to renaming of HTML constants (sb107) 2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning 2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified 2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified 2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47) 2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly 2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx: + fix wrong initialization order in constructor 2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly 2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary 2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash 2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance 2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4 2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4 2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4 2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo 2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727# - svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx, sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}: + move SvKeyValue stuff from sfx2 to svtools - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx, sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx: + move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2) to HTMLParser (svtools) + make HTMLParser::ParseMetaOptions() a virtual function + HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding() + new template method HTMLParser::AddMetaUserDefined() - svtools/source/svhtml/makefile.mk: + enable exceptions for parhtml.cxx - dbaccess/source/ui/misc/HtmlReader.cxx, sc/source/filter/html/htmlpars.cxx: + remove encoding related code duplication - sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}: + new SwHTMLParser::AddMetaUserDefined() for import of DOCINFO field subtypes INFO[1-4] + do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4] 2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo 2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception 2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo 2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button 2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45) 2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well 2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing 2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs 2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document 2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message 2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877# - svtools/source/uno/unoevent.cxx: + use proper operator delete[] 2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL 2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch 2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
ParseMetaOptions(NULL, NULL);
2001-02-16 14:54:09 +00:00
}
CWS-TOOLING: integrate CWS fwk103 2009-05-26 12:44:25 +0200 mst r272292 : #i100727# - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx: + fix warning: rename method to prevent overloading 2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment 2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly 2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly 2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo 2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros 2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros 2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros 2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored 2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored 2009-05-06 17:43:38 +0200 mst r271607 : #i100727# - svtools/source/svhtml/parhtml.cxx: + adapt code to renaming of HTML constants (sb107) 2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning 2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified 2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified 2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47) 2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly 2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx: + fix wrong initialization order in constructor 2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly 2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary 2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash 2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance 2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4 2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4 2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4 2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo 2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727# - svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx, sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}: + move SvKeyValue stuff from sfx2 to svtools - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx, sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx: + move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2) to HTMLParser (svtools) + make HTMLParser::ParseMetaOptions() a virtual function + HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding() + new template method HTMLParser::AddMetaUserDefined() - svtools/source/svhtml/makefile.mk: + enable exceptions for parhtml.cxx - dbaccess/source/ui/misc/HtmlReader.cxx, sc/source/filter/html/htmlpars.cxx: + remove encoding related code duplication - sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}: + new SwHTMLParser::AddMetaUserDefined() for import of DOCINFO field subtypes INFO[1-4] + do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4] 2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo 2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off 2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception 2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo 2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button 2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45) 2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well 2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing 2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs 2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document 2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message 2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877# - svtools/source/uno/unoevent.cxx: + use proper operator delete[] 2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL 2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch 2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
2001-11-23 13:51:40 +00:00
void OHTMLReader::release()
{
SAL_INFO("dbaccess.ui", "OHTMLReader::release" );
2001-11-23 13:51:40 +00:00
ReleaseRef();
}
TypeSelectionPageFactory OHTMLReader::getTypeSelectionPageFactory()
2002-01-22 06:22:37 +00:00
{
SAL_INFO("dbaccess.ui", "OHTMLReader::getTypeSelectionPageFactory" );
return &OWizHTMLExtend::Create;
2002-01-22 06:22:37 +00:00
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */