mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
linux build, changes some file separators
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59360 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
6de7677b87
commit
4ad5b8dfcb
@ -108,6 +108,9 @@ bool CxImage::EncodeSafeCheck(CxFile *hFile)
|
||||
*/
|
||||
bool CxImage::Save(const TCHAR * filename, uint32_t imagetype)
|
||||
{
|
||||
#ifdef CXIMAGE_DONT_USE_LOAD_SAVE
|
||||
return false;
|
||||
#else
|
||||
FILE* hFile; //file handle to write the image
|
||||
|
||||
#ifdef WIN32
|
||||
@ -124,6 +127,7 @@ bool CxImage::Save(const TCHAR * filename, uint32_t imagetype)
|
||||
bool bOK = Encode(hFile,imagetype);
|
||||
fclose(hFile);
|
||||
return bOK;
|
||||
#endif //#ifdef CXIMAGE_DONT_USE_LOAD_SAVE
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
@ -570,6 +574,9 @@ bool CxImage::Encode2RGBA(CxFile *hFile, bool bFlipY)
|
||||
bool CxImage::Load(const TCHAR * filename, uint32_t imagetype)
|
||||
//bool CxImage::Load(const char * filename, uint32_t imagetype)
|
||||
{
|
||||
#ifdef CXIMAGE_DONT_USE_LOAD_SAVE
|
||||
return false;
|
||||
#else
|
||||
/*FILE* hFile; //file handle to read the image
|
||||
if ((hFile=fopen(filename,"rb"))==NULL) return false;
|
||||
bool bOK = Decode(hFile,imagetype);
|
||||
@ -619,6 +626,7 @@ bool CxImage::Load(const TCHAR * filename, uint32_t imagetype)
|
||||
if (!bOK && imagetype > 0) strcpy(info.szLastError,szError); //restore the first error
|
||||
|
||||
return bOK;
|
||||
#endif // #ifdef CXIMAGE_DONT_USE_LOAD_SAVE
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef WIN32
|
||||
|
||||
@ -31,6 +31,9 @@ public:
|
||||
//////////////////////////////////////////////////////////
|
||||
bool Open(const TCHAR * filename, const TCHAR * mode)
|
||||
{
|
||||
#ifdef CXIMAGE_DONT_USE_LOAD_SAVE
|
||||
return false;
|
||||
#else
|
||||
#ifdef WIN32
|
||||
if (m_fp) return false; // Can't re-open without closing first
|
||||
|
||||
@ -41,6 +44,7 @@ public:
|
||||
#endif
|
||||
|
||||
return true;
|
||||
#endif // #ifdef CXIMAGE_DONT_USE_LOAD_SAVE
|
||||
}
|
||||
//////////////////////////////////////////////////////////
|
||||
virtual bool Close()
|
||||
|
||||
Reference in New Issue
Block a user