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
b6dfe6ee
Commit
b6dfe6ee
authored
Oct 13, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug with reading EMR_EXTCREATEFONTINDIRECTW in EMF.
parent
d04f0441
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
7 deletions
+31
-7
DesktopEditor/raster/Metafile/Common/MetaFileUtils.h
DesktopEditor/raster/Metafile/Common/MetaFileUtils.h
+15
-4
DesktopEditor/raster/Metafile/Emf/EmfFile.h
DesktopEditor/raster/Metafile/Emf/EmfFile.h
+6
-2
DesktopEditor/raster/Metafile/Emf/EmfObjects.h
DesktopEditor/raster/Metafile/Emf/EmfObjects.h
+10
-1
No files found.
DesktopEditor/raster/Metafile/Common/MetaFileUtils.h
View file @
b6dfe6ee
...
...
@@ -352,9 +352,9 @@ namespace MetaFile
{
*
this
>>
oVector
.
Signature
;
*
this
>>
oVector
.
NumAxes
;
oVector
.
Values
=
NULL
;
if
(
oVector
.
NumAxes
<=
0
)
oVector
.
Values
=
NULL
;
if
(
oVector
.
Signature
!=
0x08007664
||
oVector
.
NumAxes
>
16
||
oVector
.
NumAxes
<=
0
)
return
*
this
;
oVector
.
Values
=
new
int
[
oVector
.
NumAxes
];
...
...
@@ -368,8 +368,19 @@ namespace MetaFile
}
CDataStream
&
operator
>>
(
CEmfLogFont
&
oFont
)
{
*
this
>>
oFont
.
LogFontEx
;
*
this
>>
oFont
.
DesignVector
;
if
(
oFont
.
IsFixedLength
())
{
*
this
>>
oFont
.
LogFontEx
.
LogFont
;
ReadBytes
(
oFont
.
LogFontEx
.
FullName
,
64
);
ReadBytes
(
oFont
.
LogFontEx
.
Style
,
32
);
ReadBytes
(
oFont
.
LogFontEx
.
Script
,
18
);
}
else
{
*
this
>>
oFont
.
LogFontEx
;
*
this
>>
oFont
.
DesignVector
;
}
return
*
this
;
}
CDataStream
&
operator
>>
(
TEmfBitBlt
&
oBitBtl
)
...
...
DesktopEditor/raster/Metafile/Emf/EmfFile.h
View file @
b6dfe6ee
...
...
@@ -1030,13 +1030,17 @@ namespace MetaFile
}
void
Read_EMR_EXTCREATEFONTINDIRECTW
()
{
unsigned
int
ulIndex
;
CEmfLogFont
*
pFont
=
new
CEmfLogFont
();
unsigned
int
unSize
=
m_ulRecordSize
-
4
;
bool
bFixedLength
=
unSize
<=
0x0140
?
true
:
false
;
unsigned
int
ulIndex
;
CEmfLogFont
*
pFont
=
new
CEmfLogFont
(
bFixedLength
);
if
(
!
pFont
)
return
SetError
();
m_oStream
>>
ulIndex
;
m_oStream
>>
*
pFont
;
m_oPlayer
.
RegisterObject
(
ulIndex
,
(
CEmfObjectBase
*
)
pFont
);
}
void
Read_EMR_SETTEXTALIGN
()
...
...
DesktopEditor/raster/Metafile/Emf/EmfObjects.h
View file @
b6dfe6ee
...
...
@@ -117,9 +117,10 @@ namespace MetaFile
class
CEmfLogFont
:
public
CEmfObjectBase
,
public
IFont
{
public:
CEmfLogFont
()
CEmfLogFont
(
bool
bFixedLength
=
false
)
{
DesignVector
.
Values
=
NULL
;
m_bFixedLength
=
bFixedLength
;
}
virtual
~
CEmfLogFont
()
{
...
...
@@ -164,11 +165,19 @@ namespace MetaFile
{
return
LogFontEx
.
LogFont
.
CharSet
;
}
bool
IsFixedLength
()
{
return
m_bFixedLength
;
}
public:
TEmfLogFontEx
LogFontEx
;
TEmfDesignVector
DesignVector
;
private:
bool
m_bFixedLength
;
};
class
CEmfLogPen
:
public
CEmfObjectBase
,
public
IPen
...
...
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