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
71527517
Commit
71527517
authored
Aug 10, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return same error code for doc, mscrypt as xls file
parent
9a33361a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
18 deletions
+118
-18
X2tConverter/src/ASCConverters.cpp
X2tConverter/src/ASCConverters.cpp
+101
-5
X2tConverter/src/ASCConverters.h
X2tConverter/src/ASCConverters.h
+4
-3
X2tConverter/src/cextracttools.h
X2tConverter/src/cextracttools.h
+5
-4
X2tConverter/src/main.cpp
X2tConverter/src/main.cpp
+8
-6
No files found.
X2tConverter/src/ASCConverters.cpp
View file @
71527517
...
@@ -902,8 +902,20 @@ namespace NExtractTools
...
@@ -902,8 +902,20 @@ namespace NExtractTools
{
{
COfficeDocFile
docFile
;
COfficeDocFile
docFile
;
docFile
.
m_sTempFolder
=
sTemp
;
docFile
.
m_sTempFolder
=
sTemp
;
long
hRes
=
docFile
.
LoadFromFile
(
sFrom
,
sTo
,
params
.
m_sPassword
?
*
params
.
m_sPassword
:
L""
,
NULL
);
return
S_OK
==
docFile
.
LoadFromFile
(
sFrom
,
sTo
,
params
.
m_sPassword
?
*
params
.
m_sPassword
:
L""
,
NULL
)
?
0
:
AVS_FILEUTILS_ERROR_CONVERT
;
if
(
AVS_ERROR_DRM
==
hRes
)
{
if
(
!
params
.
getDontSaveAdditional
())
{
copyOrigin
(
sFrom
,
*
params
.
m_sFileTo
);
}
return
AVS_FILEUTILS_ERROR_CONVERT_DRM
;
}
else
if
(
AVS_ERROR_PASSWORD
==
hRes
)
{
return
AVS_FILEUTILS_ERROR_CONVERT_PASSWORD
;
}
return
0
==
hRes
?
0
:
AVS_FILEUTILS_ERROR_CONVERT
;
}
}
// doc -> doct
// doc -> doct
...
@@ -1305,7 +1317,40 @@ namespace NExtractTools
...
@@ -1305,7 +1317,40 @@ namespace NExtractTools
}
}
return
AVS_FILEUTILS_ERROR_CONVERT
;
return
AVS_FILEUTILS_ERROR_CONVERT
;
}
}
int
fromMscrypt
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
InputParams
&
params
)
{
std
::
wstring
sResultDecryptFile
=
sTemp
+
FILE_SEPARATOR_STR
+
L"uncrypt_file.oox"
;
int
nRes
=
mscrypt2oox
(
sFrom
,
sResultDecryptFile
,
sTemp
,
sFontPath
,
params
);
if
(
SUCCEEDED_X2T
(
nRes
))
{
COfficeFileFormatChecker
OfficeFileFormatChecker
;
if
(
OfficeFileFormatChecker
.
isOfficeFile
(
sResultDecryptFile
))
{
switch
(
OfficeFileFormatChecker
.
nFileType
)
{
case
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX
:
{
return
fromDocument
(
sResultDecryptFile
,
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX
,
sTemp
,
params
.
getXmlOptions
(),
params
);
}
break
;
case
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
:
{
return
fromSpreadsheet
(
sResultDecryptFile
,
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
,
sTemp
,
params
.
getXmlOptions
(),
params
);
}
break
;
case
AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX
:
case
AVS_OFFICESTUDIO_FILE_PRESENTATION_PPSX
:
{
return
fromPresentation
(
sResultDecryptFile
,
AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX
,
sTemp
,
params
.
getXmlOptions
(),
params
);
}
break
;
}
}
}
else
if
(
AVS_FILEUTILS_ERROR_CONVERT_DRM
==
nRes
&&
!
params
.
getDontSaveAdditional
())
{
copyOrigin
(
sFrom
,
sTo
);
}
return
nRes
;
}
//html
//html
int
html2doct_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
InputParams
&
params
)
int
html2doct_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
InputParams
&
params
)
{
{
...
@@ -1590,8 +1635,25 @@ namespace NExtractTools
...
@@ -1590,8 +1635,25 @@ namespace NExtractTools
nRes
=
AVS_FILEUTILS_ERROR_CONVERT
;
nRes
=
AVS_FILEUTILS_ERROR_CONVERT
;
return
nRes
;
return
nRes
;
}
}
int
fromDocument
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sT
o
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
)
int
fromDocument
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sT
emp
,
const
std
::
wstring
&
sXmlOptions
,
const
InputParams
&
params
)
{
{
std
::
wstring
sTo
=
*
params
.
m_sFileTo
;
int
nFormatTo
=
AVS_OFFICESTUDIO_FILE_UNKNOWN
;
if
(
NULL
!=
params
.
m_nFormatTo
)
nFormatTo
=
*
params
.
m_nFormatTo
;
std
::
wstring
sFontPath
;
if
(
NULL
!=
params
.
m_sFontDir
)
sFontPath
=
*
params
.
m_sFontDir
;
std
::
wstring
sThemeDir
;
if
(
NULL
!=
params
.
m_sThemeDir
)
sThemeDir
=
*
params
.
m_sThemeDir
;
bool
bFromChanges
=
false
;
if
(
NULL
!=
params
.
m_bFromChanges
)
bFromChanges
=
*
params
.
m_bFromChanges
;
bool
bPaid
=
true
;
if
(
NULL
!=
params
.
m_bPaid
)
bPaid
=
*
params
.
m_bPaid
;
int
nRes
=
0
;
int
nRes
=
0
;
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_HTML
==
nFormatFrom
||
AVS_OFFICESTUDIO_FILE_DOCUMENT_MHT
==
nFormatFrom
||
AVS_OFFICESTUDIO_FILE_DOCUMENT_EPUB
==
nFormatFrom
)
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_HTML
==
nFormatFrom
||
AVS_OFFICESTUDIO_FILE_DOCUMENT_MHT
==
nFormatFrom
||
AVS_OFFICESTUDIO_FILE_DOCUMENT_EPUB
==
nFormatFrom
)
{
{
...
@@ -1732,8 +1794,25 @@ namespace NExtractTools
...
@@ -1732,8 +1794,25 @@ namespace NExtractTools
nRes
=
AVS_FILEUTILS_ERROR_CONVERT
;
nRes
=
AVS_FILEUTILS_ERROR_CONVERT
;
return
nRes
;
return
nRes
;
}
}
int
fromSpreadsheet
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sT
o
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
)
int
fromSpreadsheet
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sT
emp
,
const
std
::
wstring
&
sXmlOptions
,
const
InputParams
&
params
)
{
{
std
::
wstring
sTo
=
*
params
.
m_sFileTo
;
int
nFormatTo
=
AVS_OFFICESTUDIO_FILE_UNKNOWN
;
if
(
NULL
!=
params
.
m_nFormatTo
)
nFormatTo
=
*
params
.
m_nFormatTo
;
std
::
wstring
sFontPath
;
if
(
NULL
!=
params
.
m_sFontDir
)
sFontPath
=
*
params
.
m_sFontDir
;
std
::
wstring
sThemeDir
;
if
(
NULL
!=
params
.
m_sThemeDir
)
sThemeDir
=
*
params
.
m_sThemeDir
;
bool
bFromChanges
=
false
;
if
(
NULL
!=
params
.
m_bFromChanges
)
bFromChanges
=
*
params
.
m_bFromChanges
;
bool
bPaid
=
true
;
if
(
NULL
!=
params
.
m_bPaid
)
bPaid
=
*
params
.
m_bPaid
;
int
nRes
=
0
;
int
nRes
=
0
;
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV
==
nFormatFrom
)
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV
==
nFormatFrom
)
{
{
...
@@ -1838,8 +1917,25 @@ namespace NExtractTools
...
@@ -1838,8 +1917,25 @@ namespace NExtractTools
nRes
=
AVS_FILEUTILS_ERROR_CONVERT
;
nRes
=
AVS_FILEUTILS_ERROR_CONVERT
;
return
nRes
;
return
nRes
;
}
}
int
fromPresentation
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sT
o
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
)
int
fromPresentation
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sT
emp
,
const
std
::
wstring
&
sXmlOptions
,
const
InputParams
&
params
)
{
{
std
::
wstring
sTo
=
*
params
.
m_sFileTo
;
int
nFormatTo
=
AVS_OFFICESTUDIO_FILE_UNKNOWN
;
if
(
NULL
!=
params
.
m_nFormatTo
)
nFormatTo
=
*
params
.
m_nFormatTo
;
std
::
wstring
sFontPath
;
if
(
NULL
!=
params
.
m_sFontDir
)
sFontPath
=
*
params
.
m_sFontDir
;
std
::
wstring
sThemeDir
;
if
(
NULL
!=
params
.
m_sThemeDir
)
sThemeDir
=
*
params
.
m_sThemeDir
;
bool
bFromChanges
=
false
;
if
(
NULL
!=
params
.
m_bFromChanges
)
bFromChanges
=
*
params
.
m_bFromChanges
;
bool
bPaid
=
true
;
if
(
NULL
!=
params
.
m_bPaid
)
bPaid
=
*
params
.
m_bPaid
;
int
nRes
=
0
;
int
nRes
=
0
;
std
::
wstring
sPptxDir
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"pptx_unpacked"
);
std
::
wstring
sPptxDir
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"pptx_unpacked"
);
FileSystem
::
Directory
::
CreateDirectory
(
sPptxDir
);
FileSystem
::
Directory
::
CreateDirectory
(
sPptxDir
);
...
...
X2tConverter/src/ASCConverters.h
View file @
71527517
...
@@ -115,6 +115,7 @@ namespace NExtractTools
...
@@ -115,6 +115,7 @@ namespace NExtractTools
int
xlsx2ods
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
);
int
xlsx2ods
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
);
int
xlsx_dir2ods
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
);
int
xlsx_dir2ods
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
);
int
fromMscrypt
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
InputParams
&
params
);
int
mscrypt2oox
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
InputParams
&
params
);
int
mscrypt2oox
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
InputParams
&
params
);
int
mscrypt2oot
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
InputParams
&
params
);
int
mscrypt2oot
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
InputParams
&
params
);
int
mscrypt2oot_bin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
InputParams
&
params
);
int
mscrypt2oot_bin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
InputParams
&
params
);
...
@@ -127,15 +128,15 @@ namespace NExtractTools
...
@@ -127,15 +128,15 @@ namespace NExtractTools
int
fromDocxDir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromDocxDir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromDoctBin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromDoctBin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromDocument
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromDocument
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sXmlOptions
,
const
InputParams
&
params
);
int
fromXlsxDir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromXlsxDir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromXlstBin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromXlstBin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromSpreadsheet
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromSpreadsheet
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sXmlOptions
,
const
InputParams
&
params
);
int
fromPptxDir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromPptxDir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromPpttBin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromPpttBin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromPresentation
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromPresentation
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sXmlOptions
,
const
InputParams
&
params
);
int
fromT
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromT
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromCrossPlatform
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
int
fromCrossPlatform
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
,
const
std
::
wstring
&
sThemeDir
,
bool
bFromChanges
,
bool
bPaid
,
const
InputParams
&
params
);
...
...
X2tConverter/src/cextracttools.h
View file @
71527517
...
@@ -132,7 +132,8 @@ namespace NExtractTools
...
@@ -132,7 +132,8 @@ namespace NExtractTools
TCD_XML2DOCX
,
TCD_XML2DOCX
,
TCD_DOCX2XML
,
TCD_DOCX2XML
,
//
//
TCD_MSCRYPT2
,
TCD_MSCRYPT2DOCT
,
TCD_MSCRYPT2DOCT
,
TCD_MSCRYPT2XLST
,
TCD_MSCRYPT2XLST
,
TCD_MSCRYPT2PPTT
,
TCD_MSCRYPT2PPTT
,
...
@@ -466,6 +467,8 @@ namespace NExtractTools
...
@@ -466,6 +467,8 @@ namespace NExtractTools
eRes
=
TCD_CROSSPLATFORM2
;
eRes
=
TCD_CROSSPLATFORM2
;
else
if
(
AVS_OFFICESTUDIO_FILE_CANVAS_PDF
==
nFormatFrom
)
else
if
(
AVS_OFFICESTUDIO_FILE_CANVAS_PDF
==
nFormatFrom
)
eRes
=
TCD_CANVAS_PDF2
;
eRes
=
TCD_CANVAS_PDF2
;
else
if
(
AVS_OFFICESTUDIO_FILE_OTHER_MS_OFFCRYPTO
==
nFormatFrom
)
eRes
=
TCD_MSCRYPT2
;
else
if
(
AVS_OFFICESTUDIO_FILE_OTHER_ZIP
==
nFormatFrom
&&
AVS_OFFICESTUDIO_FILE_UNKNOWN
==
nFormatTo
)
else
if
(
AVS_OFFICESTUDIO_FILE_OTHER_ZIP
==
nFormatFrom
&&
AVS_OFFICESTUDIO_FILE_UNKNOWN
==
nFormatTo
)
eRes
=
TCD_UNZIPDIR
;
eRes
=
TCD_UNZIPDIR
;
else
if
(
AVS_OFFICESTUDIO_FILE_UNKNOWN
==
nFormatFrom
&&
AVS_OFFICESTUDIO_FILE_OTHER_ZIP
==
nFormatTo
)
else
if
(
AVS_OFFICESTUDIO_FILE_UNKNOWN
==
nFormatFrom
&&
AVS_OFFICESTUDIO_FILE_OTHER_ZIP
==
nFormatTo
)
...
@@ -483,9 +486,7 @@ namespace NExtractTools
...
@@ -483,9 +486,7 @@ namespace NExtractTools
{
{
TConversionDirection
eRes
=
TCD_AUTO
;
TConversionDirection
eRes
=
TCD_AUTO
;
int
nFormatFrom
=
*
m_nFormatFrom
;
int
nFormatFrom
=
*
m_nFormatFrom
;
if
(
AVS_OFFICESTUDIO_FILE_OTHER_MS_OFFCRYPTO
==
nFormatFrom
)
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_TXT
==
nFormatFrom
&&
NULL
==
m_nCsvTxtEncoding
)
eRes
=
TCD_ERROR
;
else
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_TXT
==
nFormatFrom
&&
NULL
==
m_nCsvTxtEncoding
)
{
{
int
nCodePage
=
getEncodingByContent
();
int
nCodePage
=
getEncodingByContent
();
if
(
nCodePage
<
0
)
if
(
nCodePage
<
0
)
...
...
X2tConverter/src/main.cpp
View file @
71527517
...
@@ -180,9 +180,7 @@ int main(int argc, char *argv[])
...
@@ -180,9 +180,7 @@ int main(int argc, char *argv[])
if
(
TCD_ERROR
==
conversion
)
if
(
TCD_ERROR
==
conversion
)
{
{
if
(
AVS_OFFICESTUDIO_FILE_OTHER_MS_OFFCRYPTO
==
nFormatFrom
)
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_TXT
==
nFormatFrom
||
AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV
==
nFormatFrom
)
return
getReturnErrorCode
(
AVS_FILEUTILS_ERROR_CONVERT_MS_OFFCRYPTO
);
else
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_TXT
==
nFormatFrom
||
AVS_OFFICESTUDIO_FILE_SPREADSHEET_CSV
==
nFormatFrom
)
return
getReturnErrorCode
(
AVS_FILEUTILS_ERROR_CONVERT_NEED_PARAMS
);
return
getReturnErrorCode
(
AVS_FILEUTILS_ERROR_CONVERT_NEED_PARAMS
);
else
{
else
{
// print out conversion direction error
// print out conversion direction error
...
@@ -415,15 +413,15 @@ int main(int argc, char *argv[])
...
@@ -415,15 +413,15 @@ int main(int argc, char *argv[])
}
break
;
}
break
;
case
TCD_DOCUMENT2
:
case
TCD_DOCUMENT2
:
{
{
result
=
fromDocument
(
sFileFrom
,
nFormatFrom
,
s
FileTo
,
nFormatTo
,
sTempDir
,
sFontPath
,
sXmlOptions
,
sThemeDir
,
bFromChanges
,
bPaid
,
oInputParams
);
result
=
fromDocument
(
sFileFrom
,
nFormatFrom
,
s
TempDir
,
sXmlOptions
,
oInputParams
);
}
break
;
}
break
;
case
TCD_SPREADSHEET2
:
case
TCD_SPREADSHEET2
:
{
{
result
=
fromSpreadsheet
(
sFileFrom
,
nFormatFrom
,
s
FileTo
,
nFormatTo
,
sTempDir
,
sFontPath
,
sXmlOptions
,
sThemeDir
,
bFromChanges
,
bPaid
,
oInputParams
);
result
=
fromSpreadsheet
(
sFileFrom
,
nFormatFrom
,
s
TempDir
,
sXmlOptions
,
oInputParams
);
}
break
;
}
break
;
case
TCD_PRESENTATION2
:
case
TCD_PRESENTATION2
:
{
{
result
=
fromPresentation
(
sFileFrom
,
nFormatFrom
,
s
FileTo
,
nFormatTo
,
sTempDir
,
sFontPath
,
sXmlOptions
,
sThemeDir
,
bFromChanges
,
bPaid
,
oInputParams
);
result
=
fromPresentation
(
sFileFrom
,
nFormatFrom
,
s
TempDir
,
sXmlOptions
,
oInputParams
);
}
break
;
}
break
;
case
TCD_T2
:
case
TCD_T2
:
{
{
...
@@ -449,6 +447,10 @@ int main(int argc, char *argv[])
...
@@ -449,6 +447,10 @@ int main(int argc, char *argv[])
{
{
result
=
fromCanvasPdf
(
sFileFrom
,
nFormatFrom
,
sFileTo
,
nFormatTo
,
sTempDir
,
sFontPath
,
sXmlOptions
,
sThemeDir
,
bFromChanges
,
bPaid
);
result
=
fromCanvasPdf
(
sFileFrom
,
nFormatFrom
,
sFileTo
,
nFormatTo
,
sTempDir
,
sFontPath
,
sXmlOptions
,
sThemeDir
,
bFromChanges
,
bPaid
);
}
break
;
}
break
;
case
TCD_MSCRYPT2
:
{
result
=
fromMscrypt
(
sFileFrom
,
sFileTo
,
sTempDir
,
sFontPath
,
oInputParams
);
}
break
;
case
TCD_MSCRYPT2DOCT
:
case
TCD_MSCRYPT2DOCT
:
case
TCD_MSCRYPT2XLST
:
case
TCD_MSCRYPT2XLST
:
case
TCD_MSCRYPT2PPTT
:
case
TCD_MSCRYPT2PPTT
:
...
...
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