From 36e62098c8c541c4a3fb63eced591cf29ac56e4a Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 14 May 2020 15:42:43 +0200 Subject: 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 --- sw/qa/extras/ww8import/ww8import.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sw/qa/extras/ww8import') 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 xDrawPageSupplier(mxComponent, uno::UNO_QUERY); - uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); // This was 1, multi-page table was imported as a floating one. - CPPUNIT_ASSERT_EQUAL(static_cast(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 xDrawPageSupplier(mxComponent, uno::UNO_QUERY); - uno::Reference 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(1), xDrawPage->getCount()); + CPPUNIT_ASSERT_EQUAL(1, getShapes()); } DECLARE_WW8IMPORT_TEST(testTdf122425_2, "tdf122425_2.doc") -- cgit