2010-10-12 15:59:03 +02: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 .
|
|
|
|
|
*/
|
2006-09-17 06:12:40 +00:00
|
|
|
|
|
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>
|
2006-08-28 14:08:11 +00:00
|
|
|
|
#include <tools/tenccvt.hxx>
|
2001-03-15 07:29:16 +00:00
|
|
|
|
#include <comphelper/extract.hxx>
|
2012-06-11 13:15:18 +01:00
|
|
|
|
#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"
|
2006-10-18 12:31:57 +00:00
|
|
|
|
#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>
|
2009-10-16 00:05:16 +02:00
|
|
|
|
#include <svl/inettype.hxx>
|
2001-02-23 14:13:25 +00:00
|
|
|
|
#include <rtl/tencinfo.h>
|
2001-09-20 12:36:09 +00:00
|
|
|
|
#include "UITools.hxx"
|
|
|
|
|
#include <vcl/svapp.hxx>
|
2009-04-23 10:42:05 +00:00
|
|
|
|
#include <rtl/logfile.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;
|
|
|
|
|
|
2001-09-20 12:36:09 +00:00
|
|
|
|
#define DBAUI_HTML_FONTSIZES 8 // wie Export, HTML-Options
|
2001-02-23 14:13:25 +00:00
|
|
|
|
#define HTML_META_NONE 0
|
|
|
|
|
#define HTML_META_AUTHOR 1
|
|
|
|
|
#define HTML_META_DESCRIPTION 2
|
|
|
|
|
#define HTML_META_KEYWORDS 3
|
|
|
|
|
#define HTML_META_REFRESH 4
|
|
|
|
|
#define HTML_META_CLASSIFICATION 5
|
|
|
|
|
#define HTML_META_CREATED 6
|
|
|
|
|
#define HTML_META_CHANGEDBY 7
|
|
|
|
|
#define HTML_META_CHANGED 8
|
|
|
|
|
#define HTML_META_GENERATOR 9
|
|
|
|
|
#define HTML_META_SDFOOTNOTE 10
|
|
|
|
|
#define HTML_META_SDENDNOTE 11
|
|
|
|
|
#define HTML_META_CONTENT_TYPE 12
|
|
|
|
|
|
2001-02-16 14:54:09 +00:00
|
|
|
|
// ==========================================================================
|
2007-05-10 09:34:17 +00:00
|
|
|
|
DBG_NAME(OHTMLReader)
|
2001-02-16 14:54:09 +00:00
|
|
|
|
// ==========================================================================
|
|
|
|
|
// OHTMLReader
|
|
|
|
|
// ==========================================================================
|
2005-09-23 11:36:45 +00:00
|
|
|
|
OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection,
|
2001-02-23 14:13:25 +00:00
|
|
|
|
const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
|
2001-07-02 12:22:11 +00:00
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
|
|
|
|
|
const TColumnVector* pList,
|
|
|
|
|
const OTypeInfoMap* _pInfoMap)
|
2008-01-30 07:50:19 +00:00
|
|
|
|
:HTMLParser(rIn)
|
|
|
|
|
,ODatabaseExport( _rxConnection, _rxNumberF, _rM, pList, _pInfoMap, rIn )
|
2001-02-16 14:54:09 +00:00
|
|
|
|
,m_nTableCount(0)
|
|
|
|
|
,m_nColumnWidth(87)
|
2001-02-23 14:13:25 +00:00
|
|
|
|
,m_bMetaOptions(sal_False)
|
2002-07-09 11:32:36 +00:00
|
|
|
|
,m_bSDNum(sal_False)
|
2001-02-16 14:54:09 +00:00
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::OHTMLReader" );
|
2001-02-16 14:54:09 +00:00
|
|
|
|
DBG_CTOR(OHTMLReader,NULL);
|
2006-10-18 12:31:57 +00:00
|
|
|
|
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
|
|
|
|
|
// If the file starts with a BOM, switch to UCS2.
|
2011-01-14 15:00:11 +01:00
|
|
|
|
SetSwitchToUCS2( sal_True );
|
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,
|
2001-07-02 12:22:11 +00:00
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
|
|
|
|
|
const TColumnVector* pList,
|
2006-05-04 07:44:26 +00:00
|
|
|
|
const OTypeInfoMap* _pInfoMap,
|
|
|
|
|
sal_Bool _bAutoIncrementEnabled)
|
2008-01-30 07:50:19 +00:00
|
|
|
|
:HTMLParser(rIn)
|
|
|
|
|
,ODatabaseExport( nRows, _rColumnPositions, _rxNumberF, _rM, pList, _pInfoMap, _bAutoIncrementEnabled, rIn )
|
2001-02-16 14:54:09 +00:00
|
|
|
|
,m_nTableCount(0)
|
|
|
|
|
,m_nColumnWidth(87)
|
2001-02-23 14:13:25 +00:00
|
|
|
|
,m_bMetaOptions(sal_False)
|
2002-07-09 11:32:36 +00:00
|
|
|
|
,m_bSDNum(sal_False)
|
2001-02-16 14:54:09 +00:00
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::OHTMLReader" );
|
2001-02-16 14:54:09 +00:00
|
|
|
|
DBG_CTOR(OHTMLReader,NULL);
|
2006-10-18 12:31:57 +00:00
|
|
|
|
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
|
|
|
|
|
// If the file starts with a BOM, switch to UCS2.
|
2011-01-14 15:00:11 +01:00
|
|
|
|
SetSwitchToUCS2( sal_True );
|
2001-02-16 14:54:09 +00:00
|
|
|
|
}
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
OHTMLReader::~OHTMLReader()
|
|
|
|
|
{
|
|
|
|
|
DBG_DTOR(OHTMLReader,NULL);
|
|
|
|
|
}
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
SvParserState OHTMLReader::CallParser()
|
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::CallParser" );
|
2004-08-02 15:05:00 +00:00
|
|
|
|
DBG_CHKTHIS(OHTMLReader,NULL);
|
2001-02-16 14:54:09 +00:00
|
|
|
|
rInput.Seek(STREAM_SEEK_TO_BEGIN);
|
|
|
|
|
rInput.ResetError();
|
2001-07-16 12:42:36 +00:00
|
|
|
|
SvParserState eParseState = HTMLParser::CallParser();
|
2006-01-19 14:43:23 +00:00
|
|
|
|
SetColumnTypes(m_pColumnList,m_pInfoMap);
|
2001-07-16 12:42:36 +00:00
|
|
|
|
return m_bFoundTable ? eParseState : SVPAR_ERROR;
|
2001-02-16 14:54:09 +00:00
|
|
|
|
}
|
2001-02-23 14:13:25 +00:00
|
|
|
|
// -----------------------------------------------------------------------------
|
2001-02-16 14:54:09 +00:00
|
|
|
|
void OHTMLReader::NextToken( int nToken )
|
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::NextToken" );
|
2004-08-02 15:05:00 +00:00
|
|
|
|
DBG_CHKTHIS(OHTMLReader,NULL);
|
2001-02-16 14:54:09 +00:00
|
|
|
|
if(m_bError || !m_nRows) // falls Fehler oder keine Rows mehr zur "Uberpr"ufung dann gleich zur"uck
|
|
|
|
|
return;
|
2006-10-18 12:31:57 +00:00
|
|
|
|
if ( nToken == HTML_META )
|
|
|
|
|
setTextEncoding();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
|
|
|
|
|
if(m_xConnection.is()) // gibt an welcher CTOR gerufen wurde und damit, ob eine Tabelle erstellt werden soll
|
|
|
|
|
{
|
|
|
|
|
switch(nToken)
|
|
|
|
|
{
|
|
|
|
|
case HTML_TABLE_ON:
|
|
|
|
|
++m_nTableCount;
|
|
|
|
|
{ // es kann auch TD oder TH sein, wenn es vorher kein TABLE gab
|
2011-07-22 16:04:43 -04:00
|
|
|
|
const HTMLOptions& rHtmlOptions = GetOptions();
|
|
|
|
|
for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i)
|
2001-02-16 14:54:09 +00:00
|
|
|
|
{
|
2011-07-22 16:04:43 -04:00
|
|
|
|
const HTMLOption& rOption = rHtmlOptions[i];
|
|
|
|
|
switch( rOption.GetToken() )
|
2001-02-16 14:54:09 +00:00
|
|
|
|
{
|
|
|
|
|
case HTML_O_WIDTH:
|
|
|
|
|
{ // Prozent: von Dokumentbreite bzw. aeusserer Zelle
|
2011-07-22 16:04:43 -04:00
|
|
|
|
m_nColumnWidth = GetWidthPixel( rOption );
|
2001-02-16 14:54:09 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
case HTML_THEAD_ON:
|
|
|
|
|
case HTML_TBODY_ON:
|
2007-11-21 15:06:18 +00:00
|
|
|
|
{
|
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
* commit 'ooo/DEV300_m101': (76 commits)
masterfix DEV300: #i10000# usage of L10N build_type
removetooltypes01: Fix build problems after rebase to DEV300m99 in basctl, cui, reportdesign, sw
hr75: #i116747#: remove obsolete copyright notices
gnumake3: remove comphelper version; fix including extract.hxx
removetooltypes01: #i112600# Replace missing tools types replacement
removetooltypes01: #i112600# remove tooltypes from reportdesign
removetooltypes01: #i112600# remove tooltypes from dbaccess
undoapi: don't use deprecated JUnit API, this seems to fail now (but didn't before the rebase)
undoapi: those two classes do not belong into JAVATESTFILES, but JAVAFILES only
undoapi: (I|Sfx)UndoManager now working with size_t instead of USHORT
gridsort: give the UnoControl(Model/Base) classes a ctor taking a service factory, so we have access to the factory which created us, and don't need to resort to the process'es service factory
dba34b: #109956# notify column value in correct order
dba34b: #i114309# set default values for bit boolean and reset when we are on the insertrow
undoapi: assert unknown slots in ImplInvalidateFeature
dba34b: #i110907# check if design handle event
dba34b: #i109956# notify column values when row is refreshed
dba34b: #i115753# add test again
undoapi: renamed Undo.* to RptUndo.*, to not confuse a certain IDE with different same-named files in the source tree ...
undoapi: migrated report designer to use an own, model-bound UndoManager, instead of the UndoManager formerly bound to the controller
undoapi: split OSingleDocumentController into DBSubComponentController (which the report design's controller will be derived from) and the still-so-named OSingleDocumentController. Module reportdesign does not compile with this change, this is yet to come.
...
Conflicts:
dbaccess/inc/IEnvironment.hxx
dbaccess/inc/dataview.hxx
dbaccess/qa/complex/dbaccess/RowSet.java
dbaccess/source/core/api/CacheSet.cxx
dbaccess/source/core/api/KeySet.hxx
dbaccess/source/core/api/OptimisticSet.hxx
dbaccess/source/core/api/RowSet.cxx
dbaccess/source/core/api/RowSetCache.cxx
dbaccess/source/ext/adabas/Acomponentmodule.cxx
dbaccess/source/ext/adabas/Aservices.cxx
dbaccess/source/filter/migration/cfgimport.cxx
dbaccess/source/filter/migration/cfgimport.hxx
dbaccess/source/filter/migration/cfgservices.cxx
dbaccess/source/filter/migration/makefile.mk
dbaccess/source/inc/cfg_reghelper.hxx
dbaccess/source/sdbtools/misc/sdbt_services.cxx
dbaccess/source/shared/cfg_reghelper.cxx
dbaccess/source/shared/cfgstrings.cxx
dbaccess/source/shared/registrationhelper.cxx
dbaccess/source/ui/app/AppController.cxx
dbaccess/source/ui/app/AppDetailPageHelper.cxx
dbaccess/source/ui/app/AppDetailPageHelper.hxx
dbaccess/source/ui/app/AppDetailView.cxx
dbaccess/source/ui/app/AppIconControl.cxx
dbaccess/source/ui/app/AppSwapWindow.cxx
dbaccess/source/ui/browser/brwctrlr.cxx
dbaccess/source/ui/browser/dataview.cxx
dbaccess/source/ui/browser/unodatbr.cxx
dbaccess/source/ui/control/dbtreelistbox.cxx
dbaccess/source/ui/control/opendoccontrols.cxx
dbaccess/source/ui/control/tabletree.cxx
dbaccess/source/ui/dlg/ConnectionHelper.cxx
dbaccess/source/ui/dlg/ConnectionPage.src
dbaccess/source/ui/dlg/ExtensionNotPresent.cxx
dbaccess/source/ui/dlg/ExtensionNotPresent.hrc
dbaccess/source/ui/dlg/ExtensionNotPresent.src
dbaccess/source/ui/dlg/TablesSingleDlg.cxx
dbaccess/source/ui/dlg/adodatalinks.hxx
dbaccess/source/ui/dlg/dbadmin2.src
dbaccess/source/ui/dlg/dbadminsetup.src
dbaccess/source/ui/dlg/dlgattr.cxx
dbaccess/source/ui/dlg/dlgsize.src
dbaccess/source/ui/dlg/makefile.mk
dbaccess/source/ui/dlg/sqlmessage.cxx
dbaccess/source/ui/inc/ExtensionNotPresent.hxx
dbaccess/source/ui/inc/TokenWriter.hxx
dbaccess/source/ui/inc/imageprovider.hxx
dbaccess/source/ui/misc/DExport.cxx
dbaccess/source/ui/misc/HtmlReader.cxx
dbaccess/source/ui/misc/RowSetDrop.cxx
dbaccess/source/ui/misc/RtfReader.cxx
dbaccess/source/ui/misc/TokenWriter.cxx
dbaccess/source/ui/misc/imageprovider.cxx
dbaccess/source/ui/misc/linkeddocuments.cxx
dbaccess/source/ui/misc/singledoccontroller.cxx
dbaccess/source/ui/querydesign/ConnectionData.hxx
dbaccess/source/ui/querydesign/JoinTableView.cxx
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
dbaccess/source/ui/querydesign/TableConnectionData.cxx
dbaccess/source/ui/querydesign/TableWindowListBox.cxx
dbaccess/source/ui/relationdesign/RelationController.cxx
dbaccess/source/ui/relationdesign/RelationTableView.cxx
dbaccess/source/ui/tabledesign/table.src
reportdesign/inc/RptPage.hxx
reportdesign/qa/complex/reportdesign/ReportDesignerTest.java
reportdesign/source/core/api/ReportDefinition.cxx
reportdesign/source/core/sdr/ReportUndoFactory.cxx
reportdesign/source/core/sdr/UndoEnv.cxx
reportdesign/source/filter/xml/xmlservices.cxx
reportdesign/source/ui/dlg/GroupsSorting.cxx
reportdesign/source/ui/dlg/Navigator.cxx
reportdesign/source/ui/inspection/metadata.cxx
reportdesign/source/ui/misc/RptUndo.cxx
reportdesign/source/ui/misc/UITools.cxx
reportdesign/source/ui/misc/rptuiservices.cxx
reportdesign/source/ui/report/DesignView.cxx
reportdesign/source/ui/report/FixedTextColor.cxx
reportdesign/source/ui/report/ReportController.cxx
reportdesign/source/ui/report/ReportSection.cxx
reportdesign/source/ui/report/SectionView.cxx
reportdesign/source/ui/report/SectionWindow.cxx
reportdesign/source/ui/report/StartMarker.cxx
reportdesign/source/ui/report/ViewsWindow.cxx
reportdesign/source/ui/report/dlgedfunc.cxx
reportdesign/source/ui/report/report.src
2011-03-09 23:17:51 -06:00
|
|
|
|
sal_uInt32 nTell = rInput.Tell(); // ver<65>ndert vielleicht die Position des Streams
|
2007-11-21 15:06:18 +00:00
|
|
|
|
if ( !m_xTable.is() )
|
|
|
|
|
{// erste Zeile als Header verwenden
|
|
|
|
|
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:
|
2006-04-19 12:22:38 +00:00
|
|
|
|
if ( m_pUpdateHelper.get() )
|
2006-01-16 14:28:53 +00:00
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2006-04-19 12:22:38 +00:00
|
|
|
|
m_pUpdateHelper->moveToInsertRow(); // sonst neue Zeile anh"angen
|
2006-01-16 14:28:53 +00:00
|
|
|
|
}
|
|
|
|
|
catch(SQLException& e)
|
|
|
|
|
// UpdateFehlerbehandlung
|
|
|
|
|
{
|
2006-01-19 14:43:23 +00:00
|
|
|
|
showErrorDialog(e);
|
2006-01-16 14:28:53 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
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:
|
2006-05-04 07:44:26 +00:00
|
|
|
|
if ( m_bInTbl ) //&& !m_bSDNum ) // wichtig, da wir sonst auch die Namen der Fonts bekommen
|
2001-02-16 14:54:09 +00:00
|
|
|
|
m_sTextToken += aToken;
|
|
|
|
|
break;
|
2007-11-21 15:06:18 +00:00
|
|
|
|
case HTML_PARABREAK_OFF:
|
|
|
|
|
m_sCurrent += m_sTextToken;
|
|
|
|
|
break;
|
|
|
|
|
case HTML_PARABREAK_ON:
|
|
|
|
|
m_sTextToken.Erase();
|
|
|
|
|
break;
|
2001-02-16 14:54:09 +00:00
|
|
|
|
case HTML_TABLEDATA_ON:
|
2006-05-04 07:44:26 +00:00
|
|
|
|
fetchOptions();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
break;
|
|
|
|
|
case HTML_TABLEDATA_OFF:
|
|
|
|
|
{
|
2007-11-21 15:06:18 +00:00
|
|
|
|
if ( m_sCurrent.Len() )
|
|
|
|
|
m_sTextToken = m_sCurrent;
|
2006-01-19 14:43:23 +00:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
insertValueIntoColumn();
|
|
|
|
|
}
|
|
|
|
|
catch(SQLException& e)
|
|
|
|
|
// UpdateFehlerbehandlung
|
|
|
|
|
{
|
|
|
|
|
showErrorDialog(e);
|
|
|
|
|
}
|
2007-11-21 15:06:18 +00:00
|
|
|
|
m_sCurrent.Erase();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
m_nColumnPos++;
|
2006-05-04 07:44:26 +00:00
|
|
|
|
eraseTokens();
|
2002-07-09 11:32:36 +00:00
|
|
|
|
m_bSDNum = m_bInTbl = sal_False;
|
2001-02-16 14:54:09 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case HTML_TABLEROW_OFF:
|
2006-04-19 12:22:38 +00:00
|
|
|
|
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
|
2006-04-19 12:22:38 +00:00
|
|
|
|
m_pUpdateHelper->updateInt(1,m_nRowCount);
|
|
|
|
|
m_pUpdateHelper->insertRow();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
}
|
|
|
|
|
catch(SQLException& e)
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
// UpdateFehlerbehandlung
|
|
|
|
|
{
|
2006-01-19 14:43:23 +00:00
|
|
|
|
showErrorDialog(e);
|
2001-02-16 14:54:09 +00:00
|
|
|
|
}
|
|
|
|
|
m_nColumnPos = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else // Zweig nur f"ur Typpr"ufung g"ultig
|
|
|
|
|
{
|
|
|
|
|
switch(nToken)
|
|
|
|
|
{
|
|
|
|
|
case HTML_THEAD_ON:
|
|
|
|
|
case HTML_TBODY_ON:
|
|
|
|
|
// Der Spalten Kopf z"ahlt nicht mit
|
|
|
|
|
if(m_bHead)
|
|
|
|
|
{
|
|
|
|
|
do
|
|
|
|
|
{}
|
|
|
|
|
while(GetNextToken() != HTML_TABLEROW_OFF);
|
|
|
|
|
m_bHead = sal_False;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case HTML_TABLEDATA_ON:
|
|
|
|
|
case HTML_TABLEHEADER_ON:
|
2006-05-04 07:44:26 +00:00
|
|
|
|
fetchOptions();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
break;
|
|
|
|
|
case HTML_TEXTTOKEN:
|
|
|
|
|
case HTML_SINGLECHAR:
|
2006-05-04 07:44:26 +00:00
|
|
|
|
if ( m_bInTbl ) // && !m_bSDNum ) // wichtig, da wir sonst auch die Namen der Fonts bekommen
|
2001-02-16 14:54:09 +00:00
|
|
|
|
m_sTextToken += aToken;
|
|
|
|
|
break;
|
2007-11-21 15:06:18 +00:00
|
|
|
|
case HTML_PARABREAK_OFF:
|
|
|
|
|
m_sCurrent += m_sTextToken;
|
|
|
|
|
break;
|
|
|
|
|
case HTML_PARABREAK_ON:
|
|
|
|
|
m_sTextToken.Erase();
|
|
|
|
|
break;
|
2001-02-16 14:54:09 +00:00
|
|
|
|
case HTML_TABLEDATA_OFF:
|
2007-11-21 15:06:18 +00:00
|
|
|
|
if ( m_sCurrent.Len() )
|
|
|
|
|
m_sTextToken = m_sCurrent;
|
2006-05-04 07:44:26 +00:00
|
|
|
|
adjustFormat();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
m_nColumnPos++;
|
2006-05-04 07:44:26 +00:00
|
|
|
|
m_bSDNum = m_bInTbl = sal_False;
|
2007-11-21 15:06:18 +00:00
|
|
|
|
m_sCurrent.Erase();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
break;
|
|
|
|
|
case HTML_TABLEROW_OFF:
|
2007-11-21 15:06:18 +00:00
|
|
|
|
if ( m_sCurrent.Len() )
|
|
|
|
|
m_sTextToken = m_sCurrent;
|
2006-05-04 07:44:26 +00:00
|
|
|
|
adjustFormat();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
m_nColumnPos = 0;
|
|
|
|
|
m_nRows--;
|
2007-11-21 15:06:18 +00:00
|
|
|
|
m_sCurrent.Erase();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2006-05-04 07:44:26 +00:00
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
void OHTMLReader::fetchOptions()
|
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::fetchOptions" );
|
2011-01-14 15:00:11 +01:00
|
|
|
|
m_bInTbl = sal_True;
|
2011-07-22 16:04:43 -04:00
|
|
|
|
const HTMLOptions& options = GetOptions();
|
|
|
|
|
for (size_t i = 0, n = options.size(); i < n; ++i)
|
2006-05-04 07:44:26 +00:00
|
|
|
|
{
|
2011-07-22 16:04:43 -04:00
|
|
|
|
const HTMLOption& rOption = options[i];
|
|
|
|
|
switch( rOption.GetToken() )
|
2006-05-04 07:44:26 +00:00
|
|
|
|
{
|
|
|
|
|
case HTML_O_SDVAL:
|
|
|
|
|
{
|
2011-07-22 16:04:43 -04:00
|
|
|
|
m_sValToken = rOption.GetString();
|
2006-05-04 07:44:26 +00:00
|
|
|
|
m_bSDNum = sal_True;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case HTML_O_SDNUM:
|
2011-07-22 16:04:43 -04:00
|
|
|
|
m_sNumToken = rOption.GetString();
|
2006-05-04 07:44:26 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2001-02-16 14:54:09 +00:00
|
|
|
|
//---------------------------------------------------------------------------------
|
2011-01-27 11:24:16 +00:00
|
|
|
|
void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
|
2001-02-16 14:54:09 +00:00
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::TableDataOn" );
|
2004-08-02 15:05:00 +00:00
|
|
|
|
DBG_CHKTHIS(OHTMLReader,NULL);
|
2011-07-22 16:04:43 -04:00
|
|
|
|
const HTMLOptions& rHtmlOptions = GetOptions();
|
|
|
|
|
for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i)
|
2001-02-16 14:54:09 +00:00
|
|
|
|
{
|
2011-07-22 16:04:43 -04:00
|
|
|
|
const HTMLOption& rOption = rHtmlOptions[i];
|
|
|
|
|
switch( rOption.GetToken() )
|
2001-02-16 14:54:09 +00:00
|
|
|
|
{
|
|
|
|
|
case HTML_O_ALIGN:
|
|
|
|
|
{
|
2011-07-22 16:04:43 -04:00
|
|
|
|
const String& rOptVal = rOption.GetString();
|
2009-04-27 11:24:10 +00:00
|
|
|
|
if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_right ))
|
2001-02-16 14:54:09 +00:00
|
|
|
|
eVal = SVX_HOR_JUSTIFY_RIGHT;
|
2009-04-27 11:24:10 +00:00
|
|
|
|
else if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_center ))
|
2001-02-16 14:54:09 +00:00
|
|
|
|
eVal = SVX_HOR_JUSTIFY_CENTER;
|
2009-04-27 11:24:10 +00:00
|
|
|
|
else if (rOptVal.EqualsIgnoreCaseAscii( 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:
|
2011-07-22 16:04:43 -04:00
|
|
|
|
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
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::TableFontOn" );
|
2004-08-02 15:05:00 +00:00
|
|
|
|
DBG_CHKTHIS(OHTMLReader,NULL);
|
2011-07-22 16:04:43 -04:00
|
|
|
|
const HTMLOptions& rHtmlOptions = GetOptions();
|
|
|
|
|
for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i)
|
2001-02-16 14:54:09 +00:00
|
|
|
|
{
|
2011-07-22 16:04:43 -04:00
|
|
|
|
const HTMLOption& rOption = rHtmlOptions[i];
|
|
|
|
|
switch( rOption.GetToken() )
|
2001-02-16 14:54:09 +00:00
|
|
|
|
{
|
|
|
|
|
case HTML_O_COLOR:
|
|
|
|
|
{
|
|
|
|
|
Color aColor;
|
2011-07-22 16:04:43 -04:00
|
|
|
|
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 :
|
|
|
|
|
{
|
2011-07-22 16:04:43 -04:00
|
|
|
|
const String& rFace = rOption.GetString();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
String aFontName;
|
|
|
|
|
xub_StrLen nPos = 0;
|
|
|
|
|
while( nPos != STRING_NOTFOUND )
|
2012-06-11 13:15:18 +01:00
|
|
|
|
{
|
|
|
|
|
// Fontliste, VCL: Semikolon als Separator, HTML: Komma
|
2001-02-16 14:54:09 +00:00
|
|
|
|
String aFName = rFace.GetToken( 0, ',', nPos );
|
2012-06-11 13:15:18 +01:00
|
|
|
|
aFName = comphelper::string::strip(aFName, ' ');
|
2001-02-16 14:54:09 +00:00
|
|
|
|
if( aFontName.Len() )
|
|
|
|
|
aFontName += ';';
|
|
|
|
|
aFontName += aFName;
|
|
|
|
|
}
|
|
|
|
|
if ( aFontName.Len() )
|
2001-02-23 14:13:25 +00:00
|
|
|
|
_rFont.Name = ::rtl::OUString(aFontName);
|
2001-02-16 14:54:09 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case HTML_O_SIZE :
|
|
|
|
|
{
|
2011-07-22 16:04:43 -04:00
|
|
|
|
sal_Int16 nSize = (sal_Int16) rOption.GetNumber();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
if ( nSize == 0 )
|
|
|
|
|
nSize = 1;
|
2001-09-20 12:36:09 +00:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// ---------------------------------------------------------------------------
|
2011-07-22 16:04:43 -04:00
|
|
|
|
sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption& rOption )
|
2001-02-16 14:54:09 +00:00
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::GetWidthPixel" );
|
2004-08-02 15:05:00 +00:00
|
|
|
|
DBG_CHKTHIS(OHTMLReader,NULL);
|
2011-07-22 16:04:43 -04:00
|
|
|
|
const String& rOptVal = rOption.GetString();
|
2001-02-16 14:54:09 +00:00
|
|
|
|
if ( rOptVal.Search('%') != STRING_NOTFOUND )
|
|
|
|
|
{ // Prozent
|
2011-02-03 00:33:36 +01:00
|
|
|
|
OSL_ENSURE( m_nColumnWidth, "WIDTH Option: m_nColumnWidth==0 und Width%" );
|
2011-07-22 16:04:43 -04:00
|
|
|
|
return (sal_Int16)((rOption.GetNumber() * m_nColumnWidth) / 100);
|
2001-02-16 14:54:09 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if ( rOptVal.Search('*') != STRING_NOTFOUND )
|
|
|
|
|
{ // relativ zu was?!?
|
2010-11-23 23:33:20 +00:00
|
|
|
|
//TODO: ColArray aller relativen Werte sammeln und dann MakeCol
|
2001-02-16 14:54:09 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
else
|
2011-07-22 16:04:43 -04:00
|
|
|
|
return (sal_Int16)rOption.GetNumber(); // Pixel
|
2001-02-16 14:54:09 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
sal_Bool OHTMLReader::CreateTable(int nToken)
|
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::CreateTable" );
|
2004-08-02 15:05:00 +00:00
|
|
|
|
DBG_CHKTHIS(OHTMLReader,NULL);
|
2001-02-23 14:13:25 +00:00
|
|
|
|
String aTempName(ModuleRes(STR_TBL_TITLE));
|
|
|
|
|
aTempName = aTempName.GetToken(0,' ');
|
|
|
|
|
aTempName = String(::dbtools::createUniqueName(m_xTables,::rtl::OUString(aTempName )));
|
2001-02-16 14:54:09 +00:00
|
|
|
|
|
|
|
|
|
int nTmpToken2 = nToken;
|
|
|
|
|
sal_Bool bCaption = sal_False;
|
|
|
|
|
sal_Bool bTableHeader = sal_False;
|
|
|
|
|
String aColumnName;
|
|
|
|
|
SvxCellHorJustify eVal;
|
|
|
|
|
|
2001-02-23 14:13:25 +00:00
|
|
|
|
String aTableName;
|
2001-09-20 12:36:09 +00:00
|
|
|
|
FontDescriptor aFont = ::dbaui::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;
|
2007-11-21 15:06:18 +00:00
|
|
|
|
case HTML_PARABREAK_OFF:
|
|
|
|
|
m_sCurrent += aColumnName;
|
|
|
|
|
break;
|
|
|
|
|
case HTML_PARABREAK_ON:
|
|
|
|
|
m_sTextToken.Erase();
|
|
|
|
|
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);
|
2011-01-14 15:00:11 +01:00
|
|
|
|
bTableHeader = sal_True;
|
2001-02-16 14:54:09 +00:00
|
|
|
|
break;
|
|
|
|
|
case HTML_TABLEDATA_OFF:
|
|
|
|
|
case HTML_TABLEHEADER_OFF:
|
|
|
|
|
{
|
2012-06-11 13:15:18 +01:00
|
|
|
|
aColumnName = comphelper::string::strip(aColumnName, ' ' );
|
2007-11-21 15:06:18 +00:00
|
|
|
|
if (!aColumnName.Len() || m_bAppendFirstLine )
|
2001-02-16 14:54:09 +00:00
|
|
|
|
aColumnName = String(ModuleRes(STR_COLUMN_NAME));
|
2007-11-21 15:06:18 +00:00
|
|
|
|
else if ( m_sCurrent.Len() )
|
|
|
|
|
aColumnName = m_sCurrent;
|
2001-02-16 14:54:09 +00:00
|
|
|
|
|
2012-06-11 13:15:18 +01:00
|
|
|
|
aColumnName = comphelper::string::strip(aColumnName, ' ');
|
2001-02-16 14:54:09 +00:00
|
|
|
|
CreateDefaultColumn(aColumnName);
|
|
|
|
|
aColumnName.Erase();
|
2007-11-21 15:06:18 +00:00
|
|
|
|
m_sCurrent.Erase();
|
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:
|
2011-01-14 15:00:11 +01:00
|
|
|
|
bCaption = sal_True;
|
2001-02-16 14:54:09 +00:00
|
|
|
|
break;
|
|
|
|
|
case HTML_TITLE_OFF:
|
|
|
|
|
case HTML_CAPTION_OFF:
|
2012-06-11 13:15:18 +01:00
|
|
|
|
aTableName = comphelper::string::strip(aTableName, ' ');
|
2001-07-05 11:19:25 +00:00
|
|
|
|
if(!aTableName.Len())
|
2001-02-16 14:54:09 +00:00
|
|
|
|
aTableName = String(::dbtools::createUniqueName(m_xTables,::rtl::OUString(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);
|
|
|
|
|
|
2007-11-21 15:06:18 +00:00
|
|
|
|
if ( m_sCurrent.Len() )
|
|
|
|
|
aColumnName = m_sCurrent;
|
2012-06-11 13:15:18 +01:00
|
|
|
|
aColumnName = comphelper::string::strip(aColumnName, ' ');
|
2001-02-16 14:54:09 +00:00
|
|
|
|
if(aColumnName.Len())
|
|
|
|
|
CreateDefaultColumn(aColumnName);
|
2002-05-28 07:41:41 +00:00
|
|
|
|
|
|
|
|
|
if ( m_vDestVector.empty() )
|
|
|
|
|
return sal_False;
|
|
|
|
|
|
2001-07-05 11:19:25 +00:00
|
|
|
|
if(!aTableName.Len())
|
|
|
|
|
aTableName = aTempName;
|
2001-02-16 14:54:09 +00:00
|
|
|
|
|
2001-07-16 12:42:36 +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
|
|
|
|
}
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
void OHTMLReader::setTextEncoding()
|
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::setTextEncoding" );
|
2004-08-02 15:05:00 +00:00
|
|
|
|
DBG_CHKTHIS(OHTMLReader,NULL);
|
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-02-23 14:13:25 +00:00
|
|
|
|
// -----------------------------------------------------------------------------
|
2001-11-23 13:51:40 +00:00
|
|
|
|
void OHTMLReader::release()
|
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::release" );
|
2004-08-02 15:05:00 +00:00
|
|
|
|
DBG_CHKTHIS(OHTMLReader,NULL);
|
2001-11-23 13:51:40 +00:00
|
|
|
|
ReleaseRef();
|
|
|
|
|
}
|
|
|
|
|
// -----------------------------------------------------------------------------
|
2008-01-30 07:50:19 +00:00
|
|
|
|
TypeSelectionPageFactory OHTMLReader::getTypeSelectionPageFactory()
|
2002-01-22 06:22:37 +00:00
|
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
|
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::getTypeSelectionPageFactory" );
|
2004-08-02 15:05:00 +00:00
|
|
|
|
DBG_CHKTHIS(OHTMLReader,NULL);
|
2008-01-30 07:50:19 +00:00
|
|
|
|
return &OWizHTMLExtend::Create;
|
2002-01-22 06:22:37 +00:00
|
|
|
|
}
|
|
|
|
|
// -----------------------------------------------------------------------------
|
2006-10-18 12:31:57 +00:00
|
|
|
|
|
2010-10-12 15:59:03 +02:00
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|