diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-21 15:25:03 +0000 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-01-22 15:32:05 +0000 |
commit | 629e451f7e1a6c65e61ee8ab305e464688ca5fbf (patch) | |
tree | 79d65f9dbf266b77fe73726ce2591f75d7c840ca | |
parent | c06f0d71e16ffe68836441d125a4c1eb50d5ccda (diff) |
Resolves: fdo#87601 specific html doc hangs on load
Change-Id: I67f472d72efe123b533d4d94be0084986c0e8349
(cherry picked from commit 6acd5c45c764d81aea1539e66adbfadb51df0aa3)
Reviewed-on: https://gerrit.libreoffice.org/14080
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | sw/qa/core/data/html/pass/fdo87601-1.html | 100 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 2 |
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 b47a601baf6f..e0f929b4c370 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -3075,7 +3075,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 ) { |