From f886d9cacba197cb92a75317fe7d24280dff6436 Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 19 Oct 2020 15:13:24 +0200 Subject: use tools::Long in editeng Change-Id: Ib7014c353489461ad9489d9f3fefd59a32f8f877 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104524 Tested-by: Jenkins Reviewed-by: Noel Grandin --- editeng/qa/items/borderline_test.cxx | 46 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'editeng/qa') diff --git a/editeng/qa/items/borderline_test.cxx b/editeng/qa/items/borderline_test.cxx index a44c2927d4cb..0499c7087984 100644 --- a/editeng/qa/items/borderline_test.cxx +++ b/editeng/qa/items/borderline_test.cxx @@ -16,15 +16,15 @@ using namespace ::com::sun::star::table::BorderLineStyle; -#define TEST_WIDTH long( 40 ) +#define TEST_WIDTH tools::Long( 40 ) -#define THINTHICKSG_IN_WIDTH long( 15 ) -#define THINTHICKSG_OUT_WIDTH long( 40 ) -#define THINTHICKSG_DIST_WIDTH long( 15 ) +#define THINTHICKSG_IN_WIDTH tools::Long( 15 ) +#define THINTHICKSG_OUT_WIDTH tools::Long( 40 ) +#define THINTHICKSG_DIST_WIDTH tools::Long( 15 ) -#define THINTHICKLG_IN_WIDTH long( 15 ) -#define THINTHICKLG_OUT_WIDTH long( 30 ) -#define THINTHICKLG_DIST_WIDTH long( 40 ) +#define THINTHICKLG_IN_WIDTH tools::Long( 15 ) +#define THINTHICKLG_OUT_WIDTH tools::Long( 30 ) +#define THINTHICKLG_DIST_WIDTH tools::Long( 40 ) using namespace editeng; @@ -77,9 +77,9 @@ void BorderLineTest::testGuessWidthDouble() SvxBorderLine line; line.GuessLinesWidths( SvxBorderLineStyle::DOUBLE, TEST_WIDTH, TEST_WIDTH, TEST_WIDTH ); CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::DOUBLE, line.GetBorderLineStyle() ); - CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast(line.GetOutWidth()) ); - CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast(line.GetInWidth()) ); - CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast(line.GetDistance()) ); + CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast(line.GetOutWidth()) ); + CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast(line.GetInWidth()) ); + CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast(line.GetDistance()) ); CPPUNIT_ASSERT_EQUAL( 3*TEST_WIDTH, line.GetWidth() ); } @@ -89,10 +89,10 @@ void BorderLineTest::testGuessWidthNoMatch() line.GuessLinesWidths( SvxBorderLineStyle::DOUBLE, TEST_WIDTH + 1, TEST_WIDTH + 2, TEST_WIDTH + 3 ); CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::DOUBLE, line.GetBorderLineStyle() ); - CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+1, static_cast(line.GetOutWidth()) ); - CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+2, static_cast(line.GetInWidth()) ); - CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+3, static_cast(line.GetDistance())); - CPPUNIT_ASSERT_EQUAL( long( (3 * TEST_WIDTH) + 6 ), line.GetWidth() ); + CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+1, static_cast(line.GetOutWidth()) ); + CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+2, static_cast(line.GetInWidth()) ); + CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+3, static_cast(line.GetDistance())); + CPPUNIT_ASSERT_EQUAL( tools::Long( (3 * TEST_WIDTH) + 6 ), line.GetWidth() ); } void BorderLineTest::testGuessWidthThinthickSmallgap() @@ -104,11 +104,11 @@ void BorderLineTest::testGuessWidthThinthickSmallgap() THINTHICKSG_DIST_WIDTH ); CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::THINTHICK_SMALLGAP, line.GetBorderLineStyle() ); CPPUNIT_ASSERT_EQUAL( THINTHICKSG_OUT_WIDTH, - static_cast(line.GetOutWidth()) ); + static_cast(line.GetOutWidth()) ); CPPUNIT_ASSERT_EQUAL( THINTHICKSG_IN_WIDTH, - static_cast(line.GetInWidth()) ); + static_cast(line.GetInWidth()) ); CPPUNIT_ASSERT_EQUAL( THINTHICKSG_DIST_WIDTH, - static_cast(line.GetDistance()) ); + static_cast(line.GetDistance()) ); CPPUNIT_ASSERT_EQUAL( THINTHICKSG_OUT_WIDTH + THINTHICKSG_IN_WIDTH + THINTHICKSG_DIST_WIDTH, line.GetWidth() ); } @@ -122,11 +122,11 @@ void BorderLineTest::testGuessWidthThinthickLargegap() THINTHICKLG_DIST_WIDTH ); CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::THINTHICK_LARGEGAP, line.GetBorderLineStyle() ); CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH, - static_cast(line.GetOutWidth()) ); + static_cast(line.GetOutWidth()) ); CPPUNIT_ASSERT_EQUAL( THINTHICKLG_IN_WIDTH, - static_cast(line.GetInWidth()) ); + static_cast(line.GetInWidth()) ); CPPUNIT_ASSERT_EQUAL( THINTHICKLG_DIST_WIDTH, - static_cast(line.GetDistance()) ); + static_cast(line.GetDistance()) ); CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH + THINTHICKLG_IN_WIDTH + THINTHICKLG_DIST_WIDTH, line.GetWidth() ); } @@ -140,11 +140,11 @@ void BorderLineTest::testGuessWidthNostyleDouble() THINTHICKLG_DIST_WIDTH ); CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::THINTHICK_LARGEGAP, line.GetBorderLineStyle() ); CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH, - static_cast(line.GetOutWidth()) ); + static_cast(line.GetOutWidth()) ); CPPUNIT_ASSERT_EQUAL( THINTHICKLG_IN_WIDTH, - static_cast(line.GetInWidth()) ); + static_cast(line.GetInWidth()) ); CPPUNIT_ASSERT_EQUAL( THINTHICKLG_DIST_WIDTH, - static_cast(line.GetDistance()) ); + static_cast(line.GetDistance()) ); CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH + THINTHICKLG_IN_WIDTH + THINTHICKLG_DIST_WIDTH, line.GetWidth() ); } -- cgit