diff options
author | Tino Rachui <tra@openoffice.org> | 2001-10-10 12:32:41 +0000 |
---|---|---|
committer | Tino Rachui <tra@openoffice.org> | 2001-10-10 12:32:41 +0000 |
commit | 7b3253b162baf71433253ef6de27df1d1d2e605e (patch) | |
tree | 5b7cbf0b39917e73e1cffc2423ab0e0a5c889fc1 /dtrans | |
parent | fa123f99df137e867008ebc3c0959da0dd2a84f9 (diff) |
#92840#now searching for <BODY only in TextHtmlToHTMLFormat because the body tag may contain parameters
Diffstat (limited to 'dtrans')
-rw-r--r-- | dtrans/source/win32/dtobj/FmtFilter.cxx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 3cffb013501a..9efbc0be7274 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FmtFilter.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: ka $ $Date: 2001-06-13 08:48:18 $ + * last change: $Author: tra $ $Date: 2001-10-10 13:32:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -290,9 +290,18 @@ Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( Sequence< sal_Int8 >& aTextH sal_uInt32 lHTMLFmtHdr = rtl_str_getLength( aHTMLFmtHdr ); + // the office allways writes the start + // and end html tag in upper cases and + // without spaces + // both tags don't allow parameters OString startHtmlTag( "<HTML>" ); OString endHtmlTag( "</HTML>" ); - OString startBodyTag( "<BODY>" ); + + // we don't include '>' into the search + // because the body tag allows parameters + // e.g. <BODY param> + // #92840# + OString startBodyTag( "<BODY" ); OString endBodyTag( "</BODY" ); OString textHtml( @@ -304,6 +313,8 @@ Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( Sequence< sal_Int8 >& aTextH sal_Int32 nStartFrgmt = textHtml.indexOf( startBodyTag ); sal_Int32 nEndFrgmt = textHtml.indexOf( endBodyTag ); + OSL_ASSERT( (nStartHtml >= 0) && (nEndHtml > nStartHtml) && (nStartFrgmt > nStartHtml) && (nEndFrgmt > nStartFrgmt) ); + Sequence< sal_Int8 > aHTMLFmtSequence; if ( (nStartHtml > -1) && (nEndHtml > -1) && (nStartFrgmt > -1) && (nEndFrgmt > -1) ) |