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