diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-11-20 20:03:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-11-21 09:57:02 +0100 |
commit | b98e2979af71d1f415a856be98839f321371804a (patch) | |
tree | 80e748a97ee10a7a7998fc813697b22d3e4335b0 | |
parent | 468277a0aec9a40f5d5f3db600088ae04a45e2c9 (diff) |
drop effectively unused Font::IsSymbolFont
Change-Id: I717319dd3843aa7d73d0722967e80f7d07e98143
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143006
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | include/vcl/font.hxx | 2 | ||||
-rw-r--r-- | vcl/qa/cppunit/font.cxx | 25 | ||||
-rw-r--r-- | vcl/source/font/font.cxx | 5 | ||||
-rw-r--r-- | vcl/workben/listfonts.cxx | 1 |
4 files changed, 0 insertions, 33 deletions
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx index a49005050d67..8f7363d816b7 100644 --- a/include/vcl/font.hxx +++ b/include/vcl/font.hxx @@ -72,8 +72,6 @@ public: rtl_TextEncoding GetCharSet() const; FontEmphasisMark GetEmphasisMarkStyle() const; - bool IsSymbolFont() const; - void SetFamilyName( const OUString& rFamilyName ); void SetStyleName( const OUString& rStyleName ); void SetFamily( FontFamily ); diff --git a/vcl/qa/cppunit/font.cxx b/vcl/qa/cppunit/font.cxx index 24fd1c6126a1..25550a95f6b0 100644 --- a/vcl/qa/cppunit/font.cxx +++ b/vcl/qa/cppunit/font.cxx @@ -26,7 +26,6 @@ public: void testItalic(); void testAlignment(); void testQuality(); - void testSymbolFlagAndCharSet(); void testEmphasisMarkShouldBePosAboveWhenSimplifiedChinese(); void testEmphasisMarkShouldBePosAboveWhenNotSimplifiedChinese(); void testEmphasisMarkInitAsNone(); @@ -43,7 +42,6 @@ public: CPPUNIT_TEST(testItalic); CPPUNIT_TEST(testAlignment); CPPUNIT_TEST(testQuality); - CPPUNIT_TEST(testSymbolFlagAndCharSet); CPPUNIT_TEST(testEmphasisMarkShouldBePosAboveWhenSimplifiedChinese); CPPUNIT_TEST(testEmphasisMarkShouldBePosAboveWhenNotSimplifiedChinese); CPPUNIT_TEST(testEmphasisMarkInitAsNone); @@ -135,29 +133,6 @@ void VclFontTest::testQuality() CPPUNIT_ASSERT_EQUAL( int(50), aFont.GetQuality() ); } - -void VclFontTest::testSymbolFlagAndCharSet() -{ - // default constructor should set scalable flag to false - vcl::Font aFont; - - CPPUNIT_ASSERT_MESSAGE( "Should not be seen as a symbol font after default constructor called", !aFont.IsSymbolFont() ); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Character set should be RTL_TEXTENCODING_DONTKNOW after default constructor called", - RTL_TEXTENCODING_DONTKNOW, aFont.GetCharSet() ); - - aFont.SetCharSet( RTL_TEXTENCODING_SYMBOL ); - - CPPUNIT_ASSERT_MESSAGE( "Test 1: Symbol font flag should be on", aFont.IsSymbolFont() ); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Test 1: Character set should be RTL_TEXTENCODING_SYMBOL", - RTL_TEXTENCODING_SYMBOL, aFont.GetCharSet() ); - - aFont.SetCharSet( RTL_TEXTENCODING_UNICODE ); - - CPPUNIT_ASSERT_MESSAGE( "Test 2: Symbol font flag should be off", !aFont.IsSymbolFont() ); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Test 2: Character set should be RTL_TEXTENCODING_UNICODE", - RTL_TEXTENCODING_UNICODE, aFont.GetCharSet() ); -} - void VclFontTest::testEmphasisMarkShouldBePosAboveWhenSimplifiedChinese() { vcl::Font aFont; diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index b6ed6926b33f..410b03d2cae9 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -164,11 +164,6 @@ void Font::SetCharSet( rtl_TextEncoding eCharSet ) mpImplFont->SetCharSet( eCharSet ); } -bool Font::IsSymbolFont() const -{ - return mpImplFont->IsSymbolFont(); -} - void Font::SetLanguageTag( const LanguageTag& rLanguageTag ) { if (const_cast<const ImplType&>(mpImplFont)->maLanguageTag != rLanguageTag) diff --git a/vcl/workben/listfonts.cxx b/vcl/workben/listfonts.cxx index c66f964a895d..49380c03bcbc 100644 --- a/vcl/workben/listfonts.cxx +++ b/vcl/workben/listfonts.cxx @@ -381,7 +381,6 @@ int ListFonts::Main() << "\n\tWidth type: " << aFont.GetWidthType() << "\n\tAlignment: " << aFont.GetAlignment() << "\n\tCharset: " << GetOctetTextEncodingName(aFont.GetCharSet()) - << "\n\tSymbol font? " << (aFont.IsSymbolFont() ? "yes" : "no") << "\n\tAscent: " << aFont.GetAscent() << "\n\tDescent: " << aFont.GetDescent() << "\n\tInternal leading: " << aFont.GetInternalLeading() |