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
875717ac
Commit
875717ac
authored
Nov 23, 2017
by
Sergey Konovalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add m_sSavePassword (m_sPassword - only for open)
parent
d1227f77
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
X2tConverter/src/ASCConverters.cpp
X2tConverter/src/ASCConverters.cpp
+4
-4
X2tConverter/src/cextracttools.h
X2tConverter/src/cextracttools.h
+13
-0
X2tConverter/src/main.cpp
X2tConverter/src/main.cpp
+1
-0
No files found.
X2tConverter/src/ASCConverters.cpp
View file @
875717ac
...
@@ -2553,7 +2553,7 @@ namespace NExtractTools
...
@@ -2553,7 +2553,7 @@ namespace NExtractTools
}
}
int
oox2mscrypt
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
)
int
oox2mscrypt
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
)
{
{
std
::
wstring
password
=
params
.
get
Password
();
std
::
wstring
password
=
params
.
getSave
Password
();
ECMACryptFile
cryptReader
;
ECMACryptFile
cryptReader
;
...
@@ -2987,7 +2987,7 @@ namespace NExtractTools
...
@@ -2987,7 +2987,7 @@ namespace NExtractTools
{
{
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX
==
nFormatTo
)
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX
==
nFormatTo
)
{
{
if
(
params
.
hasPassword
())
if
(
params
.
has
Save
Password
())
{
{
std
::
wstring
sToMscrypt
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"tomscrypt.docx"
);
std
::
wstring
sToMscrypt
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"tomscrypt.docx"
);
nRes
=
dir2zip
(
sFrom
,
sToMscrypt
);
nRes
=
dir2zip
(
sFrom
,
sToMscrypt
);
...
@@ -3199,7 +3199,7 @@ namespace NExtractTools
...
@@ -3199,7 +3199,7 @@ namespace NExtractTools
{
{
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
==
nFormatTo
)
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
==
nFormatTo
)
{
{
if
(
params
.
hasPassword
())
if
(
params
.
has
Save
Password
())
{
{
std
::
wstring
sToMscrypt
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"tomscrypt.xlsx"
);
std
::
wstring
sToMscrypt
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"tomscrypt.xlsx"
);
nRes
=
dir2zip
(
sFrom
,
sToMscrypt
);
nRes
=
dir2zip
(
sFrom
,
sToMscrypt
);
...
@@ -3386,7 +3386,7 @@ namespace NExtractTools
...
@@ -3386,7 +3386,7 @@ namespace NExtractTools
{
{
if
(
AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX
==
nFormatTo
)
if
(
AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX
==
nFormatTo
)
{
{
if
(
params
.
hasPassword
())
if
(
params
.
has
Save
Password
())
{
{
std
::
wstring
sToMscrypt
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"tomscrypt.pptx"
);
std
::
wstring
sToMscrypt
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"tomscrypt.pptx"
);
nRes
=
dir2zip
(
sFrom
,
sToMscrypt
);
nRes
=
dir2zip
(
sFrom
,
sToMscrypt
);
...
...
X2tConverter/src/cextracttools.h
View file @
875717ac
...
@@ -382,6 +382,7 @@ namespace NExtractTools
...
@@ -382,6 +382,7 @@ namespace NExtractTools
int
*
m_nDoctParams
;
int
*
m_nDoctParams
;
std
::
wstring
*
m_sHtmlFileInternalPath
;
std
::
wstring
*
m_sHtmlFileInternalPath
;
std
::
wstring
*
m_sPassword
;
std
::
wstring
*
m_sPassword
;
std
::
wstring
*
m_sSavePassword
;
std
::
wstring
*
m_sTempDir
;
std
::
wstring
*
m_sTempDir
;
bool
*
m_bIsNoBase64
;
bool
*
m_bIsNoBase64
;
//output params
//output params
...
@@ -408,6 +409,7 @@ namespace NExtractTools
...
@@ -408,6 +409,7 @@ namespace NExtractTools
m_nDoctParams
=
NULL
;
m_nDoctParams
=
NULL
;
m_sHtmlFileInternalPath
=
NULL
;
m_sHtmlFileInternalPath
=
NULL
;
m_sPassword
=
NULL
;
m_sPassword
=
NULL
;
m_sSavePassword
=
NULL
;
m_sTempDir
=
NULL
;
m_sTempDir
=
NULL
;
m_bIsNoBase64
=
NULL
;
m_bIsNoBase64
=
NULL
;
...
@@ -434,6 +436,7 @@ namespace NExtractTools
...
@@ -434,6 +436,7 @@ namespace NExtractTools
RELEASEOBJECT
(
m_nDoctParams
);
RELEASEOBJECT
(
m_nDoctParams
);
RELEASEOBJECT
(
m_sHtmlFileInternalPath
);
RELEASEOBJECT
(
m_sHtmlFileInternalPath
);
RELEASEOBJECT
(
m_sPassword
);
RELEASEOBJECT
(
m_sPassword
);
RELEASEOBJECT
(
m_sSavePassword
);
RELEASEOBJECT
(
m_sTempDir
);
RELEASEOBJECT
(
m_sTempDir
);
RELEASEOBJECT
(
m_bIsNoBase64
);
RELEASEOBJECT
(
m_bIsNoBase64
);
}
}
...
@@ -522,6 +525,8 @@ namespace NExtractTools
...
@@ -522,6 +525,8 @@ namespace NExtractTools
m_sHtmlFileInternalPath
=
new
std
::
wstring
(
sValue
);
m_sHtmlFileInternalPath
=
new
std
::
wstring
(
sValue
);
else
if
(
_T
(
"m_sPassword"
)
==
sName
)
else
if
(
_T
(
"m_sPassword"
)
==
sName
)
m_sPassword
=
new
std
::
wstring
(
sValue
);
m_sPassword
=
new
std
::
wstring
(
sValue
);
else
if
(
_T
(
"m_sSavePassword"
)
==
sName
)
m_sSavePassword
=
new
std
::
wstring
(
sValue
);
else
if
(
_T
(
"m_sTempDir"
)
==
sName
)
else
if
(
_T
(
"m_sTempDir"
)
==
sName
)
m_sTempDir
=
new
std
::
wstring
(
sValue
);
m_sTempDir
=
new
std
::
wstring
(
sValue
);
else
if
(
_T
(
"m_bIsNoBase64"
)
==
sName
)
else
if
(
_T
(
"m_bIsNoBase64"
)
==
sName
)
...
@@ -549,6 +554,14 @@ namespace NExtractTools
...
@@ -549,6 +554,14 @@ namespace NExtractTools
{
{
return
(
NULL
!=
m_sPassword
)
?
(
*
m_sPassword
)
:
L""
;
return
(
NULL
!=
m_sPassword
)
?
(
*
m_sPassword
)
:
L""
;
}
}
bool
hasSavePassword
()
const
{
return
NULL
!=
m_sSavePassword
;
}
std
::
wstring
getSavePassword
()
const
{
return
(
NULL
!=
m_sSavePassword
)
?
(
*
m_sSavePassword
)
:
L""
;
}
std
::
wstring
getFontPath
()
const
std
::
wstring
getFontPath
()
const
{
{
return
(
NULL
!=
m_sFontDir
)
?
(
*
m_sFontDir
)
:
L""
;
return
(
NULL
!=
m_sFontDir
)
?
(
*
m_sFontDir
)
:
L""
;
...
...
X2tConverter/src/main.cpp
View file @
875717ac
...
@@ -146,6 +146,7 @@ static std::wstring utf8_to_unicode(const char *src)
...
@@ -146,6 +146,7 @@ static std::wstring utf8_to_unicode(const char *src)
if
(
argc
>
4
)
if
(
argc
>
4
)
{
{
oInputParams
.
m_sPassword
=
new
std
::
wstring
(
sArg4
);
oInputParams
.
m_sPassword
=
new
std
::
wstring
(
sArg4
);
oInputParams
.
m_sSavePassword
=
new
std
::
wstring
(
sArg4
);
}
}
result
=
NExtractTools
::
fromInputParams
(
oInputParams
);
result
=
NExtractTools
::
fromInputParams
(
oInputParams
);
}
}
...
...
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