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
652fc292
Commit
652fc292
authored
Dec 16, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DocFormatReader - same bugs fix
parent
2ff5bd59
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
133 additions
and
169 deletions
+133
-169
ASCOfficeDocFile/DocDocxConverter/ParagraphPropertiesMapping.cpp
...ceDocFile/DocDocxConverter/ParagraphPropertiesMapping.cpp
+16
-17
ASCOfficeDocFile/DocDocxConverter/ParagraphPropertiesMapping.h
...ficeDocFile/DocDocxConverter/ParagraphPropertiesMapping.h
+12
-13
ASCOfficeDocFile/DocDocxConverter/SectionPropertiesMapping.cpp
...ficeDocFile/DocDocxConverter/SectionPropertiesMapping.cpp
+102
-136
ASCOfficeDocFile/DocDocxConverter/SectionPropertyExceptions.h
...fficeDocFile/DocDocxConverter/SectionPropertyExceptions.h
+2
-2
ASCOfficeDocFile/DocDocxConverter/VMLShapeMapping.cpp
ASCOfficeDocFile/DocDocxConverter/VMLShapeMapping.cpp
+1
-1
No files found.
ASCOfficeDocFile/DocDocxConverter/ParagraphPropertiesMapping.cpp
View file @
652fc292
...
@@ -318,10 +318,13 @@ namespace DocFileFormat
...
@@ -318,10 +318,13 @@ namespace DocFileFormat
iter
->
Arguments
[
0
]
=
(
iter
->
Arguments
[
0
]
==
0
?
2
:
0
);
iter
->
Arguments
[
0
]
=
(
iter
->
Arguments
[
0
]
==
0
?
2
:
0
);
}
}
RELEASEOBJECT
(
jc
);
RELEASEOBJECT
(
jc
);
jc
=
new
XMLTools
::
XMLElement
<
wchar_t
>
(
_T
(
"w:jc"
)
);
jc
=
new
XMLTools
::
XMLElement
<
wchar_t
>
(
L"w:jc"
);
XMLTools
::
XMLAttribute
<
wchar_t
>
jcVal
(
_T
(
"w:val"
),
FormatUtils
::
MapValueToWideString
(
iter
->
Arguments
[
0
],
&
Global
::
JustificationCode
[
0
][
0
],
10
,
15
).
c_str
()
);
if
(
jc
)
{
XMLTools
::
XMLAttribute
<
wchar_t
>
jcVal
(
L"w:val"
,
FormatUtils
::
MapValueToWideString
(
iter
->
Arguments
[
0
],
&
Global
::
JustificationCode
[
0
][
0
],
10
,
15
).
c_str
()
);
jc
->
AppendAttribute
(
jcVal
);
jc
->
AppendAttribute
(
jcVal
);
}
}
}
break
;
break
;
//borders
//borders
...
@@ -485,8 +488,8 @@ namespace DocFileFormat
...
@@ -485,8 +488,8 @@ namespace DocFileFormat
}
}
break
;
break
;
//tabs
case
sprmOldPChgTabs
:
case
sprmOldPChgTabs
:
//tabs
case
sprmPChgTabsPapx
:
case
sprmPChgTabsPapx
:
case
sprmPChgTabs
:
case
sprmPChgTabs
:
{
{
...
@@ -664,27 +667,23 @@ namespace DocFileFormat
...
@@ -664,27 +667,23 @@ namespace DocFileFormat
_pPr
->
AppendChild
(
ind
);
_pPr
->
AppendChild
(
ind
);
}
}
//append spacing
if
(
spacing
.
GetAttributeCount
()
>
0
)
//append spacing
if
(
spacing
.
GetAttributeCount
()
>
0
)
{
{
_pPr
->
AppendChild
(
spacing
);
_pPr
->
AppendChild
(
spacing
);
}
}
//append justification
if
(
jc
)
//append justification
if
(
jc
!=
NULL
)
{
{
_pPr
->
AppendChild
(
*
jc
);
_pPr
->
AppendChild
(
*
jc
);
RELEASEOBJECT
(
jc
);
RELEASEOBJECT
(
jc
);
}
}
//append numPr
if
(
numPr
.
GetChildCount
()
>
0
)
//append numPr
if
(
numPr
.
GetChildCount
()
>
0
)
{
{
_pPr
->
AppendChild
(
numPr
);
_pPr
->
AppendChild
(
numPr
);
}
}
//append borders
if
(
pBdr
.
GetChildCount
()
>
0
)
//append borders
if
(
pBdr
.
GetChildCount
()
>
0
)
{
{
_pPr
->
AppendChild
(
pBdr
);
_pPr
->
AppendChild
(
pBdr
);
}
}
...
...
ASCOfficeDocFile/DocDocxConverter/ParagraphPropertiesMapping.h
View file @
652fc292
...
@@ -46,8 +46,8 @@ namespace DocFileFormat
...
@@ -46,8 +46,8 @@ namespace DocFileFormat
class
ParagraphPropertiesMapping
:
public
PropertiesMapping
,
public
IMapping
class
ParagraphPropertiesMapping
:
public
PropertiesMapping
,
public
IMapping
{
{
public:
public:
ParagraphPropertiesMapping
(
XMLTools
::
CStringXmlWriter
*
writer
,
ConversionContext
*
ctx
,
WordDocument
*
document
,
CharacterPropertyExceptions
*
paraEndChpx
,
bool
isBidi
,
bool
isParagraphStyleNeeded
=
true
);
ParagraphPropertiesMapping
(
XMLTools
::
CStringXmlWriter
*
writer
,
ConversionContext
*
ctx
,
WordDocument
*
document
,
CharacterPropertyExceptions
*
paraEndChpx
,
bool
isBidi
,
bool
isParagraphStyleNeeded
=
true
);
ParagraphPropertiesMapping
(
XMLTools
::
CStringXmlWriter
*
writer
,
ConversionContext
*
ctx
,
WordDocument
*
document
,
CharacterPropertyExceptions
*
paraEndChpx
,
bool
isBidi
,
SectionPropertyExceptions
*
sepx
,
int
sectionNr
,
bool
isParagraphStyleNeeded
=
true
);
ParagraphPropertiesMapping
(
XMLTools
::
CStringXmlWriter
*
writer
,
ConversionContext
*
ctx
,
WordDocument
*
document
,
CharacterPropertyExceptions
*
paraEndChpx
,
bool
isBidi
,
SectionPropertyExceptions
*
sepx
,
int
sectionNr
,
bool
isParagraphStyleNeeded
=
true
);
virtual
~
ParagraphPropertiesMapping
();
virtual
~
ParagraphPropertiesMapping
();
void
Apply
(
IVisitable
*
visited
);
void
Apply
(
IVisitable
*
visited
);
...
@@ -65,7 +65,6 @@ namespace DocFileFormat
...
@@ -65,7 +65,6 @@ namespace DocFileFormat
bool
_isParagraphStyleNeeded
;
bool
_isParagraphStyleNeeded
;
bool
_isBidi
;
bool
_isBidi
;
int
_isSectionPageBreak
;
int
_isSectionPageBreak
;
};
};
}
}
ASCOfficeDocFile/DocDocxConverter/SectionPropertiesMapping.cpp
View file @
652fc292
This diff is collapsed.
Click to expand it.
ASCOfficeDocFile/DocDocxConverter/SectionPropertyExceptions.h
View file @
652fc292
...
@@ -42,11 +42,11 @@ namespace DocFileFormat
...
@@ -42,11 +42,11 @@ namespace DocFileFormat
SectionPropertyExceptions
(
unsigned
char
*
bytes
,
int
size
,
bool
oldVersion
)
:
SectionPropertyExceptions
(
unsigned
char
*
bytes
,
int
size
,
bool
oldVersion
)
:
PropertyExceptions
(
bytes
,
size
,
oldVersion
),
isBidi
(
false
)
PropertyExceptions
(
bytes
,
size
,
oldVersion
),
isBidi
(
false
)
{
{
for
(
std
::
list
<
SinglePropertyModifier
>::
iterator
iter
=
this
->
grpprl
->
begin
();
iter
!=
this
->
grpprl
->
end
();
iter
++
)
for
(
std
::
list
<
SinglePropertyModifier
>::
iterator
iter
=
grpprl
->
begin
();
iter
!=
grpprl
->
end
();
iter
++
)
{
{
SinglePropertyModifier
sprm
(
*
iter
);
SinglePropertyModifier
sprm
(
*
iter
);
if
(
sprm
.
OpCode
==
sprmSFBiDi
)
if
(
sprm
.
OpCode
==
sprmSFBiDi
&&
sprm
.
Arguments
[
0
]
!=
0
)
{
{
isBidi
=
true
;
isBidi
=
true
;
}
}
...
...
ASCOfficeDocFile/DocDocxConverter/VMLShapeMapping.cpp
View file @
652fc292
...
@@ -1047,7 +1047,7 @@ namespace DocFileFormat
...
@@ -1047,7 +1047,7 @@ namespace DocFileFormat
//ShapeType
//ShapeType
if
(
NULL
!=
pShape
->
GetShapeType
()
/* && !m_isInlineShape*/
)
//bullete only???
if
(
NULL
!=
pShape
->
GetShapeType
()
/* && !m_isInlineShape*/
)
//bullete only???
{
{
VMLShapeTypeMapping
oXmlMapper
(
m_pXmlWriter
);
VMLShapeTypeMapping
oXmlMapper
(
m_pXmlWriter
,
m_isInlineShape
);
pShape
->
GetShapeType
()
->
Convert
(
&
oXmlMapper
);
pShape
->
GetShapeType
()
->
Convert
(
&
oXmlMapper
);
}
}
}
}
...
...
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