include/vcl/font.hxx | 2 -- offapi/com/sun/star/rendering/FontInfo.idl | 6 ++++++ vcl/qa/cppunit/font.cxx | 25 ------------------------- vcl/source/font/font.cxx | 5 ----- vcl/workben/listfonts.cxx | 1 - 5 files changed, 6 insertions(+), 33 deletions(-)
New commits: commit b98e2979af71d1f415a856be98839f321371804a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Nov 20 20:03:23 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Nov 21 09:57:02 2022 +0100 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 <caol...@redhat.com> 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() commit 468277a0aec9a40f5d5f3db600088ae04a45e2c9 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Nov 20 19:49:09 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Nov 21 09:56:48 2022 +0100 clarify what 'IsSymbolFont' in this external facing idl means Change-Id: I2cb2aab6797e55449e5e771192f48915baedc221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143005 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/offapi/com/sun/star/rendering/FontInfo.idl b/offapi/com/sun/star/rendering/FontInfo.idl index a020fba307c4..626baf5f6c87 100644 --- a/offapi/com/sun/star/rendering/FontInfo.idl +++ b/offapi/com/sun/star/rendering/FontInfo.idl @@ -80,6 +80,12 @@ struct FontInfo /** Specifies whether the font is a symbol font.<p> + This refers solely to a font using the Microsoft SYMBOL_CHARSET + charset (i.e. RTL_TEXTENCODING_SYMBOL), and not a font using any + different "Symbol" encoding (e.g. RTL_TEXTENCODING_ADOBE_SYMBOL, + RTL_TEXTENCODING_ADOBE_DINGBATS) or a font only useful for + icons, dingbats or technical symbols. + If yes, text written in this symbol font does not have a specified meaning.<p> */