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
e8574965
Commit
e8574965
authored
Mar 29, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
..
parent
143f65ae
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
8 additions
and
88 deletions
+8
-88
ASCOfficeXlsFile2/source/XlsFormat/Crypt/Crypt.h
ASCOfficeXlsFile2/source/XlsFormat/Crypt/Crypt.h
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Crypt/Decryptor.cpp
ASCOfficeXlsFile2/source/XlsFormat/Crypt/Decryptor.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Crypt/Decryptor.h
ASCOfficeXlsFile2/source/XlsFormat/Crypt/Decryptor.h
+2
-2
ASCOfficeXlsFile2/source/XlsFormat/Crypt/RC4Crypt.cpp
ASCOfficeXlsFile2/source/XlsFormat/Crypt/RC4Crypt.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Crypt/RC4Crypt.h
ASCOfficeXlsFile2/source/XlsFormat/Crypt/RC4Crypt.h
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/RC4EncryptionHeader.h
...rce/XlsFormat/Logic/Biff_structures/RC4EncryptionHeader.h
+2
-2
Common/OfficeFileFormatChecker.h
Common/OfficeFileFormatChecker.h
+0
-2
DesktopEditor/xml/include/xmlutils.h
DesktopEditor/xml/include/xmlutils.h
+0
-78
No files found.
ASCOfficeXlsFile2/source/XlsFormat/Crypt/Crypt.h
View file @
e8574965
...
...
@@ -37,7 +37,7 @@
namespace
CRYPT
{
struct
CryptRC4
Data
struct
_rc4Crypt
Data
{
struct
SALT_TAG
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Crypt/Decryptor.cpp
View file @
e8574965
...
...
@@ -37,7 +37,7 @@
namespace
CRYPT
{
RC4Decryptor
::
RC4Decryptor
(
CryptRC4
Data
&
header
,
std
::
wstring
_password
,
int
_type
)
:
RC4Decryptor
::
RC4Decryptor
(
_rc4Crypt
Data
&
header
,
std
::
wstring
_password
,
int
_type
)
:
crypt
(
new
RC4Crypt
(
header
,
_password
,
_type
))
{
crypt_data
=
header
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Crypt/Decryptor.h
View file @
e8574965
...
...
@@ -40,7 +40,7 @@ namespace CRYPT
class
RC4Decryptor
:
public
Decryptor
{
public:
RC4Decryptor
(
CryptRC4
Data
&
header
,
std
::
wstring
password
,
int
type
);
RC4Decryptor
(
_rc4Crypt
Data
&
header
,
std
::
wstring
password
,
int
type
);
virtual
void
Decrypt
(
char
*
data
,
const
size_t
size
,
const
unsigned
long
stream_pos
);
virtual
bool
SetPassword
(
std
::
wstring
password
);
...
...
@@ -50,7 +50,7 @@ namespace CRYPT
private:
int
type
;
CryptPtr
crypt
;
CryptRC4
Data
crypt_data
;
_rc4Crypt
Data
crypt_data
;
};
typedef
boost
::
shared_ptr
<
RC4Decryptor
>
RC4DecryptorPtr
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Crypt/RC4Crypt.cpp
View file @
e8574965
...
...
@@ -38,7 +38,7 @@
namespace
CRYPT
{
RC4Crypt
::
RC4Crypt
(
CRYPT
::
CryptRC4
Data
&
data
,
std
::
wstring
password
,
int
type
)
RC4Crypt
::
RC4Crypt
(
CRYPT
::
_rc4Crypt
Data
&
data
,
std
::
wstring
password
,
int
type
)
{
m_VerifyPassword
=
false
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Crypt/RC4Crypt.h
View file @
e8574965
...
...
@@ -41,7 +41,7 @@ namespace CRYPT
class
RC4Crypt
:
public
Crypt
{
public:
RC4Crypt
(
CRYPT
::
CryptRC4
Data
&
data
,
std
::
wstring
password
,
int
type
);
RC4Crypt
(
CRYPT
::
_rc4Crypt
Data
&
data
,
std
::
wstring
password
,
int
type
);
virtual
void
Encrypt
(
char
*
data
,
const
size_t
size
);
virtual
void
Decrypt
(
char
*
data
,
const
size_t
size
,
const
unsigned
long
stream_pos
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/RC4EncryptionHeader.h
View file @
e8574965
...
...
@@ -49,8 +49,8 @@ public:
Version
EncryptionVersionInfo
;
CRYPT
::
CryptRC4Data
crypt_data_rc4
;
CRYPT
::
ECMADecryptor
::
_cryptData
crypt_data_aes
;
CRYPT
::
_rc4CryptData
crypt_data_rc4
;
CRYPT
::
_ecmaCryptData
crypt_data_aes
;
bool
bStandard
;
};
...
...
Common/OfficeFileFormatChecker.h
View file @
e8574965
...
...
@@ -61,8 +61,6 @@ public:
std
::
wstring
GetExtensionByType
(
int
type
);
static
int
GetFormatByExtension
(
const
std
::
wstring
&
ext
);
private:
bool
isOOXFormatFile
(
const
std
::
wstring
&
fileName
);
bool
isOpenOfficeFormatFile
(
const
std
::
wstring
&
fileName
);
bool
isOnlyOfficeFormatFile
(
const
std
::
wstring
&
fileName
);
...
...
DesktopEditor/xml/include/xmlutils.h
View file @
e8574965
...
...
@@ -338,85 +338,7 @@ namespace XmlUtils
bool
SaveToFile
(
const
std
::
wstring
&
strFilePath
/*, bool bEncodingToUTF8 = false*/
)
{
return
NSFile
::
CFileBinary
::
SaveToFile
(
strFilePath
,
m_str
);
//#if defined(_WIN32) || defined (_WIN64)
// // win32 unicode and multibyte strings
// FILE* pFile = _tfopen(strFilePath, (L"wt"));
//#else
// // *nix build
// #ifdef _UNICODE
// std::string sFilePathUtf8 = stringWstingToUtf8String (strFilePath);
// FILE* pFile = fopen(sFilePathUtf8.c_str(), "wt");
// #else
// // path is already utf8
// std::string sFilePathUtf8 = strFilePath;
// FILE* pFile = fopen(sFilePathUtf8.c_str(), "wt");
// #endif
//#endif
//
// if (!pFile)
// return false;
//
// std::string str; str = m_str;
// if (bEncodingToUTF8)
//#ifdef _UNICODE
// str = EncodingUnicodeToUTF8();
//#else
// str = EncodingASCIIToUTF8();
//#endif
//
// fprintf(pFile, str);
//
// fclose(pFile);
//
// return true;
}
//#ifdef _UNICODE
// std::string EncodingUnicodeToUTF8()
// {
// //#if defined(_WIN32) || defined (_WIN64)
// // int nLength = m_str.GetLength();
//
// // // Encoding Unicode to UTF-8
// // std::string saStr;
// // WideCharToMultiByte(CP_UTF8, 0, m_str.GetBuffer(), nLength + 1, saStr.GetBuffer(nLength*3 + 1), nLength*3, NULL, NULL);
// // saStr.ReleaseBuffer();
// // return saStr;
// //#else
//
// std::string sStrTempUtf8 = stringWstingToUtf8String (m_str);
// std::string saStr = sStrTempUtf8;
// return saStr;
// //#endif
// }
//#else
// std::wstring EncodingASCIIToUTF8()
// {
// int nLength = m_str.GetLength();
//
// wchar_t* pWStr = new wchar_t[nLength + 1];
// if (!pWStr)
// return (L"");
//
// // set end string
// pWStr[nLength] = 0;
//
// // Encoding ASCII to Unicode
// MultiByteToWideChar(CP_ACP, 0, m_str, nLength, pWStr, nLength);
//
// int nLengthW = (int) wcslen(pWStr);
//
// // Encoding Unicode to UTF-8
// std::wstring cStr;
// WideCharToMultiByte(CP_UTF8, 0, pWStr, nLengthW + 1, cStr.GetBuffer(nLengthW*3 + 1), nLengthW*3, NULL, NULL);
// cStr.ReleaseBuffer();
//
// delete[] pWStr;
//
// return cStr;
// }
//#endif
void
WriteString
(
const
std
::
wstring
&
strValue
)
{
m_str
+=
strValue
;
...
...
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