Bugzilla – Attachment 87404 Details for
Bug 40218
FILEOPEN: Calc confused by unclosed HTML tags
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed unit test for this bug
0001-fdo-40218-add-a-testcase.patch (text/plain), 2.49 KB, created by
Thomas Arnhold
on 2013-10-10 16:46:05 UTC
(
hide
)
Description:
Proposed unit test for this bug
Filename:
MIME Type:
Creator:
Thomas Arnhold
Created:
2013-10-10 16:46:05 UTC
Size:
2.49 KB
patch
obsolete
>From 77621e0de5a19fd761a9ec51ba211df77f9c9b83 Mon Sep 17 00:00:00 2001 >From: Thomas Arnhold <thomas@arnhold.org> >Date: Thu, 10 Oct 2013 17:44:24 +0200 >Subject: [PATCH] fdo#40218 add a testcase > >The problem only appers if the href option is there. > >Change-Id: Iffcacc194655d802ec541a1a74143c41254c6072 >--- > sc/qa/unit/data/html/unclosed-link.html | 13 +++++++++++++ > sc/qa/unit/subsequent_filters-test.cxx | 20 ++++++++++++++++++++ > 2 files changed, 33 insertions(+) > create mode 100644 sc/qa/unit/data/html/unclosed-link.html > >diff --git a/sc/qa/unit/data/html/unclosed-link.html b/sc/qa/unit/data/html/unclosed-link.html >new file mode 100644 >index 0000000..ea17b40 >--- /dev/null >+++ b/sc/qa/unit/data/html/unclosed-link.html >@@ -0,0 +1,13 @@ >+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> >+<html> >+ <head> >+ <title>spreadsheet</title> >+ </head> >+ <body> >+ <table> >+ <tr><td>a1</td><td>b1</td><td>c1</td></tr> >+ <tr><td>a2</td><td><a name="foo">b2</td><td>c2</td></tr> >+ <tr><td>a3</td><td><a href="bar">b3</td><td>c3</td></tr> >+ </table> >+ </body> >+</html> >diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx >index b69cb08..179102c 100644 >--- a/sc/qa/unit/subsequent_filters-test.cxx >+++ b/sc/qa/unit/subsequent_filters-test.cxx >@@ -131,6 +131,7 @@ public: > void testControlImport(); > void testChartImportODS(); > >+ void testUnclosedLinkHTML(); > void testNumberFormatHTML(); > void testNumberFormatCSV(); > >@@ -186,6 +187,7 @@ public: > CPPUNIT_TEST(testNewCondFormatODS); > CPPUNIT_TEST(testNewCondFormatXLSX); > >+ CPPUNIT_TEST(testUnclosedLinkHTML); > CPPUNIT_TEST(testNumberFormatHTML); > CPPUNIT_TEST(testNumberFormatCSV); > >@@ -1387,6 +1389,24 @@ void ScFiltersTest::testChartImportODS() > xDocSh->DoClose(); > } > >+void ScFiltersTest::testUnclosedLinkHTML() >+{ >+ ScDocShellRef xDocSh = loadDoc("unclosed-link.", HTML); >+ CPPUNIT_ASSERT_MESSAGE("Failed to load unclosed-link.html", xDocSh.Is()); >+ >+ ScDocument* pDoc = xDocSh->GetDocument(); >+ >+ // Ensure unclosed tags don't break the import >+ CPPUNIT_ASSERT_EQUAL_MESSAGE( >+ "Cell value is not as expected", OUString("b2"), >+ pDoc->GetString(1, 1, 0)); >+ CPPUNIT_ASSERT_EQUAL_MESSAGE( >+ "Cell value is not as expected", OUString("b3"), >+ pDoc->GetString(1, 2, 0)); >+ >+ xDocSh->DoClose(); >+} >+ > void ScFiltersTest::testNumberFormatHTML() > { > ScDocShellRef xDocSh = loadDoc("numberformat.", HTML); >-- >1.8.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 40218
:
55960
| 87404