Re: [Libreoffice] [PATCH] Bug 36390 title / breaks html filter fixed

2011-04-28 Thread Chr. Rossmanith

Hi,
my fix for bug 34666 has been too conservative. Now the test for 
HTML_UNKNOWNCONTROL_ON is removed and
title / is treated correctly (c.f. bug 36390). I'm not sure whether 
there should be a test if the token is a ONOFF token? And I'm not 
sure if bug 36080 should be listed in the comment as well, but the 
strange behaviour is mentioned in the discussion of 36080.


Just to emphasize: I didn't push yet because I'd like to have the 
questions answered first...


Thank you,
Christina
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] Bug 36390 title / breaks html filter fixed

2011-04-23 Thread Chr. Rossmanith

Hi,

my fix for bug 34666 has been too conservative. Now the test for 
HTML_UNKNOWNCONTROL_ON is removed and
title / is treated correctly (c.f. bug 36390). I'm not sure whether 
there should be a test if the token is a ONOFF token? And I'm not sure 
if bug 36080 should be listed in the comment as well, but the strange 
behaviour is mentioned in the discussion of 36080.


There are some minor translations contained as well, please ignore 
during reviewing (yes I know I should keep them separate - I just missed 
those during translating all comments).


Christina
From 50abefa305b603bb0b9b502b5fdd34786874026d Mon Sep 17 00:00:00 2001
From: Christina Rossmanith chrrossman...@web.de
Date: Sat, 23 Apr 2011 22:25:26 +0200
Subject: [PATCH] Bug 36390 title / breaks html filter fixed

---
 svtools/source/svhtml/parhtml.cxx |   15 ++-
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index aa760fa..77bdb75 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -372,7 +372,7 @@ int HTMLParser::FilterToken( int nToken )
 {
 case sal_Unicode(EOF):
 nToken = 0;
-break;			// nicht verschicken
+break;			// don't pass
 
 case HTML_HEAD_OFF:
 bIsInBody = sal_True;
@@ -393,7 +393,7 @@ int HTMLParser::FilterToken( int nToken )
 case HTML_HTML_OFF:
 nToken = 0;
 bReadPRE = bReadListing = bReadXMP = sal_False;
-break;		// HTML_ON wurde auch nicht verschickt !
+break;		// HTML_ON hasn't been passed either !
 
 case HTML_PREFORMTXT_ON:
 StartPRE();
@@ -1223,12 +1223,10 @@ int HTMLParser::_GetNextToken()
 {
 ScanText( '' );
 
-// fdo#34666: closing /?:
-// return HTML_UNKNOWNCONTROL_OFF instead of
-// HTML_UNKNOWNCONTROL_ON
+// fdo#34666 fdo#36080 fdo#36390: closing /?:
+// return HTML_TOKEN_OFF instead of HTML_TOKEN_ON
 if (aToken.Len() = 1  '/' == aToken.GetChar(aToken.Len()-1)) {
-if (HTML_UNKNOWNCONTROL_ON == nRet)
-nRet = HTML_UNKNOWNCONTROL_OFF;
+nRet += 1; // HTML_TOKEN_ON - HTML_TOKEN_OFF;
 }
 if( sal_Unicode(EOF) == nNextCh  rInput.IsEof() )
 {
@@ -1351,7 +1349,6 @@ int HTMLParser::_GetNextToken()
 bReadStyle = sal_False;
 break;
 }
-
 }
 }
 break;
@@ -1648,7 +1645,7 @@ int HTMLParser::FilterPRE( int nToken )
 {
 xub_StrLen nSpaces = sal::static_int_cast xub_StrLen (
 8 - (nPre_LinePos % 8));
-DBG_ASSERT( !aToken.Len(), Wieso ist das Token nicht leer? );
+DBG_ASSERT( !aToken.Len(), Why is the token not empty? );
 aToken.Expand( nSpaces, ' ' );
 nPre_LinePos += nSpaces;
 nToken = HTML_TEXTTOKEN;
-- 
1.7.0.4

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice