[Libreoffice-commits] core.git: sw/qa
Miklos Vajna
vmiklos at suse.cz
Sun Jun 16 09:32:34 PDT 2013
sw/qa/extras/rtfexport/data/textframe-table.rtf | 41 ++++++++++++++++++++++++
sw/qa/extras/rtfexport/rtfexport.cxx | 15 ++++++++
sw/qa/extras/rtfimport/data/textframe-table.rtf | 41 ------------------------
sw/qa/extras/rtfimport/rtfimport.cxx | 15 --------
4 files changed, 56 insertions(+), 56 deletions(-)
New commits:
commit f0ed219c8f8c5c46e6244cc1bc0bb097b515574a
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Sun Jun 16 18:27:34 2013 +0200
sw: move the textframe-table testcase from rtfimport to rtfexport
Change-Id: I7e9d26ec1f47d16e35e24fc4bd9482f5d899e79c
diff --git a/sw/qa/extras/rtfimport/data/textframe-table.rtf b/sw/qa/extras/rtfexport/data/textframe-table.rtf
similarity index 100%
rename from sw/qa/extras/rtfimport/data/textframe-table.rtf
rename to sw/qa/extras/rtfexport/data/textframe-table.rtf
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 7de0a4b..0249426 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -65,6 +65,7 @@ public:
void testTextFrameBorders();
void testTextframeGradient();
void testRecordChanges();
+ void testTextframeTable();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -119,6 +120,7 @@ void Test::run()
{"textframe-borders.rtf", &Test::testTextFrameBorders},
{"textframe-gradient.rtf", &Test::testTextframeGradient},
{"record-changes.rtf", &Test::testRecordChanges},
+ {"textframe-table.rtf", &Test::testTextframeTable},
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
@@ -592,6 +594,19 @@ void Test::testRecordChanges()
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(mxComponent, "RecordChanges"));
}
+void Test::testTextframeTable()
+{
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xTextRange(xDraws->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextRange->getText();
+ CPPUNIT_ASSERT_EQUAL(OUString("First para."), getParagraphOfText(1, xText)->getString());
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(2, xText), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("A"), uno::Reference<text::XTextRange>(xTable->getCellByName("A1"), uno::UNO_QUERY)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("B"), uno::Reference<text::XTextRange>(xTable->getCellByName("B1"), uno::UNO_QUERY)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Last para."), getParagraphOfText(3, xText)->getString());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 624b2b7..165a4f9 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -142,7 +142,6 @@ public:
void testPageBackground();
void testFdo62044();
void testPoshPosv();
- void testTextframeTable();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -272,7 +271,6 @@ void Test::run()
{"page-background.rtf", &Test::testPageBackground},
{"fdo62044.rtf", &Test::testFdo62044},
{"posh-posv.rtf", &Test::testPoshPosv},
- {"textframe-table.rtf", &Test::testTextframeTable},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1286,19 +1284,6 @@ void Test::testPoshPosv()
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xDraws->getByIndex(0), "FrameIsAutomaticHeight"));
}
-void Test::testTextframeTable()
-{
- uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
- uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
- uno::Reference<text::XTextRange> xTextRange(xDraws->getByIndex(0), uno::UNO_QUERY);
- uno::Reference<text::XText> xText = xTextRange->getText();
- CPPUNIT_ASSERT_EQUAL(OUString("First para."), getParagraphOfText(1, xText)->getString());
- uno::Reference<text::XTextTable> xTable(getParagraphOrTable(2, xText), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(OUString("A"), uno::Reference<text::XTextRange>(xTable->getCellByName("A1"), uno::UNO_QUERY)->getString());
- CPPUNIT_ASSERT_EQUAL(OUString("B"), uno::Reference<text::XTextRange>(xTable->getCellByName("B1"), uno::UNO_QUERY)->getString());
- CPPUNIT_ASSERT_EQUAL(OUString("Last para."), getParagraphOfText(3, xText)->getString());
-}
-
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
More information about the Libreoffice-commits
mailing list