builder error (save to pdf & open file by url)

This commit is contained in:
Oleg Korshul
2017-12-01 14:23:21 +03:00
parent f72d6dfe0e
commit fdb7716abc
4 changed files with 9 additions and 4 deletions

View File

@ -97,7 +97,12 @@ public :
m_bComplete = (CURLE_OK == res);
if (m_bComplete)
m_sFilePath = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)sOut.c_str(), sOut.length());
{
if (m_sFilePath.empty())
m_sFilePath = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)sOut.c_str(), sOut.length());
else
NSFile::CFileBinary::Move(UTF8_TO_U(sOut), m_sFilePath);
}
//int nRes = execl("/usr/bin/wget", stringWstingToUtf8String (m_sFileUrl).c_str(), "-P", stringWstingToUtf8String (m_sFilePath).c_str(), (char *)NULL);
//m_bComplete = nRes >= 0;

View File

@ -70,7 +70,7 @@ public :
virtual int DownloadFile()
{
CoInitialize ( NULL );
if ( S_OK != _DownloadFile ( m_sFileUrl ) )
if ( /*S_OK != _DownloadFile ( m_sFileUrl )*/TRUE )
{
HRESULT hrResultAll = DownloadFileAll(m_sFileUrl, m_sFilePath);

View File

@ -939,7 +939,7 @@ namespace NSDoctRenderer
MoveFileOpen(path, sFileCopy);
COfficeFileFormatChecker oChecker;
if (!oChecker.isOfficeFile(path))
if (!oChecker.isOfficeFile(sFileCopy))
return false;
if (oChecker.nFileType & AVS_OFFICESTUDIO_FILE_DOCUMENT)

View File

@ -1194,5 +1194,5 @@ bool Doct_renderer_SaveFile_ForBuilder(int nFormat, const std::wstring& strDstFi
oParams.m_strDstFilePath = strDstFile;
return NSDoctRenderer::CDoctRenderer_Private::Doct_renderer_SaveFile(&oParams,
pNative, isolate, global_js, args, try_catch, strError, true);
pNative, isolate, global_js, args, try_catch, strError, false);
}