summaryrefslogtreecommitdiff
path: root/vcl/win/gdi
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2017-02-09 00:18:10 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2017-02-09 03:16:35 +0000
commit026345eeb2aa9fca02bc055f28ebd34abd7ad680 (patch)
tree0fbd459bff8a6c4afd976423fc22f77be26bcd49 /vcl/win/gdi
parent0e0fef10002b46965edad02b3f460a502d9f6595 (diff)
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@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/win/gdi')
-rw-r--r--vcl/win/gdi/salfont.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 0461f31d6e03..b6b49150a685 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 )
{