Commit b85f3a18 authored by Alexey.Musinov's avatar Alexey.Musinov Committed by Alexander Trofimov

[ios] правки для сборки под ios

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@61979 954022d7-b5bf-4e40-9824-e11837661b57
parent 8d7814ee
...@@ -3727,6 +3727,7 @@ ...@@ -3727,6 +3727,7 @@
BUILD_CONFIG_FULL_VERSION, BUILD_CONFIG_FULL_VERSION,
DONT_WRITE_EMBEDDED_FONTS, DONT_WRITE_EMBEDDED_FONTS,
CXIMAGE_DONT_DECLARE_TCHAR, CXIMAGE_DONT_DECLARE_TCHAR,
_IOS,
); );
GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_SYMBOLS_PRIVATE_EXTERN = NO;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
...@@ -3764,6 +3765,7 @@ ...@@ -3764,6 +3765,7 @@
BUILD_CONFIG_FULL_VERSION, BUILD_CONFIG_FULL_VERSION,
DONT_WRITE_EMBEDDED_FONTS, DONT_WRITE_EMBEDDED_FONTS,
CXIMAGE_DONT_DECLARE_TCHAR, CXIMAGE_DONT_DECLARE_TCHAR,
_IOS,
); );
GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_SYMBOLS_PRIVATE_EXTERN = NO;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
......
...@@ -7,12 +7,10 @@ ...@@ -7,12 +7,10 @@
#if defined(_WIN32) || defined (_WIN64) #if defined(_WIN32) || defined (_WIN64)
#include <tchar.h> #include <tchar.h>
#elif __linux__ #elif __linux__ || MAC
#include <libgen.h> #include <libgen.h>
#elif MAC
#endif #endif
namespace NSSystemPath namespace NSSystemPath
{ {
static std::wstring GetDirectoryName(const std::wstring& strFileName) static std::wstring GetDirectoryName(const std::wstring& strFileName)
...@@ -24,14 +22,13 @@ namespace NSSystemPath ...@@ -24,14 +22,13 @@ namespace NSSystemPath
_tsplitpath( strFileName.c_str(), tDrive, tFolder, NULL, NULL ); _tsplitpath( strFileName.c_str(), tDrive, tFolder, NULL, NULL );
sRes.append(tDrive); sRes.append(tDrive);
sRes.append(tFolder); sRes.append(tFolder);
#elif __linux__ #elif __linux__ || MAC
BYTE* pUtf8 = NULL; BYTE* pUtf8 = NULL;
LONG lLen = 0; LONG lLen = 0;
NSFile::CUtf8Converter::GetUtf8StringFromUnicode(strFileName.c_str(), strFileName.length(), pUtf8, lLen, false); NSFile::CUtf8Converter::GetUtf8StringFromUnicode(strFileName.c_str(), strFileName.length(), pUtf8, lLen, false);
char* pDirName = dirname((char*)pUtf8); char* pDirName = dirname((char*)pUtf8);
sRes = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pDirName, strlen(pDirName)); sRes = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pDirName, strlen(pDirName));
delete [] pUtf8; delete [] pUtf8;
#elif MAC
#endif #endif
return sRes; return sRes;
} }
...@@ -45,14 +42,13 @@ namespace NSSystemPath ...@@ -45,14 +42,13 @@ namespace NSSystemPath
sRes.append(tFilename); sRes.append(tFilename);
sRes.append(tExt); sRes.append(tExt);
return sRes; return sRes;
#elif __linux__ #elif __linux__ || MAC
BYTE* pUtf8 = NULL; BYTE* pUtf8 = NULL;
LONG lLen = 0; LONG lLen = 0;
NSFile::CUtf8Converter::GetUtf8StringFromUnicode(strFileName.c_str(), strFileName.length(), pUtf8, lLen, false); NSFile::CUtf8Converter::GetUtf8StringFromUnicode(strFileName.c_str(), strFileName.length(), pUtf8, lLen, false);
char* pBaseName = basename((char*)pUtf8); char* pBaseName = basename((char*)pUtf8);
sRes = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pBaseName, strlen(pBaseName)); sRes = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pBaseName, strlen(pBaseName));
delete [] pUtf8; delete [] pUtf8;
#elif MAC
#endif #endif
return sRes; return sRes;
} }
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#undef BOOL #undef BOOL
#endif #endif
#ifdef _IOS
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
CArray<std::wstring> CApplicationFonts::GetSetupFontFiles_ios() CArray<std::wstring> CApplicationFonts::GetSetupFontFiles_ios()
...@@ -42,3 +44,5 @@ namespace NSDirectory ...@@ -42,3 +44,5 @@ namespace NSDirectory
} }
} }
} }
#endif
...@@ -76,7 +76,6 @@ ...@@ -76,7 +76,6 @@
17D9135E1AC58F000096D788 /* Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = 17D913421AC58F000096D788 /* Timer.h */; }; 17D9135E1AC58F000096D788 /* Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = 17D913421AC58F000096D788 /* Timer.h */; };
17D913711AC58F400096D788 /* ApplicationFonts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17D913601AC58F400096D788 /* ApplicationFonts.cpp */; }; 17D913711AC58F400096D788 /* ApplicationFonts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17D913601AC58F400096D788 /* ApplicationFonts.cpp */; };
17D913721AC58F400096D788 /* ApplicationFonts.h in Headers */ = {isa = PBXBuildFile; fileRef = 17D913611AC58F400096D788 /* ApplicationFonts.h */; }; 17D913721AC58F400096D788 /* ApplicationFonts.h in Headers */ = {isa = PBXBuildFile; fileRef = 17D913611AC58F400096D788 /* ApplicationFonts.h */; };
17D913731AC58F400096D788 /* ApplicationFonts_ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 17D913621AC58F400096D788 /* ApplicationFonts_ios.mm */; };
17D913741AC58F400096D788 /* ApplicationFontsWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17D913631AC58F400096D788 /* ApplicationFontsWorker.cpp */; }; 17D913741AC58F400096D788 /* ApplicationFontsWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17D913631AC58F400096D788 /* ApplicationFontsWorker.cpp */; };
17D913751AC58F400096D788 /* ApplicationFontsWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 17D913641AC58F400096D788 /* ApplicationFontsWorker.h */; }; 17D913751AC58F400096D788 /* ApplicationFontsWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 17D913641AC58F400096D788 /* ApplicationFontsWorker.h */; };
17D913771AC58F400096D788 /* FontFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17D913691AC58F400096D788 /* FontFile.cpp */; }; 17D913771AC58F400096D788 /* FontFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17D913691AC58F400096D788 /* FontFile.cpp */; };
...@@ -390,7 +389,6 @@ ...@@ -390,7 +389,6 @@
17D913591AC58F000096D788 /* Matrix.cpp in Sources */, 17D913591AC58F000096D788 /* Matrix.cpp in Sources */,
17D913711AC58F400096D788 /* ApplicationFonts.cpp in Sources */, 17D913711AC58F400096D788 /* ApplicationFonts.cpp in Sources */,
17D913771AC58F400096D788 /* FontFile.cpp in Sources */, 17D913771AC58F400096D788 /* FontFile.cpp in Sources */,
17D913731AC58F400096D788 /* ApplicationFonts_ios.mm in Sources */,
17D913741AC58F400096D788 /* ApplicationFontsWorker.cpp in Sources */, 17D913741AC58F400096D788 /* ApplicationFontsWorker.cpp in Sources */,
17D9134A1AC58F000096D788 /* Clip.cpp in Sources */, 17D9134A1AC58F000096D788 /* Clip.cpp in Sources */,
17D9137B1AC58F400096D788 /* FontPath.cpp in Sources */, 17D9137B1AC58F400096D788 /* FontPath.cpp in Sources */,
...@@ -422,6 +420,7 @@ ...@@ -422,6 +420,7 @@
unix, unix,
LINUX, LINUX,
_LINUX, _LINUX,
_IOS,
); );
GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_SYMBOLS_PRIVATE_EXTERN = NO;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
...@@ -448,6 +447,7 @@ ...@@ -448,6 +447,7 @@
unix, unix,
LINUX, LINUX,
_LINUX, _LINUX,
_IOS,
); );
GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_SYMBOLS_PRIVATE_EXTERN = NO;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
......
#include "CSVWriter.h" #include "CSVWriter.h"
#ifndef CP_UTF8
#define CP_UTF8 65001
#endif
namespace CSVWriter namespace CSVWriter
{ {
void WriteFile(NSFile::CFileBinary *pFile, WCHAR **pWriteBuffer, INT &nCurrentIndex, CString &sWriteString, UINT &nCodePage, BOOL bIsEnd) void WriteFile(NSFile::CFileBinary *pFile, WCHAR **pWriteBuffer, INT &nCurrentIndex, CString &sWriteString, UINT &nCodePage, BOOL bIsEnd)
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
#define CP_UTF16 1200 #define CP_UTF16 1200
#define CP_unicodeFFFE 1201 #define CP_unicodeFFFE 1201
#ifndef CP_UTF8
#define CP_UTF8 65001
#endif
#if defined(_WIN32) || defined (_WIN64) #if defined(_WIN32) || defined (_WIN64)
#include <atlbase.h> #include <atlbase.h>
#include <atlstr.h> #include <atlstr.h>
......
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