From 1ff2f5fa2d8c353b0cad28317a696c2ba9a4aab5 Mon Sep 17 00:00:00 2001 From: خالد حسني Date: Mon, 21 Nov 2022 15:01:39 +0100 Subject: Revert "vcl: test getting glyph boundary rect from LogicalFontInstance" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0cef06f0a2c0963e8c1579b78975710e6af4471c. Reason for revert: https://gerrit.libreoffice.org/c/core/+/141234/comments/89325e55_2271cfe8 > Stephan Bergmann: > > I saw the unrelated fail its Jenkins build on tb88-win with > > C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/vcl/qa/cppunit/logicalfontinstance.cxx(53) : error : Assertion > Test name: VclLogicalFontInstanceTest::testglyphboundrect > equality assertion failed > - Expected: 51x82@(7,-80) > - Actual : 50x82@(7,-80) Change-Id: Idc4132adbaf0b051dcf955f3f1e7c44841c60117 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142928 Tested-by: Jenkins Reviewed-by: خالد حسني --- vcl/CppunitTest_vcl_font.mk | 5 --- vcl/qa/cppunit/logicalfontinstance.cxx | 59 ---------------------------------- 2 files changed, 64 deletions(-) delete mode 100644 vcl/qa/cppunit/logicalfontinstance.cxx (limited to 'vcl') diff --git a/vcl/CppunitTest_vcl_font.mk b/vcl/CppunitTest_vcl_font.mk index 813ab1c9c009..891352508a1c 100644 --- a/vcl/CppunitTest_vcl_font.mk +++ b/vcl/CppunitTest_vcl_font.mk @@ -20,7 +20,6 @@ $(eval $(call gb_CppunitTest_add_exception_objects,vcl_font, \ vcl/qa/cppunit/physicalfontfacecollection \ vcl/qa/cppunit/physicalfontfamily \ vcl/qa/cppunit/physicalfontcollection \ - vcl/qa/cppunit/logicalfontinstance \ )) $(eval $(call gb_CppunitTest_use_externals,vcl_font,\ @@ -57,8 +56,4 @@ $(eval $(call gb_CppunitTest_use_components,vcl_font,\ $(eval $(call gb_CppunitTest_use_configuration,vcl_font)) -$(eval $(call gb_CppunitTest_use_more_fonts,vcl_font)) - -$(eval $(call gb_CppunitTest_set_non_application_font_use,vcl_font,abort)) - # vim: set noet sw=4 ts=4: diff --git a/vcl/qa/cppunit/logicalfontinstance.cxx b/vcl/qa/cppunit/logicalfontinstance.cxx deleted file mode 100644 index 56b9897f0589..000000000000 --- a/vcl/qa/cppunit/logicalfontinstance.cxx +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include - -#include -#include - -#include -#include - -#include - -#include - -class VclLogicalFontInstanceTest : public test::BootstrapFixture -{ -public: - VclLogicalFontInstanceTest() - : BootstrapFixture(true, false) - { - } - - void testglyphboundrect(); - - CPPUNIT_TEST_SUITE(VclLogicalFontInstanceTest); - CPPUNIT_TEST(testglyphboundrect); - - CPPUNIT_TEST_SUITE_END(); -}; - -void VclLogicalFontInstanceTest::testglyphboundrect() -{ - ScopedVclPtr device = VclPtr::Create(DeviceFormat::DEFAULT); - device->SetOutputSizePixel(Size(1000, 1000)); - device->SetFont(vcl::Font("Liberation Sans", Size(0, 110))); - - const LogicalFontInstance* pFontInstance = device->GetFontInstance(); - - tools::Rectangle aBoundRect; - const auto LATIN_SMALL_LETTER_B = 0x0062; - pFontInstance->GetGlyphBoundRect(pFontInstance->GetGlyphIndex(LATIN_SMALL_LETTER_B), aBoundRect, - false); -#ifdef MACOSX - CPPUNIT_ASSERT_EQUAL(tools::Rectangle(Point(7, -80), Size(51, 83)), aBoundRect); -#else - CPPUNIT_ASSERT_EQUAL(tools::Rectangle(Point(7, -80), Size(51, 82)), aBoundRect); -#endif -} - -CPPUNIT_TEST_SUITE_REGISTRATION(VclLogicalFontInstanceTest); - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ -- cgit