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
9ff89124
Commit
9ff89124
authored
Apr 05, 2016
by
konovalovsergey
Committed by
Alexander.Trofimov
May 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for Bug #31290 - "Error saveChanges" в логах DocService при Drag'n'Drop Opacity используя Webdriver
parent
5e058a2f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
8 deletions
+56
-8
cell/api.js
cell/api.js
+1
-0
cell/model/History.js
cell/model/History.js
+18
-2
common/docscoapi.js
common/docscoapi.js
+12
-0
slide/Editor/CollaborativeEditing.js
slide/Editor/CollaborativeEditing.js
+4
-3
word/Editor/CollaborativeEditing.js
word/Editor/CollaborativeEditing.js
+4
-3
word/Editor/History.js
word/Editor/History.js
+17
-0
No files found.
cell/api.js
View file @
9ff89124
...
...
@@ -1341,6 +1341,7 @@ var editor;
}
if
(
0
<
arrChanges
.
length
||
null
!==
deleteIndex
||
null
!==
excelAdditionalInfo
)
{
this
.
CoAuthoringApi
.
saveChanges
(
arrChanges
,
deleteIndex
,
excelAdditionalInfo
);
History
.
CanNotAddChanges
=
true
;
}
else
{
this
.
CoAuthoringApi
.
unLockDocument
(
true
);
}
...
...
cell/model/History.js
View file @
9ff89124
...
...
@@ -117,7 +117,8 @@ function CHistory(workbook)
this
.
lastDrawingObjects
=
null
;
this
.
LastState
=
null
;
this
.
LoadFonts
=
{};
//собираем все загруженные шрифты между моментами сохранения
this
.
HasLoadFonts
=
false
;
this
.
HasLoadFonts
=
false
;
this
.
CanNotAddChanges
=
false
;
//флаг для отслеживания ошибок добавления изменений без точки:Create_NewPoint->Add->Save_Changes->Add
this
.
SavedIndex
=
null
;
// Номер точки отката, на которой произошло последнее сохранение
this
.
ForceSave
=
false
;
// Нужно сохранение, случается, когда у нас точка SavedIndex смещается из-за объединения точек, и мы делаем Undo
...
...
@@ -562,6 +563,8 @@ CHistory.prototype.Create_NewPoint = function()
{
if
(
0
!==
this
.
TurnOffHistory
||
0
!==
this
.
Transaction
)
return
;
this
.
CanNotAddChanges
=
false
;
if
(
null
!==
this
.
SavedIndex
&&
this
.
Index
<
this
.
SavedIndex
)
this
.
Set_SavedIndex
(
this
.
Index
);
...
...
@@ -602,6 +605,8 @@ CHistory.prototype.Add = function(Class, Type, sheetid, range, Data, LocalChange
{
if
(
0
!==
this
.
TurnOffHistory
||
this
.
Index
<
0
)
return
;
this
.
_CheckCanNotAddChanges
();
var
Item
;
if
(
this
.
RecIndex
>=
this
.
Index
)
...
...
@@ -839,5 +844,16 @@ CHistory.prototype._addFonts = function (isCreateNew) {
this
.
LoadFonts
=
{};
this
.
HasLoadFonts
=
false
;
}
};
};
CHistory
.
prototype
.
_CheckCanNotAddChanges
=
function
()
{
try
{
if
(
this
.
CanNotAddChanges
)
{
var
tmpErr
=
new
Error
();
if
(
tmpErr
.
stack
)
{
this
.
workbook
.
oApi
.
CoAuthoringApi
.
sendChangesError
(
tmpErr
.
stack
);
}
}
}
catch
(
e
)
{
}
}
var
History
=
null
;
\ No newline at end of file
common/docscoapi.js
View file @
9ff89124
...
...
@@ -179,6 +179,12 @@
}
};
CDocsCoApi
.
prototype
.
sendChangesError
=
function
(
data
)
{
if
(
this
.
_CoAuthoringApi
&&
this
.
_onlineWork
)
{
this
.
_CoAuthoringApi
.
sendChangesError
(
data
);
}
};
CDocsCoApi
.
prototype
.
askLock
=
function
(
arrayBlockId
,
callback
)
{
if
(
this
.
_CoAuthoringApi
&&
this
.
_onlineWork
)
{
this
.
_CoAuthoringApi
.
askLock
(
arrayBlockId
,
callback
);
...
...
@@ -715,6 +721,12 @@
}
};
DocsCoApi
.
prototype
.
sendChangesError
=
function
(
data
)
{
if
(
typeof
data
===
'
string
'
)
{
this
.
_send
({
'
type
'
:
'
changesError
'
,
'
stack
'
:
data
});
}
};
DocsCoApi
.
prototype
.
_sendPrebuffered
=
function
()
{
for
(
var
i
=
0
;
i
<
this
.
_msgBuffer
.
length
;
i
++
)
{
this
.
_sendRaw
(
this
.
_msgBuffer
[
i
]);
...
...
slide/Editor/CollaborativeEditing.js
View file @
9ff89124
...
...
@@ -143,9 +143,10 @@ CCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalIn
this
.
m_aNeedUnlock
.
length
=
0
;
this
.
m_aNeedUnlock2
.
length
=
0
;
if
(
0
<
aChanges
.
length
||
null
!==
deleteIndex
)
editor
.
CoAuthoringApi
.
saveChanges
(
aChanges
,
deleteIndex
,
AdditionalInfo
);
else
if
(
0
<
aChanges
.
length
||
null
!==
deleteIndex
)
{
editor
.
CoAuthoringApi
.
saveChanges
(
aChanges
,
deleteIndex
,
AdditionalInfo
);
History
.
CanNotAddChanges
=
true
;
}
else
editor
.
CoAuthoringApi
.
unLockDocument
(
true
);
if
(
-
1
===
this
.
m_nUseType
)
...
...
word/Editor/CollaborativeEditing.js
View file @
9ff89124
...
...
@@ -84,9 +84,10 @@ CWordCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, Addition
this
.
m_aNeedUnlock2
.
length
=
0
;
var
deleteIndex
=
(
null
===
History
.
SavedIndex
?
null
:
SumIndex
);
if
(
0
<
aChanges
.
length
||
null
!==
deleteIndex
)
editor
.
CoAuthoringApi
.
saveChanges
(
aChanges
,
deleteIndex
,
AdditionalInfo
);
else
if
(
0
<
aChanges
.
length
||
null
!==
deleteIndex
)
{
editor
.
CoAuthoringApi
.
saveChanges
(
aChanges
,
deleteIndex
,
AdditionalInfo
);
History
.
CanNotAddChanges
=
true
;
}
else
editor
.
CoAuthoringApi
.
unLockDocument
(
true
);
if
(
-
1
===
this
.
m_nUseType
)
...
...
word/Editor/History.js
View file @
9ff89124
...
...
@@ -16,6 +16,7 @@ function CHistory(Document)
this
.
Document
=
Document
;
this
.
Api
=
null
;
this
.
CollaborativeEditing
=
null
;
this
.
CanNotAddChanges
=
false
;
//флаг для отслеживания ошибок добавления изменений без точки:Create_NewPoint->Add->Save_Changes->Add
this
.
RecalculateData
=
{
...
...
@@ -278,6 +279,8 @@ CHistory.prototype =
{
if
(
0
!==
this
.
TurnOffHistory
)
return
;
this
.
CanNotAddChanges
=
false
;
if
(
null
!==
this
.
SavedIndex
&&
this
.
Index
<
this
.
SavedIndex
)
this
.
Set_SavedIndex
(
this
.
Index
);
...
...
@@ -351,6 +354,8 @@ CHistory.prototype =
{
if
(
0
!==
this
.
TurnOffHistory
||
this
.
Index
<
0
)
return
;
this
.
_CheckCanNotAddChanges
();
// Заглушка на случай, если у нас во время создания одной точки в истории, после нескольких изменений идет
// пересчет, потом снова добавляются изменения и снова запускается пересчет и т.д.
...
...
@@ -971,6 +976,18 @@ CHistory.prototype =
this
.
BinaryWriter
.
WriteLong
(
PosInfo
.
Position
);
var
BinaryLen
=
this
.
BinaryWriter
.
GetCurPosition
()
-
BinaryPos
;
return
(
BinaryLen
+
"
;
"
+
this
.
BinaryWriter
.
GetBase64Memory2
(
BinaryPos
,
BinaryLen
));
},
_CheckCanNotAddChanges
:
function
()
{
try
{
if
(
this
.
CanNotAddChanges
&&
this
.
Api
)
{
var
tmpErr
=
new
Error
();
if
(
tmpErr
.
stack
)
{
this
.
Api
.
CoAuthoringApi
.
sendChangesError
(
tmpErr
.
stack
);
}
}
}
catch
(
e
)
{
}
}
};
...
...
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