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
56d5bbc6
Commit
56d5bbc6
authored
Mar 10, 2017
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 34250
parent
85c01f94
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
3 deletions
+87
-3
common/Charts/DrawingObjects.js
common/Charts/DrawingObjects.js
+2
-0
common/CollaborativeEditingBase.js
common/CollaborativeEditingBase.js
+22
-2
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+26
-0
slide/Editor/Format/Slide.js
slide/Editor/Format/Slide.js
+37
-1
No files found.
common/Charts/DrawingObjects.js
View file @
56d5bbc6
...
...
@@ -990,6 +990,8 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
{
var
oUnifill
=
CreateUniFillFromExcelColor
(
oSparklineGroup
.
colorSeries
);
var
oSerie
=
chart_space
.
chart
.
plotArea
.
charts
[
0
].
series
[
0
];
oSerie
.
setSpPr
(
new
AscFormat
.
CSpPr
());
if
(
nSparklineType
===
Asc
.
c_oAscSparklineType
.
Line
)
{
var
oLn
=
oSerie
.
spPr
.
ln
;
...
...
common/CollaborativeEditingBase.js
View file @
56d5bbc6
...
...
@@ -949,6 +949,8 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
var
mapTables
=
{};
var
mapGrObjects
=
{};
var
mapSlides
=
{};
var
mapLayouts
=
{};
var
bChangedLayout
=
false
;
for
(
var
nIndex
=
0
,
nCount
=
arrReverseChanges
.
length
;
nIndex
<
nCount
;
++
nIndex
)
{
var
oChange
=
arrReverseChanges
[
nIndex
];
...
...
@@ -971,8 +973,14 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
mapTables
[
oClass
.
Get_Id
()]
=
oClass
;
else
if
(
oClass
instanceof
AscFormat
.
CShape
||
oClass
instanceof
AscFormat
.
CImageShape
||
oClass
instanceof
AscFormat
.
CChartSpace
||
oClass
instanceof
AscFormat
.
CGroupShape
||
oClass
instanceof
AscFormat
.
CGraphicFrame
)
mapGrObjects
[
oClass
.
Get_Id
()]
=
oClass
;
else
if
(
typeof
AscCommonSlide
!==
"
undefined
"
&&
AscCommonSlide
.
Slide
&&
oClass
instanceof
AscCommonSlide
.
Slide
){
mapSlides
[
oClass
.
Get_Id
()]
=
oClass
;
else
if
(
typeof
AscCommonSlide
!==
"
undefined
"
)
{
if
(
AscCommonSlide
.
Slide
&&
oClass
instanceof
AscCommonSlide
.
Slide
)
{
mapSlides
[
oClass
.
Get_Id
()]
=
oClass
;
}
else
if
(
AscCommonSlide
.
SlideLayout
&&
oClass
instanceof
AscCommonSlide
.
SlideLayout
){
mapLayouts
[
oClass
.
Get_Id
()]
=
oClass
;
bChangedLayout
=
true
;
}
}
}
...
...
@@ -985,6 +993,18 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
mapSlides
[
sId
].
correctContent
();
}
}
if
(
bChangedLayout
){
for
(
var
i
=
oLogicDocument
.
Slides
.
length
-
1
;
i
>
-
1
;
--
i
){
var
Layout
=
oLogicDocument
.
Slides
[
i
].
Layout
;
if
(
!
Layout
||
mapLayouts
[
Layout
.
Get_Id
()]){
if
(
!
oLogicDocument
.
Slides
[
i
].
CheckLayout
()){
oLogicDocument
.
removeSlide
(
i
);
}
}
}
}
for
(
var
sId
in
mapGrObjects
){
var
oShape
=
mapGrObjects
[
sId
];
if
(
!
oShape
.
checkCorrect
()){
...
...
slide/Editor/Format/Presentation.js
View file @
56d5bbc6
...
...
@@ -943,6 +943,32 @@ CPresentation.prototype =
if
(
_RecalcData
.
Drawings
.
ThemeInfo
)
{
this
.
clearThemeTimeouts
();
if
(
_RecalcData
.
Drawings
&&
_RecalcData
.
Drawings
.
Map
)
{
for
(
key
in
_RecalcData
.
Drawings
.
Map
)
{
if
(
_RecalcData
.
Drawings
.
Map
.
hasOwnProperty
(
key
))
{
var
oSlide
=
_RecalcData
.
Drawings
.
Map
[
key
];
if
(
oSlide
instanceof
AscCommonSlide
.
Slide
&&
AscFormat
.
isRealNumber
(
oSlide
.
num
))
{
var
ArrInd
=
_RecalcData
.
Drawings
.
ThemeInfo
.
ArrInd
;
for
(
i
=
0
;
i
<
ArrInd
.
length
;
++
i
)
{
if
(
oSlide
.
num
===
ArrInd
[
i
])
{
break
;
}
}
if
(
i
===
ArrInd
.
length
)
{
_RecalcData
.
Drawings
.
ThemeInfo
.
ArrInd
.
push
(
oSlide
.
num
);
}
}
}
}
}
var
startRecalcIndex
=
_RecalcData
.
Drawings
.
ThemeInfo
.
ArrInd
.
indexOf
(
this
.
CurPage
);
if
(
startRecalcIndex
===
-
1
)
{
...
...
slide/Editor/Format/Slide.js
View file @
56d5bbc6
...
...
@@ -195,6 +195,11 @@ function Slide(presentation, slideLayout, slideNum)
this
.
Id
=
AscCommon
.
g_oIdCounter
.
Get_NewId
();
g_oTableId
.
Add
(
this
,
this
.
Id
);
this
.
lastLayoutType
=
null
;
this
.
lastLayoutMatchingName
=
null
;
this
.
lastLayoutName
=
null
;
if
(
presentation
)
{
this
.
Width
=
presentation
.
Width
;
...
...
@@ -513,6 +518,11 @@ Slide.prototype =
case
AscDFH
.
historyitem_SlideSetLayout
:
{
this
.
checkSlideTheme
();
if
(
this
.
Layout
){
this
.
lastLayoutType
=
this
.
Layout
.
type
;
this
.
lastLayoutMatchingName
=
this
.
Layout
.
matchingName
;
this
.
lastLayoutName
=
this
.
Layout
.
cSld
.
name
;
}
break
;
}
}
...
...
@@ -560,6 +570,11 @@ Slide.prototype =
{
History
.
Add
(
new
AscDFH
.
CChangesDrawingsObject
(
this
,
AscDFH
.
historyitem_SlideSetLayout
,
this
.
Layout
,
layout
));
this
.
Layout
=
layout
;
if
(
layout
){
this
.
lastLayoutType
=
layout
.
type
;
this
.
lastLayoutMatchingName
=
layout
.
matchingName
;
this
.
lastLayoutName
=
layout
.
cSld
.
name
;
}
},
setSlideNum
:
function
(
num
)
...
...
@@ -662,6 +677,27 @@ Slide.prototype =
}
},
CheckLayout
:
function
(){
var
bRet
=
true
;
if
(
!
this
.
Layout
||
!
this
.
Layout
.
CheckCorrect
()){
var
oMaster
=
this
.
presentation
.
slideMasters
[
0
];
if
(
!
oMaster
){
bRet
=
false
;
}
else
{
var
oLayout
=
oMaster
.
getMatchingLayout
(
this
.
lastLayoutType
,
this
.
lastLayoutMatchingName
,
this
.
lastLayoutName
,
undefined
);
if
(
oLayout
){
this
.
setLayout
(
oLayout
);
}
else
{
bRet
=
false
;
}
}
}
return
bRet
;
},
correctContent
:
function
(){
for
(
var
i
=
this
.
cSld
.
spTree
.
length
-
1
;
i
>
-
1
;
--
i
){
if
(
this
.
cSld
.
spTree
[
i
].
bDeleted
){
...
...
@@ -677,7 +713,7 @@ Slide.prototype =
{
if
(
sp_tree
[
i
].
Get_Id
()
===
id
)
{
History
.
Add
(
new
AscDFH
.
CChangesDrawingsContentPresentation
(
this
,
AscDFH
.
historyitem_SlideRemoveFromSpTree
,
i
,
[
sp_tree
[
i
]],
false
));
History
.
Add
(
new
AscDFH
.
CChangesDrawingsContentPresentation
(
this
,
AscDFH
.
historyitem_SlideRemoveFromSpTree
,
i
,
[
sp_tree
[
i
]],
false
));
sp_tree
.
splice
(
i
,
1
);
return
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