Commit 2cb32147 authored by Ivan.Shulga's avatar Ivan.Shulga Committed by Alexander Trofimov

disabled file downloader by macros

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58834 954022d7-b5bf-4e40-9824-e11837661b57
parent 0a0a3ece
......@@ -337,6 +337,7 @@ namespace NSFontCutter
rgsab.lLbound = 0;
rgsab.cElements = nCount;
// be sure that WCHAR is 2 bytes long
SAFEARRAY* pArray = SafeArrayCreate(VT_UI2, 1, &rgsab);
USHORT* pBuffer = (USHORT*)(pArray->pvData);
......
......@@ -10,7 +10,10 @@ using namespace NSFontCutter;
#define AVSINLINE __forceinline
#endif
//#include "../../ASCPresentationEditor/PPTXWriter/FileDownloader.h"
#ifndef DISABLE_FILE_DOWNLOADER
#include "../../ASCPresentationEditor/PPTXWriter/FileDownloader.h"
#endif
#include "WMFToImageConverter.h"
#include "../../Common/MediaFormatDefine.h"
#include "../../DesktopEditor/raster/ImageFileFormatChecker.h"
......@@ -243,18 +246,23 @@ namespace NSShapeImageGen
if (bIsDownload)
{
CString strFile1 = strFile;
strFile1.Replace(_T("\\"), _T("/"));
strFile1.Replace(_T("http:/"), _T("http://"));
strFile1.Replace(_T("https:/"), _T("https://"));
strFile1.Replace(_T("ftp:/"), _T("ftp://"));
CImageInfo oInfo;
CAtlMap<CString, CImageInfo>::CPair* pPair = m_mapImagesFile.Lookup(strFile1);
if (pPair != NULL)
return pPair->m_value;
CString strDownload = _T("");
#ifndef DISABLE_FILE_DOWNLOADER
CFileDownloader oDownloader(strFile1, TRUE);
oDownloader.Start( 1 );
while ( oDownloader.IsRunned() )
......@@ -265,7 +273,11 @@ namespace NSShapeImageGen
if ( oDownloader.IsFileDownloaded() )
strDownload = oDownloader.GetFilePath();
#endif
return GenerateImageID_2(strDownload, strFile1, max(1.0, width), max(1.0, height));
}
CImageInfo info;
......
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