summaryrefslogtreecommitdiff
path: root/vcl/win/gdi/salgdi3.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2015-12-31 15:20:12 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2015-12-31 22:49:16 +0000
commite9598378b55cc05c95bd3f410c396bd44a74341d (patch)
tree35cd6ae2245806117a337631a6d8b0ef9406c80f /vcl/win/gdi/salgdi3.cxx
parente81c4d3ea00949cb4d8c3f44e09e70b19eebb826 (diff)
vcl: merge ImplDevFontAttributes with ImplFontAttributes
ImplFontAttributes handles device independent data, whilst ImplDevFontAttributes handles device dependent data. However, there is no real reason for the divide in classes, and in fact I'm not at all a fan of using a pImpl directly - sort of defeats the purpose of having one! Change-Id: I2db22727e3479b14e3bc37dfad9136703bbdeb13 Reviewed-on: https://gerrit.libreoffice.org/21018 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/win/gdi/salgdi3.cxx')
-rw-r--r--vcl/win/gdi/salgdi3.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/vcl/win/gdi/salgdi3.cxx b/vcl/win/gdi/salgdi3.cxx
index c26d7951c04d..9e290beae7a1 100644
--- a/vcl/win/gdi/salgdi3.cxx
+++ b/vcl/win/gdi/salgdi3.cxx
@@ -72,7 +72,7 @@ static bool bImplSalCourierScalable = false;
static bool bImplSalCourierNew = false;
// TODO: also support temporary TTC font files
-typedef std::map< OUString, ImplDevFontAttributes > FontAttrMap;
+typedef std::map< OUString, ImplFontAttributes > FontAttrMap;
class ImplFontAttrCache
{
@@ -92,8 +92,8 @@ public:
const OUString& rBaseURL);
~ImplFontAttrCache();
- ImplDevFontAttributes GetFontAttr( const OUString& rFontFileName ) const;
- void AddFontAttr( const OUString& rFontFileName, const ImplDevFontAttributes& );
+ ImplFontAttributes GetFontAttr( const OUString& rFontFileName ) const;
+ void AddFontAttr( const OUString& rFontFileName, const ImplFontAttributes& );
};
ImplFontAttrCache::ImplFontAttrCache( const OUString& rFileNameURL, const OUString& rBaseURL ) : aBaseURL( rBaseURL )
@@ -115,7 +115,7 @@ ImplFontAttrCache::ImplFontAttrCache( const OUString& rFileNameURL, const OUStri
// read the cache entries from the file
OUString aFontFileURL;
- ImplDevFontAttributes aDFA;
+ ImplFontAttributes aDFA;
for(;;)
{
aFontFileURL = read_uInt16_lenPrefixed_uInt8s_ToOUString(aCacheFile, RTL_TEXTENCODING_UTF8);
@@ -160,7 +160,7 @@ ImplFontAttrCache::~ImplFontAttrCache()
while ( aIter != aFontAttributes.end() )
{
const OUString rFontFileURL( (*aIter).first );
- const ImplDevFontAttributes& rDFA( (*aIter).second );
+ const ImplFontAttributes& rDFA( (*aIter).second );
write_uInt16_lenPrefixed_uInt8s_FromOUString(aCacheFile, rFontFileURL, RTL_TEXTENCODING_UTF8);
write_uInt16_lenPrefixed_uInt8s_FromOUString(aCacheFile, rDFA.GetFamilyName(), RTL_TEXTENCODING_UTF8);
@@ -189,9 +189,9 @@ OUString ImplFontAttrCache::OptimizeURL( const OUString& rURL ) const
return aOptimizedFontFileURL;
}
-ImplDevFontAttributes ImplFontAttrCache::GetFontAttr( const OUString& rFontFileName ) const
+ImplFontAttributes ImplFontAttrCache::GetFontAttr( const OUString& rFontFileName ) const
{
- ImplDevFontAttributes aDFA;
+ ImplFontAttributes aDFA;
FontAttrMap::const_iterator it = aFontAttributes.find( OptimizeURL( rFontFileName ) );
if( it != aFontAttributes.end() )
{
@@ -200,7 +200,7 @@ ImplDevFontAttributes ImplFontAttrCache::GetFontAttr( const OUString& rFontFileN
return aDFA;
}
-void ImplFontAttrCache::AddFontAttr( const OUString& rFontFileName, const ImplDevFontAttributes& rDFA )
+void ImplFontAttrCache::AddFontAttr( const OUString& rFontFileName, const ImplFontAttributes& rDFA )
{
SAL_WARN_IF(rFontFileName.isEmpty() || rDFA.GetFamilyName().isEmpty(),
"vcl.gdi", "ImplFontNameCache::AddFontName - invalid data!");
@@ -769,10 +769,10 @@ inline BYTE ImplPitchToWin( FontPitch ePitch )
return DEFAULT_PITCH;
}
-static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rEnumFont,
+static ImplFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rEnumFont,
const NEWTEXTMETRICW& rMetric, DWORD nFontType )
{
- ImplDevFontAttributes aDFA;
+ ImplFontAttributes aDFA;
const LOGFONTW rLogFont = rEnumFont.elfLogFont;
@@ -993,7 +993,7 @@ const void * GrFontData::getTable(unsigned int name, size_t *len) const
}
#endif
-ImplWinFontData::ImplWinFontData( const ImplDevFontAttributes& rDFS,
+ImplWinFontData::ImplWinFontData( const ImplFontAttributes& rDFS,
int nHeight, BYTE eWinCharSet, BYTE nPitchAndFamily )
: PhysicalFontFace( rDFS, 0 ),
mnId( 0 ),
@@ -1694,7 +1694,7 @@ void ImplReleaseTempFonts( SalData& rSalData )
}
static bool ImplGetFontAttrFromFile( const OUString& rFontFileURL,
- ImplDevFontAttributes& rDFA )
+ ImplFontAttributes& rDFA )
{
OUString aUSytemPath;
OSL_VERIFY( !osl::FileBase::getSystemPathFromFileURL( rFontFileURL, aUSytemPath ) );
@@ -1792,7 +1792,7 @@ bool WinSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
{
SAL_INFO( "vcl.gdi", "WinSalGraphics::AddTempDevFont(): " << OUStringToOString( rFontFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
- ImplDevFontAttributes aDFA;
+ ImplFontAttributes aDFA;
aDFA.SetFamilyName(rFontName);
aDFA.SetQuality( 1000 );
aDFA.SetBuiltInFontFlag( true );
@@ -1829,7 +1829,7 @@ bool WinSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
aDFA.SetEmbeddableFlag( false );
/*
- // TODO: improve ImplDevFontAttributes using the "font resource file"
+ // TODO: improve ImplFontAttributes using the "font resource file"
aDFS.maName = // using "FONTRES:" from file
if( rFontName != aDFS.maName )
aDFS.maMapName = aFontName;