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
74befd8e
Commit
74befd8e
authored
Mar 07, 2017
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 34235; fix 34204
parent
879a8f53
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
136 additions
and
2 deletions
+136
-2
common/CollaborativeEditingBase.js
common/CollaborativeEditingBase.js
+24
-0
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+3
-1
common/Drawings/DrawingsChanges.js
common/Drawings/DrawingsChanges.js
+14
-0
common/Drawings/Format/ChartFormat.js
common/Drawings/Format/ChartFormat.js
+7
-0
common/Drawings/Format/ChartSpace.js
common/Drawings/Format/ChartSpace.js
+20
-0
common/Drawings/Format/GraphicFrame.js
common/Drawings/Format/GraphicFrame.js
+8
-1
common/Drawings/Format/GraphicObjectBase.js
common/Drawings/Format/GraphicObjectBase.js
+12
-0
common/Drawings/Format/GroupShape.js
common/Drawings/Format/GroupShape.js
+11
-0
common/Drawings/Format/Image.js
common/Drawings/Format/Image.js
+10
-0
common/Drawings/Format/OleObject.js
common/Drawings/Format/OleObject.js
+12
-0
common/Drawings/Format/Shape.js
common/Drawings/Format/Shape.js
+7
-0
slide/Editor/Format/Layout.js
slide/Editor/Format/Layout.js
+8
-0
No files found.
common/CollaborativeEditingBase.js
View file @
74befd8e
...
...
@@ -947,6 +947,7 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
var
mapDrawings
=
{};
var
mapRuns
=
{};
var
mapTables
=
{};
var
mapGrObjects
=
{};
for
(
var
nIndex
=
0
,
nCount
=
arrReverseChanges
.
length
;
nIndex
<
nCount
;
++
nIndex
)
{
var
oChange
=
arrReverseChanges
[
nIndex
];
...
...
@@ -963,12 +964,29 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
mapRuns
[
oClass
.
Get_Id
()]
=
oClass
;
else
if
(
oClass
instanceof
AscCommonWord
.
CTable
)
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
;
}
// Создаем точку в истории. Делаем действия через обычные функции (с отключенным пересчетом), которые пишут в
// историю. Сохраняем список изменений в новой точке, удаляем данную точку.
var
oHistory
=
AscCommon
.
History
;
oHistory
.
CreateNewPointForCollectChanges
();
for
(
var
sId
in
mapGrObjects
){
var
oShape
=
mapGrObjects
[
sId
];
if
(
!
oShape
.
checkCorrect
()){
oShape
.
setBDeleted
(
true
);
if
(
oShape
.
group
){
oShape
.
group
.
removeFromSpTree
(
oShape
.
Get_Id
());
}
else
if
(
AscFormat
.
Slide
&&
(
oShape
.
parent
instanceof
AscFormat
.
Slide
)){
oShape
.
parent
.
removeFromSpTreeById
(
oShape
.
Get_Id
());
}
else
if
(
AscCommonWord
.
ParaDrawing
&&
(
oShape
.
parent
instanceof
AscCommonWord
.
ParaDrawing
)){
mapDrawings
[
oShape
.
parent
.
Get_Id
()]
=
oShape
.
parent
;
}
}
}
var
oDrawing
;
for
(
var
sId
in
mapDrawings
)
{
...
...
@@ -1047,6 +1065,8 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
oParagraph
.
CheckParaEnd
();
}
var
oBinaryWriter
=
AscCommon
.
History
.
BinaryWriter
;
var
aSendingChanges
=
[];
for
(
var
nIndex
=
0
,
nCount
=
arrReverseChanges
.
length
;
nIndex
<
nCount
;
++
nIndex
)
...
...
@@ -1211,6 +1231,10 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
// return false;
// }
if
(
oChange
.
CheckCorrect
&&
!
oChange
.
CheckCorrect
())
{
return
false
;
}
return
true
;
};
...
...
common/Drawings/CommonController.js
View file @
74befd8e
...
...
@@ -2855,6 +2855,9 @@ DrawingObjectsController.prototype =
if
(
oPr
.
isEqual
(
chartSettings
)){
return
;
}
//Title Settings
chart_space
.
setChart
(
chart_space
.
chart
.
createDuplicate
());
chart_space
.
setStyle
(
chart_space
.
style
);
if
(
this
.
drawingObjects
&&
this
.
drawingObjects
.
getWorksheet
&&
typeof
sRange
===
"
string
"
&&
sRange
.
length
>
0
)
{
var
ws_view
=
this
.
drawingObjects
.
getWorksheet
();
...
...
@@ -2916,7 +2919,6 @@ DrawingObjectsController.prototype =
return
;
}
}
//Title Settings
var
chart
=
chart_space
.
chart
;
var
title_show_settings
=
chartSettings
.
getTitle
();
if
(
title_show_settings
===
c_oAscChartTitleShowSettings
.
none
)
...
...
common/Drawings/DrawingsChanges.js
View file @
74befd8e
...
...
@@ -219,6 +219,20 @@
this
.
Redo
();
this
.
RefreshRecalcData
();
};
CChangesDrawingsObject
.
prototype
.
CheckCorrect
=
function
()
{
if
(
this
.
Old
){
var
oObject
=
AscCommon
.
g_oTableId
.
Get_ById
(
this
.
Old
);
if
(
oObject
.
CheckCorrect
){
if
(
!
oObject
.
CheckCorrect
()){
return
false
;
}
}
}
return
true
;
};
function
CChangesDrawingsContent
(
Class
,
Type
,
Pos
,
Items
,
isAdd
)
{
this
.
Type
=
Type
;
CChangesDrawingsContent
.
superclass
.
constructor
.
call
(
this
,
Class
,
Pos
,
Items
,
isAdd
);
...
...
common/Drawings/Format/ChartFormat.js
View file @
74befd8e
...
...
@@ -13003,6 +13003,13 @@ CChart.prototype =
},
CheckCorrect
:
function
(){
if
(
!
this
.
plotArea
){
return
false
;
}
return
true
;
},
getContentChangesByType
:
function
(
type
){
switch
(
type
){
case
AscDFH
.
historyitem_Chart_AddPivotFmt
:{
...
...
common/Drawings/Format/ChartSpace.js
View file @
74befd8e
...
...
@@ -714,6 +714,21 @@ CChartSpace.prototype.checkDrawingBaseCoords = CShape.prototype.checkDrawingBase
CChartSpace
.
prototype
.
setDrawingBaseCoords
=
CShape
.
prototype
.
setDrawingBaseCoords
;
CChartSpace
.
prototype
.
deleteBFromSerialize
=
CShape
.
prototype
.
deleteBFromSerialize
;
CChartSpace
.
prototype
.
setBFromSerialize
=
CShape
.
prototype
.
setBFromSerialize
;
CChartSpace
.
prototype
.
checkTypeCorrect
=
function
(){
if
(
!
this
.
chart
){
return
false
;
}
if
(
!
this
.
chart
.
plotArea
){
return
false
}
if
(
this
.
chart
.
plotArea
.
charts
.
length
===
0
){
return
false
;
}
if
(
this
.
chart
.
plotArea
.
charts
[
0
].
series
.
length
===
0
){
return
false
;
}
return
true
;
};
CChartSpace
.
prototype
.
drawSelect
=
function
(
drawingDocument
,
nPageIndex
)
{
var
i
;
...
...
@@ -2259,6 +2274,11 @@ CChartSpace.prototype.Refresh_RecalcData = function(data)
this
.
addToRecalculate
();
break
;
}
case
AscDFH
.
historyitem_ChartSpace_SetChart
:
{
this
.
handleUpdateType
();
break
;
}
}
};
CChartSpace
.
prototype
.
getObjectType
=
function
()
...
...
common/Drawings/Format/GraphicFrame.js
View file @
74befd8e
...
...
@@ -1092,7 +1092,14 @@ CGraphicFrame.prototype.Refresh_RecalcData2 = function()
this
.
recalcInfo
.
recalculateTable
=
true
;
this
.
recalcInfo
.
recalculateSizes
=
true
;
this
.
addToRecalculate
();
};
};
CGraphicFrame
.
prototype
.
checkTypeCorrect
=
function
()
{
if
(
!
this
.
graphicObject
){
return
false
;
}
return
true
;
};
//--------------------------------------------------------export----------------------------------------------------
window
[
'
AscFormat
'
]
=
window
[
'
AscFormat
'
]
||
{};
...
...
common/Drawings/Format/GraphicObjectBase.js
View file @
74befd8e
...
...
@@ -551,6 +551,18 @@
};
CGraphicObjectBase
.
prototype
.
checkCorrect
=
function
(){
if
(
this
.
bDeleted
===
true
){
return
false
;
}
return
this
.
checkTypeCorrect
();
};
CGraphicObjectBase
.
prototype
.
CheckCorrect
=
function
(){
return
this
.
checkCorrect
();
};
CGraphicObjectBase
.
prototype
.
checkTypeCorrect
=
function
(){
return
true
;
};
...
...
common/Drawings/Format/GroupShape.js
View file @
74befd8e
...
...
@@ -1780,6 +1780,17 @@ AscCommon.extendClass(CGroupShape, AscFormat.CGraphicObjectBase);
CGroupShape
.
prototype
.
Refresh_RecalcData
=
function
()
{};
CGroupShape
.
prototype
.
checkTypeCorrect
=
function
()
{
if
(
!
this
.
spPr
){
return
false
;
}
if
(
this
.
spTree
.
length
===
0
){
return
false
;
}
return
true
;
};
//--------------------------------------------------------export----------------------------------------------------
window
[
'
AscFormat
'
]
=
window
[
'
AscFormat
'
]
||
{};
window
[
'
AscFormat
'
].
CGroupShape
=
CGroupShape
;
...
...
common/Drawings/Format/Image.js
View file @
74befd8e
...
...
@@ -721,6 +721,16 @@ CImageShape.prototype.getAllImages = function(images)
images
[
AscCommon
.
getFullImageSrc2
(
this
.
blipFill
.
RasterImageId
)]
=
true
;
}
};
CImageShape
.
prototype
.
checkTypeCorrect
=
function
()
{
if
(
!
this
.
blipFill
){
return
false
;
}
if
(
!
this
.
spPr
){
return
false
;
}
return
true
;
};
CImageShape
.
prototype
.
Load_LinkData
=
function
(
linkData
)
{
...
...
common/Drawings/Format/OleObject.js
View file @
74befd8e
...
...
@@ -150,6 +150,18 @@ function (window, undefined) {
if
(
AscFormat
.
CImageShape
.
prototype
.
handleUpdateExtents
){
AscFormat
.
CImageShape
.
prototype
.
handleUpdateExtents
.
call
(
this
,
[]);
}
};
COleObject
.
prototype
.
checkTypeCorrect
=
function
(){
if
(
!
this
.
m_sData
){
return
false
;
}
if
(
!
this
.
m_sApplicationId
){
return
false
;
}
if
(
this
.
m_nPixHeight
===
null
||
this
.
m_nPixHeight
===
null
){
return
false
;
}
return
true
;
};
window
[
'
AscFormat
'
]
=
window
[
'
AscFormat
'
]
||
{};
window
[
'
AscFormat
'
].
COleObject
=
COleObject
;
...
...
common/Drawings/Format/Shape.js
View file @
74befd8e
...
...
@@ -5270,6 +5270,13 @@ CShape.prototype.checkTextWarp = function(oContent, oBodyPr, dWidth, dHeight, bN
return
oRet
;
};
CShape
.
prototype
.
checkTypeCorrect
=
function
(){
if
(
!
this
.
spPr
){
return
false
;
}
return
true
;
}
function
CreateBinaryReader
(
szSrc
,
offset
,
srcLen
)
{
var
nWritten
=
0
;
...
...
slide/Editor/Format/Layout.js
View file @
74befd8e
...
...
@@ -327,6 +327,14 @@ SlideLayout.prototype =
}
}
},
CheckCorrect
:
function
(){
if
(
!
this
.
Master
){
return
false
;
}
return
true
;
},
getMatchingShape
:
Slide
.
prototype
.
getMatchingShape
,
/*function(type, idx, bSingleBody)
{
var _input_reduced_type;
...
...
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