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