Commit d00a98c6 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

загрузка из реестра виндоус

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59470 954022d7-b5bf-4e40-9824-e11837661b57
parent f592b694
...@@ -1279,14 +1279,23 @@ void CApplicationFonts::InitFromReg() ...@@ -1279,14 +1279,23 @@ void CApplicationFonts::InitFromReg()
std::wstring sName; std::wstring sName;
std::wstring sData; std::wstring sData;
std::map<std::wstring, bool> map_files;
CArray<std::wstring> oArray; CArray<std::wstring> oArray;
while (GetNextNameValue( HKEY_LOCAL_MACHINE, wsPath, sName, sData ) == ERROR_SUCCESS) while (GetNextNameValue( HKEY_LOCAL_MACHINE, wsPath, sName, sData ) == ERROR_SUCCESS)
{ {
if (wsPath.length())
wsPath = L"";
NSFile::CFileBinary oFile; NSFile::CFileBinary oFile;
if (oFile.OpenFile(sData)) if (oFile.OpenFile(sData))
{ {
oFile.CloseFile(); oFile.CloseFile();
if (map_files.find(sData) == map_files.end())
{
oArray.Add(sData); oArray.Add(sData);
map_files.insert(map_files.begin(), std::pair<std::wstring,bool>(sData,true));
}
continue; continue;
} }
...@@ -1296,7 +1305,12 @@ void CApplicationFonts::InitFromReg() ...@@ -1296,7 +1305,12 @@ void CApplicationFonts::InitFromReg()
if (oFile.OpenFile(sFileInDir)) if (oFile.OpenFile(sFileInDir))
{ {
oFile.CloseFile(); oFile.CloseFile();
if (map_files.find(sFileInDir) == map_files.end())
{
oArray.Add(sFileInDir); oArray.Add(sFileInDir);
map_files.insert(map_files.begin(), std::pair<std::wstring,bool>(sFileInDir,true));
}
continue; continue;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment