Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
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
sdkjs
Commits
86507cd1
Commit
86507cd1
authored
Jun 06, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix presentation numbering bugs
parent
249b8741
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
382 additions
and
409 deletions
+382
-409
common/Drawings/Format/DrawingContent.js
common/Drawings/Format/DrawingContent.js
+10
-2
common/Drawings/Format/Format.js
common/Drawings/Format/Format.js
+1
-1
common/Shapes/Serialize.js
common/Shapes/Serialize.js
+10
-10
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+1
-1
slide/Editor/Format/ShapePrototype.js
slide/Editor/Format/ShapePrototype.js
+1
-1
word/Editor/GraphicObjects/DrawingStates.js
word/Editor/GraphicObjects/DrawingStates.js
+105
-108
word/Editor/GraphicObjects/GraphicObjects.js
word/Editor/GraphicObjects/GraphicObjects.js
+2
-7
word/Editor/Numbering.js
word/Editor/Numbering.js
+200
-262
word/Editor/Paragraph_Recalculate.js
word/Editor/Paragraph_Recalculate.js
+1
-1
word/Editor/Styles.js
word/Editor/Styles.js
+51
-16
No files found.
common/Drawings/Format/DrawingContent.js
View file @
86507cd1
...
...
@@ -133,9 +133,17 @@
this
.
Start_Recalculate
(
fWidth
,
fHeight
);
if
(
this
.
Pages
.
length
>
1
){
var
fSummaryHeight
=
this
.
Get_SummaryHeight
();
var
fNeedHeight
=
fSummaryHeight
;
var
fLow
=
fHeight
,
fHigh
=
fSummaryHeight
;
this
.
Start_Recalculate
(
fWidth
,
fHigh
);
var
nItCount
=
0
;
while
(
this
.
Pages
.
length
>
1
&&
nItCount
<
5
){
fHigh
+=
fSummaryHeight
;
this
.
Start_Recalculate
(
fWidth
,
fHigh
);
++
nItCount
;
}
var
fNeedHeight
=
fHigh
;
if
(
this
.
Get_ColumnsCount
()
>
1
){
var
fLow
=
fHeight
,
fHigh
=
fSummaryHeight
;
while
((
fHigh
-
fLow
)
>
0.1
){
var
fCheckHeight
=
fLow
+
(
fHigh
-
fLow
)
/
2
;
this
.
Start_Recalculate
(
fWidth
,
fCheckHeight
);
...
...
common/Drawings/Format/Format.js
View file @
86507cd1
...
...
@@ -8485,7 +8485,7 @@ CBullet.prototype =
function
CBulletColor
()
{
this
.
type
=
AscFormat
.
BULLET_TYPE_COLOR_
NONE
;
this
.
type
=
AscFormat
.
BULLET_TYPE_COLOR_
CLRTX
;
this
.
UniColor
=
null
;
}
...
...
common/Shapes/Serialize.js
View file @
86507cd1
...
...
@@ -7824,13 +7824,13 @@ function BinaryPPTYLoader()
}
case
3
:
{
b_bullet
=
true
;
bullet
.
bulletColor
=
new
AscFormat
.
CBulletColor
();
var
cur_pos
=
s
.
cur
;
var
_len
=
s
.
GetULong
();
if
(
0
!=
_len
)
{
b_bullet
=
true
;
bullet
.
bulletColor
=
new
AscFormat
.
CBulletColor
();
bullet
.
bulletColor
.
type
=
s
.
GetUChar
();
if
(
bullet
.
bulletColor
.
type
==
AscFormat
.
BULLET_TYPE_COLOR_CLRTX
)
...
...
@@ -7849,13 +7849,13 @@ function BinaryPPTYLoader()
}
case
4
:
{
b_bullet
=
true
;
bullet
.
bulletSize
=
new
AscFormat
.
CBulletSize
();
var
cur_pos
=
s
.
cur
;
var
_len
=
s
.
GetULong
();
if
(
0
!=
_len
)
{
b_bullet
=
true
;
bullet
.
bulletSize
=
new
AscFormat
.
CBulletSize
();
bullet
.
bulletSize
.
type
=
s
.
GetUChar
();
if
(
bullet
.
bulletSize
.
type
==
AscFormat
.
BULLET_TYPE_SIZE_TX
)
...
...
@@ -7865,7 +7865,7 @@ function BinaryPPTYLoader()
else
{
var
_l
=
s
.
GetULong
();
s
.
Skip2
(
2
);
// start attributes + type
value (need 0)
s
.
Skip2
(
2
);
// start attributes + type
bullet
.
bulletSize
.
val
=
s
.
GetLong
();
s
.
Skip2
(
1
);
// end attributes
}
...
...
@@ -7875,13 +7875,13 @@ function BinaryPPTYLoader()
}
case
5
:
{
b_bullet
=
true
;
bullet
.
bulletTypeface
=
new
AscFormat
.
CBulletTypeface
();
var
cur_pos
=
s
.
cur
;
var
_len
=
s
.
GetULong
();
if
(
0
!=
_len
)
{
b_bullet
=
true
;
bullet
.
bulletTypeface
=
new
AscFormat
.
CBulletTypeface
();
bullet
.
bulletTypeface
.
type
=
s
.
GetUChar
();
if
(
bullet
.
bulletTypeface
.
type
==
AscFormat
.
BULLET_TYPE_TYPEFACE_BUFONT
)
...
...
@@ -7898,13 +7898,13 @@ function BinaryPPTYLoader()
}
case
6
:
{
b_bullet
=
true
;
bullet
.
bulletType
=
new
AscFormat
.
CBulletType
();
var
cur_pos
=
s
.
cur
;
var
_len
=
s
.
GetULong
();
if
(
0
!=
_len
)
{
b_bullet
=
true
;
bullet
.
bulletType
=
new
AscFormat
.
CBulletType
();
bullet
.
bulletType
.
type
=
s
.
GetUChar
();
if
(
bullet
.
bulletType
.
type
==
AscFormat
.
BULLET_TYPE_BULLET_NONE
)
...
...
slide/Editor/Format/Presentation.js
View file @
86507cd1
...
...
@@ -3106,7 +3106,7 @@ CPresentation.prototype =
{
target_doc_content1
=
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
getTargetDocContent
();
}
this
.
AddToParagraph
(
new
ParaText
(
String
.
fromCharCode
(
Code
)
),
undefined
,
true
);
this
.
AddToParagraph
(
new
ParaText
(
String
.
fromCharCode
(
Code
)
),
false
,
true
);
if
(
this
.
Slides
[
this
.
CurPage
])
{
target_doc_content2
=
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
getTargetDocContent
();
...
...
slide/Editor/Format/ShapePrototype.js
View file @
86507cd1
...
...
@@ -687,7 +687,7 @@ CShape.prototype.recalculateContent2 = function()
}
content
.
Set_StartPage
(
0
);
content
.
Reset
(
0
,
0
,
w
,
20000
);
content
.
Recalculate
_Page
(
content
.
StartPage
,
true
);
content
.
Recalculate
Content
(
this
.
txBody
.
contentWidth2
,
this
.
txBody
.
contentHeight2
,
0
);
var
oTextWarpContent
=
this
.
checkTextWarp
(
content
,
body_pr
,
this
.
txBody
.
contentWidth2
,
this
.
txBody
.
contentHeight2
,
false
,
true
);
this
.
txWarpStructParamarks2
=
oTextWarpContent
.
oTxWarpStructParamarks
;
...
...
word/Editor/GraphicObjects/DrawingStates.js
View file @
86507cd1
This diff is collapsed.
Click to expand it.
word/Editor/GraphicObjects/GraphicObjects.js
View file @
86507cd1
...
...
@@ -258,7 +258,7 @@ CGraphicObjects.prototype =
isViewMode
:
function
()
{
return
editor
.
isViewMode
;
return
this
.
document
.
IsViewMode
()
;
},
convertPixToMM
:
function
(
v
)
...
...
@@ -2657,7 +2657,7 @@ CGraphicObjects.prototype =
unGroupSelectedObjects
:
function
()
{
if
(
!
(
editor
.
isViewMode
===
false
))
if
(
!
(
this
.
isViewMode
()
===
false
))
return
;
var
bTrackRevisions
=
false
;
if
(
this
.
document
.
TrackRevisions
){
...
...
@@ -2784,11 +2784,6 @@ CGraphicObjects.prototype =
return
false
;
},
isViewMod
:
function
()
{
return
editor
.
isViewMode
;
},
moveSelectedObjects
:
DrawingObjectsController
.
prototype
.
moveSelectedObjects
,
cursorMoveLeft
:
DrawingObjectsController
.
prototype
.
cursorMoveLeft
,
...
...
word/Editor/Numbering.js
View file @
86507cd1
This diff is collapsed.
Click to expand it.
word/Editor/Paragraph_Recalculate.js
View file @
86507cd1
...
...
@@ -2989,7 +2989,7 @@ CParagraphRecalculateStateWrap.prototype =
NumberingItem
.
Bullet
=
Bullet
;
NumberingItem
.
BulletNum
=
BulletNum
+
1
;
NumberingItem
.
Measure
(
g_oTextMeasurer
,
FirstTextPr
,
Para
.
Get_Theme
());
NumberingItem
.
Measure
(
g_oTextMeasurer
,
FirstTextPr
,
Para
.
Get_Theme
()
,
Para
.
Get_ColorMap
()
);
if
(
numbering_presentationnumfrmt_None
!=
Bullet
.
Get_Type
()
)
...
...
word/Editor/Styles.js
View file @
86507cd1
...
...
@@ -9340,8 +9340,27 @@ CParaPr.prototype =
this
.
DefaultRunPr
.
Merge
(
ParaPr
.
DefaultRunPr
);
}
if
(
undefined
!=
ParaPr
.
Bullet
&&
ParaPr
.
Bullet
.
isBullet
())
this
.
Bullet
=
ParaPr
.
Bullet
.
createDuplicate
();
if
(
undefined
!=
ParaPr
.
Bullet
)
{
if
(
ParaPr
.
Bullet
.
isBullet
())
{
this
.
Bullet
=
ParaPr
.
Bullet
.
createDuplicate
();
}
else
{
if
(
this
.
Bullet
&&
this
.
Bullet
.
isBullet
()){
if
(
ParaPr
.
Bullet
.
bulletColor
){
this
.
Bullet
.
bulletColor
=
ParaPr
.
Bullet
.
bulletColor
.
createDuplicate
();
}
if
(
ParaPr
.
Bullet
.
bulletSize
){
this
.
Bullet
.
bulletSize
=
ParaPr
.
Bullet
.
bulletSize
.
createDuplicate
();
}
if
(
ParaPr
.
Bullet
.
bulletTypeface
){
this
.
Bullet
.
bulletTypeface
=
ParaPr
.
Bullet
.
bulletTypeface
.
createDuplicate
();
}
}
}
}
if
(
undefined
!=
ParaPr
.
Lvl
)
this
.
Lvl
=
ParaPr
.
Lvl
;
...
...
@@ -9956,11 +9975,6 @@ CParaPr.prototype =
{
Bullet
.
m_sChar
=
"
•
"
;
}
if
(
this
.
Bullet
.
bulletTypeface
&&
this
.
Bullet
.
bulletTypeface
.
type
==
AscFormat
.
BULLET_TYPE_TYPEFACE_BUFONT
)
{
Bullet
.
m_bFontTx
=
false
;
Bullet
.
m_sFont
=
this
.
Bullet
.
bulletTypeface
.
typeface
;
}
break
;
}
...
...
@@ -9968,11 +9982,6 @@ CParaPr.prototype =
{
Bullet
.
m_nType
=
g_NumberingArr
[
this
.
Bullet
.
bulletType
.
AutoNumType
];
Bullet
.
m_nStartAt
=
this
.
Bullet
.
bulletType
.
startAt
;
if
(
this
.
Bullet
.
bulletTypeface
&&
this
.
Bullet
.
bulletTypeface
.
type
==
AscFormat
.
BULLET_TYPE_TYPEFACE_BUFONT
)
{
Bullet
.
m_bFontTx
=
false
;
Bullet
.
m_sFont
=
this
.
Bullet
.
bulletTypeface
.
typeface
;
}
break
;
}
case
AscFormat
.
BULLET_TYPE_BULLET_NONE
:
...
...
@@ -9995,10 +10004,36 @@ CParaPr.prototype =
if
(
this
.
Bullet
.
bulletColor
.
type
===
AscFormat
.
BULLET_TYPE_COLOR_CLR
){
if
(
this
.
Bullet
.
bulletColor
.
UniColor
&&
this
.
Bullet
.
bulletColor
.
UniColor
.
color
&&
theme
&&
colorMap
){
Bullet
.
m_bColorTx
=
false
;
this
.
Bullet
.
bulletColor
.
UniColor
.
check
(
theme
,
colorMap
);
Bullet
.
m_oColor
.
r
=
this
.
Bullet
.
bulletColor
.
UniColor
.
RGBA
.
R
;
Bullet
.
m_oColor
.
g
=
this
.
Bullet
.
bulletColor
.
UniColor
.
RGBA
.
G
;
Bullet
.
m_oColor
.
b
=
this
.
Bullet
.
bulletColor
.
UniColor
.
RGBA
.
B
;
Bullet
.
Unifill
=
AscFormat
.
CreateUniFillByUniColor
(
this
.
Bullet
.
bulletColor
.
UniColor
);
}
}
}
if
(
this
.
Bullet
.
bulletTypeface
)
{
if
(
this
.
Bullet
.
bulletTypeface
.
type
==
AscFormat
.
BULLET_TYPE_TYPEFACE_BUFONT
){
Bullet
.
m_bFontTx
=
false
;
Bullet
.
m_sFont
=
this
.
Bullet
.
bulletTypeface
.
typeface
;
}
}
if
(
this
.
Bullet
.
bulletSize
)
{
switch
(
this
.
Bullet
.
bulletSize
.
type
){
case
AscFormat
.
BULLET_TYPE_SIZE_TX
:{
Bullet
.
m_bSizeTx
=
true
;
break
;
}
case
AscFormat
.
BULLET_TYPE_SIZE_PCT
:{
Bullet
.
m_bSizeTx
=
false
;
Bullet
.
m_bSizePct
=
true
;
Bullet
.
m_dSize
=
this
.
Bullet
.
bulletSize
.
val
/
100000.0
;
break
;
}
case
AscFormat
.
BULLET_TYPE_SIZE_PCT
:{
Bullet
.
m_bSizeTx
=
false
;
Bullet
.
m_bSizePct
=
false
;
Bullet
.
m_dSize
=
this
.
Bullet
.
bulletSize
.
val
/
100000.0
;
break
;
}
}
}
...
...
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