diff options
Diffstat (limited to 'vcl/generic/fontmanager')
-rw-r--r-- | vcl/generic/fontmanager/fontmanager.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index f2ccc291d0c1..b57195505893 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -1049,9 +1049,10 @@ int PrintFontManager::getDirectoryAtom( const OString& rDirectory, bool bCreate std::vector<fontID> PrintFontManager::addFontFile( const ::rtl::OString& rFileName ) { rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - INetURLObject aPath( OStringToOUString( rFileName, aEncoding ), INET_PROT_FILE, INetURLObject::ENCODE_ALL ); - OString aName( OUStringToOString( aPath.GetName(), aEncoding ) ); - OString aDir( OUStringToOString( aPath.GetPath(), aEncoding ) ); + INetURLObject aPath( OStringToOUString( rFileName, aEncoding ), INetURLObject::FSYS_DETECT ); + OString aName( OUStringToOString( aPath.GetName( INetURLObject::DECODE_WITH_CHARSET, aEncoding ), aEncoding ) ); + OString aDir( OUStringToOString( + INetURLObject::decode( aPath.GetPath(), '%', INetURLObject::DECODE_WITH_CHARSET, aEncoding ), aEncoding ) ); int nDirID = getDirectoryAtom( aDir, true ); std::vector<fontID> aFontIds = findFontFileIDs( nDirID, aName ); |