Commit 5280a785 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

отключен SvmFile, так как он win only, переписывается

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62682 954022d7-b5bf-4e40-9824-e11837661b57
parent 5cce624d
......@@ -51,7 +51,8 @@ public:
}
static CString CreateTempDir()
{
return FileSystem::Directory::CreateDirectoryWithUniqueName(FileSystem::Directory::GetTempPath());
CString tmpDirectory = FileSystem::Directory::GetTempPath();
return FileSystem::Directory::CreateDirectoryWithUniqueName(tmpDirectory);
}
static CString PrepareToXML( const CString & sInput)
{
......
......@@ -276,4 +276,16 @@ namespace FileSystem
return pcTemplate;
}
#endif
bool Directory::IsExist(const std::wstring& strFileName)
{
FILE* pFile = _wfopen(strFileName.c_str(), L"rb");
if (NULL != pFile)
{
fclose(pFile);
return true;
}
else
return false;
}
}
......@@ -47,24 +47,6 @@ namespace FileSystem {
static void DeleteDirectory(std::wstring& path, bool deleteRoot = true);
#endif
static bool IsExist(const std::wstring& strFileName)
{
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
FILE* pFile = _wfopen(strFileName.c_str(), L"rb");
#else
BYTE* pUtf8 = NULL;
LONG lLen = 0;
CUtf8Converter::GetUtf8StringFromUnicode(strFileName.c_str(), strFileName.length(), pUtf8, lLen, false);
FILE* pFile = fopen((char*)pUtf8, "rb");
delete [] pUtf8;
#endif
if (NULL != pFile)
{
fclose(pFile);
return true;
}
else
return false;
}
static bool IsExist(const std::wstring& strFileName);
};
}
......@@ -127,7 +127,7 @@ namespace FileSystem {
strFolder += strFolderName;
return CreateDirectory(strFolder);
}
CString Directory::CreateDirectoryWithUniqueName (CString strFolderPathRoot)
CString Directory::CreateDirectoryWithUniqueName (CString & strFolderPathRoot)
{
std::string pcTemplate = stringWstingToUtf8String (strFolderPathRoot) + "/ascXXXXXX";
char *pcRes = mkdtemp(const_cast <char *> (pcTemplate.c_str()));
......@@ -255,4 +255,21 @@ namespace FileSystem {
return false;
}
bool Directory::IsExist(const std::wstring& strFileName)
{
BYTE* pUtf8 = NULL;
LONG lLen = 0;
NSFile::CUtf8Converter::GetUtf8StringFromUnicode(strFileName.c_str(), strFileName.length(), pUtf8, lLen, false);
FILE* pFile = fopen((char*)pUtf8, "rb");
delete [] pUtf8;
if (NULL != pFile)
{
fclose(pFile);
return true;
}
else
return false;
}
}
......@@ -4,7 +4,7 @@
#include "Jp2/J2kFile.h"
#include "JBig2/source/JBig2File.h"
#include "SvmFile/source/SvmFile.h"
#include "SvmFile/Source/SvmFile.h"
bool CBgraFrame::OpenFile(const std::wstring& strFileName, unsigned int nFileType)
{
......@@ -13,11 +13,11 @@ bool CBgraFrame::OpenFile(const std::wstring& strFileName, unsigned int nFileTyp
Jpeg2000::CJ2kFile oJ2;
return oJ2.Open(this, strFileName, std::wstring(L""));
}
if (22/*CXIMAGE_FORMAT_SVM*/ == nFileType)
{
SvmFile::CSvmFile oSvm;
return oSvm.Open(this, strFileName);
}
// if (22/*CXIMAGE_FORMAT_SVM*/ == nFileType)
// {
// SvmFile::CSvmFile oSvm;
// return oSvm.Open(this, strFileName);
// }
else
{
NSFile::CFileBinary oFile;
......
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