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
84fb75ab
Commit
84fb75ab
authored
Sep 30, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
7595d189
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
11 deletions
+24
-11
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXPictureAnchorReader.h
...fFile/RtfFormatLib/source/Reader/OOXPictureAnchorReader.h
+10
-3
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
...ficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
+14
-8
No files found.
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXPictureAnchorReader.h
View file @
84fb75ab
...
...
@@ -84,8 +84,8 @@ public:
if
(
PROP_DEF
!=
oOutput
.
m_nLeft
&&
PROP_DEF
!=
oOutput
.
m_nTop
)
//всегда !!
{
oOutput
.
m_nRight
=
oOutput
.
m_nLeft
+
nWidth
;
oOutput
.
m_nBottom
=
oOutput
.
m_nTop
+
nHeight
;
oOutput
.
m_nRight
=
oOutput
.
m_nLeft
+
nWidth
;
oOutput
.
m_nBottom
=
oOutput
.
m_nTop
+
nHeight
;
}
}
if
(
m_ooxAnchor
->
m_oPositionH
.
IsInit
()
)
...
...
@@ -315,7 +315,14 @@ public:
int
nNewScale
=
(
int
)(
100
*
(
1.0
*
nHeight
/
oOutput
.
m_oPicture
->
m_nHeightGoal
));
oOutput
.
m_oPicture
->
m_dScaleY
=
nNewScale
;
}
if
(
PROP_DEF
==
oOutput
.
m_nBottom
&&
oOutput
.
m_nTop
!=
PROP_DEF
)
{
oOutput
.
m_nBottom
=
oOutput
.
m_nTop
+
nHeight
;
}
if
(
PROP_DEF
==
oOutput
.
m_nRight
&&
oOutput
.
m_nLeft
!=
PROP_DEF
)
{
oOutput
.
m_nRight
=
oOutput
.
m_nLeft
+
nWidth
;
}
return
true
;
}
};
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
View file @
84fb75ab
...
...
@@ -160,10 +160,9 @@ bool ParseStyle(RtfShape* pShape, SimpleTypes::Vml::CCssProperty* prop)
case
SimpleTypes
:
:
Vml
::
cssptMsoWrapEdited
:
break
;
case
SimpleTypes
:
:
Vml
::
cssptMsoWrapStyle
:
if
(
prop
->
get_Value
().
eMsoWrapStyle
==
SimpleTypes
::
Vml
::
cssmsowrapstyleNone
)
pShape
->
m_nWrapType
=
3
;
else
else
if
(
pShape
->
m_nZOrderRelative
==
PROP_DEF
)
pShape
->
m_nWrapType
=
2
;
break
;
case
SimpleTypes
:
:
Vml
::
cssptPosition
:
...
...
@@ -183,9 +182,15 @@ bool ParseStyle(RtfShape* pShape, SimpleTypes::Vml::CCssProperty* prop)
int
nValue
=
prop
->
get_Value
().
oZIndex
.
nOrder
;
pShape
->
m_nZOrder
=
nValue
;
if
(
nValue
>
0
)
pShape
->
m_nZOrderRelative
=
0
;
{
pShape
->
m_nWrapType
=
3
;
pShape
->
m_nZOrderRelative
=
0
;
}
else
if
(
nValue
<
0
)
pShape
->
m_nZOrderRelative
=
1
;
{
pShape
->
m_nWrapType
=
3
;
pShape
->
m_nZOrderRelative
=
1
;
}
}
break
;
case
SimpleTypes
:
:
Vml
::
cssptFontFamily
:
{
...
...
@@ -425,7 +430,7 @@ bool OOXShapeReader::Parse2( ReaderParameter oParam , RtfShapePtr& oOutput)
{
OOX
::
VmlWord
::
CWrap
*
wrap
=
dynamic_cast
<
OOX
::
VmlWord
::
CWrap
*>
(
m_arrElement
->
m_arrItems
[
i
]);
if
(
wrap
->
m_oType
.
IsInit
())
if
(
wrap
->
m_oType
.
IsInit
()
&&
oOutput
->
m_nZOrderRelative
==
PROP_DEF
)
{
switch
(
wrap
->
m_oType
->
GetValue
())
{
...
...
@@ -436,7 +441,7 @@ bool OOXShapeReader::Parse2( ReaderParameter oParam , RtfShapePtr& oOutput)
case
SimpleTypes
:
:
wraptypeTopAndBottom
:
oOutput
->
m_nWrapType
=
1
;
break
;
}
}
if
(
wrap
->
m_oSide
.
IsInit
())
if
(
wrap
->
m_oSide
.
IsInit
()
&&
oOutput
->
m_nZOrderRelative
==
PROP_DEF
)
{
switch
(
wrap
->
m_oSide
->
GetValue
())
{
...
...
@@ -645,7 +650,8 @@ bool OOXShapeReader::Parse( ReaderParameter oParam , RtfShapePtr& oOutput)
if
(
m_vmlElement
->
m_oWrapCoords
.
IsInit
())
{
if
(
oOutput
->
m_nWrapType
==
3
)
oOutput
->
m_nWrapType
=
2
;
if
(
oOutput
->
m_nWrapType
==
3
&&
oOutput
->
m_nZOrderRelative
==
PROP_DEF
)
oOutput
->
m_nWrapType
=
2
;
int
nPosition
=
0
;
CString
sPoint
=
_T
(
"start"
);
...
...
@@ -711,7 +717,7 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapeGroupPtr& oOut
if
(
m_vmlGroup
->
m_oWrapCoords
.
IsInit
())
{
if
(
oOutput
->
m_nWrapType
==
3
)
oOutput
->
m_nWrapType
=
2
;
if
(
oOutput
->
m_nWrapType
==
3
&&
oOutput
->
m_nZOrderRelative
==
PROP_DEF
)
oOutput
->
m_nWrapType
=
2
;
int
nPosition
=
0
;
CString
sPoint
=
_T
(
"start"
);
for
(
long
i
=
0
;
i
<
m_vmlGroup
->
m_oWrapCoords
->
GetSize
();
i
++
)
...
...
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