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
6b3594b5
Commit
6b3594b5
authored
Nov 16, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #33397
parent
7195d442
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
14 deletions
+38
-14
ASCOfficeDocFile/DocDocxConverter/DocumentMapping.cpp
ASCOfficeDocFile/DocDocxConverter/DocumentMapping.cpp
+35
-11
ASCOfficeDocFile/DocDocxConverter/DocumentMapping.h
ASCOfficeDocFile/DocDocxConverter/DocumentMapping.h
+1
-1
ASCOfficeDocFile/Win32/OfficeDocFile_VS2005.sln
ASCOfficeDocFile/Win32/OfficeDocFile_VS2005.sln
+2
-2
No files found.
ASCOfficeDocFile/DocDocxConverter/DocumentMapping.cpp
View file @
6b3594b5
...
@@ -342,6 +342,7 @@ namespace DocFileFormat
...
@@ -342,6 +342,7 @@ namespace DocFileFormat
int
DocumentMapping
::
writeRun
(
std
::
vector
<
wchar_t
>*
chars
,
CharacterPropertyExceptions
*
chpx
,
int
initialCp
)
int
DocumentMapping
::
writeRun
(
std
::
vector
<
wchar_t
>*
chars
,
CharacterPropertyExceptions
*
chpx
,
int
initialCp
)
{
{
int
cp
=
initialCp
;
int
cp
=
initialCp
;
int
result_cp
=
cp
+
chars
->
size
();
if
((
_skipRuns
<=
0
)
&&
(
chars
->
size
()
>
0
))
if
((
_skipRuns
<=
0
)
&&
(
chars
->
size
()
>
0
))
{
{
...
@@ -408,7 +409,9 @@ namespace DocFileFormat
...
@@ -408,7 +409,9 @@ namespace DocFileFormat
}
}
else
else
{
{
writeText
(
chars
,
cp
,
chpx
,
false
);
int
new_result_cp
=
writeText
(
chars
,
cp
,
chpx
,
false
);
if
(
new_result_cp
>
result_cp
)
result_cp
=
new_result_cp
;
}
}
//end run
//end run
...
@@ -434,11 +437,11 @@ namespace DocFileFormat
...
@@ -434,11 +437,11 @@ namespace DocFileFormat
--
_skipRuns
;
--
_skipRuns
;
}
}
return
cp
+
(
int
)
chars
->
size
()
;
return
result_cp
;
}
}
// Writes the given text to the document
// Writes the given text to the document
void
DocumentMapping
::
writeText
(
std
::
vector
<
wchar_t
>*
chars
,
int
initialCp
,
CharacterPropertyExceptions
*
chpx
,
bool
writeDeletedText
)
int
DocumentMapping
::
writeText
(
std
::
vector
<
wchar_t
>*
chars
,
int
initialCp
,
CharacterPropertyExceptions
*
chpx
,
bool
writeDeletedText
)
{
{
int
cp
=
initialCp
;
int
cp
=
initialCp
;
...
@@ -728,8 +731,14 @@ namespace DocFileFormat
...
@@ -728,8 +731,14 @@ namespace DocFileFormat
}
}
}
}
if
(
bEMBED
)
_skipRuns
=
3
;
if
(
bEMBED
)
else
_skipRuns
=
5
;
{
//Приложения_011015.doc(9 стр) ellipt_eq.doc конфликтные
cp
=
cpFieldEnd
;
_skipRuns
=
3
;
}
else
_skipRuns
=
5
;
}
}
else
else
{
{
...
@@ -833,7 +842,10 @@ namespace DocFileFormat
...
@@ -833,7 +842,10 @@ namespace DocFileFormat
}
}
else
if
((
oPicture
.
mfp
.
mm
>
98
)
&&
(
NULL
!=
oPicture
.
shapeContainer
))
else
if
((
oPicture
.
mfp
.
mm
>
98
)
&&
(
NULL
!=
oPicture
.
shapeContainer
))
{
{
m_pXmlWriter
->
WriteNodeBegin
(
_T
(
"w:pict"
));
bool
bFormula
=
false
;
XMLTools
::
CStringXmlWriter
pictWriter
;
pictWriter
.
WriteNodeBegin
(
_T
(
"w:pict"
));
bool
picture
=
true
;
bool
picture
=
true
;
...
@@ -846,13 +858,13 @@ namespace DocFileFormat
...
@@ -846,13 +858,13 @@ namespace DocFileFormat
if
(
picture
)
if
(
picture
)
{
{
VMLPictureMapping
oVmlMapper
(
m_context
,
m_pXml
Writer
,
false
,
_caller
,
isInline
);
VMLPictureMapping
oVmlMapper
(
m_context
,
&
pict
Writer
,
false
,
_caller
,
isInline
);
oPicture
.
Convert
(
&
oVmlMapper
);
oPicture
.
Convert
(
&
oVmlMapper
);
if
(
oVmlMapper
.
m_isEmbedded
)
if
(
oVmlMapper
.
m_isEmbedded
)
{
{
OleObject
ole
(
chpx
,
m_document
->
GetStorage
(),
m_document
->
bOlderVersion
);
OleObject
ole
(
chpx
,
m_document
->
GetStorage
(),
m_document
->
bOlderVersion
);
OleObjectMapping
oleObjectMapping
(
m_pXml
Writer
,
m_context
,
&
oPicture
,
_caller
,
oVmlMapper
.
GetShapeId
()
);
OleObjectMapping
oleObjectMapping
(
&
pict
Writer
,
m_context
,
&
oPicture
,
_caller
,
oVmlMapper
.
GetShapeId
()
);
ole
.
isEquation
=
oVmlMapper
.
m_isEquation
;
ole
.
isEquation
=
oVmlMapper
.
m_isEquation
;
ole
.
isEmbedded
=
oVmlMapper
.
m_isEmbedded
;
ole
.
isEmbedded
=
oVmlMapper
.
m_isEmbedded
;
...
@@ -860,13 +872,24 @@ namespace DocFileFormat
...
@@ -860,13 +872,24 @@ namespace DocFileFormat
ole
.
Convert
(
&
oleObjectMapping
);
ole
.
Convert
(
&
oleObjectMapping
);
}
}
else
if
(
oVmlMapper
.
m_isEquation
)
{
//нельзя в Run писать oMath
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml.c_str());
_writeAfterRun
=
oVmlMapper
.
m_equationXml
;
bFormula
=
true
;
}
}
else
}
else
{
{
VMLShapeMapping
oVmlMapper
(
m_context
,
m_pXml
Writer
,
NULL
,
&
oPicture
,
_caller
,
isInline
);
VMLShapeMapping
oVmlMapper
(
m_context
,
&
pict
Writer
,
NULL
,
&
oPicture
,
_caller
,
isInline
);
oPicture
.
shapeContainer
->
Convert
(
&
oVmlMapper
);
oPicture
.
shapeContainer
->
Convert
(
&
oVmlMapper
);
}
}
m_pXmlWriter
->
WriteNodeEnd
(
_T
(
"w:pict"
));
pictWriter
.
WriteNodeEnd
(
_T
(
"w:pict"
));
if
(
!
bFormula
)
m_pXmlWriter
->
WriteString
(
pictWriter
.
GetXmlString
());
}
}
}
}
else
if
((
TextMark
::
AutoNumberedFootnoteReference
==
code
)
&&
fSpec
)
else
if
((
TextMark
::
AutoNumberedFootnoteReference
==
code
)
&&
fSpec
)
...
@@ -929,6 +952,7 @@ namespace DocFileFormat
...
@@ -929,6 +952,7 @@ namespace DocFileFormat
writeTextEnd
(
textType
);
writeTextEnd
(
textType
);
}
}
return
cp
;
}
}
void
DocumentMapping
::
writeTextElement
(
const
std
::
wstring
&
text
,
const
std
::
wstring
&
textType
)
void
DocumentMapping
::
writeTextElement
(
const
std
::
wstring
&
text
,
const
std
::
wstring
&
textType
)
...
...
ASCOfficeDocFile/DocDocxConverter/DocumentMapping.h
View file @
6b3594b5
...
@@ -91,7 +91,7 @@ namespace DocFileFormat
...
@@ -91,7 +91,7 @@ namespace DocFileFormat
int
writeRun
(
std
::
vector
<
wchar_t
>*
chars
,
CharacterPropertyExceptions
*
chpx
,
int
initialCp
);
int
writeRun
(
std
::
vector
<
wchar_t
>*
chars
,
CharacterPropertyExceptions
*
chpx
,
int
initialCp
);
/// Writes the given text to the document
/// Writes the given text to the document
void
writeText
(
std
::
vector
<
wchar_t
>*
chars
,
int
initialCp
,
CharacterPropertyExceptions
*
chpx
,
bool
writeDeletedText
);
int
writeText
(
std
::
vector
<
wchar_t
>*
chars
,
int
initialCp
,
CharacterPropertyExceptions
*
chpx
,
bool
writeDeletedText
);
void
writeTextElement
(
const
std
::
wstring
&
text
,
const
std
::
wstring
&
textType
);
void
writeTextElement
(
const
std
::
wstring
&
text
,
const
std
::
wstring
&
textType
);
void
writeTextStart
(
const
std
::
wstring
&
textType
,
bool
preserve_space
);
void
writeTextStart
(
const
std
::
wstring
&
textType
,
bool
preserve_space
);
void
writeTextEnd
(
const
std
::
wstring
&
textType
);
void
writeTextEnd
(
const
std
::
wstring
&
textType
);
...
...
ASCOfficeDocFile/Win32/OfficeDocFile_VS2005.sln
View file @
6b3594b5
...
@@ -55,17 +55,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsFormat", "..\..\ASCOffic
...
@@ -55,17 +55,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsFormat", "..\..\ASCOffic
EndProject
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocFormatTest", "..\DocFormatTest\DocFormatTest.vcproj", "{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocFormatTest", "..\DocFormatTest\DocFormatTest.vcproj", "{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
ProjectSection(ProjectDependencies) = postProject
ProjectSection(ProjectDependencies) = postProject
{C5371405-338F-4B70-83BD-2A5CDF64F383} = {C5371405-338F-4B70-83BD-2A5CDF64F383}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C} = {C27E9A9F-3A17-4482-9C5F-BF15C01E747C}
{C27E9A9F-3A17-4482-9C5F-BF15C01E747C} = {C27E9A9F-3A17-4482-9C5F-BF15C01E747C}
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
{C5371405-338F-4B70-83BD-2A5CDF64F383} = {C5371405-338F-4B70-83BD-2A5CDF64F383}
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D} = {77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}
{77DDC8D7-5B12-4FF2-9629-26AEBCA8436D} = {77DDC8D7-5B12-4FF2-9629-26AEBCA8436D}
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
EndProjectSection
EndProjectSection
EndProject
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\..\Common\DocxFormat\Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\..\Common\DocxFormat\Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
...
...
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