diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-09-26 15:32:46 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-09-27 06:55:14 +0000 |
commit | 298571e2e10f5a925abc3cb75940dbef5701b583 (patch) | |
tree | 3269abfafcf00c5217f4df5fd0b04c4a61389388 /sw | |
parent | b7dfa4d6625d066f5507420089434cb7ac29c968 (diff) |
tdf#90697 unit test for rtf import
When importing this rtf file, sections were interpreted as page breaks.
They shouldn't, instead all content should be on the same page.
Change-Id: I445ce507d14d21ef568734ab7020eed9cbfe57ac
Reviewed-on: https://gerrit.libreoffice.org/29298
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/tdf90697.rtf | 73 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 7 |
2 files changed, 80 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf90697.rtf b/sw/qa/extras/rtfimport/data/tdf90697.rtf new file mode 100644 index 000000000000..2e49379a17c7 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf90697.rtf @@ -0,0 +1,73 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\deflang1031\deflangfe1031 +{\fonttbl +{\f1\froman\fprq2 Times;} +{\f2\fmodern\fprq1 Courier;} +{\f3\froman\fprq2{\*\panose 02000506060000020003}Liberation Serif;} +{\f4\froman\fprq2{\*\panose 02000903070000020003}Liberation Sans;} +} +{\colortbl; +\red0\green0\blue0; +\red0\green0\blue255; +\red0\green255\blue255; +\red0\green255\blue0; +\red255\green0\blue255; +\red255\green0\blue0; +\red255\green255\blue0; +\red255\green255\blue255; +\red0\green0\blue128; +\red0\green128\blue128; +\red0\green128\blue0; +\red128\green0\blue128; +\red128\green0\blue0; +\red128\green128\blue0; +\red128\green128\blue128; +\red192\green192\blue192; +\red224\green224\blue224; +\red208\green239\blue151; +} +{\stylesheet{\widctlpar\adjustright\fs20\cgrid\snext0 Normal;} +{\*\cs10\additive Default Paragraph Font;}} +{\info{\title V9.4 SAS System Output}{\author SAS Version 9.4}{\operator sastrust}{\version1}} +\widowctrl\ftnbj\aenddoc\formshade\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\fet0 +\paperw11904\paperh16837\margl1077\margr850\margt567\margb567 +\sectd\linex0\endnhere\pgwsxn11904\pghsxn16837\pgnrestart\pgnstarts1\sbknone + +\headery567\footery567\marglsxn1077\margrsxn850\margtsxn567\margbsxn567 +{\*\bkmkstart IDX}{\*\bkmkend IDX} + + +\pard\plain\fs20\cf1\ql\f1{{\fs22\f3}} +{\par} + + +\pard\par\pard\sect\sectd\linex0\endnhere\pgwsxn11904\pghsxn16837\sbknone + +\headery567\footery567\marglsxn1077\margrsxn850\margtsxn567\margbsxn567 +{\*\bkmkstart IDX1}{\*\bkmkend IDX1} +{\header\pard\plain\qr\pvmrg\phmrg\posxr\posy0{ +}} + +\trowd\trkeep\trql\trgaph0 +\pard\plain\intbl\sb0\sa0\sl-21\fs2\cf1\ql\f2{\cell} +\cltxlrtb\clvertalt\cellx10 +{\row} + +\pard\plain\fs20\cf1\ql\f1{{\fs24\f3 {\line}{\line}{\line}{\line}}} +{\par} +\pard\par\pard\sect\sectd\linex0\endnhere\pgwsxn11904\pghsxn16837\sbknone + +\headery567\footery567\marglsxn1077\margrsxn850\margtsxn567\margbsxn567 +{\*\bkmkstart IDX2}{\*\bkmkend IDX2} +{\header\pard\plain\qr\pvmrg\phmrg\posxr\posy0{ +}} + +\trowd\trkeep\trql\trgaph0 +\pard\plain\intbl\sb0\sa0\sl-21\fs2\cf1\ql\f2{\cell} +\cltxlrtb\clvertalt\cellx10 +{\row} + + + +\pard\plain\fs20\cf1\ql\f1{{\fs24\f3 {\line}{\line}{\line}{\line}{\line}{\line}{\line}}} +{\par} +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index f66c2f0bd110..0b307d7e3119 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2706,6 +2706,13 @@ DECLARE_RTFIMPORT_TEST(testTdf44986, "tdf44986.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators").getLength()); } +DECLARE_RTFIMPORT_TEST(testTdf90697, "tdf90697.rtf") +{ + // We want section breaks to be seen as section breaks, not as page breaks, + // so this document should have only one page, not three. + CPPUNIT_ASSERT_EQUAL(1, getPages()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |