Merge remote-tracking branch 'origin/hotfix/v7.4.1' into develop

This commit is contained in:
Elena.Subbotina
2023-07-24 09:31:56 +03:00
7 changed files with 20 additions and 6 deletions

View File

@ -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))

View File

@ -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();