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
a9076beb
Commit
a9076beb
authored
Dec 07, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CONVERT_CORRUPTED
parent
5157908b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
X2tConverter/src/ASCConverters.cpp
X2tConverter/src/ASCConverters.cpp
+8
-1
X2tConverter/src/cextracttools.cpp
X2tConverter/src/cextracttools.cpp
+2
-3
X2tConverter/src/cextracttools.h
X2tConverter/src/cextracttools.h
+5
-1
No files found.
X2tConverter/src/ASCConverters.cpp
View file @
a9076beb
...
...
@@ -2738,8 +2738,15 @@ namespace NExtractTools
//clean up v8
NSDoctRenderer
::
CDocBuilder
::
Dispose
();
if
(
SUCCEEDED_X2T
(
result
)
&&
oInputParams
.
m_bOutputConvertCorrupted
)
{
return
AVS_FILEUTILS_ERROR_CONVERT_CORRUPTED
;
}
else
{
return
result
;
}
}
int
FromFile
(
const
std
::
wstring
&
file
)
{
...
...
X2tConverter/src/cextracttools.cpp
View file @
a9076beb
...
...
@@ -298,7 +298,6 @@ namespace NExtractTools
}
int
apply_changes
(
const
std
::
wstring
&
sBinFrom
,
const
std
::
wstring
&
sToResult
,
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
eType
,
const
std
::
wstring
&
sThemeDir
,
std
::
wstring
&
sBinTo
,
const
InputParams
&
params
)
{
int
nRes
=
0
;
std
::
wstring
sBinDir
=
FileSystem
::
Directory
::
GetFolderPath
(
sBinFrom
);
std
::
wstring
sChangesDir
=
sBinDir
+
FILE_SEPARATOR_STR
+
_T
(
"changes"
);
if
(
NSDirectory
::
Exists
(
sChangesDir
))
...
...
@@ -317,7 +316,7 @@ namespace NExtractTools
if
(
!
sResult
.
empty
()
&&
-
1
!=
sResult
.
find
(
_T
(
"error"
)))
{
std
::
wcerr
<<
_T
(
"DoctRenderer:"
)
<<
sResult
<<
std
::
endl
;
nRes
=
AVS_FILEUTILS_ERROR_CONVERT_CORRUPTED
;
params
.
m_bOutputConvertCorrupted
=
true
;
int
nErrorIndex
=
-
1
;
int
nErrorIndexStart
=
sResult
.
find
(
_T
(
"index"
));
if
(
-
1
!=
nErrorIndexStart
)
...
...
@@ -364,6 +363,6 @@ namespace NExtractTools
}
else
sBinTo
=
sBinFrom
;
return
nRes
;
return
0
;
}
}
X2tConverter/src/cextracttools.h
View file @
a9076beb
...
...
@@ -45,7 +45,7 @@
#include <iostream>
#include <fstream>
#define SUCCEEDED_X2T(nRes) (0 == (nRes)
|| AVS_FILEUTILS_ERROR_CONVERT_CORRUPTED == (nRes)
)
#define SUCCEEDED_X2T(nRes) (0 == (nRes))
namespace
NExtractTools
{
...
...
@@ -337,6 +337,8 @@ namespace NExtractTools
int
*
m_nDoctParams
;
std
::
wstring
*
m_sHtmlFileInternalPath
;
std
::
wstring
*
m_sPassword
;
//output params
mutable
bool
m_bOutputConvertCorrupted
;
public:
InputParams
()
{
...
...
@@ -358,6 +360,8 @@ namespace NExtractTools
m_nDoctParams
=
NULL
;
m_sHtmlFileInternalPath
=
NULL
;
m_sPassword
=
NULL
;
m_bOutputConvertCorrupted
=
false
;
}
~
InputParams
()
{
...
...
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