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
24d58fe1
Commit
24d58fe1
authored
Sep 19, 2017
by
Alexey.Musinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for build
parent
48d4b72d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
162 additions
and
109 deletions
+162
-109
X2tConverter/src/ASCConverters_ios.cpp
X2tConverter/src/ASCConverters_ios.cpp
+162
-109
No files found.
X2tConverter/src/ASCConverters_ios.cpp
View file @
24d58fe1
...
...
@@ -487,10 +487,22 @@ namespace NExtractTools
}
else
return
AVS_FILEUTILS_ERROR_CONVERT
;
}
return
xlsx_dir2xlst_bin
(
sTempUnpackedXLSX
,
sTo
,
params
,
true
);
return
xlsx_dir2xlst_bin
(
sTempUnpackedXLSX
,
sTo
,
params
,
true
,
sFrom
);
}
int
xlsx_dir2xlst_bin
(
const
std
::
wstring
&
sXlsxDir
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
,
bool
bXmlOptions
)
int
xlsx_dir2xlst_bin
(
const
std
::
wstring
&
sXlsxDir
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
,
bool
bXmlOptions
,
const
std
::
wstring
&
sXlsxFile
)
{
//save Editor.xlsx for pivot
std
::
wstring
sToDir
=
NSDirectory
::
GetFolderPath
(
sTo
);
std
::
wstring
sEditorXLSX
=
sToDir
+
FILE_SEPARATOR_STR
+
_T
(
"Editor.xlsx"
);
if
(
sXlsxFile
.
empty
())
{
dir2zip
(
sXlsxDir
,
sEditorXLSX
);
}
else
{
NSFile
::
CFileBinary
::
Copy
(
sXlsxFile
,
sEditorXLSX
);
}
// Save to file (from temp dir)
BinXlsxRW
::
CXlsxSerializer
m_oCXlsxSerializer
;
...
...
@@ -2597,15 +2609,27 @@ namespace NExtractTools
return
nRes
;
}
int
fromXlsxDir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
InputParams
&
params
)
int
fromXlsxDir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
InputParams
&
params
,
const
std
::
wstring
&
sXlsxFile
)
{
int
nRes
=
0
;
if
(
0
!=
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET
&
nFormatTo
)
&&
AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV
!=
nFormatTo
)
{
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
==
nFormatTo
)
{
if
(
params
.
hasPassword
())
{
std
::
wstring
sToMscrypt
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"tomscrypt.xlsx"
);
nRes
=
dir2zip
(
sFrom
,
sToMscrypt
);
if
(
SUCCEEDED_X2T
(
nRes
))
{
nRes
=
oox2mscrypt
(
sToMscrypt
,
sTo
,
sTemp
,
params
);
}
}
else
{
nRes
=
dir2zip
(
sFrom
,
sTo
);
}
}
//else if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLS == nFormatTo)
else
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS
==
nFormatTo
)
{
...
...
@@ -2616,11 +2640,11 @@ namespace NExtractTools
}
else
if
(
AVS_OFFICESTUDIO_FILE_OTHER_JSON
==
nFormatTo
)
{
nRes
=
xlsx_dir2xlst_bin
(
sFrom
,
sTo
,
params
,
true
);
nRes
=
xlsx_dir2xlst_bin
(
sFrom
,
sTo
,
params
,
true
,
sXlsxFile
);
}
else
if
(
AVS_OFFICESTUDIO_FILE_CANVAS_SPREADSHEET
==
nFormatTo
)
{
nRes
=
xlsx_dir2xlst_bin
(
sFrom
,
sTo
,
params
,
true
);
nRes
=
xlsx_dir2xlst_bin
(
sFrom
,
sTo
,
params
,
true
,
sXlsxFile
);
}
else
{
...
...
@@ -2628,9 +2652,9 @@ namespace NExtractTools
NSDirectory
::
CreateDirectory
(
sXlstDir
);
std
::
wstring
sTFile
=
sXlstDir
+
FILE_SEPARATOR_STR
+
_T
(
"Editor.bin"
);
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV
==
nFormatTo
)
nRes
=
xlsx_dir2xlst_bin
(
sFrom
,
sTFile
,
params
,
fals
e
);
nRes
=
xlsx_dir2xlst_bin
(
sFrom
,
sTFile
,
params
,
false
,
sXlsxFil
e
);
else
nRes
=
xlsx_dir2xlst_bin
(
sFrom
,
sTFile
,
params
,
tru
e
);
nRes
=
xlsx_dir2xlst_bin
(
sFrom
,
sTFile
,
params
,
true
,
sXlsxFil
e
);
if
(
SUCCEEDED_X2T
(
nRes
))
{
nRes
=
fromXlstBin
(
sTFile
,
sTo
,
nFormatTo
,
sTemp
,
sThemeDir
,
bFromChanges
,
bPaid
,
params
);
...
...
@@ -2663,12 +2687,13 @@ namespace NExtractTools
}
else
if
(
0
!=
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET
&
nFormatTo
))
{
std
::
wstring
sXlsxDir
=
sTemp
+
FILE_SEPARATOR_STR
+
L"xlsx_unpacked"
;
std
::
wstring
sXlsxDir
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"xlsx_unpacked"
)
;
NSDirectory
::
CreateDirectory
(
sXlsxDir
);
nRes
=
xlst_bin2xlsx_dir
(
sFrom
,
sTo
,
sXlsxDir
,
bFromChanges
,
sThemeDir
,
params
);
if
(
SUCCEEDED_X2T
(
nRes
))
{
nRes
=
fromXlsxDir
(
sXlsxDir
,
sTo
,
nFormatTo
,
sTemp
,
sThemeDir
,
bFromChanges
,
bPaid
,
params
);
std
::
wstring
sXlsxFile
;
nRes
=
fromXlsxDir
(
sXlsxDir
,
sTo
,
nFormatTo
,
sTemp
,
sThemeDir
,
bFromChanges
,
bPaid
,
params
,
sXlsxFile
);
}
}
else
...
...
@@ -2703,9 +2728,9 @@ namespace NExtractTools
}
else
{
std
::
wstring
sXlstDir
=
sTemp
+
FILE_SEPARATOR_STR
+
L"xlst_unpacked"
;
std
::
wstring
sTFile
=
sXlstDir
+
FILE_SEPARATOR_STR
+
L"Editor.bin"
;
std
::
wstring
sXlstDir
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"xlst_unpacked"
);
NSDirectory
::
CreateDirectory
(
sXlstDir
);
std
::
wstring
sTFile
=
sXlstDir
+
FILE_SEPARATOR_STR
+
_T
(
"Editor.bin"
);
nRes
=
csv2xlst_bin
(
sFrom
,
sTFile
,
params
);
if
(
SUCCEEDED_X2T
(
nRes
))
{
...
...
@@ -2716,11 +2741,39 @@ namespace NExtractTools
}
else
{
std
::
wstring
sXlsxDir
=
sTemp
+
FILE_SEPARATOR_STR
+
L"xlsx_unpacked"
;
std
::
wstring
sXlsxFile
;
std
::
wstring
sXlsxDir
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"xlsx_unpacked"
);
NSDirectory
::
CreateDirectory
(
sXlsxDir
);
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
==
nFormatFrom
)
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
==
nFormatFrom
)
{
nRes
=
zip2dir
(
sFrom
,
sXlsxDir
);
sXlsxFile
=
sFrom
;
}
else
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM
==
nFormatFrom
)
{
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
==
nFormatTo
||
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLTX
==
nFormatTo
)
{
nRes
=
xlsm2xlsx_dir
(
sFrom
,
sXlsxDir
,
params
);
}
else
{
nRes
=
zip2dir
(
sFrom
,
sXlsxDir
);
}
}
else
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLTX
==
nFormatFrom
)
{
nRes
=
xltx2xlsx_dir
(
sFrom
,
sXlsxDir
,
params
);
}
else
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLTM
==
nFormatFrom
)
{
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
==
nFormatTo
||
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLTX
==
nFormatTo
)
{
nRes
=
xltm2xlsx_dir
(
sFrom
,
sXlsxDir
,
params
);
}
else
{
nRes
=
xltm2xlsm_dir
(
sFrom
,
sXlsxDir
,
params
);
}
}
else
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLS
==
nFormatFrom
)
{
...
...
@@ -2734,7 +2787,7 @@ namespace NExtractTools
nRes
=
AVS_FILEUTILS_ERROR_CONVERT
;
if
(
SUCCEEDED_X2T
(
nRes
))
{
nRes
=
fromXlsxDir
(
sXlsxDir
,
sTo
,
nFormatTo
,
sTemp
,
sThemeDir
,
bFromChanges
,
bPaid
,
params
);
nRes
=
fromXlsxDir
(
sXlsxDir
,
sTo
,
nFormatTo
,
sTemp
,
sThemeDir
,
bFromChanges
,
bPaid
,
params
,
sXlsxFile
);
}
}
return
nRes
;
...
...
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