summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfexport/rtfexport.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-11-29 17:12:54 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-11-29 17:31:43 +0100
commit049933c035157129cc0409bb100dfc5353847a63 (patch)
tree16908dfee4f95d47751db72cbfc39fbf30c73361 /sw/qa/extras/rtfexport/rtfexport.cxx
parentc506650b21c628e603ce7dc3dc30238c480342d2 (diff)
sw: fix RTF export of text frames anchored to empty paragraphs
Regression from d4069372484f18b242a42a1996767f57b031fff6 Change-Id: I28e095819e0c2f1a4b110741ace366329937f863 Reported-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/qa/extras/rtfexport/rtfexport.cxx')
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index c2d88301988f..f79b13f5bd4e 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -66,6 +66,7 @@ public:
void testMathRuns();
void testFdo53113();
void testFdo55939();
+ void testTextFrames();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -107,6 +108,7 @@ void Test::run()
{"math-runs.rtf", &Test::testMathRuns},
{"fdo53113.odt", &Test::testFdo53113},
{"fdo55939.odt", &Test::testFdo55939},
+ {"textframes.odt", &Test::testTextFrames},
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
@@ -439,6 +441,14 @@ void Test::testFdo55939()
getRun(xParagraph, 3, " Text after the footnote."); // However, this leading space is intentional and OK.
}
+void Test::testTextFrames()
+{
+ // The output was simply invalid, so let's check if all 3 frames were imported back.
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xIndexAccess->getCount());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();