[Libreoffice-commits] core.git: sw/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Sat May 30 10:00:38 UTC 2020


 sw/qa/extras/htmlimport/data/tdf118579.html |   67 ++++++++++++++++++++++++++++
 sw/qa/extras/htmlimport/htmlimport.cxx      |    7 ++
 2 files changed, 74 insertions(+)

New commits:
commit 5956df1a9bdc875856ae8e2fafe7b3c051721126
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri May 29 17:49:50 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Sat May 30 12:00:00 2020 +0200

    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 at libreoffice.org>

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


More information about the Libreoffice-commits mailing list