Kaydet (Commit) 34970022 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:mergeclasses

Change-Id: I9f56beebae1ea02a8914b7b25fe7565f7b0df053
üst 64d0de92
......@@ -66,7 +66,7 @@ for clazz in sorted(definitionSet - instantiatedSet):
if clazz.find("mutex") != -1 or clazz.find("Mutex") != -1:
continue
otherclazz = next(iter(parentChildDict[clazz]))
# exclude combinations that span modules because we often use those to make cross-module dependencies more manageable.
# exclude combinations that span modules because we often use those to make cross-module dependencies more manageable.
if extractModuleName(clazz) != extractModuleName(otherclazz):
continue
print "merge", clazz, "with", otherclazz
......
......@@ -46,8 +46,6 @@ merge ISwFrameControl with SwFrameMenuButtonBase
merge IXFAttrList with XFSaxAttrList
merge IXFStream with XFSaxStream
merge IXFStyle with XFStyle
merge ImplGlyphFallbackFontSubstitution with FcGlyphFallbackSubstititution
merge ImplPreMatchFontSubstitution with FcPreMatchSubstititution
merge LwpDLList with LwpParaProperty
merge LwpDLVListHead with LwpPropList
merge OldBasicPassword with basic::SfxScriptLibraryContainer
......
......@@ -35,19 +35,6 @@
#include <unotools/fontdefs.hxx>
#include <list>
// platform specific font substitution hooks
class FcPreMatchSubstititution
: public ImplPreMatchFontSubstitution
{
public:
bool FindFontSubstitute( FontSelectPattern& ) const SAL_OVERRIDE;
typedef ::std::pair<FontSelectPatternAttributes, FontSelectPatternAttributes> value_type;
private:
typedef ::std::list<value_type> CachedFontMapType;
mutable CachedFontMapType maCachedFontMap;
};
class FcGlyphFallbackSubstititution
: public ImplGlyphFallbackFontSubstitution
{
......@@ -95,7 +82,7 @@ void SalGenericInstance::RegisterFontSubstitutors( PhysicalFontCollection* pFont
// register font fallback substitutions (unless disabled by bit0)
if( (nDisableBits & 1) == 0 )
{
static FcPreMatchSubstititution aSubstPreMatch;
static PreMatchFontSubstititution aSubstPreMatch;
pFontCollection->SetPreMatchHook( &aSubstPreMatch );
}
......@@ -138,12 +125,12 @@ namespace
: mrAttributes(rAttributes)
{
}
bool operator()(const FcPreMatchSubstititution::value_type& rOther) const
bool operator()(const PreMatchFontSubstititution::value_type& rOther) const
{ return rOther.first == mrAttributes; }
};
}
bool FcPreMatchSubstititution::FindFontSubstitute( FontSelectPattern &rFontSelData ) const
bool PreMatchFontSubstititution::FindFontSubstitute( FontSelectPattern &rFontSelData ) const
{
// We don't actually want to talk to Fontconfig at all for symbol fonts
if( rFontSelData.IsSymbolFont() )
......
......@@ -40,7 +40,7 @@ private:
typedef std::unordered_map<OUString, PhysicalFontFamily*,OUStringHash> PhysicalFontFamilies;
PhysicalFontFamilies maPhysicalFontFamilies;
ImplPreMatchFontSubstitution* mpPreMatchHook; // device specific prematch substitution
PreMatchFontSubstititution* mpPreMatchHook; // device specific prematch substitution
ImplGlyphFallbackFontSubstitution* mpFallbackHook; // device specific glyph fallback substitution
public:
......@@ -63,7 +63,7 @@ public:
OUString& rMissingCodes, int nFallbackLevel ) const;
// prepare platform specific font substitutions
void SetPreMatchHook( ImplPreMatchFontSubstitution* );
void SetPreMatchHook( PreMatchFontSubstititution* );
void SetFallbackHook( ImplGlyphFallbackFontSubstitution* );
// misc utilities
......
......@@ -112,13 +112,17 @@ public:
// PreMatchFontSubstitution
// abstracts the concept of a configured font substitution
// before the availability of the originally selected font has been checked
class ImplPreMatchFontSubstitution
: public ImplFontSubstitution
class PreMatchFontSubstititution
{
public:
virtual bool FindFontSubstitute( FontSelectPattern& ) const = 0;
bool FindFontSubstitute( FontSelectPattern& ) const;
typedef ::std::pair<FontSelectPatternAttributes, FontSelectPatternAttributes> value_type;
private:
typedef ::std::list<value_type> CachedFontMapType;
mutable CachedFontMapType maCachedFontMap;
};
// ImplGlyphFallbackFontSubstitution
// abstracts the concept of finding the best font to support an incomplete font
class ImplGlyphFallbackFontSubstitution
......
......@@ -37,7 +37,7 @@ class ImplGetDevFontList;
class ImplGetDevSizeList;
class ImplFontEntry;
class ImplFontCache;
class ImplPreMatchFontSubstitution;
class PreMatchFontSubstititution;
class ImplGlyphFallbackFontSubstitution;
class FontSelectPattern;
namespace vcl { class Font; }
......
......@@ -84,7 +84,7 @@ PhysicalFontCollection::~PhysicalFontCollection()
Clear();
}
void PhysicalFontCollection::SetPreMatchHook( ImplPreMatchFontSubstitution* pHook )
void PhysicalFontCollection::SetPreMatchHook( PreMatchFontSubstititution* pHook )
{
mpPreMatchHook = pHook;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment