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
bab37e16
Commit
bab37e16
authored
Jan 10, 2017
by
Alexey Golubev
Browse files
Options
Browse Files
Download
Plain Diff
Merge tag 'staropramen' into develop
staropramen
parents
105a23d5
06dea568
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
10 deletions
+30
-10
X2tConverter/src/ASCConverters.cpp
X2tConverter/src/ASCConverters.cpp
+26
-10
X2tConverter/src/cextracttools.cpp
X2tConverter/src/cextracttools.cpp
+4
-0
No files found.
X2tConverter/src/ASCConverters.cpp
View file @
bab37e16
...
...
@@ -668,6 +668,26 @@ namespace NExtractTools
if
(
NSFile
::
CFileBinary
::
Exists
(
sPdfBinFile
))
NSFile
::
CFileBinary
::
Remove
(
sPdfBinFile
);
return
nRes
;
}
std
::
wstring
getExtentionByRasterFormat
(
int
format
)
{
std
::
wstring
sExt
;
switch
(
format
)
{
case
1
:
sExt
=
L".bmp"
;
break
;
case
2
:
sExt
=
L".gif"
;
break
;
case
3
:
sExt
=
L".jpg"
;
break
;
default:
sExt
=
L".png"
;
break
;
}
return
sExt
;
}
//doct_bin -> image
int
doct_bin2image
(
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
eFromType
,
const
std
::
wstring
&
sFrom
,
const
std
::
wstring
&
sTo
,
const
std
::
wstring
&
sTemp
,
bool
bPaid
,
const
std
::
wstring
&
sThemeDir
,
InputParams
&
params
)
...
...
@@ -731,9 +751,7 @@ namespace NExtractTools
{
sThumbnailDir
=
sTemp
+
FILE_SEPARATOR_STR
+
L"thumbnails"
;
FileSystem
::
Directory
::
CreateDirectory
(
sThumbnailDir
);
std
::
wstring
::
size_type
pos
=
sTo
.
find_last_of
(
'.'
);
std
::
wstring
sExt
=
std
::
wstring
::
npos
==
pos
?
L""
:
sTo
.
substr
(
pos
);
imageWriter
.
m_sFileName
=
sThumbnailDir
+
FILE_SEPARATOR_STR
+
L"image"
+
sExt
;
imageWriter
.
m_sFileName
=
sThumbnailDir
+
FILE_SEPARATOR_STR
+
L"image"
+
getExtentionByRasterFormat
(
imageWriter
.
m_nRasterFormat
);
}
BYTE
*
pData
;
DWORD
nBytesCount
;
...
...
@@ -1747,9 +1765,7 @@ namespace NExtractTools
{
sThumbnailDir
=
sTemp
+
FILE_SEPARATOR_STR
+
L"thumbnails"
;
FileSystem
::
Directory
::
CreateDirectory
(
sThumbnailDir
);
std
::
wstring
::
size_type
pos
=
sTo
.
find_last_of
(
'.'
);
sFileToExt
=
std
::
wstring
::
npos
==
pos
?
L""
:
sTo
.
substr
(
pos
);
sFileToExt
=
getExtentionByRasterFormat
(
nRasterFormat
);
}
int
nPagesCount
=
pReader
->
GetPagesCount
();
if
(
bIsOnlyFirst
)
...
...
@@ -1879,7 +1895,7 @@ namespace NExtractTools
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
eFromType
=
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
::
DOCT
;
nRes
=
doct_bin2pdf
(
eFromType
,
sFrom
,
sTo
,
sTemp
,
bPaid
,
sThemeDir
,
params
);
}
else
if
(
AVS_OFFICESTUDIO_FILE_IMAGE
==
nFormatTo
)
else
if
(
0
!=
(
AVS_OFFICESTUDIO_FILE_IMAGE
&
nFormatTo
)
)
{
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
eFromType
=
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
::
DOCT
;
nRes
=
doct_bin2image
(
eFromType
,
sFrom
,
sTo
,
sTemp
,
bPaid
,
sThemeDir
,
params
);
...
...
@@ -2047,7 +2063,7 @@ namespace NExtractTools
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
eFromType
=
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
::
XLST
;
nRes
=
doct_bin2pdf
(
eFromType
,
sFrom
,
sTo
,
sTemp
,
bPaid
,
sThemeDir
,
params
);
}
else
if
(
AVS_OFFICESTUDIO_FILE_IMAGE
==
nFormatTo
)
else
if
(
0
!=
(
AVS_OFFICESTUDIO_FILE_IMAGE
&
nFormatTo
)
)
{
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
eFromType
=
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
::
XLST
;
nRes
=
doct_bin2image
(
eFromType
,
sFrom
,
sTo
,
sTemp
,
bPaid
,
sThemeDir
,
params
);
...
...
@@ -2176,7 +2192,7 @@ namespace NExtractTools
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
eFromType
=
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
::
PPTT
;
nRes
=
doct_bin2pdf
(
eFromType
,
sFrom
,
sTo
,
sTemp
,
bPaid
,
sThemeDir
,
params
);
}
else
if
(
AVS_OFFICESTUDIO_FILE_IMAGE
==
nFormatTo
)
else
if
(
0
!=
(
AVS_OFFICESTUDIO_FILE_IMAGE
&
nFormatTo
)
)
{
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
eFromType
=
NSDoctRenderer
::
DoctRendererFormat
::
FormatFile
::
PPTT
;
nRes
=
doct_bin2image
(
eFromType
,
sFrom
,
sTo
,
sTemp
,
bPaid
,
sThemeDir
,
params
);
...
...
@@ -2306,7 +2322,7 @@ namespace NExtractTools
oHtmlRenderer
.
CloseFile
();
RELEASEOBJECT
(
pReader
);
}
else
if
(
AVS_OFFICESTUDIO_FILE_IMAGE
==
nFormatTo
)
else
if
(
0
!=
(
AVS_OFFICESTUDIO_FILE_IMAGE
&
nFormatTo
)
)
{
IOfficeDrawingFile
*
pReader
=
NULL
;
nRes
=
PdfDjvuXpsToImage
(
&
pReader
,
sFrom
,
nFormatFrom
,
sTo
,
sTemp
,
params
,
&
oApplicationFonts
);
...
...
X2tConverter/src/cextracttools.cpp
View file @
bab37e16
...
...
@@ -293,6 +293,10 @@ namespace NExtractTools
}
oBuilder
.
WriteString
(
_T
(
"</Changes>"
));
oBuilder
.
WriteString
(
sMailMerge
);
if
(
NULL
!=
params
.
m_oThumbnail
&&
(
NULL
==
params
.
m_oThumbnail
->
first
||
true
==
*
params
.
m_oThumbnail
->
first
))
{
oBuilder
.
WriteString
(
_T
(
"<OnlyOnePage>1</OnlyOnePage>"
));
}
oBuilder
.
WriteString
(
_T
(
"</Settings>"
));
return
oBuilder
.
GetData
();
}
...
...
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