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
9be4d6ca
Commit
9be4d6ca
authored
Jan 16, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x2t linux build
parent
9e9da204
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
181 additions
and
218 deletions
+181
-218
ASCOfficeDocxFile2/DocWrapper/FontProcessor.cpp
ASCOfficeDocxFile2/DocWrapper/FontProcessor.cpp
+1
-0
ASCOfficePPTXFile/ASCOfficePPTXFile.h
ASCOfficePPTXFile/ASCOfficePPTXFile.h
+2
-2
ASCOfficePPTXFile/ASCOfficePPTXFileRealization.cpp
ASCOfficePPTXFile/ASCOfficePPTXFileRealization.cpp
+9
-31
ASCOfficePPTXFile/Editor/PPTXWriter.h
ASCOfficePPTXFile/Editor/PPTXWriter.h
+4
-4
ASCOfficeXlsFile2/source/XlsXlsxConverter/ConvertShapes/FormulaShape.h
...ile2/source/XlsXlsxConverter/ConvertShapes/FormulaShape.h
+1
-1
Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro
Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro
+2
-2
Common/DocxFormat/DocxFormatLib/docxformatlib_logic.cpp
Common/DocxFormat/DocxFormatLib/docxformatlib_logic.cpp
+1
-0
X2tConverter/build/Qt/X2tConverter.pri
X2tConverter/build/Qt/X2tConverter.pri
+12
-7
X2tConverter/src/ASCConverters.cpp
X2tConverter/src/ASCConverters.cpp
+148
-170
X2tConverter/src/cextracttools.h
X2tConverter/src/cextracttools.h
+1
-1
No files found.
ASCOfficeDocxFile2/DocWrapper/FontProcessor.cpp
View file @
9be4d6ca
...
...
@@ -29,6 +29,7 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "FontProcessor.h"
#include "../../Common/DocxFormat/Source/XlsxFormat/Xlsx.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Docx.h"
...
...
ASCOfficePPTXFile/ASCOfficePPTXFile.h
View file @
9be4d6ca
...
...
@@ -52,8 +52,8 @@ class CPPTXFile : public PPTX::IPPTXEvent
{
private:
PPTX
::
Folder
*
m_pFolder
;
std
::
wstring
m_strTempDir
;
std
::
wstring
m_strDirectory
;
std
::
wstring
m_strTempDir
;
std
::
wstring
m_strDirectory
;
// writer to ppty
std
::
wstring
m_strFontDirectory
;
...
...
ASCOfficePPTXFile/ASCOfficePPTXFileRealization.cpp
View file @
9be4d6ca
...
...
@@ -58,11 +58,10 @@ CPPTXFile::CPPTXFile(extract_to_directory fCallbackExtract, compress_from_direct
GetLongPathName
(
m_strTempDir
.
c_str
(),
buffer
,
4096
);
m_strTempDir
=
std
::
wstring
(
buffer
)
+
std
::
wstring
(
L"_PPTX
\\
"
);
#else
m_strTempDir
=
NSDirectory
::
GetTempPath
();
m_strTempDir
=
NSDirectory
::
GetLongPathName_
(
m_strTempDir
)
+
std
::
wstring
(
"_PPTX/"
);
m_strTempDir
=
NSDirectory
::
GetTempPath
()
+
L"_PPTX/"
;
#endif
//
m_strFontDirectory
=
_T
(
""
);
m_strFontDirectory
=
_T
(
""
);
m_strMediaDirectory
=
_T
(
""
);
m_bIsUseSystemFonts
=
false
;
m_strEmbeddedFontsDirectory
=
_T
(
""
);
...
...
@@ -70,18 +69,14 @@ CPPTXFile::CPPTXFile(extract_to_directory fCallbackExtract, compress_from_direct
m_strFolderThemes
=
_T
(
""
);
//m_fCallbackResource = fCallbackResource;
m_fCallbackExtract
=
fCallbackExtract
;
m_fCallbackExtract
=
fCallbackExtract
;
m_fCallbackCompress
=
fCallbackCompress
;
m_fCallbackProgress
=
fCallbackProgress
;
m_pCallbackArg
=
pCallbackArg
;
m_pCallbackArg
=
pCallbackArg
;
m_pFolder
=
NULL
;
//m_pOfficeUtils = NULL;
//if (S_OK != CoCreateInstance(__uuidof(OfficeUtils::COfficeUtils), NULL, CLSCTX_INPROC_SERVER, __uuidof(OfficeUtils::IOfficeUtils),(void**)&m_pOfficeUtils))
// return S_FALSE;
}
CPPTXFile
::~
CPPTXFile
()
{
RELEASEOBJECT
(
m_pFolder
);
...
...
@@ -93,33 +88,16 @@ HRESULT CPPTXFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath
{
bool
res
=
NSDirectory
::
CreateDirectory
(
localTempDir
);
if
(
res
==
false
)
return
S_FALSE
;
//int res = SHCreateDirectoryExW(NULL, localTempDir.GetString(), NULL);
//if((res != ERROR_SUCCESS) && (res != ERROR_ALREADY_EXISTS) && (res != ERROR_FILE_EXISTS))
// return S_FALSE;
put_TempDirectory
(
sDstPath
);
}
else
{
bool
res
=
NSDirectory
::
CreateDirectory
(
m_strTempDir
);
if
(
res
==
false
)
return
S_FALSE
;
// int res = SHCreateDirectoryExW(NULL, m_strTempDir, NULL);
// if((res != ERROR_SUCCESS) && (res != ERROR_ALREADY_EXISTS) && (res != ERROR_FILE_EXISTS))
// return S_FALSE;
}
localTempDir
=
m_strTempDir
;
/*
SHFILEOPSTRUCTW shfos;
ZeroMemory(&shfos, sizeof(shfos));
shfos.wFunc = FO_DELETE;
std::wstring _local = localTempDir + std::wstring(L"*.*");
_local.AppendChar(0);
_local.AppendChar(0);
shfos.pFrom = _local.GetString();
shfos.fFlags = FOF_SILENT + FOF_NOCONFIRMATION;
if(SHFileOperationW(&shfos) != 0)
return S_FALSE;
*/
std
::
wstring
srcFileName
=
sSrcFileName
;
if
(
m_pCallbackArg
)
{
...
...
@@ -192,8 +170,8 @@ HRESULT CPPTXFile::put_TempDirectory(std::wstring newVal)
#else
if
(
NSDirectory
::
PathIsDirectory
(
TempStr
))
{
if
(
TempStr
.
Right
(
1
)
!=
_T
(
"/"
)
)
TempStr
+=
_T
(
"/"
)
;
if
(
TempStr
[
TempStr
.
length
()
-
1
]
!=
L'/'
)
TempStr
+=
L"/"
;
m_strTempDir
=
TempStr
;
}
#endif
...
...
@@ -336,7 +314,7 @@ HRESULT CPPTXFile::OpenDirectoryToPPTY(std::wstring bsInput, std::wstring bsOutp
NSDirectory
::
CreateDirectory
(
m_strMediaDirectory
);
if
(
_T
(
""
)
!=
m_strEmbeddedFontsDirectory
)
if
(
!
m_strEmbeddedFontsDirectory
.
empty
()
)
{
NSDirectory
::
CreateDirectory
(
m_strEmbeddedFontsDirectory
);
...
...
ASCOfficePPTXFile/Editor/PPTXWriter.h
View file @
9be4d6ca
...
...
@@ -127,7 +127,7 @@ namespace NSBinPptxRW
if
(
cur_pos
==
len
||
cur_pos
==
start_pos
)
return
;
std
::
string
__str_ppty
((
LPSTR
)(
pBuffer
+
start_pos
),
cur_pos
-
start_pos
);
std
::
string
__str_ppty
((
char
*
)(
pBuffer
+
start_pos
),
cur_pos
-
start_pos
);
start_pos
=
cur_pos
+
1
;
cur_pos
=
start_pos
;
...
...
@@ -137,7 +137,7 @@ namespace NSBinPptxRW
if
(
cur_pos
==
len
||
cur_pos
==
start_pos
)
return
;
std
::
string
__str_version
((
LPSTR
)(
pBuffer
+
start_pos
),
cur_pos
-
start_pos
);
std
::
string
__str_version
((
char
*
)(
pBuffer
+
start_pos
),
cur_pos
-
start_pos
);
start_pos
=
cur_pos
+
1
;
cur_pos
=
start_pos
;
...
...
@@ -147,7 +147,7 @@ namespace NSBinPptxRW
if
(
cur_pos
==
len
||
cur_pos
==
start_pos
)
return
;
std
::
string
__str_decode_len_ansi
((
LPSTR
)(
pBuffer
+
start_pos
),
cur_pos
-
start_pos
);
std
::
string
__str_decode_len_ansi
((
char
*
)(
pBuffer
+
start_pos
),
cur_pos
-
start_pos
);
std
::
wstring
__str_decode_len
=
std
::
wstring
(
__str_decode_len_ansi
.
begin
(),
__str_decode_len_ansi
.
end
());
start_pos
=
cur_pos
+
1
;
...
...
@@ -158,7 +158,7 @@ namespace NSBinPptxRW
BYTE
*
pDstBuffer
=
new
BYTE
[
dstLenTemp
];
int
dstLen
=
dstLenTemp
;
Base64
::
Base64Decode
((
LPCSTR
)
pBuffer
,
len
,
pDstBuffer
,
&
dstLen
);
Base64
::
Base64Decode
((
const
char
*
)
pBuffer
,
len
,
pDstBuffer
,
&
dstLen
);
m_oReader
.
m_strContentTypes
=
_T
(
""
);
m_oReader
.
Init
(
pDstBuffer
,
0
,
dstLen
);
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/ConvertShapes/FormulaShape.h
View file @
9be4d6ca
...
...
@@ -69,7 +69,7 @@ namespace NSCustomShapesConvert
};
#define VML_GUIDE_COUNT 18
const
LPSTR
VML_GUIDE_TYPE
[
VML_GUIDE_COUNT
]
=
{
static
const
char
*
VML_GUIDE_TYPE
[
VML_GUIDE_COUNT
]
=
{
"sum"
,
"prod"
,
"mid"
,
...
...
Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro
View file @
9be4d6ca
...
...
@@ -69,7 +69,8 @@ SOURCES += \
..
/
Source
/
Common
/
Utils
.
cpp
\
..
/
Source
/
Common
/
Wrap
.
cpp
\
..
/
Source
/
Common
/
ZIndex
.
cpp
\
..
/
Source
/
Common
/
SimpleTypes_Word
.
cpp
..
/
Source
/
Common
/
SimpleTypes_Word
.
cpp
\
..
/
Source
/
SystemUtility
/
SystemUtility
.
cpp
}
...
...
@@ -78,7 +79,6 @@ SOURCES += docxformatlib.cpp \
..
/
Source
/
Utility
/
DateTime
.
cpp
\
..
/
Source
/
Utility
/
TxtFile
.
cpp
\
..
/
Source
/
Base
/
unicode_util
.
cpp
\
..
/
Source
/
SystemUtility
/
SystemUtility
.
cpp
\
..
/../
3
dParty
/
pole
/
pole
.
cpp
HEADERS
+=
docxformatlib
.
h
\
...
...
Common/DocxFormat/DocxFormatLib/docxformatlib_logic.cpp
View file @
9be4d6ca
...
...
@@ -68,3 +68,4 @@
#include "../Source/Common/Wrap.cpp"
#include "../Source/Common/ZIndex.cpp"
#include "../Source/Common/SimpleTypes_Word.cpp"
#include "../Source/SystemUtility/SystemUtility.cpp"
X2tConverter/build/Qt/X2tConverter.pri
View file @
9be4d6ca
...
...
@@ -70,6 +70,9 @@ core_mac {
INCLUDEPATH += ../../../OfficeUtils/src/zlib-1.2.3
}
INCLUDEPATH += ../../../DesktopEditor/xml/build/qt
INCLUDEPATH += ../../../DesktopEditor/xml/libxml2/include
INCLUDEPATH += ../../../DesktopEditor/freetype-2.5.2/include
INCLUDEPATH += ../../../DesktopEditor/agg-2.4/include
...
...
@@ -91,13 +94,15 @@ DEPENDPATH += $$PWD/../../../ASCOfficeDocxFile2
##############################################################################################################
SOURCES += ../../src/cextracttools.cpp \
../../../Common/OfficeFileFormatChecker2.cpp \
../../src/ASCConverters.cpp
HEADERS += ../../src/cextracttools.h \
../../../Common/OfficeFileFormatChecker.h \
../../src/ASCConverters.h \
../../../DesktopEditor/graphics/MetafileToGraphicsRenderer.h
SOURCES += ../../src/cextracttools.cpp \
../../../Common/OfficeFileFormatChecker2.cpp \
../../src/ASCConverters.cpp \
../../../DesktopEditor/xml/src/xmllight.cpp \
../../../DesktopEditor/xml/src/xmldom.cpp
HEADERS += ../../src/cextracttools.h \
../../../Common/OfficeFileFormatChecker.h \
../../src/ASCConverters.h \
../../../DesktopEditor/graphics/MetafileToGraphicsRenderer.h
#Xls file
...
...
X2tConverter/src/ASCConverters.cpp
View file @
9be4d6ca
This diff is collapsed.
Click to expand it.
X2tConverter/src/cextracttools.h
View file @
9be4d6ca
...
...
@@ -750,7 +750,7 @@ namespace NExtractTools
#if defined(_WIN32) || defined (_WIN64)
options_stream
.
open
(
xmlFileName
.
c_str
());
#else
options_stream
.
open
(
stringWstingToUtf8String
(
xmlFileName
));
options_stream
.
open
(
NSFile
::
CUtf8Converter
::
GetUtf8StringFromUnicode
(
xmlFileName
));
#endif
if
(
options_stream
.
is_open
())
{
...
...
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