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
903236d8
Commit
903236d8
authored
Sep 01, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
15bd732b
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
288 additions
and
22 deletions
+288
-22
ASCOfficePPTXFile/PPTXFormat/Logic/Pic.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/Pic.cpp
+4
-2
ASCOfficeXlsFile2/XlsFormatTest/XlsFormatTest.cpp
ASCOfficeXlsFile2/XlsFormatTest/XlsFormatTest.cpp
+15
-6
ASCOfficeXlsFile2/source/XlsXlsxConverter/ConvertXls2Xlsx.cpp
...fficeXlsFile2/source/XlsXlsxConverter/ConvertXls2Xlsx.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsXlsxConverter/ConvertXls2Xlsx.h
ASCOfficeXlsFile2/source/XlsXlsxConverter/ConvertXls2Xlsx.h
+1
-1
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
+3
-1
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.h
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.h
+1
-1
X2tConverter/src/ASCConverters.cpp
X2tConverter/src/ASCConverters.cpp
+246
-8
X2tConverter/src/ASCConverters.h
X2tConverter/src/ASCConverters.h
+8
-2
X2tConverter/src/cextracttools.cpp
X2tConverter/src/cextracttools.cpp
+6
-0
X2tConverter/src/cextracttools.h
X2tConverter/src/cextracttools.h
+3
-0
No files found.
ASCOfficePPTXFile/PPTXFormat/Logic/Pic.cpp
View file @
903236d8
...
...
@@ -160,7 +160,8 @@ namespace PPTX
COfficeFileFormatChecker
office_checker
;
office_checker
.
isOOXFormatFile
(
oox_file
.
GetPath
());
//if ( std::wstring::npos != sProgID.find(L"Word.Document"))
if
(
office_checker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX
)
if
(
office_checker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX
||
office_checker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCM
)
{
pWriter
->
StartRecord
(
1
);
pWriter
->
WriteBYTE
(
1
);
...
...
@@ -189,7 +190,8 @@ namespace PPTX
*
pWriter
->
m_pCurrentContainer
=
old_rels
;
pWriter
->
m_pMainDocument
=
old_serial
;
}
else
if
(
office_checker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
)
else
if
(
office_checker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
||
office_checker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM
)
//if ( std::wstring::npos != sProgID.find(L"Excel.Sheet")) //"ET.Xlsx.6" !!!
{
pWriter
->
StartRecord
(
1
);
...
...
ASCOfficeXlsFile2/XlsFormatTest/XlsFormatTest.cpp
View file @
903236d8
...
...
@@ -51,18 +51,26 @@
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
#endif
HRESULT
convert_single
(
std
::
wstring
f
ileName
)
HRESULT
convert_single
(
std
::
wstring
srcF
ileName
)
{
HRESULT
hr
=
S_OK
;
std
::
wstring
srcFileName
=
fileName
;
std
::
wstring
dstPath
=
srcFileName
+
L"-my.xlsx"
;
std
::
wstring
outputDir
=
NSDirectory
::
GetFolderPath
(
dstPath
);
std
::
wstring
outputDir
=
NSDirectory
::
GetFolderPath
(
srcFileName
);
std
::
wstring
dstTempPath
=
NSDirectory
::
CreateDirectoryWithUniqueName
(
outputDir
);
std
::
wstring
dstPath
;
hr
=
ConvertXls2Xlsx
(
srcFileName
,
dstTempPath
,
L"password"
,
L"C:
\\
Windows
\\
Fonts"
,
NULL
,
true
);
bool
bMacros
=
true
;
hr
=
ConvertXls2Xlsx
(
srcFileName
,
dstTempPath
,
L"password"
,
L"C:
\\
Windows
\\
Fonts"
,
NULL
,
bMacros
);
if
(
bMacros
)
{
dstPath
=
srcFileName
+
L"-my.xlsm"
;
}
else
{
dstPath
=
srcFileName
+
L"-my.xlsx"
;
}
if
(
hr
==
S_OK
)
{
COfficeUtils
oCOfficeUtils
(
NULL
);
...
...
@@ -71,6 +79,7 @@ HRESULT convert_single(std::wstring fileName)
NSDirectory
::
DeleteDirectory
(
dstTempPath
);
return
hr
;
}
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/ConvertXls2Xlsx.cpp
View file @
903236d8
...
...
@@ -36,7 +36,7 @@
#include "../../../Common/OfficeFileErrorDescription.h"
long
ConvertXls2Xlsx
(
const
std
::
wstring
&
srcFile
,
const
std
::
wstring
&
dstPath
,
const
std
::
wstring
&
password
,
const
std
::
wstring
&
fontsPath
,
const
ProgressCallback
*
pCallBack
,
bool
bMacros
)
long
ConvertXls2Xlsx
(
const
std
::
wstring
&
srcFile
,
const
std
::
wstring
&
dstPath
,
const
std
::
wstring
&
password
,
const
std
::
wstring
&
fontsPath
,
const
ProgressCallback
*
pCallBack
,
bool
&
bMacros
)
{
XlsConverter
converter
(
srcFile
,
dstPath
,
password
,
fontsPath
,
pCallBack
,
bMacros
);
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/ConvertXls2Xlsx.h
View file @
903236d8
...
...
@@ -33,4 +33,4 @@
struct
ProgressCallback
;
long
ConvertXls2Xlsx
(
const
std
::
wstring
&
srcFile
,
const
std
::
wstring
&
dstPath
,
const
std
::
wstring
&
password
,
const
std
::
wstring
&
fontsPath
,
const
ProgressCallback
*
CallBack
,
bool
bMacros
);
\ No newline at end of file
long
ConvertXls2Xlsx
(
const
std
::
wstring
&
srcFile
,
const
std
::
wstring
&
dstPath
,
const
std
::
wstring
&
password
,
const
std
::
wstring
&
fontsPath
,
const
ProgressCallback
*
CallBack
,
bool
&
bMacros
);
\ No newline at end of file
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
View file @
903236d8
...
...
@@ -121,7 +121,7 @@ typedef struct tagBITMAPCOREHEADER {
}
BITMAPCOREHEADER
;
#endif
XlsConverter
::
XlsConverter
(
const
std
::
wstring
&
xls_file
,
const
std
::
wstring
&
_xlsx_path
,
const
std
::
wstring
&
password
,
const
std
::
wstring
&
fontsPath
,
const
ProgressCallback
*
CallBack
,
bool
bMacros
)
XlsConverter
::
XlsConverter
(
const
std
::
wstring
&
xls_file
,
const
std
::
wstring
&
_xlsx_path
,
const
std
::
wstring
&
password
,
const
std
::
wstring
&
fontsPath
,
const
ProgressCallback
*
CallBack
,
bool
&
bMacros
)
{
xlsx_path
=
_xlsx_path
;
output_document
=
NULL
;
...
...
@@ -239,6 +239,8 @@ XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _
output_document
->
get_xl_files
().
add_vba_project
();
}
}
else
bMacros
=
false
;
}
catch
(...)
{
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.h
View file @
903236d8
...
...
@@ -93,7 +93,7 @@ namespace ODRAW
class
XlsConverter
{
public:
XlsConverter
(
const
std
::
wstring
&
xls_file
,
const
std
::
wstring
&
xlsx_path
,
const
std
::
wstring
&
password
,
const
std
::
wstring
&
fontsPath
,
const
ProgressCallback
*
ffCallBack
,
bool
bMacros
);
XlsConverter
(
const
std
::
wstring
&
xls_file
,
const
std
::
wstring
&
xlsx_path
,
const
std
::
wstring
&
password
,
const
std
::
wstring
&
fontsPath
,
const
ProgressCallback
*
ffCallBack
,
bool
&
bMacros
);
~
XlsConverter
()
;
oox
::
xlsx_conversion_context
*
xlsx_context
;
...
...
X2tConverter/src/ASCConverters.cpp
View file @
903236d8
This diff is collapsed.
Click to expand it.
X2tConverter/src/ASCConverters.h
View file @
903236d8
...
...
@@ -55,12 +55,14 @@ namespace NExtractTools
int
doct_bin2docx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sToResult
,
const
std
::
wstring
&
sTo
,
bool
bFromChanges
,
const
std
::
wstring
&
sThemeDir
,
InputParams
&
params
);
int
doct2docx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
bool
bFromChanges
,
const
std
::
wstring
&
sThemeDir
,
InputParams
&
params
);
int
dotx2docx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
dotx2docx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
);
int
dotm2docm
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
dotm2docm_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
);
int
dotx2docx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
dotx2docx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
);
int
docm2docx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
docm2docx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
);
int
dotm2docx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
dotm2docx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
);
int
xlsx2xlst_bin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
xlsx_dir2xlst_bin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
,
bool
bXmlOptions
);
...
...
@@ -75,6 +77,8 @@ namespace NExtractTools
int
xltm2xlsm_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
);
int
xlsm2xlsx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
xlsm2xlsx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
);
int
xltm2xlsx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
xltm2xlsx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
);
int
pptx2pptt_bin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
pptx_dir2pptt_bin
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
...
...
@@ -100,6 +104,8 @@ namespace NExtractTools
int
potm2pptm_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
);
int
pptm2pptx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
pptm2pptx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
);
int
potm2pptx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
potm2pptx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
InputParams
&
params
);
int
ppt2pptx
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
int
ppt2pptx_dir
(
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
InputParams
&
params
);
...
...
X2tConverter/src/cextracttools.cpp
View file @
903236d8
...
...
@@ -123,6 +123,8 @@ namespace NExtractTools
res
=
TCD_DOTX2DOCX
;
if
(
OfficeFileFormatChecker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCM
)
res
=
TCD_DOCM2DOCX
;
if
(
OfficeFileFormatChecker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_DOCUMENT_DOTM
)
res
=
TCD_DOTM2DOCX
;
}
else
if
(
0
==
sExt2
.
compare
(
_T
(
".docm"
)))
res
=
TCD_DOTM2DOCM
;
}
break
;
...
...
@@ -141,6 +143,8 @@ namespace NExtractTools
res
=
TCD_XLTX2XLSX
;
if
(
OfficeFileFormatChecker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM
)
res
=
TCD_XLSM2XLSX
;
if
(
OfficeFileFormatChecker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLTM
)
res
=
TCD_XLTM2XLSX
;
}
else
if
(
0
==
sExt2
.
compare
(
_T
(
".xlsm"
)))
res
=
TCD_XLTM2XLSM
;
}
break
;
...
...
@@ -160,6 +164,8 @@ namespace NExtractTools
res
=
TCD_POTX2PPTX
;
if
(
OfficeFileFormatChecker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTM
)
res
=
TCD_PPTM2PPTX
;
if
(
OfficeFileFormatChecker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_PRESENTATION_POTM
)
res
=
TCD_POTM2PPTX
;
}
else
if
(
0
==
sExt2
.
compare
(
_T
(
".pptm"
)))
res
=
TCD_POTM2PPTM
;
else
if
(
0
==
sExt2
.
compare
(
_T
(
".odp"
)))
res
=
TCD_PPTX2ODP
;
...
...
X2tConverter/src/cextracttools.h
View file @
903236d8
...
...
@@ -64,6 +64,7 @@ namespace NExtractTools
TCD_DOCT_BIN2DOCX
,
TCD_DOTX2DOCX
,
TCD_DOCM2DOCX
,
TCD_DOTM2DOCX
,
TCD_DOTM2DOCM
,
TCD_XLSX2XLST
,
...
...
@@ -72,6 +73,7 @@ namespace NExtractTools
TCD_XLST_BIN2XLSX
,
TCD_XLTX2XLSX
,
TCD_XLSM2XLSX
,
TCD_XLTM2XLSX
,
TCD_XLTM2XLSM
,
TCD_PPTX2PPTT
,
...
...
@@ -81,6 +83,7 @@ namespace NExtractTools
TCD_PPSX2PPTX
,
TCD_POTX2PPTX
,
TCD_PPTM2PPTX
,
TCD_POTM2PPTX
,
TCD_POTM2PPTM
,
TCD_ZIPDIR
,
...
...
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