[Libreoffice-commits] core.git: vcl/win
Tor Lillqvist
tml at collabora.com
Wed Jul 29 04:46:36 PDT 2015
vcl/win/source/gdi/salgdi3.cxx | 36 +-----------------------------------
1 file changed, 1 insertion(+), 35 deletions(-)
New commits:
commit ef6fa18ffca3ad1b5cc55dc07b922803c4551b6f
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Jul 29 14:44:24 2015 +0300
AddFontResourceExW exists since Windows 2000
Change-Id: If81b165bf910661a2742ab4fd5123ad8b97ae7d2
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 76cbc22..2e3c44a 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,
More information about the Libreoffice-commits
mailing list