[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sw/qa sw/source

Caolán McNamara caolanm at redhat.com
Mon Jun 6 08:32:10 UTC 2016


 sw/qa/core/data/html/pass/tdf93971-1.html |   78 ++++++++++++++++++++++++++++++
 sw/source/filter/html/swhtml.cxx          |    2 
 2 files changed, 79 insertions(+), 1 deletion(-)

New commits:
commit 6317bcfd353a02d957811f2b6cb343cc3a3bbbec
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 3 09:59:11 2016 +0100

    Resolves: tdf#93971 freeze on load of specific html doc
    
    this is similar to
    
    commit 6acd5c45c764d81aea1539e66adbfadb51df0aa3
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Wed Jan 21 15:25:03 2015 +0000
    
        Resolves: fdo#87601 specific html doc hangs on load
    
    and is a consequence of the old changeover from unsigned shorts for old string
    class to signed int for new string class
    
    Change-Id: I47022c641cbc329d8802765927005d43211b0d88
    (cherry picked from commit e8db81b2fb3bde736deb42d23f3ecfd680212767)
    (cherry picked from commit 3e50a7bf0e3437a22b6440d0f36c242e40c451ae)
    Reviewed-on: https://gerrit.libreoffice.org/25856
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/qa/core/data/html/pass/tdf93971-1.html b/sw/qa/core/data/html/pass/tdf93971-1.html
new file mode 100644
index 0000000..f516556
--- /dev/null
+++ b/sw/qa/core/data/html/pass/tdf93971-1.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<!-- saved from url=(0266)file:///home/yanpas/%D0%97%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%BA%D0%B8/%D0%A1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20%D1%83%20%D0%BC%D1%8B%D1%81%D0%B0%20%D0%A2%D0%B5%D0%BD%D0%B4%D1%80%D0%B0%20%E2%80%94%20%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F.html -->
+<html lang="ru" dir="ltr" class="client-js ve-available">
+<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-Сражение_у_мыса_Тендра skin-vector action-view">
+		
+		
+		<div id="content" class="mw-body" role="main">
+			<a id="top"></a>
+
+							<div id="siteNotice"><div id="centralNotice"></div><!-- CentralNotice --></div>
+						<div class="mw-indicators">
+</div>
+			<h1 id="firstHeading" class="firstHeading" lang="ru">Сражение у мыса Тендра</h1>
+									<div id="bodyContent" class="mw-body-content">
+									
+								<div id="contentSub"></div>
+												
+				<div id="mw-content-text" lang="ru" dir="ltr" class="mw-content-ltr">
+
+
+
+<p></p>
+<div id="toc" class="toc">
+<div id="toctitle">
+<h2>Содержание</h2>
+<span class="toctoggle"> [<a href="https://ru.wikipedia.org/w/index.php?title=%D0%A1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5_%D1%83_%D0%BC%D1%8B%D1%81%D0%B0_%D0%A2%D0%B5%D0%BD%D0%B4%D1%80%D0%B0&printable=yes#" id="togglelink">убрать</a>] </span></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="https://ru.wikipedia.org/w/index.php?title=%D0%A1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5_%D1%83_%D0%BC%D1%8B%D1%81%D0%B0_%D0%A2%D0%B5%D0%BD%D0%B4%D1%80%D0%B0&printable=yes#.D0.9F.D1.80.D0.B5.D0.B4.D1.8B.D1.81.D1.82.D0.BE.D1.80.D0.B8.D1.8F"><span class="tocnumber">1</span> <span class="toctext">Предыстория</span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="https://ru.wikipedia.org/w/index.php?title=%D0%A1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5_%D1%83_%D0%BC%D1%8B%D1%81%D0%B0_%D0%A2%D0%B5%D0%BD%D0%B4%D1%80%D0%B0&printable=yes#28_.D0.B0.D0.B2.D0.B3.D1.83.D1.81.D1.82.D0.B0"><span class="tocnumber">2</span> <span class="toctext">28 августа</span></a></li>
+<li class="toclevel-1 tocsection-3"><a href="https://ru.wikipedia.org/w/index.php?title=%D0%A1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5_%D1%83_%D0%BC%D1%8B%D1%81%D0%B0_%D0%A2%D0%B5%D0%BD%D0%B4%D1%80%D0%B0&printable=yes#29_.D0.B0.D0.B2.D0.B3.D1.83.D1.81.D1.82.D0.B0"><span class="tocnumber">3</span> <span class="toctext">29 августа</span></a></li>
+<li class="toclevel-1 tocsection-4"><a href="https://ru.wikipedia.org/w/index.php?title=%D0%A1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5_%D1%83_%D0%BC%D1%8B%D1%81%D0%B0_%D0%A2%D0%B5%D0%BD%D0%B4%D1%80%D0%B0&printable=yes#.D0.98.D1.82.D0.BE.D0.B3"><span class="tocnumber">4</span> <span class="toctext">Итог</span></a></li>
+<li class="toclevel-1 tocsection-5"><a href="https://ru.wikipedia.org/w/index.php?title=%D0%A1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5_%D1%83_%D0%BC%D1%8B%D1%81%D0%B0_%D0%A2%D0%B5%D0%BD%D0%B4%D1%80%D0%B0&printable=yes#.D0.A1.D0.BC._.D1.82.D0.B0.D0.BA.D0.B6.D0.B5"><span class="tocnumber">5</span> <span class="toctext">См. также</span></a></li>
+<li class="toclevel-1 tocsection-6"><a href="https://ru.wikipedia.org/w/index.php?title=%D0%A1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5_%D1%83_%D0%BC%D1%8B%D1%81%D0%B0_%D0%A2%D0%B5%D0%BD%D0%B4%D1%80%D0%B0&printable=yes#.D0.9F.D1.80.D0.B8.D0.BC.D0.B5.D1.87.D0.B0.D0.BD.D0.B8.D1.8F"><span class="tocnumber">6</span> <span class="toctext">Примечания</span></a></li>
+<li class="toclevel-1 tocsection-7"><a href="https://ru.wikipedia.org/w/index.php?title=%D0%A1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5_%D1%83_%D0%BC%D1%8B%D1%81%D0%B0_%D0%A2%D0%B5%D0%BD%D0%B4%D1%80%D0%B0&printable=yes#.D0.A1.D1.81.D1.8B.D0.BB.D0.BA.D0.B8"><span class="tocnumber">7</span> <span class="toctext">Ссылки</span></a></li>
+</ul>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</div>					
+								<div class="visualClear"></div>
+							</div>
+		</div>
+		
+		
+		
+
+
+	
+
+</body></html>
\ No newline at end of file
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 42c4ff1..94a06fd 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2178,7 +2178,7 @@ bool SwHTMLParser::AppendTextNode( SwHTMLAppendMode eMode, bool bUpdateNum )
                                             rText, pAttr->GetSttCnt() );
                             sal_Int32 nScriptEnd = g_pBreakIt->GetBreakIter()
                                     ->endOfScript( rText, nStt, nScriptText );
-                            while( nScriptEnd < nEndCnt )
+                            while (nScriptEnd < nEndCnt && nScriptEnd != -1)
                             {
                                 if( nScriptItem == nScriptText )
                                 {


More information about the Libreoffice-commits mailing list