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
c8c0924c
Commit
c8c0924c
authored
Jun 02, 2017
by
Sergey Konovalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for oox2mscrypt
parent
af732e4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
3 deletions
+43
-3
X2tConverter/src/ASCConverters.cpp
X2tConverter/src/ASCConverters.cpp
+39
-3
X2tConverter/src/cextracttools.h
X2tConverter/src/cextracttools.h
+4
-0
No files found.
X2tConverter/src/ASCConverters.cpp
View file @
c8c0924c
...
@@ -1935,7 +1935,19 @@ namespace NExtractTools
...
@@ -1935,7 +1935,19 @@ namespace NExtractTools
{
{
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX
==
nFormatTo
)
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX
==
nFormatTo
)
{
{
nRes
=
dir2zip
(
sFrom
,
sTo
);
if
(
params
.
hasPassword
())
{
std
::
wstring
sToMscrypt
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"tomscrypt.docx"
);
nRes
=
dir2zip
(
sFrom
,
sToMscrypt
);
if
(
SUCCEEDED_X2T
(
nRes
))
{
nRes
=
oox2mscrypt
(
sToMscrypt
,
sTo
,
sTemp
,
params
);
}
}
else
{
nRes
=
dir2zip
(
sFrom
,
sTo
);
}
}
}
else
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOC
==
nFormatTo
)
else
if
(
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOC
==
nFormatTo
)
{
{
...
@@ -2104,7 +2116,19 @@ namespace NExtractTools
...
@@ -2104,7 +2116,19 @@ namespace NExtractTools
{
{
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
==
nFormatTo
)
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
==
nFormatTo
)
{
{
nRes
=
dir2zip
(
sFrom
,
sTo
);
if
(
params
.
hasPassword
())
{
std
::
wstring
sToMscrypt
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"tomscrypt.xlsx"
);
nRes
=
dir2zip
(
sFrom
,
sToMscrypt
);
if
(
SUCCEEDED_X2T
(
nRes
))
{
nRes
=
oox2mscrypt
(
sToMscrypt
,
sTo
,
sTemp
,
params
);
}
}
else
{
nRes
=
dir2zip
(
sFrom
,
sTo
);
}
}
}
//else if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLS == nFormatTo)
//else if(AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLS == nFormatTo)
else
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS
==
nFormatTo
)
else
if
(
AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS
==
nFormatTo
)
...
@@ -2246,7 +2270,19 @@ namespace NExtractTools
...
@@ -2246,7 +2270,19 @@ namespace NExtractTools
{
{
if
(
AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX
==
nFormatTo
)
if
(
AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX
==
nFormatTo
)
{
{
nRes
=
dir2zip
(
sFrom
,
sTo
);
if
(
params
.
hasPassword
())
{
std
::
wstring
sToMscrypt
=
sTemp
+
FILE_SEPARATOR_STR
+
_T
(
"tomscrypt.pptx"
);
nRes
=
dir2zip
(
sFrom
,
sToMscrypt
);
if
(
SUCCEEDED_X2T
(
nRes
))
{
nRes
=
oox2mscrypt
(
sToMscrypt
,
sTo
,
sTemp
,
params
);
}
}
else
{
nRes
=
dir2zip
(
sFrom
,
sTo
);
}
}
}
//else if(AVS_OFFICESTUDIO_FILE_PRESENTATION_PPT == nFormatTo)
//else if(AVS_OFFICESTUDIO_FILE_PRESENTATION_PPT == nFormatTo)
else
if
(
AVS_OFFICESTUDIO_FILE_PRESENTATION_ODP
==
nFormatTo
)
else
if
(
AVS_OFFICESTUDIO_FILE_PRESENTATION_ODP
==
nFormatTo
)
...
...
X2tConverter/src/cextracttools.h
View file @
c8c0924c
...
@@ -511,6 +511,10 @@ namespace NExtractTools
...
@@ -511,6 +511,10 @@ namespace NExtractTools
}
}
return
true
;
return
true
;
}
}
bool
hasPassword
()
const
{
return
NULL
!=
m_sPassword
;
}
std
::
wstring
getPassword
()
const
std
::
wstring
getPassword
()
const
{
{
return
(
NULL
!=
m_sPassword
)
?
(
*
m_sPassword
)
:
L""
;
return
(
NULL
!=
m_sPassword
)
?
(
*
m_sPassword
)
:
L""
;
...
...
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