summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-30 13:57:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-01 08:13:06 +0100
commite7f6fdd5c3805469e1905b11d11d9b01bef477a9 (patch)
tree344fa8bceaad4eca3f4259eabafa86470c70fb51 /vcl
parent7522dc0f5ce4774f8947e588cda5b32e24553b43 (diff)
loplugin:unusedfields
The mnRequestedLength fields in formula/ were introduced in commit 6ef6dd0122b8e44d8547ec31f40def42173e4e41 Author: Kohei Yoshida <kohei.yoshida@collabora.com> Date: Wed Feb 26 14:32:57 2014 -0500 Store the length of originally requested array size prior to trimming. but then partially removed in commit d7f1f91b194da1cb96e66268ce7ef38602aa5754 Author: Noel Grandin <noel@peralex.com> Date: Mon Mar 3 13:29:43 2014 +0200 remove unused code in formula/vectortoken Change-Id: Ic56b6e42682131ee45df7838867145f980f3d601 Reviewed-on: https://gerrit.libreoffice.org/45571 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/PhysicalFontCollection.hxx2
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx47
2 files changed, 0 insertions, 49 deletions
diff --git a/vcl/inc/PhysicalFontCollection.hxx b/vcl/inc/PhysicalFontCollection.hxx
index 41382cd0116e..2c32408ce158 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -68,7 +68,6 @@ public:
private:
mutable bool mbMatchData; // true if matching attributes are initialized
- bool mbMapNames; // true if MapNames are available
typedef std::unordered_map<OUString, PhysicalFontFamily*> PhysicalFontFamilies;
PhysicalFontFamilies maPhysicalFontFamilies;
@@ -83,7 +82,6 @@ private:
void ImplInitGenericGlyphFallback() const;
PhysicalFontFamily* ImplFindFontFamilyBySearchName( const OUString& ) const;
- PhysicalFontFamily* ImplFindFontFamilyByAliasName ( const OUString& rSearchName, const OUString& rShortName) const;
PhysicalFontFamily* ImplFindFontFamilyBySubstFontAttr( const utl::FontNameAttr& ) const;
PhysicalFontFamily* ImplFindFontFamilyOfDefaultFont() const;
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index 39390b7bf107..bde66d9ab466 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -61,7 +61,6 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName )
PhysicalFontCollection::PhysicalFontCollection()
: mbMatchData( false )
- , mbMapNames( false )
, mpPreMatchHook( nullptr )
, mpFallbackHook( nullptr )
, mpFallbackList( nullptr )
@@ -306,43 +305,6 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindFontFamilyBySearchName( cons
return pFoundData;
}
-PhysicalFontFamily* PhysicalFontCollection::ImplFindFontFamilyByAliasName(const OUString& rSearchName,
- const OUString& rShortName) const
-{
- // short circuit for impossible font name alias
- if (rSearchName.isEmpty())
- return nullptr;
-
- // short circuit if no alias names are available
- if (!mbMapNames)
- return nullptr;
-
- // use the font's alias names to find the font
- // TODO: get rid of linear search
- PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.begin();
- while( it != maPhysicalFontFamilies.end() )
- {
- PhysicalFontFamily* pData = (*it).second;
- if( pData->GetAliasNames().isEmpty() )
- continue;
-
- // if one alias name matches we found a matching font
- OUString aTempName;
- sal_Int32 nIndex = 0;
-
- do
- {
- aTempName = GetNextFontToken( pData->GetAliasNames(), nIndex );
- // Test, if the Font name match with one of the mapping names
- if ( (aTempName == rSearchName) || (aTempName == rShortName) )
- return pData;
- }
- while ( nIndex != -1 );
- }
-
- return nullptr;
-}
-
PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( const OUString& rFontName ) const
{
return ImplFindFontFamilyBySearchName( GetEnglishSearchFontName( rFontName ) );
@@ -922,7 +884,6 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindFontFamilyOfDefaultFont() co
PhysicalFontCollection* PhysicalFontCollection::Clone() const
{
PhysicalFontCollection* pClonedCollection = new PhysicalFontCollection;
- pClonedCollection->mbMapNames = mbMapNames;
pClonedCollection->mpPreMatchHook = mpPreMatchHook;
pClonedCollection->mpFallbackHook = mpFallbackHook;
@@ -1264,14 +1225,6 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( FontSelectPattern& r
}
}
- // if still needed use the alias names of the installed fonts
- if( mbMapNames )
- {
- PhysicalFontFamily* pFoundData = ImplFindFontFamilyByAliasName( rFSD.maTargetName, aSearchShortName );
- if( pFoundData )
- return pFoundData;
- }
-
// if still needed use the font request's attributes to find a good match
if (MsLangId::isSimplifiedChinese(rFSD.meLanguage))
nSearchType |= ImplFontAttrs::CJK | ImplFontAttrs::CJK_SC;