[Libreoffice-commits] core.git: vcl/inc vcl/source
Chris Sherlock
chris.sherlock79 at gmail.com
Wed Dec 23 18:26:03 PST 2015
vcl/inc/PhysicalFontCollection.hxx | 2 +-
vcl/source/font/PhysicalFontCollection.cxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit fab012e7ea6c84d0bd0867cefee0b5e9563abc53
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Thu Dec 24 12:04:15 2015 +1100
vcl: function name change to ImplFindFontFamilyOfDefaultFont
Changed ImplFindDefaultFontFamily to ImplFindFontFamilyOfDefaultFont
because it was misleading before. It was originally FindDefaultFont,
which it never was (it found an instance of PhysicalFontFamily, not
a specific font face), but when I changed it to
ImplFindDefaultFontFamily this is wrong also because it doesn't find a
default font family, it finds the default font and then returns that
font's PhysicalFontFamily.
Whilst this function name is longer, it's also a private function so
not going to be used by other classes, thus I think it's better to
increase code reading clarity in this instance.
Change-Id: Ie39fa5899fece157cdca6789d7b8504e58ceb316
Reviewed-on: https://gerrit.libreoffice.org/20917
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 67d762d..4adbbe7 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -85,7 +85,7 @@ private:
PhysicalFontFamily* ImplFindFontFamilyByAliasName ( const OUString& rSearchName, const OUString& rShortName) const;
PhysicalFontFamily* ImplFindFontFamilyBySubstFontAttr( const utl::FontNameAttr& ) const;
- PhysicalFontFamily* ImplFindDefaultFontFamily() const;
+ PhysicalFontFamily* ImplFindFontFamilyOfDefaultFont() const;
};
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index 72b0d85..033499e 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -876,7 +876,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamilyByAttributes( ImplFont
return pFoundData;
}
-PhysicalFontFamily* PhysicalFontCollection::ImplFindDefaultFontFamily() const
+PhysicalFontFamily* PhysicalFontCollection::ImplFindFontFamilyOfDefaultFont() const
{
// try to find one of the default fonts of the
// UNICODE, SANSSERIF, SERIF or FIXED default font lists
@@ -1302,7 +1302,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamilyByFont( FontSelectPatt
else
{
// if still needed fall back to default fonts
- pFoundData = ImplFindDefaultFontFamily();
+ pFoundData = ImplFindFontFamilyOfDefaultFont();
}
return pFoundData;
More information about the Libreoffice-commits
mailing list