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
e04388aa
Commit
e04388aa
authored
Feb 02, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cee61e7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
42 deletions
+42
-42
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.cpp
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.cpp
+16
-16
ASCOfficeDocFile/DocDocxConverter/WordprocessingDocument.cpp
ASCOfficeDocFile/DocDocxConverter/WordprocessingDocument.cpp
+26
-26
No files found.
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.cpp
View file @
e04388aa
...
@@ -71,26 +71,26 @@ namespace DocFileFormat
...
@@ -71,26 +71,26 @@ namespace DocFileFormat
{
{
struct
__BITMAPINFOHEADER
struct
__BITMAPINFOHEADER
{
{
DWORD
biSize
;
_UINT32
biSize
;
LONG
biWidth
;
_INT32
biWidth
;
LONG
biHeight
;
_INT32
biHeight
;
WORD
biPlanes
;
_UINT16
biPlanes
;
WORD
biBitCount
;
_UINT16
biBitCount
;
DWORD
biCompression
;
_UINT32
biCompression
;
DWORD
biSizeImage
;
_UINT32
biSizeImage
;
LONG
biXPelsPerMeter
;
_INT32
biXPelsPerMeter
;
LONG
biYPelsPerMeter
;
_INT32
biYPelsPerMeter
;
DWORD
biClrUsed
;
_UINT32
biClrUsed
;
DWORD
biClrImportant
;
_UINT32
biClrImportant
;
};
};
struct
__BITMAPCOREHEADER
struct
__BITMAPCOREHEADER
{
{
DWORD
bcSize
;
/* used to get to color table */
_UINT32
bcSize
;
/* used to get to color table */
WORD
bcWidth
;
_UINT16
bcWidth
;
WORD
bcHeight
;
_UINT16
bcHeight
;
WORD
bcPlanes
;
_UINT16
bcPlanes
;
WORD
bcBitCount
;
_UINT16
bcBitCount
;
};
};
Global
::
BlipType
GetFormatPict
(
unsigned
char
*
data
,
int
size
)
Global
::
BlipType
GetFormatPict
(
unsigned
char
*
data
,
int
size
)
{
{
...
...
ASCOfficeDocFile/DocDocxConverter/WordprocessingDocument.cpp
View file @
e04388aa
...
@@ -37,29 +37,29 @@
...
@@ -37,29 +37,29 @@
namespace
ImageHelper
namespace
ImageHelper
{
{
struct
__BITMAPINFOHEADER
struct
__BITMAPINFOHEADER
{
{
DWORD
biSize
;
_UINT32
biSize
;
LONG
biWidth
;
_INT32
biWidth
;
LONG
biHeight
;
_INT32
biHeight
;
WORD
biPlanes
;
_UINT16
biPlanes
;
WORD
biBitCount
;
_UINT16
biBitCount
;
DWORD
biCompression
;
_UINT32
biCompression
;
DWORD
biSizeImage
;
_UINT32
biSizeImage
;
LONG
biXPelsPerMeter
;
_INT32
biXPelsPerMeter
;
LONG
biYPelsPerMeter
;
_INT32
biYPelsPerMeter
;
DWORD
biClrUsed
;
_UINT32
biClrUsed
;
DWORD
biClrImportant
;
_UINT32
biClrImportant
;
};
};
struct
__BITMAPCOREHEADER
struct
__BITMAPCOREHEADER
{
{
DWORD
bcSize
;
/* used to get to color table */
_UINT32
bcSize
;
/* used to get to color table */
WORD
bcWidth
;
_UINT16
bcWidth
;
WORD
bcHeight
;
_UINT16
bcHeight
;
WORD
bcPlanes
;
_UINT16
bcPlanes
;
WORD
bcBitCount
;
_UINT16
bcBitCount
;
};
};
inline
Global
::
_BlipType
SaveImageToFileFromDIB
(
unsigned
char
*
data
,
int
size
,
const
std
::
wstring
&
file_name
)
//without ext
inline
Global
::
_BlipType
SaveImageToFileFromDIB
(
unsigned
char
*
data
,
int
size
,
const
std
::
wstring
&
file_name
)
//without ext
{
{
...
@@ -152,10 +152,10 @@ namespace ImageHelper
...
@@ -152,10 +152,10 @@ namespace ImageHelper
NSFile
::
CFileBinary
file
;
NSFile
::
CFileBinary
file
;
if
(
file
.
CreateFileW
(
file_name
+
L".bmp"
))
if
(
file
.
CreateFileW
(
file_name
+
L".bmp"
))
{
{
WORD
vtType
=
0x4D42
;
file
.
WriteFile
((
BYTE
*
)
&
vtType
,
2
);
_UINT16
vtType
=
0x4D42
;
file
.
WriteFile
((
BYTE
*
)
&
vtType
,
2
);
DWORD
dwLen
=
biSizeImage
;
file
.
WriteFile
((
BYTE
*
)
&
dwLen
,
4
);
_UINT32
dwLen
=
biSizeImage
;
file
.
WriteFile
((
BYTE
*
)
&
dwLen
,
4
);
DWORD
dwRes
=
0
;
file
.
WriteFile
((
BYTE
*
)
&
dwRes
,
4
);
_UINT32
dwRes
=
0
;
file
.
WriteFile
((
BYTE
*
)
&
dwRes
,
4
);
DWORD
dwOffset
=
2
;
file
.
WriteFile
((
BYTE
*
)
&
dwOffset
,
4
);
_UINT32
dwOffset
=
2
;
file
.
WriteFile
((
BYTE
*
)
&
dwOffset
,
4
);
file
.
WriteFile
((
BYTE
*
)
data
,
size
);
file
.
WriteFile
((
BYTE
*
)
data
,
size
);
file
.
CloseFile
();
file
.
CloseFile
();
...
...
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