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
f9a19bad
Commit
f9a19bad
authored
Apr 24, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DocFormatReader - fix embedded docx formula
parent
d2630ea7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.cpp
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.cpp
+10
-5
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.h
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.h
+1
-1
ASCOfficeDocFile/DocDocxConverter/WordDocument.h
ASCOfficeDocFile/DocDocxConverter/WordDocument.h
+1
-0
No files found.
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.cpp
View file @
f9a19bad
...
...
@@ -136,14 +136,18 @@ namespace DocFileFormat
}
return
btWin32
;
}
bool
ParseEmbeddedEquation
(
const
std
::
string
&
xmlString
,
std
::
wstring
&
newXmlString
)
bool
VMLPictureMapping
::
ParseEmbeddedEquation
(
const
std
::
string
&
xmlString
,
std
::
wstring
&
newXmlString
)
{
newXmlString
.
clear
();
std
::
wstring
sTempXmlFile
=
NSDirectory
::
CreateTempFileWithUniqueName
(
NSDirectory
::
GetTempPath
(),
L"emb"
);
sTempXmlFile
+=
L".xml"
;
std
::
wstring
sTempFolder
=
m_ctx
->
_doc
->
m_sTempFolder
;
if
(
sTempFolder
.
empty
())
{
sTempFolder
=
NSFile
::
CFileBinary
::
GetTempPath
();
}
std
::
wstring
sTempXmlFile
=
NSDirectory
::
CreateTempFileWithUniqueName
(
sTempFolder
,
L"emb"
);
NSFile
::
CFileBinary
file
;
file
.
CreateFileW
(
sTempXmlFile
);
file
.
WriteFile
((
BYTE
*
)
xmlString
.
c_str
(),
xmlString
.
size
());
...
...
@@ -186,6 +190,7 @@ namespace DocFileFormat
if
(
res
)
break
;
}
}
NSFile
::
CFileBinary
::
Remove
(
sTempXmlFile
);
return
res
;
}
//---------------------------------------------------------------
...
...
ASCOfficeDocFile/DocDocxConverter/VMLPictureMapping.h
View file @
f9a19bad
...
...
@@ -46,7 +46,6 @@ namespace DocFileFormat
{
class
OleObject
;
bool
ParseEmbeddedEquation
(
const
std
::
string
&
xmlString
,
std
::
wstring
&
newXmlString
);
class
VMLPictureMapping
:
public
PropertiesMapping
,
public
IMapping
{
...
...
@@ -58,6 +57,7 @@ namespace DocFileFormat
/// Writes a border element
void
writePictureBorder
(
const
std
::
wstring
&
name
,
const
BorderCode
*
brc
);
void
appendStyleProperty
(
std
::
wstring
*
b
,
const
std
::
wstring
&
propName
,
const
std
::
wstring
&
propValue
)
const
;
bool
ParseEmbeddedEquation
(
const
std
::
string
&
xmlString
,
std
::
wstring
&
newXmlString
);
protected:
/// Copies the picture from the binary stream to the zip archive
/// and creates the relationships for the image.
...
...
ASCOfficeDocFile/DocDocxConverter/WordDocument.h
View file @
f9a19bad
...
...
@@ -86,6 +86,7 @@ namespace DocFileFormat
friend
class
Table
;
friend
class
TableRow
;
friend
class
VMLShapeMapping
;
friend
class
VMLPictureMapping
;
friend
class
OpenXmlPackage
;
friend
class
TextboxMapping
;
...
...
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