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
Hide 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,7 +2738,14 @@ namespace NExtractTools
...
@@ -2738,7 +2738,14 @@ namespace NExtractTools
//clean up v8
//clean up v8
NSDoctRenderer
::
CDocBuilder
::
Dispose
();
NSDoctRenderer
::
CDocBuilder
::
Dispose
();
return
result
;
if
(
SUCCEEDED_X2T
(
result
)
&&
oInputParams
.
m_bOutputConvertCorrupted
)
{
return
AVS_FILEUTILS_ERROR_CONVERT_CORRUPTED
;
}
else
{
return
result
;
}
}
}
int
FromFile
(
const
std
::
wstring
&
file
)
int
FromFile
(
const
std
::
wstring
&
file
)
...
...
X2tConverter/src/cextracttools.cpp
View file @
a9076beb
...
@@ -298,7 +298,6 @@ namespace NExtractTools
...
@@ -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
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
sBinDir
=
FileSystem
::
Directory
::
GetFolderPath
(
sBinFrom
);
std
::
wstring
sChangesDir
=
sBinDir
+
FILE_SEPARATOR_STR
+
_T
(
"changes"
);
std
::
wstring
sChangesDir
=
sBinDir
+
FILE_SEPARATOR_STR
+
_T
(
"changes"
);
if
(
NSDirectory
::
Exists
(
sChangesDir
))
if
(
NSDirectory
::
Exists
(
sChangesDir
))
...
@@ -317,7 +316,7 @@ namespace NExtractTools
...
@@ -317,7 +316,7 @@ namespace NExtractTools
if
(
!
sResult
.
empty
()
&&
-
1
!=
sResult
.
find
(
_T
(
"error"
)))
if
(
!
sResult
.
empty
()
&&
-
1
!=
sResult
.
find
(
_T
(
"error"
)))
{
{
std
::
wcerr
<<
_T
(
"DoctRenderer:"
)
<<
sResult
<<
std
::
endl
;
std
::
wcerr
<<
_T
(
"DoctRenderer:"
)
<<
sResult
<<
std
::
endl
;
nRes
=
AVS_FILEUTILS_ERROR_CONVERT_CORRUPTED
;
params
.
m_bOutputConvertCorrupted
=
true
;
int
nErrorIndex
=
-
1
;
int
nErrorIndex
=
-
1
;
int
nErrorIndexStart
=
sResult
.
find
(
_T
(
"index"
));
int
nErrorIndexStart
=
sResult
.
find
(
_T
(
"index"
));
if
(
-
1
!=
nErrorIndexStart
)
if
(
-
1
!=
nErrorIndexStart
)
...
@@ -364,6 +363,6 @@ namespace NExtractTools
...
@@ -364,6 +363,6 @@ namespace NExtractTools
}
}
else
else
sBinTo
=
sBinFrom
;
sBinTo
=
sBinFrom
;
return
nRes
;
return
0
;
}
}
}
}
X2tConverter/src/cextracttools.h
View file @
a9076beb
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
#include <iostream>
#include <iostream>
#include <fstream>
#include <fstream>
#define SUCCEEDED_X2T(nRes) (0 == (nRes)
|| AVS_FILEUTILS_ERROR_CONVERT_CORRUPTED == (nRes)
)
#define SUCCEEDED_X2T(nRes) (0 == (nRes))
namespace
NExtractTools
namespace
NExtractTools
{
{
...
@@ -337,6 +337,8 @@ namespace NExtractTools
...
@@ -337,6 +337,8 @@ namespace NExtractTools
int
*
m_nDoctParams
;
int
*
m_nDoctParams
;
std
::
wstring
*
m_sHtmlFileInternalPath
;
std
::
wstring
*
m_sHtmlFileInternalPath
;
std
::
wstring
*
m_sPassword
;
std
::
wstring
*
m_sPassword
;
//output params
mutable
bool
m_bOutputConvertCorrupted
;
public:
public:
InputParams
()
InputParams
()
{
{
...
@@ -358,6 +360,8 @@ namespace NExtractTools
...
@@ -358,6 +360,8 @@ namespace NExtractTools
m_nDoctParams
=
NULL
;
m_nDoctParams
=
NULL
;
m_sHtmlFileInternalPath
=
NULL
;
m_sHtmlFileInternalPath
=
NULL
;
m_sPassword
=
NULL
;
m_sPassword
=
NULL
;
m_bOutputConvertCorrupted
=
false
;
}
}
~
InputParams
()
~
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