summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime de Roucy <mderoucy@linagora.com>2013-03-27 12:09:32 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-03-27 12:19:47 +0000
commit54b5973ded864634b70e3ec45200beaf1d13cb53 (patch)
treedc86b4ddd04ecbfe3b9865b65a224f764141dee1
parent32ec7666596b2a0f27c72f9d856e2ec0f0545f6b (diff)
unit test for fdo#62805
Change-Id: Iebc1a63496aaf54b9e459d0ed53db5cae49929ac Reviewed-on: https://gerrit.libreoffice.org/3086 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
-rw-r--r--sw/qa/extras/rtfimport/data/fdo62805.rtf21
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx12
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 000000000000..fee2b59fe668
--- /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 a7b1e01a055e..41e829f32c01 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -113,7 +113,7 @@ public:
void testFdo52052();
void testInk();
void testFdo52389();
- void testFdo49655();
+ void testFdo49655_62805();
void testFdo52475();
void testFdo55493();
void testCopyPastePageStyle();
@@ -232,7 +232,8 @@ void Test::run()
{"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},
@@ -861,12 +862,17 @@ void Test::testFdo52389()
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);