mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Merge remote-tracking branch 'origin/hotfix/v7.4.1' into develop
This commit is contained in:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user