[PATCH 5/5] Added HTML_TOKEN_ONOFF test

Christina Rossmanith ChrRossmanith at web.de
Thu May 12 02:18:14 PDT 2011


---
 svtools/source/svhtml/parhtml.cxx |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 77bdb75..66ef97c 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -1225,8 +1225,9 @@ int HTMLParser::_GetNextToken()
 
                         // 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)) {
-                            nRet += 1; // HTML_<TOKEN>_ON -> HTML_<TOKEN>_OFF;
+                        if ((HTML_TOKEN_ONOFF & nRet) && (aToken.Len() >= 1) &&
+                            ('/' == aToken.GetChar(aToken.Len()-1))) {
+                            ++nRet; // HTML_<TOKEN>_ON -> HTML_<TOKEN>_OFF;
                         }
                         if( sal_Unicode(EOF) == nNextCh && rInput.IsEof() )
                         {
-- 
1.7.0.4


--------------000805070102010501000209--


More information about the LibreOffice mailing list