[Libreoffice-commits] core.git: vcl/win
Khaled Hosny
khaledhosny at eglug.org
Thu Feb 9 03:17:00 UTC 2017
vcl/win/gdi/salfont.cxx | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 026345eeb2aa9fca02bc055f28ebd34abd7ad680
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Thu Feb 9 00:18:10 2017 +0200
Don’t look for bundled fonts relative to executable path on Windows
Just do like other platforms, so that the fonts are avialble to unit tests
since cppunittester is not run from instdir.
Change-Id: Ib209473f5b6b07a154fecb430dca45b32e8fa556
Reviewed-on: https://gerrit.libreoffice.org/34048
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny at eglug.org>
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 0461f31..b6b4915 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1302,14 +1302,11 @@ void WinSalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection )
// since we are only interested in fonts that could not be
// registered before because of missing administration rights
// only the font path of the user installation is needed
- OUString aPath;
- osl_getExecutableFile( &aPath.pData );
- aPath = aPath.copy( 0, aPath.lastIndexOf('/') );
- OUString aFontDirUrl = aPath.copy( 0, aPath.lastIndexOf('/') );
- aFontDirUrl += "/" LIBO_SHARE_FOLDER "/fonts/truetype";
+ OUString aPath("$BRAND_BASE_DIR");
+ rtl_bootstrap_expandMacros(&aPath.pData);
// collect fonts in font path that could not be registered
- osl::Directory aFontDir( aFontDirUrl );
+ osl::Directory aFontDir(aPath + "/" LIBO_SHARE_FOLDER "/fonts/truetype");
osl::FileBase::RC rcOSL = aFontDir.open();
if( rcOSL == osl::FileBase::E_None )
{
More information about the Libreoffice-commits
mailing list