diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-07-29 14:44:24 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-07-29 14:45:45 +0300 |
commit | ef6fa18ffca3ad1b5cc55dc07b922803c4551b6f (patch) | |
tree | 6e6e56306b6ac929a08afeb971b07857dfaf5ad8 /vcl | |
parent | 395d922f58c1aa604b4c40dc3055b71dfaf47cb8 (diff) |
AddFontResourceExW exists since Windows 2000
Change-Id: If81b165bf910661a2742ab4fd5123ad8b97ae7d2
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/source/gdi/salgdi3.cxx | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 76cbc222926e..2e3c44a1b911 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -1821,40 +1821,13 @@ struct TempFontItem TempFontItem* mpNextItem; }; -#ifdef FR_PRIVATE -static int WINAPI __AddFontResourceExW( LPCWSTR lpszfileName, DWORD fl, PVOID pdv ) -{ - typedef int (WINAPI *AddFontResourceExW_FUNC)(LPCWSTR, DWORD, PVOID ); - - static AddFontResourceExW_FUNC pFunc = NULL; - static HMODULE hmGDI = NULL; - - if ( !pFunc && !hmGDI ) - { - hmGDI = GetModuleHandleA( "GDI32" ); - if ( hmGDI ) - pFunc = reinterpret_cast<AddFontResourceExW_FUNC>( GetProcAddress( hmGDI, "AddFontResourceExW" ) ); - } - - if ( pFunc ) - return pFunc( lpszfileName, fl, pdv ); - else - { - SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); - return 0; - } -} -#endif - bool ImplAddTempFont( SalData& rSalData, const OUString& rFontFileURL ) { int nRet = 0; OUString aUSytemPath; OSL_VERIFY( !osl::FileBase::getSystemPathFromFileURL( rFontFileURL, aUSytemPath ) ); -#ifdef FR_PRIVATE - nRet = __AddFontResourceExW( reinterpret_cast<LPCWSTR>(aUSytemPath.getStr()), FR_PRIVATE, NULL ); -#endif + nRet = AddFontResourceExW( reinterpret_cast<LPCWSTR>(aUSytemPath.getStr()), FR_PRIVATE, NULL ); if ( !nRet ) { @@ -1911,13 +1884,6 @@ void ImplReleaseTempFonts( SalData& rSalData ) rSalData.mpTempFontItem = p->mpNextItem; delete p; } - -#ifndef FR_PRIVATE - // notify every other application - // unless the temp fonts were installed as private fonts - if( nCount > 0 ) - PostMessageW( HWND_BROADCAST, WM_FONTCHANGE, 0, NULL ); -#endif // FR_PRIVATE } static bool ImplGetFontAttrFromFile( const OUString& rFontFileURL, |