summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/rtfimport')
-rw-r--r--sw/qa/extras/rtfimport/data/fdo39001.rtf22
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx8
2 files changed, 30 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo39001.rtf b/sw/qa/extras/rtfimport/data/fdo39001.rtf
new file mode 100644
index 000000000000..939b21dcbe13
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo39001.rtf
@@ -0,0 +1,22 @@
+{\rtf1 \ansi
+{\*\generator Apache XML Graphics RTF Library;}
+\fet0 \ftnbj \paperw11905 \paperh16837 \margt2267 \margb1133 \margl1417 \margr1417 \headery2267 \footery1984 \itap0
+\sectd
+{\li0 \f3 \b0 \ql \ri0 \fs24 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs24 \cf1 \i0
+FIRST PAGE
+\par
+}
+}\sect \sbkpage
+{\li0 \f3 \b0 \ql \ri0 \fs24 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs24 \cf1 \i0
+NEXT PAGE
+\par
+}
+}
+{\li0 \f3 \sbkpage \b0 \ql \sect \ri0 \fs24 \cf1 \i0
+{\f3 \strike0 \ul0 \b0 \sa0 \sb0 \fs24 \cf1 \i0
+LAST PAGE
+\par
+}
+}\sect }
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 76967db313bc..80b52efb0ccd 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -142,6 +142,7 @@ public:
void testN825305();
void testParaBottomMargin();
void testN823655();
+ void testFdo39001();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -272,6 +273,7 @@ void Test::run()
{"n825305.rtf", &Test::testN825305},
{"para-bottom-margin.rtf", &Test::testParaBottomMargin},
{"n823655.rtf", &Test::testN823655},
+ {"fdo39001.rtf", &Test::testFdo39001},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1310,6 +1312,12 @@ void Test::testN823655()
CPPUNIT_ASSERT_EQUAL(sal_Int32(286), aCoordinates[0].Second.Value.get<sal_Int32>());
}
+void Test::testFdo39001()
+{
+ // Document was of 4 pages, \sect at the end of the doc wasn't ignored.
+ CPPUNIT_ASSERT_EQUAL(3, getPages());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();