summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-05-29 17:49:50 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-05-30 12:00:00 +0200
commit5956df1a9bdc875856ae8e2fafe7b3c051721126 (patch)
treedeeb66225f60be9011bff447fcbca04a89dab9b9 /sw/qa
parentd6c32cffb5cc81989b4bb4a221a152bbe607bd98 (diff)
tdf#118579: html: Add unittest
Change-Id: I8fe25ce6778244a235a19bab1ede299bb6e93d3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95159 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/htmlimport/data/tdf118579.html67
-rw-r--r--sw/qa/extras/htmlimport/htmlimport.cxx7
2 files changed, 74 insertions, 0 deletions
diff --git a/sw/qa/extras/htmlimport/data/tdf118579.html b/sw/qa/extras/htmlimport/data/tdf118579.html
new file mode 100644
index 000000000000..41613fb8e58c
--- /dev/null
+++ b/sw/qa/extras/htmlimport/data/tdf118579.html
@@ -0,0 +1,67 @@
+<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><style type="text/css">@media screen
+{
+ .documento
+ {
+ font-size: 130%;
+ }
+}
+
+
+</style></head><body>
+<BODY><SPAN id=panel-1140-outerCt style="HEIGHT: 100%; WIDTH: 100%; DISPLAY: table">
+<DIV id=panel-1140-innerCt style="HEIGHT: 100%; VERTICAL-ALIGN: top; DISPLAY: table-cell">
+<DIV class=titoloSeparato>PUBBLICI ESERCIZI MINORI</DIV><SPAN class=documento>
+<DIV class=WordSection1>
+<DIV id=app-template>
+<DIV class=app-dati>
+<DIV class=app-dati>
+<DIV class=app-dati>
+<DIV class=app-dati>
+<DIV class=app-dati>
+<DIV class=app-dati>
+<DIV class=app-dati>
+<TABLE class=app-tab>
+<CAPTION>Percorso Anno I</CAPTION>
+<THEAD>
+<TR>
+<TH>Unità di Competenza</TH>
+<TH>Teorica</TH>
+<TH>On The Job</TH>
+<TH>Ore Totali</TH></TR></THEAD>
+<TABLE class=app-tab style="MARGIN-TOP: 20px">
+<CAPTION>Riepilogo</CAPTION>
+<THEAD>
+<TR>
+<TH colSpan=3>Interna</TH>
+<TH colSpan=3>Esterna</TH>
+<TH colSpan=3>Interna / Esterna</TH></TR></THEAD>
+<TBODY>
+<TR>
+<TD class=app-tab-sottotit>Anno</TD>
+<TD class=app-tab-sottotit>Teorica</TD>
+<TD class=app-tab-sottotit>On the job</TD>
+<TD class=app-tab-sottotit>Anno</TD>
+<TD class=app-tab-sottotit>Teorica</TD>
+<TD class=app-tab-sottotit>On the job</TD>
+<TD class=app-tab-sottotit>Anno</TD>
+<TD class=app-tab-sottotit>Teorica</TD>
+<TD class=app-tab-sottotit>On the job</TD></TR>
+<TR>
+<TD>0</TD></TR>
+<TR>
+<TD class=app-tab-cella-tot-right>Totali</TD>
+<TD class=app-tab-cella-tot>4</TD>
+<TD class=app-tab-cella-tot>8</TD>
+<TD class=app-tab-cella-tot-right>Totali</TD>
+<TD class=app-tab-cella-tot>0</TD>
+<TD class=app-tab-cella-tot>0</TD>
+<TD class=app-tab-cella-tot-right>Totali</TD>
+<TD class=app-tab-cella-tot>0</TD>
+<TD class=app-tab-cella-tot>0</TD></TR>
+<TR>
+<TD class=app-tab-cella-tot-right>Totali Complessivi</TD>
+<TD class=app-tab-cella-tot colSpan=2>12</TD>
+<TD class=app-tab-cella-tot-right>Totali Complessivi</TD>
+<TD class=app-tab-cella-tot colSpan=2>0</TD>
+<TD class=app-tab-cella-tot-right>Totali Complessivi</TD>
+<TD class=app-tab-cella-tot colSpan=2>0</TD></TR></TBODY></TABLE></DIV>
diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx
index fe323ca2592c..7f5486dad321 100644
--- a/sw/qa/extras/htmlimport/htmlimport.cxx
+++ b/sw/qa/extras/htmlimport/htmlimport.cxx
@@ -380,6 +380,13 @@ DECLARE_HTMLIMPORT_TEST(testTdf122789, "tdf122789.html")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt8>(70), rFormats[0]->GetAttrSet().GetFrameSize().GetWidthPercent());
}
+DECLARE_HTMLIMPORT_TEST(testTdf118579, "tdf118579.html")
+{
+ //Without the fix in place, the file fails to load
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+}
+
DECLARE_HTMLIMPORT_TEST(testReqIfPageStyle, "reqif-page-style.xhtml")
{
// Without the accompanying fix in place, this test would have failed with