mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Merge remote-tracking branch 'origin/hotfix/v7.4.1' into develop
This commit is contained in:
@ -1414,6 +1414,12 @@ namespace NSFile
|
||||
close(dst);
|
||||
return (-1 != read_size_marker) ? true : false;
|
||||
#else
|
||||
|
||||
#ifdef _WIN32
|
||||
if (0 != ::CopyFileW(strSrc.c_str(), strDst.c_str(), 1))
|
||||
return true;
|
||||
#endif
|
||||
|
||||
std::ifstream src;
|
||||
std::ofstream dst;
|
||||
|
||||
|
||||
@ -1649,7 +1649,7 @@ static long GetNextNameValue(HKEY key, const std::wstring& sSubkey, std::wstring
|
||||
if (hkey)
|
||||
RegCloseKey(hkey);
|
||||
hkey = NULL;
|
||||
return ERROR_SUCCESS;
|
||||
return ERROR_SUCCESS + 1;
|
||||
}
|
||||
|
||||
// if subkey is specified then open key (first time)
|
||||
@ -1749,6 +1749,10 @@ std::vector<std::wstring> CApplicationFonts::GetSetupFontFiles()
|
||||
}
|
||||
}
|
||||
|
||||
sName = L"";
|
||||
sData = L"";
|
||||
GetNextNameValue(0, L"", sName, sData);
|
||||
|
||||
if (true)
|
||||
{
|
||||
std::vector<std::wstring> oArray2 = NSDirectory::GetFiles(L"C:\\Windows\\Fonts", true);
|
||||
|
||||
@ -2158,7 +2158,8 @@ HRESULT CFb2File::FromHtml(const std::wstring& sHtmlFile, const std::wstring& sD
|
||||
{
|
||||
oWriter.WriteStringUTF8(oRes.GetData());
|
||||
oWriter.CloseFile();
|
||||
return S_OK;
|
||||
}
|
||||
return S_OK;
|
||||
return S_FALSE;
|
||||
|
||||
}
|
||||
|
||||
@ -93,7 +93,6 @@ bool RoundTripExtractor::extract()
|
||||
return false;
|
||||
|
||||
NSFile::CFileBinary::Remove(tempZipPath);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -348,6 +348,7 @@ namespace PPTX
|
||||
pReader->Skip(6); // len + start attributes + type
|
||||
|
||||
std::wstring strImagePath = pReader->GetString2(true);
|
||||
bool bIsTheme = false;
|
||||
|
||||
if (0 != strImagePath.find(_T("http:")) &&
|
||||
0 != strImagePath.find(_T("https:")) &&
|
||||
@ -359,6 +360,7 @@ namespace PPTX
|
||||
if (0 == strImagePath.find(_T("theme")))
|
||||
{
|
||||
pathNormalizer = pReader->m_strFolderExternalThemes;
|
||||
bIsTheme = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -371,7 +373,7 @@ namespace PPTX
|
||||
pathNormalizer = strImagePath;
|
||||
strImagePath = pathNormalizer.GetPath();
|
||||
|
||||
if (std::wstring::npos != strImagePath.find(strPath))
|
||||
if (!bIsTheme && std::wstring::npos != strImagePath.find(strPath))
|
||||
{
|
||||
CImageFileFormatChecker checker;
|
||||
if (false == checker.isImageFile(strImagePath))
|
||||
|
||||
@ -316,6 +316,7 @@ namespace PPTX
|
||||
std::wstring strTempFile ;
|
||||
|
||||
bool bIsUrl = false;
|
||||
bool bIsTheme = false;
|
||||
|
||||
if (!blip.is_init())
|
||||
blip = new PPTX::Logic::Blip();
|
||||
@ -403,6 +404,7 @@ namespace PPTX
|
||||
if (0 == strImagePath.find(_T("theme")))
|
||||
{
|
||||
strImagePath = pReader->m_strFolderExternalThemes + FILE_SEPARATOR_STR + strImagePath;
|
||||
bIsTheme = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -414,7 +416,7 @@ namespace PPTX
|
||||
}
|
||||
// -------------------
|
||||
//в случае url не надо нормализовать путь
|
||||
if(!bIsUrl)
|
||||
if(!bIsUrl && !bIsTheme)
|
||||
{
|
||||
OOX::CPath pathUrl = strImagePath;
|
||||
strImagePath = pathUrl.GetPath();
|
||||
|
||||
@ -1095,7 +1095,7 @@ bool ECMACryptFile::DecryptOfficeFile(const std::wstring &file_name_inp, const s
|
||||
{
|
||||
NSFile::CFileBinary f;
|
||||
f.CreateFileW(file_name_out);
|
||||
f.WriteFile(data_out, lengthData);
|
||||
f.WriteFile(data_out, (std::min)((int)lengthData, readData));
|
||||
f.CloseFile();
|
||||
|
||||
delete []data_out;
|
||||
|
||||
Reference in New Issue
Block a user