[Libreoffice-commits] core.git: vcl/inc vcl/source vcl/win
Chris Sherlock
"Chris Sherlockchris.sherlock79" at gmail.com
Tue Dec 22 23:14:01 PST 2015
vcl/inc/PhysicalFontCollection.hxx | 5 ++---
vcl/source/font/PhysicalFontCollection.cxx | 6 +++---
vcl/win/gdi/salgdi3.cxx | 10 +++++-----
3 files changed, 10 insertions(+), 11 deletions(-)
New commits:
commit 395815caa6be493d0831a61ba3de4e7d5ba4ae1d
Author: Chris Sherlock <Chris Sherlock chris.sherlock79 at gmail.com>
Date: Wed Dec 23 10:39:37 2015 +1100
vcl: Make ImplFindByAttributes public and rename
Renamed PhysicalFontCollection::ImplFindByAttributes to
FindByAttributes. This function is actually useful for finding a
font within the collection, so I'm moving it from being a protected
function to public because it is actually useful in its own right,
not just for PhysicalFontCollection.
Note that ImplFontAttrs is a mess anyway, so not going to touch that
(yet).
Change-Id: I884ddd5118cbbb0f92b157540f7ffcf1bf35609b
Reviewed-on: https://gerrit.libreoffice.org/20865
Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79 at gmail.com>
diff --git a/vcl/inc/PhysicalFontCollection.hxx b/vcl/inc/PhysicalFontCollection.hxx
index 6eb77ae..2e4825f 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -63,10 +63,9 @@ public:
ImplGetDevSizeList* GetDevSizeList( const OUString& rFontName ) const;
PhysicalFontFamily* FindByTokenNames(const OUString& rTokenStr) const;
-
+ PhysicalFontFamily* FindByAttributes(ImplFontAttrs nSearchType, FontWeight, FontWidth,
+ FontItalic, const OUString& rSearchFamily) const;
protected:
- PhysicalFontFamily* ImplFindByAttributes(ImplFontAttrs nSearchType, FontWeight, FontWidth,
- FontItalic, const OUString& rSearchFamily) const;
PhysicalFontFamily* FindDefaultFont() const;
private:
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index 02c85cb..39bcb26 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -421,7 +421,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindBySubstFontAttr( const utl::
const FontItalic eSearchSlant = ITALIC_DONTKNOW;
const OUString aSearchName;
- pFoundData = ImplFindByAttributes( nSearchType,
+ pFoundData = FindByAttributes( nSearchType,
eSearchWeight, eSearchWidth, eSearchSlant, aSearchName );
if( pFoundData )
@@ -454,7 +454,7 @@ void PhysicalFontCollection::InitMatchData() const
}
}
-PhysicalFontFamily* PhysicalFontCollection::ImplFindByAttributes( ImplFontAttrs nSearchType,
+PhysicalFontFamily* PhysicalFontCollection::FindByAttributes( ImplFontAttrs nSearchType,
FontWeight eSearchWeight,
FontWidth eSearchWidth,
FontItalic eSearchItalic,
@@ -1271,7 +1271,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindByFont( FontSelectPattern& rFSD
}
PhysicalFontFamily::CalcType( nSearchType, eSearchWeight, eSearchWidth, rFSD.GetFamilyType(), pFontAttr );
- PhysicalFontFamily* pFoundData = ImplFindByAttributes( nSearchType,
+ PhysicalFontFamily* pFoundData = FindByAttributes( nSearchType,
eSearchWeight, eSearchWidth, rFSD.GetSlant(), aSearchFamilyName );
if( pFoundData )
diff --git a/vcl/win/gdi/salgdi3.cxx b/vcl/win/gdi/salgdi3.cxx
index d091764..02982f6d 100644
--- a/vcl/win/gdi/salgdi3.cxx
+++ b/vcl/win/gdi/salgdi3.cxx
@@ -543,11 +543,11 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFon
}
// are the missing characters symbols?
- pFontFamily = pFontCollection->ImplFindByAttributes( ImplFontAttrs::Symbol,
- rFontSelData.GetWeight(),
- rFontSelData.GetWidthType(),
- rFontSelData.GetSlant(),
- rFontSelData.maSearchName );
+ pFontFamily = pFontCollection->FindByAttributes( ImplFontAttrs::Symbol,
+ rFontSelData.GetWeight(),
+ rFontSelData.GetWidthType(),
+ rFontSelData.GetSlant(),
+ rFontSelData.maSearchName );
if( pFontFamily )
{
PhysicalFontFace* pFace = pFontFamily->FindBestFontFace( rFontSelData );
More information about the Libreoffice-commits
mailing list