summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-21 15:25:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-21 15:25:03 +0000
commit6acd5c45c764d81aea1539e66adbfadb51df0aa3 (patch)
tree423e693709bc8d0cba96a5ad21507dd4f1a869a2
parentb97d9a1238a82461e64717757a4527565f879ee2 (diff)
Resolves: fdo#87601 specific html doc hangs on load
Change-Id: I67f472d72efe123b533d4d94be0084986c0e8349
-rw-r--r--sw/qa/core/data/html/pass/fdo87601-1.html100
-rw-r--r--sw/source/filter/html/swhtml.cxx2
2 files changed, 101 insertions, 1 deletions
diff --git a/sw/qa/core/data/html/pass/fdo87601-1.html b/sw/qa/core/data/html/pass/fdo87601-1.html
new file mode 100644
index 000000000000..b33f11c1b0a7
--- /dev/null
+++ b/sw/qa/core/data/html/pass/fdo87601-1.html
@@ -0,0 +1,100 @@
+
+ <html xmlns:v="urn:schemas-microsoft-com:vml"
+ xmlns:o="urn:schemas-microsoft-com:office:office"
+ xmlns:w="urn:schemas-microsoft-com:office:word"
+ xmlns:m="http://schemas.microsoft.com/office/2006/01/omml"
+ xmlns="http://www.w3.org/TR/REC-html40">
+ <head>
+ <meta http-equiv=Content-Type content="text/html; charset=utf-8">
+ <style>
+ v\:* {behavior:url(#default#VML);}
+ o\:* {behavior:url(#default#VML);}
+ w\:* {behavior:url(#default#VML);}
+ .shape {behavior:url(#default#VML);}
+ </style>
+ <style>
+ @page
+ {
+ mso-page-orientation: portrait;
+ size:21cm 29.7cm; margin:1cm 1cm 1cm 1cm;
+ }
+ @page Section1 {
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-header: h1;
+ mso-footer: f1;
+ mso-bidi-font:Arial;
+ }
+ div.Section1 { page:Section1; }
+ table {
+ border-spacing: 0;
+ border-collapse: collapse;
+ font-size: 10.0pt;
+ }
+ td
+ {
+ border: 1px solid #000;
+ font-size:10.0pt;
+ font-family:Verdana,sans-serif;
+ margin-bottom:0.000cm;
+ vertical-align:top;
+ }
+ p.MsoFooter, li.MsoFooter, div.MsoFooter
+ {
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ tab-stops:center 3.0in right 6.0in;
+ font-size:10.0pt;
+ }
+ </style>
+ <xml>
+ <w:WordDocument>
+ <w:View>Print</w:View>
+ <w:Zoom>100</w:Zoom>
+ <w:DoNotOptimizeForBrowsertc2ms/>
+ </w:WordDocument>
+ </xml>
+ </head>
+ <body style="width:21.001cm;">
+ <div class="Section1">
+ <br>
+ <br>
+ <h1 style="mso-element:header;font-size:24.0pt;font-weight:normal;font-family:Verdana,sans-serif;color:#f00;" id="h1">
+ <p class="MsoHeader">
+ Your bug here
+ </p>
+ </h1>
+ <br>
+ <table width="700" cellpadding="6" style="border-collapse:collapse;">
+ <tr>
+ <td width="200" border="1" style="font-weight:bold;">x</td>
+ <td width="500" style="font-weight:bold;">x</td>
+ </tr>
+ <tr>
+ <td style="font-weight:bold;">x</td>
+ <td style="font-weight:bold;">x</td>
+ </tr>
+ <tr>
+ <td style="font-weight:bold;">x</td>
+ <td style="font-weight:bold;">x</td>
+ </tr>
+ <tr>
+ <td style="font-weight:bold;">x</td>
+ <td style="font-weight:bold;">x</td>
+ </tr>
+ </table>
+ <br>
+ <table width="700" cellpadding="6" style="border:1px solid #bbb; border-collapse:collapse;">
+<tr><td width="50" style="border-bottom:1px solid #bbb;"></td><td width="110" style="border:1px solid #fff; border-bottom:1px solid #bbb;"></td><td width="540" style="border:1px solid #fff;border-bottom:1px solid #bbb;"></td></tr>
+ <tr>
+ <td width="50" style="border:1px solid #bbb;vertical-align:top;text-align:center;font-weight:bold;color:#666;">x</td>
+ <td width="110" style="border:1px solid #bbb;vertical-align:top;text-align:center;font-weight:bold;color:#666;">x</td>
+ <td width="540" style="border:1px solid #bbb;vertical-align:top;text-align:center;font-weight:bold;color:#666;">x</td>
+ </tr>
+ <tr><td style="border:1px solid #bbb;vertical-align:top;" width="50">x</td><td style="border:1px solid #bbb;vertical-align:top;" width="110">x</td><td style="border:1px solid #bbb;vertical-align:top;" width="540">x</td></tr>
+<tr><td style="border:1px solid #bbb;vertical-align:top;" width="50">x</td><td style="border:1px solid #bbb;vertical-align:top;" width="110">x</td><td style="border:1px solid #bbb;vertical-align:top;" width="540">x</td></tr>
+<tr><td style="border:1px solid #bbb;vertical-align:top;" width="50">x</td><td style="border:1px solid #bbb;vertical-align:top;" width="110">x</td><td style="border:1px solid #bbb;vertical-align:top;" width="540">x</td></tr>
+</table> </div>
+ </body>
+ </html>
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index d2c6212dc8ac..138a64b71ef8 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -3074,7 +3074,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
rText, pAttr->GetSttCnt() );
sal_Int32 nScriptEnd = g_pBreakIt->GetBreakIter()
->endOfScript( rText, pAttr->GetSttCnt(), nScriptTxt );
- while( nScriptEnd < nEndCnt )
+ while (nScriptEnd < nEndCnt && nScriptEnd != -1)
{
if( nScriptItem == nScriptTxt )
{