vcl/inc/unx/fontmanager.hxx | 24 ------------------------ vcl/unx/generic/fontmanager/fontmanager.cxx | 24 ------------------------ 2 files changed, 48 deletions(-)
New commits: commit 9e654aaaaa9ed8e1eaf83685e2f47279f0b17ccf Author: Khaled Hosny <kha...@aliftype.com> AuthorDate: Sat Sep 24 15:44:50 2022 +0200 Commit: خالد حسني <kha...@aliftype.com> CommitDate: Sat Sep 24 17:14:18 2022 +0200 vcl: Removed unused PrintFontInfo and support code Change-Id: I4e4d67b5ff57585a02eaba9372599e767d31229d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140549 Tested-by: Jenkins Reviewed-by: خالد حسني <kha...@aliftype.com> diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx index 356b08b95a0e..7ff56f957d38 100644 --- a/vcl/inc/unx/fontmanager.hxx +++ b/vcl/inc/unx/fontmanager.hxx @@ -58,15 +58,6 @@ class PPDParser; typedef int fontID; -/* - * the difference between FastPrintFontInfo and PrintFontInfo - * is that the information in FastPrintFontInfo can usually - * be gathered from fontconfig results. - * if only FastPrintFontInfo is gathered and PrintFontInfo - * on demand and for less fonts, then performance in startup - * increases considerably - */ - struct FastPrintFontInfo { fontID m_nID; // FontID @@ -93,18 +84,6 @@ struct FastPrintFontInfo {} }; -struct PrintFontInfo : public FastPrintFontInfo -{ - int m_nAscend; - int m_nDescend; - - PrintFontInfo() : - FastPrintFontInfo(), - m_nAscend( 0 ), - m_nDescend( 0 ) - {} -}; - // a class to manage printable fonts class VCL_PLUGIN_PUBLIC PrintFontManager @@ -174,7 +153,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager return it == m_aFonts.end() ? nullptr : &it->second; } static void fillPrintFontInfo(const PrintFont& rFont, FastPrintFontInfo& rInfo); - void fillPrintFontInfo( PrintFont& rFont, PrintFontInfo& rInfo ) const; OString getDirectory( int nAtom ) const; int getDirectoryAtom( const OString& rDirectory ); @@ -216,8 +194,6 @@ public: // returns the ids of all managed fonts. void getFontList( std::vector< fontID >& rFontIDs ); - // get font info for a specific font - bool getFontInfo( fontID nFontID, PrintFontInfo& rInfo ) const; // get fast font info for a specific font bool getFontFastInfo( fontID nFontID, FastPrintFontInfo& rInfo ) const; diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx index d926c5bba1e6..122ff3e67b4f 100644 --- a/vcl/unx/generic/fontmanager/fontmanager.cxx +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -746,30 +746,6 @@ void PrintFontManager::fillPrintFontInfo(const PrintFont& rFont, FastPrintFontIn rInfo.m_aAliases = rFont.m_aAliases; } -void PrintFontManager::fillPrintFontInfo( PrintFont& rFont, PrintFontInfo& rInfo ) const -{ - if (rFont.m_nAscend == 0 && rFont.m_nDescend == 0) - { - analyzeSfntFile(rFont); - } - - fillPrintFontInfo( rFont, static_cast< FastPrintFontInfo& >( rInfo ) ); - - rInfo.m_nAscend = rFont.m_nAscend; - rInfo.m_nDescend = rFont.m_nDescend; -} - -bool PrintFontManager::getFontInfo( fontID nFontID, PrintFontInfo& rInfo ) const -{ - const PrintFont* pFont = getFont( nFontID ); - if( pFont ) - { - rInfo.m_nID = nFontID; - fillPrintFontInfo( *pFont, rInfo ); - } - return pFont != nullptr; -} - bool PrintFontManager::getFontFastInfo( fontID nFontID, FastPrintFontInfo& rInfo ) const { const PrintFont* pFont = getFont( nFontID );