summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8import
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-05-14 15:42:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-15 08:42:04 +0200
commit36e62098c8c541c4a3fb63eced591cf29ac56e4a (patch)
tree2a8b87b9049338819e0cef1997d00fac3b56d135 /sw/qa/extras/ww8import
parent44006d2fdc67c1b2ff68407b16b4b4939012282c (diff)
CppUnittest: sw: simplify code. use getShapes and getShape
Change-Id: I494349b99a122f67ed1f2881faf1a37e4358c55b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/ww8import')
-rw-r--r--sw/qa/extras/ww8import/ww8import.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 1313eff345aa..dfbd496a31df 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -211,10 +211,8 @@ DECLARE_WW8IMPORT_TEST(testTdf106799, "tdf106799.doc")
DECLARE_WW8IMPORT_TEST(testTdf112346, "tdf112346.doc")
{
- uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
- uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
// This was 1, multi-page table was imported as a floating one.
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), xDrawPage->getCount());
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
}
DECLARE_WW8IMPORT_TEST(testTdf121734, "tdf121734.doc")
@@ -326,13 +324,11 @@ DECLARE_WW8IMPORT_TEST(testTdf122425_1, "tdf122425_1.doc")
DECLARE_WW8IMPORT_TEST(testTdf79639, "tdf79639.doc")
{
- uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
- uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
// - Actual : 0
// as the floating table in the header wasn't converted to a TextFrame.
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xDrawPage->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
}
DECLARE_WW8IMPORT_TEST(testTdf122425_2, "tdf122425_2.doc")