Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3086

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/86/3086/1

unit test for fdo#62805

Change-Id: Iebc1a63496aaf54b9e459d0ed53db5cae49929ac
---
A sw/qa/extras/rtfimport/data/fdo62805.rtf
M sw/qa/extras/rtfimport/rtfimport.cxx
2 files changed, 30 insertions(+), 3 deletions(-)



diff --git a/sw/qa/extras/rtfimport/data/fdo62805.rtf 
b/sw/qa/extras/rtfimport/data/fdo62805.rtf
new file mode 100644
index 0000000..fee2b59
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo62805.rtf
@@ -0,0 +1,21 @@
+{\rtf1\ansi\deff3\adeflang1025
+{\fonttbl{\f0\froman\fprq2\fcharset0 Times New 
Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 
Arial;}{\f3\froman\fprq2\fcharset0 Nimbus Roman No9 L{\*\falt Times New 
Roman};}{\f4\fswiss\fprq2\fcharset0 Nimbus Sans L{\*\falt 
Arial};}{\f5\fnil\fprq2\fcharset0 DejaVu Sans;}}
+{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
+{\stylesheet{\s0\snext0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af5\langfe2052\dbch\af5\afs24\alang1081\loch\f3\fs24\lang1036
 Style par d\u233\'e9faut;}
+{\s15\sbasedon0\snext16\sb240\sa120\keepn\dbch\af5\dbch\af5\afs28\loch\f4\fs28 
Titre;}
+{\s16\sbasedon0\snext16\sb0\sa120 Corps de texte;}
+{\s17\sbasedon16\snext17\sb0\sa120 Liste;}
+{\s18\sbasedon0\snext18\sb120\sa120\noline\i\afs24\ai\fs24 L\u233\'e9gende;}
+{\s19\sbasedon0\snext19\noline Index;}
+{\s20\sbasedon0\snext20\noline Contenu de tableau;}
+}{\info{\author 
test}{\creatim\yr2013\mo3\dy27\hr11\min43}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment
 LibreOffice}{\vern4000}}\deftab709
+\viewscale110
+{\*\pgdsctbl
+{\pgdsc0\pgdscuse455\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0
 Style par d\u233\'e9faut;}}
+\formshade\paperh16838\paperw11906\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
+\pgndec\pard\plain 
\s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af5\langfe2052\dbch\af5\afs24\alang1081\loch\f3\fs24\lang1036{\rtlch
 \ltrch\loch
+Test}
+\par
+{\trowd\trql\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\clbrdrt\brdrhair\brdrw1\brdrcf1\clbrdrl\brdrhair\brdrw1\brdrcf1\clbrdrb\brdrhair\brdrw1\brdrcf1\clbrdrr\brdrhair\brdrw1\brdrcf1\cellx9638\pard\plain
 \s20\noline\intbl{\rtlch \ltrch\loch
+test in cell}\cell\row}
+test\par}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index 4d042dc..591e6ba 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -113,7 +113,7 @@
     void testFdo52052();
     void testInk();
     void testFdo52389();
-    void testFdo49655();
+    void testFdo49655_62805();
     void testFdo52475();
     void testFdo55493();
     void testCopyPastePageStyle();
@@ -231,7 +231,8 @@
         {"fdo52052.rtf", &Test::testFdo52052},
         {"ink.rtf", &Test::testInk},
         {"fdo52389.rtf", &Test::testFdo52389},
-        {"fdo49655.rtf", &Test::testFdo49655},
+        {"fdo49655.rtf", &Test::testFdo49655_62805},
+        {"fdo62805.rtf", &Test::testFdo49655_62805},
         {"fdo52475.rtf", &Test::testFdo52475},
         {"fdo55493.rtf", &Test::testFdo55493},
         {"copypaste-pagestyle.rtf", &Test::testCopyPastePageStyle},
@@ -859,12 +860,17 @@
     CPPUNIT_ASSERT_EQUAL(6, getLength());
 }
 
-void Test::testFdo49655()
+void Test::testFdo49655_62805()
 {
     /*
+     * 49655 :
      * The problem was that the table was not imported due to the '  ' string 
in the middle of the table definition.
      *
      * xray ThisComponent.TextTables.Count 'was 0
+     *
+     * 62805 :
+     * The problem was that the table was not imported due to the absence of 
\pard after \row.
+     * The table was instead in a group (the '}' replace the \pard).
      */
     uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<container::XIndexAccess> 
xIndexAccess(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);

-- 
To view, visit https://gerrit.libreoffice.org/3086
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iebc1a63496aaf54b9e459d0ed53db5cae49929ac
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Maxime de Roucy <mdero...@linagora.com>

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to