Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
358c1613
Commit
358c1613
authored
Jul 20, 2017
by
Alexey.Musinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #35395
parent
5aaf90eb
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
162 additions
and
1 deletion
+162
-1
ASCOfficeRtfFile/RtfFormatLib/Mac/RtfFormatLib.xcodeproj/project.pbxproj
...e/RtfFormatLib/Mac/RtfFormatLib.xcodeproj/project.pbxproj
+2
-0
Common/DocxFormat/Mac/DocxFormatLib.xcodeproj/project.pbxproj
...on/DocxFormat/Mac/DocxFormatLib.xcodeproj/project.pbxproj
+6
-0
DesktopEditor/common/File.cpp
DesktopEditor/common/File.cpp
+92
-0
DesktopEditor/common/File.h
DesktopEditor/common/File.h
+11
-0
DesktopEditor/ios_projects/PdfWriter/PdfWriter.xcodeproj/project.pbxproj
...os_projects/PdfWriter/PdfWriter.xcodeproj/project.pbxproj
+2
-0
DesktopEditor/xml/mac/libxml2.xcodeproj/project.pbxproj
DesktopEditor/xml/mac/libxml2.xcodeproj/project.pbxproj
+24
-0
HtmlFile/Mac/HtmlFile/HtmlFile.xcodeproj/project.pbxproj
HtmlFile/Mac/HtmlFile/HtmlFile.xcodeproj/project.pbxproj
+2
-0
OfficeUtils/OfficeUtils.xcodeproj/project.pbxproj
OfficeUtils/OfficeUtils.xcodeproj/project.pbxproj
+3
-1
OfficeUtils/src/ZipUtilsCP.cpp
OfficeUtils/src/ZipUtilsCP.cpp
+18
-0
UnicodeConverter/build/UnicodeConverter/UnicodeConverter.xcodeproj/project.pbxproj
...icodeConverter/UnicodeConverter.xcodeproj/project.pbxproj
+2
-0
No files found.
ASCOfficeRtfFile/RtfFormatLib/Mac/RtfFormatLib.xcodeproj/project.pbxproj
View file @
358c1613
...
...
@@ -562,6 +562,7 @@
_IOS
,
DONT_WRITE_EMBEDDED_FONTS
,
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML
,
_XCODE
,
);
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
...
...
@@ -595,6 +596,7 @@
_IOS
,
DONT_WRITE_EMBEDDED_FONTS
,
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML
,
_XCODE
,
);
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
...
...
Common/DocxFormat/Mac/DocxFormatLib.xcodeproj/project.pbxproj
View file @
358c1613
...
...
@@ -213,6 +213,7 @@
690FE07F1E9BBA15004B26D0
/* DrawingExt.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
690FE07B1E9BBA15004B26D0
/* DrawingExt.h */
;
};
690FE0821E9BBA23004B26D0
/* DiagramData.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
690FE0801E9BBA23004B26D0
/* DiagramData.h */
;
};
690FE0831E9BBA23004B26D0
/* DiagramDrawing.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
690FE0811E9BBA23004B26D0
/* DiagramDrawing.h */
;
};
691C3E131F20C3D500F1775E
/* File.cpp in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
691C3E121F20C3D500F1775E
/* File.cpp */
;
};
69F181EC1C7734A700B2952B
/* strings_hack_printf.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
69F181EA1C7734A700B2952B
/* strings_hack_printf.h */
;
};
/* End PBXBuildFile section */
...
...
@@ -431,6 +432,7 @@
690FE07B1E9BBA15004B26D0
/* DrawingExt.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
DrawingExt.h
;
sourceTree
=
"<group>"
;
};
690FE0801E9BBA23004B26D0
/* DiagramData.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
DiagramData.h
;
sourceTree
=
"<group>"
;
};
690FE0811E9BBA23004B26D0
/* DiagramDrawing.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
DiagramDrawing.h
;
sourceTree
=
"<group>"
;
};
691C3E121F20C3D500F1775E
/* File.cpp */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
sourcecode.cpp.objcpp.preprocessed
;
fileEncoding
=
4
;
path
=
File.cpp
;
sourceTree
=
"<group>"
;
};
69F181EA1C7734A700B2952B
/* strings_hack_printf.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
strings_hack_printf.h
;
path
=
../../Common/DocxFormat/Source/Base/strings_hack_printf.h
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
...
...
@@ -901,6 +903,7 @@
17E6B3BD1AC4298500F28F8B
/* Base64.h */
,
17E6B3BE1AC4298500F28F8B
/* Directory.h */
,
17E6B3BF1AC4298500F28F8B
/* File.h */
,
691C3E121F20C3D500F1775E
/* File.cpp */
,
17E6B3C01AC4298500F28F8B
/* Path.h */
,
17E6B3C11AC4298500F28F8B
/* Types.h */
,
69F181EA1C7734A700B2952B
/* strings_hack_printf.h */
,
...
...
@@ -1163,6 +1166,7 @@
17C1FBAE1ACC4250006B99B3
/* oMath.cpp in Sources */
,
17C1FBAF1ACC4250006B99B3
/* ChartSerialize.cpp in Sources */
,
17C1FBB11ACC4250006B99B3
/* Position.cpp in Sources */
,
691C3E131F20C3D500F1775E
/* File.cpp in Sources */
,
17C1FBB21ACC4250006B99B3
/* Vml.cpp in Sources */
,
17C1FBB31ACC4250006B99B3
/* unicode_util.cpp in Sources */
,
17C1FBB41ACC4250006B99B3
/* FldSimple.cpp in Sources */
,
...
...
@@ -1202,6 +1206,7 @@
unix
,
_IOS
,
DONT_WRITE_EMBEDDED_FONTS
,
_XCODE
,
);
GCC_SYMBOLS_PRIVATE_EXTERN
=
NO
;
HEADER_SEARCH_PATHS
=
(
...
...
@@ -1242,6 +1247,7 @@
unix
,
_IOS
,
DONT_WRITE_EMBEDDED_FONTS
,
_XCODE
,
);
GCC_SYMBOLS_PRIVATE_EXTERN
=
NO
;
HEADER_SEARCH_PATHS
=
(
...
...
DesktopEditor/common/File.cpp
0 → 100644
View file @
358c1613
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "File.h"
#ifdef _IOS
#import <Foundation/Foundation.h>
static
const
char
*
fileSystemRepresentation
(
const
std
::
wstring
&
sFileName
)
{
NSString
*
path
=
[[
NSString
alloc
]
initWithBytes
:
(
char
*
)
sFileName
.
data
()
length:
sFileName
.
size
()
*
sizeof
(
wchar_t
)
encoding:
CFStringConvertEncodingToNSStringEncoding
(
kCFStringEncodingUTF32LE
)];
return
(
const
char
*
)[
path
fileSystemRepresentation
];
}
namespace
NSFile
{
bool
CFileBinary
::
OpenFile
(
const
std
::
wstring
&
sFileName
,
bool
bRewrite
)
{
m_pFile
=
fopen
(
fileSystemRepresentation
(
sFileName
),
bRewrite
?
"rb+"
:
"rb"
);
if
(
NULL
==
m_pFile
)
return
false
;
fseek
(
m_pFile
,
0
,
SEEK_END
);
m_lFileSize
=
ftell
(
m_pFile
);
fseek
(
m_pFile
,
0
,
SEEK_SET
);
m_lFilePosition
=
0
;
if
(
0
<
sFileName
.
length
())
{
if
(((
wchar_t
)
'/'
)
==
sFileName
.
c_str
()[
sFileName
.
length
()
-
1
])
m_lFileSize
=
0x7FFFFFFF
;
}
unsigned
int
err
=
0x7FFFFFFF
;
unsigned
int
cur
=
(
unsigned
int
)
m_lFileSize
;
if
(
err
==
cur
)
{
CloseFile
();
return
false
;
}
return
true
;
}
bool
CFileBinary
::
CreateFileW
(
const
std
::
wstring
&
sFileName
)
{
m_pFile
=
fopen
(
fileSystemRepresentation
(
sFileName
),
"wb"
);
if
(
NULL
==
m_pFile
)
return
false
;
m_lFilePosition
=
0
;
return
true
;
}
}
#endif
DesktopEditor/common/File.h
View file @
358c1613
...
...
@@ -618,6 +618,14 @@ namespace NSFile
{
return
m_lFilePosition
;
}
#ifdef _IOS
bool
OpenFile
(
const
std
::
wstring
&
sFileName
,
bool
bRewrite
=
false
);
bool
CreateFileW
(
const
std
::
wstring
&
sFileName
);
#else
bool
OpenFile
(
const
std
::
wstring
&
sFileName
,
bool
bRewrite
=
false
)
{
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
...
...
@@ -675,6 +683,9 @@ namespace NSFile
m_lFilePosition
=
0
;
return
true
;
}
#endif
bool
CreateTempFile
()
{
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
...
...
DesktopEditor/ios_projects/PdfWriter/PdfWriter.xcodeproj/project.pbxproj
View file @
358c1613
...
...
@@ -437,6 +437,7 @@
_IOS
,
FILTER_FLATE_DECODE_ENABLED
,
_ARM_ALIGN_
,
_XCODE
,
);
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
...
...
@@ -476,6 +477,7 @@
_IOS
,
FILTER_FLATE_DECODE_ENABLED
,
_ARM_ALIGN_
,
_XCODE
,
);
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
...
...
DesktopEditor/xml/mac/libxml2.xcodeproj/project.pbxproj
View file @
358c1613
...
...
@@ -566,6 +566,18 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
DEVELOPMENT_TEAM
=
2WH24U26GJ
;
GCC_PREPROCESSOR_DEFINITIONS
=
(
UNICODE
,
_UNICODE
,
USE_LITE_READER
,
_USE_LIBXML2_READER_
,
_USE_XMLLITE_READER_
,
LINUX
,
MAC
,
_IOS
,
LIBXML_READER_ENABLED
,
_XCODE
,
);
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
,
...
...
@@ -582,6 +594,18 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
DEVELOPMENT_TEAM
=
2WH24U26GJ
;
GCC_PREPROCESSOR_DEFINITIONS
=
(
UNICODE
,
_UNICODE
,
USE_LITE_READER
,
_USE_LIBXML2_READER_
,
_USE_XMLLITE_READER_
,
LINUX
,
MAC
,
_IOS
,
LIBXML_READER_ENABLED
,
_XCODE
,
);
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
,
...
...
HtmlFile/Mac/HtmlFile/HtmlFile.xcodeproj/project.pbxproj
View file @
358c1613
...
...
@@ -241,6 +241,7 @@
_IOS
,
NOMINMAX
,
LINUX
,
_XCODE
,
);
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
...
...
@@ -271,6 +272,7 @@
_IOS
,
NOMINMAX
,
LINUX
,
_XCODE
,
);
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
...
...
OfficeUtils/OfficeUtils.xcodeproj/project.pbxproj
View file @
358c1613
...
...
@@ -36,7 +36,7 @@
69676CB81CA58BBD00D7A1D1
/* OfficeUtils.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
path
=
OfficeUtils.cpp
;
sourceTree
=
"<group>"
;
};
69676CB91CA58BBD00D7A1D1
/* OfficeUtils.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OfficeUtils.h
;
sourceTree
=
"<group>"
;
};
69676CBA1CA58BBD00D7A1D1
/* OfficeUtilsCommon.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OfficeUtilsCommon.h
;
sourceTree
=
"<group>"
;
};
69676CBB1CA58BBD00D7A1D1
/* ZipUtilsCP.cpp */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
path
=
ZipUtilsCP.cpp
;
sourceTree
=
"<group>"
;
};
69676CBB1CA58BBD00D7A1D1
/* ZipUtilsCP.cpp */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
sourcecode.cpp.objcpp.preprocessed
;
fileEncoding
=
4
;
path
=
ZipUtilsCP.cpp
;
sourceTree
=
"<group>"
;
};
69676CBC1CA58BBD00D7A1D1
/* ZipUtilsCP.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ZipUtilsCP.h
;
sourceTree
=
"<group>"
;
};
69676D291CA58BBD00D7A1D1
/* crypt.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
crypt.h
;
sourceTree
=
"<group>"
;
};
69676D2A1CA58BBD00D7A1D1
/* ioapi.c */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.c
;
path
=
ioapi.c
;
sourceTree
=
"<group>"
;
};
...
...
@@ -292,6 +292,7 @@
MAC
,
unix
,
_IOS
,
_XCODE
,
);
IPHONEOS_DEPLOYMENT_TARGET
=
8.2
;
OTHER_LDFLAGS
=
"-ObjC"
;
...
...
@@ -309,6 +310,7 @@
MAC
,
unix
,
_IOS
,
_XCODE
,
);
IPHONEOS_DEPLOYMENT_TARGET
=
8.2
;
OTHER_LDFLAGS
=
"-ObjC"
;
...
...
OfficeUtils/src/ZipUtilsCP.cpp
View file @
358c1613
...
...
@@ -36,6 +36,10 @@
#include "../../DesktopEditor/common/Directory.h"
#include "../../DesktopEditor/common/Path.h"
#if _IOS
#import <Foundation/Foundation.h>
#endif
#define WRITEBUFFERSIZE 8192
#define READBUFFERSIZE 8192
...
...
@@ -43,6 +47,13 @@ namespace ZLibZipUtils
{
static
zipFile
zipOpenHelp
(
const
wchar_t
*
filename
)
{
#ifdef _IOS
NSString
*
path
=
[[
NSString
alloc
]
initWithBytes
:
filename
length:
wcslen
(
filename
)
*
sizeof
(
*
filename
)
encoding:
NSUTF32LittleEndianStringEncoding
];
return
zipOpen
(
(
const
char
*
)[
path
fileSystemRepresentation
],
APPEND_STATUS_CREATE
);
#endif
#if defined(_WIN32) || defined (_WIN64)
zipFile
zf
=
zipOpen
(
filename
,
APPEND_STATUS_CREATE
);
#else
...
...
@@ -56,6 +67,13 @@ namespace ZLibZipUtils
}
static
unzFile
unzOpenHelp
(
const
wchar_t
*
filename
)
{
#ifdef _IOS
NSString
*
path
=
[[
NSString
alloc
]
initWithBytes
:
filename
length:
wcslen
(
filename
)
*
sizeof
(
*
filename
)
encoding:
NSUTF32LittleEndianStringEncoding
];
return
unzOpen
((
const
char
*
)[
path
fileSystemRepresentation
]);
#endif
#if defined(_WIN32) || defined (_WIN64)
unzFile
uf
=
unzOpen
(
filename
);
#else
...
...
UnicodeConverter/build/UnicodeConverter/UnicodeConverter.xcodeproj/project.pbxproj
View file @
358c1613
...
...
@@ -232,6 +232,7 @@
MAC
,
unix
,
_IOS
,
_XCODE
,
);
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
...
...
@@ -260,6 +261,7 @@
MAC
,
unix
,
_IOS
,
_XCODE
,
);
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment