summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport
diff options
context:
space:
mode:
authorGuillaume Smaha <guillaume.smaha@gmail.com>2016-01-12 17:00:39 +0100
committerjan iversen <jani@documentfoundation.org>2016-01-15 07:34:29 +0000
commit6f2ce5c31708e5914d6d17d69b45f15a4429f8e3 (patch)
tree8886c07fd0976c071c2d9e2ac2427bd8ab2d5114 /sw/qa/extras/rtfimport
parentb7612e44e1f8dae66a8e64e69079e26e5eaacef2 (diff)
Fix tdf#97035 - FILEOPEN: RTF wrong cell width
Change-Id: Ifd31ab1672261644a00a32f3a8632dd0dcb33825 Reviewed-on: https://gerrit.libreoffice.org/21382 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'sw/qa/extras/rtfimport')
-rw-r--r--sw/qa/extras/rtfimport/data/tdf97035.rtf140
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx11
2 files changed, 151 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf97035.rtf b/sw/qa/extras/rtfimport/data/tdf97035.rtf
new file mode 100644
index 000000000000..a8f1d8a43e81
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf97035.rtf
@@ -0,0 +1,140 @@
+{\rtf1 \ansi
+{\colortbl;
+\red0\green0\blue0;
+\red255\green255\blue255;
+\red255\green0\blue0;
+\red0\green255\blue0;
+\red0\green0\blue255;
+\red0\green255\blue255;
+\red255\green0\blue255;
+\red255\green255\blue0;
+\red0\green0\blue128;
+\red0\green128\blue128;
+\red0\green128\blue0;
+\red128\green0\blue128;
+\red128\green0\blue0;
+\red128\green128\blue0;
+\red128\green128\blue128;
+\red192\green192\blue192;
+\red204\green204\blue204;
+}
+{\fonttbl {
+\f0 Arial;}{
+\f1 Symbol;}{
+\f2 Times New Roman;}{
+\f3 Times Roman;}{
+\f4 sans-serif;}
+}
+\paperw16837 \paperh11905 \landscape \margt396 \margb453 \margl737 \margr680 \headery566 \footery396 \itap0
+\sectd {
+{\trowd \itap0 \trleft0
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrl \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx1927
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx3060
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx4023
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx4816
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx5836
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx6573
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx7253
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx8160
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx9407
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx10200
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx11107
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx12014
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx12921
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx13828
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx14394
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrb \brdrw4 \brdrcf1 \brdrs \clbrdrr \brdrw4 \brdrcf1 \brdrs \trql \clvertalc \cellx15527
+\intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \fs16 \cf1 \i0
+}
+}\f3 \li0 \strike0 \ul0 \b0 \ql \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs16 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs16 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \fs16 \cf1 \i0
+123
+}
+}\f3 \li0 \strike0 \ul0 \b0 \ql \fs16 \ri0 \cf1 \i0 \intbl \cell \row }}{
+{\trowd \itap0 \trleft0
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \clbrdrl \trql \clvertalc \cellx3571
+\clpadt60 \clpadft3 \clpadr60 \clpadfr3 \trql \clvertalc \cellx15418
+\intbl
+{\li0 \f3 \b0 \ql \ri0 \fs20 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs20 \cf1 \i0
+Nombre de page(s) : 1
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs20 \ri0 \cf1 \i0 \intbl \cell \intbl
+{\li0 \f3 \b0 \ql \ri0 \fs20 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs20 \cf1 \i0
+Nombre d\rquote article(s) : 1
+}
+}\f3 \li0 \strike0 \ul0 \b0 \sa0 \ql \sb0 \fs20 \ri0 \cf1 \i0 \intbl \cell \row }}}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index c3edad9c58ae..1cb27c6bf3bb 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2473,6 +2473,17 @@ DECLARE_RTFIMPORT_TEST(testLandscape, "landscape.rtf")
CPPUNIT_ASSERT_EQUAL(sal_True, getProperty<sal_Bool>(xStylePage, "IsLandscape"));
}
+DECLARE_RTFIMPORT_TEST(testTdf97035, "tdf97035.rtf")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+
+ // First cell width of the second row should be 2299
+ uno::Reference<table::XTableRows> xTableRows(xTable->getRows(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2299), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(1), "TableColumnSeparators")[0].Position);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */