xref: /AOO41X/main/dbaccess/source/ui/misc/HtmlReader.cxx (revision 96de54900b79e13b861fbc62cbf36018b54e21b7)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_dbaccess.hxx"
26 #include "HtmlReader.hxx"
27 #include <connectivity/dbconversion.hxx>
28 #include <connectivity/dbtools.hxx>
29 #include <tools/tenccvt.hxx>
30 #include <comphelper/extract.hxx>
31 #include "dbu_misc.hrc"
32 #include "dbustrings.hrc"
33 #include <sfx2/sfxhtml.hxx>
34 #include <tools/debug.hxx>
35 #include <tools/tenccvt.hxx>
36 #include "moduledbu.hxx"
37 #include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
38 #include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
39 #include <com/sun/star/sdbcx/XAppend.hpp>
40 #include <com/sun/star/sdbc/DataType.hpp>
41 #include <com/sun/star/sdbc/ColumnValue.hpp>
42 #include <com/sun/star/awt/FontDescriptor.hpp>
43 #include <com/sun/star/awt/FontWeight.hpp>
44 #include <com/sun/star/awt/FontStrikeout.hpp>
45 #include <com/sun/star/awt/FontSlant.hpp>
46 #include <com/sun/star/awt/FontUnderline.hpp>
47 #include <com/sun/star/util/NumberFormat.hpp>
48 #include <com/sun/star/util/XNumberFormatTypes.hpp>
49 #include <svtools/htmltokn.h>
50 #include <svtools/htmlkywd.hxx>
51 #include <tools/color.hxx>
52 #include "WCopyTable.hxx"
53 #include "WExtendPages.hxx"
54 #include "WNameMatch.hxx"
55 #include "WColumnSelect.hxx"
56 #include "QEnumTypes.hxx"
57 #include "WCPage.hxx"
58 #include <tools/inetmime.hxx>
59 #include <svl/inettype.hxx>
60 #include <rtl/tencinfo.h>
61 #include "UITools.hxx"
62 #include <vcl/svapp.hxx>
63 #include <rtl/logfile.hxx>
64 
65 using namespace dbaui;
66 using namespace ::com::sun::star::uno;
67 using namespace ::com::sun::star::beans;
68 using namespace ::com::sun::star::container;
69 using namespace ::com::sun::star::sdbc;
70 using namespace ::com::sun::star::sdbcx;
71 using namespace ::com::sun::star::awt;
72 
73 #define DBAUI_HTML_FONTSIZES    8       // wie Export, HTML-Options
74 #define HTML_META_NONE          0
75 #define HTML_META_AUTHOR        1
76 #define HTML_META_DESCRIPTION   2
77 #define HTML_META_KEYWORDS      3
78 #define HTML_META_REFRESH       4
79 #define HTML_META_CLASSIFICATION 5
80 #define HTML_META_CREATED       6
81 #define HTML_META_CHANGEDBY     7
82 #define HTML_META_CHANGED       8
83 #define HTML_META_GENERATOR     9
84 #define HTML_META_SDFOOTNOTE    10
85 #define HTML_META_SDENDNOTE     11
86 #define HTML_META_CONTENT_TYPE  12
87 
88 // ==========================================================================
DBG_NAME(OHTMLReader)89 DBG_NAME(OHTMLReader)
90 // ==========================================================================
91 // OHTMLReader
92 // ==========================================================================
93 OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection,
94                         const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
95                         const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
96                         const TColumnVector* pList,
97                         const OTypeInfoMap* _pInfoMap)
98     :HTMLParser(rIn)
99     ,ODatabaseExport( _rxConnection, _rxNumberF, _rM, pList, _pInfoMap, rIn )
100     ,m_nTableCount(0)
101     ,m_nColumnWidth(87)
102     ,m_bMetaOptions(sal_False)
103     ,m_bSDNum(sal_False)
104 {
105     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::OHTMLReader" );
106     DBG_CTOR(OHTMLReader,NULL);
107     SetSrcEncoding( GetExtendedCompatibilityTextEncoding(  RTL_TEXTENCODING_ISO_8859_1 ) );
108     // If the file starts with a BOM, switch to UCS2.
109     SetSwitchToUCS2( sal_True );
110 }
111 // ---------------------------------------------------------------------------
OHTMLReader(SvStream & rIn,sal_Int32 nRows,const TPositions & _rColumnPositions,const Reference<::com::sun::star::util::XNumberFormatter> & _rxNumberF,const::com::sun::star::uno::Reference<::com::sun::star::lang::XMultiServiceFactory> & _rM,const TColumnVector * pList,const OTypeInfoMap * _pInfoMap,sal_Bool _bAutoIncrementEnabled)112 OHTMLReader::OHTMLReader(SvStream& rIn,
113                          sal_Int32 nRows,
114                          const TPositions &_rColumnPositions,
115                          const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
116                          const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
117                          const TColumnVector* pList,
118                          const OTypeInfoMap* _pInfoMap,
119                          sal_Bool _bAutoIncrementEnabled)
120     :HTMLParser(rIn)
121     ,ODatabaseExport( nRows, _rColumnPositions, _rxNumberF, _rM, pList, _pInfoMap, _bAutoIncrementEnabled, rIn )
122     ,m_nTableCount(0)
123     ,m_nColumnWidth(87)
124     ,m_bMetaOptions(sal_False)
125     ,m_bSDNum(sal_False)
126 {
127     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::OHTMLReader" );
128     DBG_CTOR(OHTMLReader,NULL);
129     SetSrcEncoding( GetExtendedCompatibilityTextEncoding(  RTL_TEXTENCODING_ISO_8859_1 ) );
130     // If the file starts with a BOM, switch to UCS2.
131     SetSwitchToUCS2( sal_True );
132 }
133 // ---------------------------------------------------------------------------
~OHTMLReader()134 OHTMLReader::~OHTMLReader()
135 {
136     DBG_DTOR(OHTMLReader,NULL);
137 }
138 // ---------------------------------------------------------------------------
CallParser()139 SvParserState OHTMLReader::CallParser()
140 {
141     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::CallParser" );
142     DBG_CHKTHIS(OHTMLReader,NULL);
143     rInput.Seek(STREAM_SEEK_TO_BEGIN);
144     rInput.ResetError();
145     SvParserState  eParseState = HTMLParser::CallParser();
146     SetColumnTypes(m_pColumnList,m_pInfoMap);
147     return m_bFoundTable ? eParseState : SVPAR_ERROR;
148 }
149 // -----------------------------------------------------------------------------
NextToken(int nToken)150 void OHTMLReader::NextToken( int nToken )
151 {
152     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::NextToken" );
153     DBG_CHKTHIS(OHTMLReader,NULL);
154     if(m_bError || !m_nRows) // falls Fehler oder keine Rows mehr zur "Uberpr"ufung dann gleich zur"uck
155         return;
156     if ( nToken ==  HTML_META )
157         setTextEncoding();
158 
159     if(m_xConnection.is())    // gibt an welcher CTOR gerufen wurde und damit, ob eine Tabelle erstellt werden soll
160     {
161         switch(nToken)
162         {
163             case HTML_TABLE_ON:
164                 ++m_nTableCount;
165                 {   // es kann auch TD oder TH sein, wenn es vorher kein TABLE gab
166                     const HTMLOptions* pHtmlOptions = GetOptions();
167                     sal_Int16 nArrLen = pHtmlOptions->Count();
168                     for ( sal_Int16 i = 0; i < nArrLen; i++ )
169                     {
170                         const HTMLOption* pOption = (*pHtmlOptions)[i];
171                         switch( pOption->GetToken() )
172                         {
173                             case HTML_O_WIDTH:
174                             {   // Prozent: von Dokumentbreite bzw. aeusserer Zelle
175                                 m_nColumnWidth = GetWidthPixel( pOption );
176                             }
177                             break;
178                         }
179                     }
180                 }
181             case HTML_THEAD_ON:
182             case HTML_TBODY_ON:
183                 {
184                     sal_uInt32 nTell = rInput.Tell(); // ver�ndert vielleicht die Position des Streams
185                     if ( !m_xTable.is() )
186                     {// erste Zeile als Header verwenden
187                         m_bError = !CreateTable(nToken);
188                         if ( m_bAppendFirstLine )
189                             rInput.Seek(nTell);
190                     }
191                 }
192                 break;
193             case HTML_TABLE_OFF:
194                 if(!--m_nTableCount)
195                 {
196                     m_xTable = NULL;
197                 }
198                 break;
199             case HTML_TABLEROW_ON:
200                 if ( m_pUpdateHelper.get() )
201                 {
202                     try
203                     {
204                         m_pUpdateHelper->moveToInsertRow(); // sonst neue Zeile anh"angen
205                     }
206                     catch(SQLException& e)
207                     // UpdateFehlerbehandlung
208                     {
209                         showErrorDialog(e);
210                     }
211                 }
212                 else
213                     m_bError = sal_True;
214                 break;
215             case HTML_TEXTTOKEN:
216             case HTML_SINGLECHAR:
217                 if ( m_bInTbl ) //&& !m_bSDNum ) // wichtig, da wir sonst auch die Namen der Fonts bekommen
218                     m_sTextToken += aToken;
219                 break;
220             case HTML_PARABREAK_OFF:
221                 m_sCurrent += m_sTextToken;
222                 break;
223             case HTML_PARABREAK_ON:
224                 m_sTextToken.Erase();
225                 break;
226             case HTML_TABLEDATA_ON:
227                 fetchOptions();
228                 break;
229             case HTML_TABLEDATA_OFF:
230                 {
231                     if ( m_sCurrent.Len() )
232                         m_sTextToken = m_sCurrent;
233                     try
234                     {
235                         insertValueIntoColumn();
236                     }
237                     catch(SQLException& e)
238                     // UpdateFehlerbehandlung
239                     {
240                         showErrorDialog(e);
241                     }
242                     m_sCurrent.Erase();
243                     m_nColumnPos++;
244                     eraseTokens();
245                     m_bSDNum = m_bInTbl = sal_False;
246                 }
247                 break;
248             case HTML_TABLEROW_OFF:
249                 if ( !m_pUpdateHelper.get() )
250                 {
251                     m_bError = sal_True;
252                     break;
253                 }
254                 try
255                 {
256                     m_nRowCount++;
257                     if (m_bIsAutoIncrement) // if bSetAutoIncrement then I have to set the autoincrement
258                         m_pUpdateHelper->updateInt(1,m_nRowCount);
259                     m_pUpdateHelper->insertRow();
260                 }
261                 catch(SQLException& e)
262                 //////////////////////////////////////////////////////////////////////
263                 // UpdateFehlerbehandlung
264                 {
265                     showErrorDialog(e);
266                 }
267                 m_nColumnPos = 0;
268                 break;
269         }
270     }
271     else // Zweig nur f"ur Typpr"ufung g"ultig
272     {
273         switch(nToken)
274         {
275             case HTML_THEAD_ON:
276             case HTML_TBODY_ON:
277                 // Der Spalten Kopf z"ahlt nicht mit
278                 if(m_bHead)
279                 {
280                     do
281                     {}
282                     while(GetNextToken() != HTML_TABLEROW_OFF);
283                     m_bHead = sal_False;
284                 }
285                 break;
286             case HTML_TABLEDATA_ON:
287             case HTML_TABLEHEADER_ON:
288                 fetchOptions();
289                 break;
290             case HTML_TEXTTOKEN:
291             case HTML_SINGLECHAR:
292                 if ( m_bInTbl ) // && !m_bSDNum ) // wichtig, da wir sonst auch die Namen der Fonts bekommen
293                     m_sTextToken += aToken;
294                 break;
295             case HTML_PARABREAK_OFF:
296                 m_sCurrent += m_sTextToken;
297                 break;
298             case HTML_PARABREAK_ON:
299                 m_sTextToken.Erase();
300                 break;
301             case HTML_TABLEDATA_OFF:
302                 if ( m_sCurrent.Len() )
303                     m_sTextToken = m_sCurrent;
304                 adjustFormat();
305                 m_nColumnPos++;
306                 m_bSDNum = m_bInTbl = sal_False;
307                 m_sCurrent.Erase();
308                 break;
309             case HTML_TABLEROW_OFF:
310                 if ( m_sCurrent.Len() )
311                     m_sTextToken = m_sCurrent;
312                 adjustFormat();
313                 m_nColumnPos = 0;
314                 m_nRows--;
315                 m_sCurrent.Erase();
316                 break;
317         }
318     }
319 }
320 // -----------------------------------------------------------------------------
fetchOptions()321 void OHTMLReader::fetchOptions()
322 {
323     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::fetchOptions" );
324     m_bInTbl = sal_True;
325     const HTMLOptions* options = GetOptions();
326     sal_Int16 nArrLen = options->Count();
327     for ( sal_Int16 i = 0; i < nArrLen; i++ )
328     {
329         const HTMLOption* pOption = (*options)[i];
330         switch( pOption->GetToken() )
331         {
332             case HTML_O_SDVAL:
333             {
334                 m_sValToken = pOption->GetString();
335                 //m_sTextToken = pOption->GetString();
336                 m_bSDNum = sal_True;
337             }
338             break;
339             case HTML_O_SDNUM:
340                 m_sNumToken = pOption->GetString();
341             break;
342         }
343     }
344 }
345 //---------------------------------------------------------------------------------
TableDataOn(SvxCellHorJustify & eVal,int nToken)346 void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal,int nToken)
347 {
348     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::TableDataOn" );
349     DBG_CHKTHIS(OHTMLReader,NULL);
350     sal_Bool bHorJustifyCenterTH = (nToken == HTML_TABLEHEADER_ON);
351     const HTMLOptions* pHtmlOptions = GetOptions();
352     sal_Int16 nArrLen = pHtmlOptions->Count();
353     for ( sal_Int16 i = 0; i < nArrLen; i++ )
354     {
355         const HTMLOption* pOption = (*pHtmlOptions)[i];
356         switch( pOption->GetToken() )
357         {
358             case HTML_O_ALIGN:
359             {
360                 bHorJustifyCenterTH = sal_False;
361                 const String& rOptVal = pOption->GetString();
362                 if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_right ))
363                     eVal = SVX_HOR_JUSTIFY_RIGHT;
364                 else if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_center ))
365                     eVal = SVX_HOR_JUSTIFY_CENTER;
366                 else if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_left ))
367                     eVal = SVX_HOR_JUSTIFY_LEFT;
368                 else
369                     eVal = SVX_HOR_JUSTIFY_STANDARD;
370             }
371             break;
372             case HTML_O_WIDTH:
373                 m_nWidth = GetWidthPixel( pOption );
374             break;
375         }
376     }
377 }
378 
379 //---------------------------------------------------------------------------------
TableFontOn(FontDescriptor & _rFont,sal_Int32 & _rTextColor)380 void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
381 {
382     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::TableFontOn" );
383     DBG_CHKTHIS(OHTMLReader,NULL);
384     const HTMLOptions* pHtmlOptions = GetOptions();
385     sal_Int16 nArrLen = pHtmlOptions->Count();
386     for ( sal_Int16 i = 0; i < nArrLen; i++ )
387     {
388         const HTMLOption* pOption = (*pHtmlOptions)[i];
389         switch( pOption->GetToken() )
390         {
391         case HTML_O_COLOR:
392             {
393                 Color aColor;
394                 pOption->GetColor( aColor );
395                 _rTextColor = aColor.GetRGBColor();
396             }
397             break;
398         case HTML_O_FACE :
399             {
400                 const String& rFace = pOption->GetString();
401                 String aFontName;
402                 xub_StrLen nPos = 0;
403                 while( nPos != STRING_NOTFOUND )
404                 {   // Fontliste, VCL: Semikolon als Separator, HTML: Komma
405                     String aFName = rFace.GetToken( 0, ',', nPos );
406                     aFName.EraseTrailingChars().EraseLeadingChars();
407                     if( aFontName.Len() )
408                         aFontName += ';';
409                     aFontName += aFName;
410                 }
411                 if ( aFontName.Len() )
412                     _rFont.Name = ::rtl::OUString(aFontName);
413             }
414             break;
415         case HTML_O_SIZE :
416             {
417                 sal_Int16 nSize = (sal_Int16) pOption->GetNumber();
418                 if ( nSize == 0 )
419                     nSize = 1;
420                 else if ( nSize < DBAUI_HTML_FONTSIZES )
421                     nSize = DBAUI_HTML_FONTSIZES;
422 
423                 _rFont.Height = nSize;
424             }
425             break;
426         }
427     }
428 }
429 // ---------------------------------------------------------------------------
GetWidthPixel(const HTMLOption * pOption)430 sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption* pOption )
431 {
432     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::GetWidthPixel" );
433     DBG_CHKTHIS(OHTMLReader,NULL);
434     const String& rOptVal = pOption->GetString();
435     if ( rOptVal.Search('%') != STRING_NOTFOUND )
436     {   // Prozent
437         DBG_ASSERT( m_nColumnWidth, "WIDTH Option: m_nColumnWidth==0 und Width%" );
438         return (sal_Int16)((pOption->GetNumber() * m_nColumnWidth) / 100);
439     }
440     else
441     {
442         if ( rOptVal.Search('*') != STRING_NOTFOUND )
443         {   // relativ zu was?!?
444 //2do: ColArray aller relativen Werte sammeln und dann MakeCol
445             return 0;
446         }
447         else
448             return (sal_Int16)pOption->GetNumber(); // Pixel
449     }
450 }
451 // ---------------------------------------------------------------------------
CreateTable(int nToken)452 sal_Bool OHTMLReader::CreateTable(int nToken)
453 {
454     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::CreateTable" );
455     DBG_CHKTHIS(OHTMLReader,NULL);
456     String aTempName(ModuleRes(STR_TBL_TITLE));
457     aTempName = aTempName.GetToken(0,' ');
458     aTempName = String(::dbtools::createUniqueName(m_xTables,::rtl::OUString(aTempName )));
459 
460     int nTmpToken2 = nToken;
461     sal_Bool bCaption = sal_False;
462     sal_Bool bTableHeader = sal_False;
463     String aColumnName;
464     SvxCellHorJustify eVal;
465 
466     String aTableName;
467     FontDescriptor aFont = ::dbaui::CreateFontDescriptor(Application::GetSettings().GetStyleSettings().GetAppFont());
468     sal_Int32 nTextColor = 0;
469     do
470     {
471         switch(nTmpToken2)
472         {
473             case HTML_TEXTTOKEN:
474             case HTML_SINGLECHAR:
475                 if(bTableHeader)
476                     aColumnName += aToken;
477                 if(bCaption)
478                     aTableName += aToken;
479                 break;
480             case HTML_PARABREAK_OFF:
481                 m_sCurrent += aColumnName;
482                 break;
483             case HTML_PARABREAK_ON:
484                 m_sTextToken.Erase();
485                 break;
486             case HTML_TABLEDATA_ON:
487                 // m_bAppendFirstLine = true;
488                 // run through
489             case HTML_TABLEHEADER_ON:
490                 TableDataOn(eVal,nTmpToken2);
491                 bTableHeader = sal_True;
492                 break;
493             case HTML_TABLEDATA_OFF:
494                 // m_bAppendFirstLine = true;
495                 // run through
496             case HTML_TABLEHEADER_OFF:
497                 {
498                     aColumnName.EraseLeadingChars();
499                     aColumnName.EraseTrailingChars();
500                     if (!aColumnName.Len() || m_bAppendFirstLine )
501                         aColumnName = String(ModuleRes(STR_COLUMN_NAME));
502                     else if ( m_sCurrent.Len() )
503                         aColumnName = m_sCurrent;
504 
505                     aColumnName.EraseLeadingChars();
506                     aColumnName.EraseTrailingChars();
507                     CreateDefaultColumn(aColumnName);
508                     aColumnName.Erase();
509                     m_sCurrent.Erase();
510 
511                     eVal = SVX_HOR_JUSTIFY_STANDARD;
512                     bTableHeader = sal_False;
513                 }
514                 break;
515 
516             case HTML_TITLE_ON:
517             case HTML_CAPTION_ON:
518                 bCaption = sal_True;
519                 break;
520             case HTML_TITLE_OFF:
521             case HTML_CAPTION_OFF:
522                 aTableName.EraseLeadingChars();
523                 aTableName.EraseTrailingChars();
524                 if(!aTableName.Len())
525                     aTableName = String(::dbtools::createUniqueName(m_xTables,::rtl::OUString(aTableName)));
526                 else
527                     aTableName = aTempName;
528                 bCaption = sal_False;
529                 break;
530             case HTML_FONT_ON:
531                 TableFontOn(aFont,nTextColor);
532                 break;
533             case HTML_BOLD_ON:
534                 aFont.Weight = ::com::sun::star::awt::FontWeight::BOLD;
535                 break;
536             case HTML_ITALIC_ON:
537                 aFont.Slant = ::com::sun::star::awt::FontSlant_ITALIC;
538                 break;
539             case HTML_UNDERLINE_ON:
540                 aFont.Underline = ::com::sun::star::awt::FontUnderline::SINGLE;
541                 break;
542             case HTML_STRIKE_ON:
543                 aFont.Strikeout = ::com::sun::star::awt::FontStrikeout::SINGLE;
544                 break;
545         }
546     }
547     while((nTmpToken2 = GetNextToken()) != HTML_TABLEROW_OFF);
548 
549     if ( m_sCurrent.Len() )
550         aColumnName = m_sCurrent;
551     aColumnName.EraseLeadingChars();
552     aColumnName.EraseTrailingChars();
553     if(aColumnName.Len())
554         CreateDefaultColumn(aColumnName);
555 
556     if ( m_vDestVector.empty() )
557         return sal_False;
558 
559     if(!aTableName.Len())
560         aTableName = aTempName;
561 
562     m_bInTbl        = sal_False;
563     m_bFoundTable   = sal_True;
564 
565     if ( isCheckEnabled() )
566         return sal_True;
567 
568     return !executeWizard(aTableName,makeAny(nTextColor),aFont) && m_xTable.is();
569 }
570 // -----------------------------------------------------------------------------
setTextEncoding()571 void OHTMLReader::setTextEncoding()
572 {
573     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::setTextEncoding" );
574     DBG_CHKTHIS(OHTMLReader,NULL);
575     m_bMetaOptions = sal_True;
576     ParseMetaOptions(NULL, NULL);
577 }
578 
579 // -----------------------------------------------------------------------------
release()580 void OHTMLReader::release()
581 {
582     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::release" );
583     DBG_CHKTHIS(OHTMLReader,NULL);
584     ReleaseRef();
585 }
586 // -----------------------------------------------------------------------------
getTypeSelectionPageFactory()587 TypeSelectionPageFactory OHTMLReader::getTypeSelectionPageFactory()
588 {
589     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::getTypeSelectionPageFactory" );
590     DBG_CHKTHIS(OHTMLReader,NULL);
591     return &OWizHTMLExtend::Create;
592 }
593 // -----------------------------------------------------------------------------
594 
595