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
a197743a
Commit
a197743a
authored
Apr 27, 2016
by
konovalovsergey
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add param:password; error: drm, password
parent
39a3fd1b
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
110 additions
and
83 deletions
+110
-83
Common/OfficeFileErrorDescription.h
Common/OfficeFileErrorDescription.h
+2
-0
X2tConverter/src/ASCConverters.cpp
X2tConverter/src/ASCConverters.cpp
+87
-71
X2tConverter/src/ASCConverters.h
X2tConverter/src/ASCConverters.h
+3
-3
X2tConverter/src/cextracttools.h
X2tConverter/src/cextracttools.h
+16
-7
X2tConverter/src/main.cpp
X2tConverter/src/main.cpp
+2
-2
No files found.
Common/OfficeFileErrorDescription.h
View file @
a197743a
...
...
@@ -206,3 +206,5 @@
#define AVS_FILEUTILS_ERROR_CONVERT_LIBREOFFICE (AVS_ERROR_FIRST + AVS_FILEUTILS_ERROR_FIRST + 0x0057)
#define AVS_FILEUTILS_ERROR_CONVERT_PARAMS (AVS_ERROR_FIRST + AVS_FILEUTILS_ERROR_FIRST + 0x0058)
#define AVS_FILEUTILS_ERROR_CONVERT_NEED_PARAMS (AVS_ERROR_FIRST + AVS_FILEUTILS_ERROR_FIRST + 0x0059)
#define AVS_FILEUTILS_ERROR_CONVERT_DRM (AVS_ERROR_FIRST + AVS_FILEUTILS_ERROR_FIRST + 0x005a)
#define AVS_FILEUTILS_ERROR_CONVERT_PASSWORD (AVS_ERROR_FIRST + AVS_FILEUTILS_ERROR_FIRST + 0x005b)
X2tConverter/src/ASCConverters.cpp
View file @
a197743a
This diff is collapsed.
Click to expand it.
X2tConverter/src/ASCConverters.h
View file @
a197743a
...
...
@@ -63,8 +63,8 @@ namespace NExtractTools
int
doc2doct_bin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
);
int
docx_dir2doc
(
const
std
::
wstring
&
sDocxDir
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
);
int
xls2xlsx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
s
Password
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
);
int
xls2xlsx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
s
Password
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
);
int
xls2xlsx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
s
Temp
,
const
std
::
wstring
&
sFontPath
,
const
InputParams
&
params
);
int
xls2xlsx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
s
Temp
,
const
std
::
wstring
&
sFontPath
,
const
InputParams
&
params
);
int
xls2xlst
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sPassword
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
);
int
xls2xlst_bin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sPassword
,
const
std
::
wstring
&
sTemp
,
const
std
::
wstring
&
sFontPath
,
const
std
::
wstring
&
sXmlOptions
);
...
...
@@ -95,7 +95,7 @@ namespace NExtractTools
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
fromSpreadsheet
(
const
std
::
wstring
&
sFrom
,
int
nFormatFrom
,
const
std
::
wstring
&
sTo
,
int
nFormatTo
,
const
std
::
wstring
&
s
Password
,
const
std
::
wstring
&
s
Temp
,
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
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
);
...
...
X2tConverter/src/cextracttools.h
View file @
a197743a
...
...
@@ -123,7 +123,13 @@ namespace NExtractTools
TCSVD_COMMA
=
4
,
TCSVD_SPACE
=
5
}
TCsvDelimiter
;
static
bool
copyOrigin
(
const
std
::
wstring
&
sFileFrom
,
const
std
::
wstring
&
sFileTo
)
{
size_t
nIndex
=
sFileFrom
.
rfind
(
'.'
);
return
NSFile
::
CFileBinary
::
Copy
(
sFileFrom
,
NSSystemPath
::
GetDirectoryName
(
sFileTo
)
+
FILE_SEPARATOR_STR
+
_T
(
"origin"
)
+
sFileFrom
.
substr
(
nIndex
));
}
class
InputParamsMailMerge
{
public:
...
...
@@ -235,6 +241,7 @@ namespace NExtractTools
InputParamsMailMerge
*
m_oMailMergeSend
;
int
*
m_nDoctParams
;
std
::
wstring
*
m_sHtmlFileInternalPath
;
std
::
wstring
*
m_sPassword
;
public:
InputParams
()
{
...
...
@@ -254,6 +261,7 @@ namespace NExtractTools
m_oMailMergeSend
=
NULL
;
m_nDoctParams
=
NULL
;
m_sHtmlFileInternalPath
=
NULL
;
m_sPassword
=
NULL
;
}
~
InputParams
()
{
...
...
@@ -273,6 +281,7 @@ namespace NExtractTools
RELEASEOBJECT
(
m_oMailMergeSend
);
RELEASEOBJECT
(
m_nDoctParams
);
RELEASEOBJECT
(
m_sHtmlFileInternalPath
);
RELEASEOBJECT
(
m_sPassword
);
}
bool
FromXmlFile
(
std
::
wstring
sFilename
)
...
...
@@ -329,6 +338,8 @@ namespace NExtractTools
m_nDoctParams
=
new
int
(
XmlUtils
::
GetInteger
(
sValue
));
else
if
(
_T
(
"m_sHtmlFileInternalPath"
)
==
sName
)
m_sHtmlFileInternalPath
=
new
std
::
wstring
(
sValue
);
else
if
(
_T
(
"m_sPassword"
)
==
sName
)
m_sPassword
=
new
std
::
wstring
(
sValue
);
}
}
}
...
...
@@ -337,9 +348,9 @@ namespace NExtractTools
}
return
true
;
}
std
::
wstring
getPassword
()
std
::
wstring
getPassword
()
const
{
return
L""
;
return
(
NULL
!=
m_sPassword
)
?
(
*
m_sPassword
)
:
L""
;
}
std
::
wstring
getXmlOptions
()
...
...
@@ -445,8 +456,7 @@ namespace NExtractTools
{
if
(
!
getDontSaveAdditional
())
{
size_t
nIndex
=
m_sFileFrom
->
rfind
(
'.'
);
NSFile
::
CFileBinary
::
Copy
(
*
m_sFileFrom
,
NSSystemPath
::
GetDirectoryName
(
*
m_sFileTo
)
+
FILE_SEPARATOR_STR
+
_T
(
"origin"
)
+
m_sFileFrom
->
substr
(
nIndex
));
copyOrigin
(
*
m_sFileFrom
,
*
m_sFileTo
);
}
eRes
=
TCD_ERROR
;
}
...
...
@@ -467,8 +477,7 @@ namespace NExtractTools
oBuilder
.
WriteString
(
_T
(
"}"
));
std
::
wstring
sFilePath
=
NSSystemPath
::
GetDirectoryName
(
*
m_sFileTo
)
+
FILE_SEPARATOR_STR
+
_T
(
"settings.json"
);
NSFile
::
CFileBinary
::
SaveToFile
(
sFilePath
,
oBuilder
.
GetData
());
size_t
nIndex
=
m_sFileFrom
->
rfind
(
'.'
);
NSFile
::
CFileBinary
::
Copy
(
*
m_sFileFrom
,
NSSystemPath
::
GetDirectoryName
(
*
m_sFileTo
)
+
FILE_SEPARATOR_STR
+
_T
(
"origin"
)
+
m_sFileFrom
->
substr
(
nIndex
));
copyOrigin
(
*
m_sFileFrom
,
*
m_sFileTo
);
}
eRes
=
TCD_ERROR
;
}
...
...
X2tConverter/src/main.cpp
View file @
a197743a
...
...
@@ -341,7 +341,7 @@ int main(int argc, char *argv[])
}
else
if
(
TCD_XLS2XLSX
==
conversion
)
{
result
=
xls2xlsx
(
sFileFrom
,
sFileTo
,
s
Password
,
sTempDir
,
sFontPath
);
result
=
xls2xlsx
(
sFileFrom
,
sFileTo
,
s
TempDir
,
sFontPath
,
oInputParams
);
}
else
if
(
TCD_XLS2XLST
==
conversion
)
{
...
...
@@ -381,7 +381,7 @@ int main(int argc, char *argv[])
}
else
if
(
TCD_SPREADSHEET2
==
conversion
)
{
result
=
fromSpreadsheet
(
sFileFrom
,
nFormatFrom
,
sFileTo
,
nFormatTo
,
s
Password
,
s
TempDir
,
sFontPath
,
sXmlOptions
,
sThemeDir
,
bFromChanges
,
bPaid
,
oInputParams
);
result
=
fromSpreadsheet
(
sFileFrom
,
nFormatFrom
,
sFileTo
,
nFormatTo
,
sTempDir
,
sFontPath
,
sXmlOptions
,
sThemeDir
,
bFromChanges
,
bPaid
,
oInputParams
);
}
else
if
(
TCD_PRESENTATION2
==
conversion
)
{
...
...
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