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
f060b3ba
Commit
f060b3ba
authored
Dec 28, 2016
by
Alexander Trofimov
Committed by
GitHub
Dec 28, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #95 from ONLYOFFICE/hotfix/v4.2.4
Hotfix/v4.2.4
parents
61f696a8
8b187082
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
72 deletions
+72
-72
cell/model/FormulaObjects/lookupandreferenceFunctions.js
cell/model/FormulaObjects/lookupandreferenceFunctions.js
+38
-40
cell/view/CellEditorView.js
cell/view/CellEditorView.js
+1
-1
common/Local/common.js
common/Local/common.js
+0
-11
common/clipboard_base.js
common/clipboard_base.js
+12
-1
common/docscoapi.js
common/docscoapi.js
+19
-19
word/Editor/Document.js
word/Editor/Document.js
+1
-0
word/Editor/DocumentContent.js
word/Editor/DocumentContent.js
+1
-0
No files found.
cell/model/FormulaObjects/lookupandreferenceFunctions.js
View file @
f060b3ba
...
...
@@ -802,65 +802,61 @@
var
arg0
=
arg
[
0
],
arg1
=
arg
[
1
],
arg2
=
arg
[
2
]
?
arg
[
2
]
:
new
cNumber
(
1
);
function
findMatch
(
a0
,
a1
,
a2
)
{
var
a1RowCount
=
a1
.
length
,
a1ColumnCount
=
a1
[
0
].
length
,
a0Value
=
a0
.
getValue
(),
a2Value
=
a2
.
getValue
(),
arr
=
[],
res
=
new
cError
(
cErrorType
.
not_available
),
index
=
-
1
;
var
i
,
item
,
a1RowCount
=
a1
.
length
,
a1ColumnCount
=
a1
[
0
].
length
,
a2Value
=
a2
.
getValue
(),
arr
,
index
=
-
1
;
var
a0Type
=
a0
.
type
;
var
a0Value
=
a0
.
getValue
();
if
(
!
(
cElementType
.
number
===
a0Type
||
cElementType
.
string
===
a0Type
||
cElementType
.
bool
===
a0Type
||
cElementType
.
error
===
a0Type
||
cElementType
.
empty
===
a0Type
))
{
a0Type
=
a0Value
.
type
;
a0Value
=
a0Value
.
getValue
();
}
if
(
a1RowCount
>
1
&&
a1ColumnCount
>
1
)
{
return
new
cError
(
cErrorType
.
not_available
);
}
else
if
(
a1RowCount
==
1
&&
a1ColumnCount
>
1
)
{
for
(
var
i
=
0
;
i
<
a1ColumnCount
;
i
++
)
{
arr
[
i
]
=
a1
[
0
][
i
].
getValue
();
}
}
else
if
(
a1RowCount
>
1
&&
a1ColumnCount
==
1
)
{
for
(
var
i
=
0
;
i
<
a1RowCount
;
i
++
)
{
arr
[
i
]
=
a1
[
i
][
0
].
getValue
();
}
}
else
if
(
a1RowCount
===
1
&&
a1ColumnCount
>=
1
)
{
arr
=
a1
[
0
];
}
else
{
arr
[
0
]
=
a1
[
0
][
0
];
arr
=
[];
for
(
i
=
0
;
i
<
a1RowCount
;
i
++
)
{
arr
[
i
]
=
a1
[
i
][
0
];
}
}
if
(
!
(
a2Value
==
1
||
a2Value
==
0
||
a2Value
==
-
1
))
{
if
(
!
(
-
1
===
a2Value
||
0
===
a2Value
||
1
===
a2Value
))
{
return
new
cError
(
cErrorType
.
not_numeric
);
}
if
(
a2Value
==
-
1
)
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
arr
[
i
]
>=
a0Value
)
{
index
=
i
;
}
else
{
break
;
}
}
}
else
if
(
a2Value
==
0
)
{
if
(
cElementType
.
string
===
a0
.
type
)
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
AscCommonExcel
.
searchRegExp2
(
arr
[
i
].
toString
(),
a0Value
))
{
for
(
i
=
0
;
i
<
arr
.
length
;
++
i
)
{
item
=
arr
[
i
];
if
(
arr
[
i
].
type
===
a0Type
)
{
if
(
0
===
a2Value
)
{
if
(
cElementType
.
string
===
a0Type
)
{
if
(
AscCommonExcel
.
searchRegExp2
(
item
.
toString
(),
a0Value
))
{
index
=
i
;
break
;
}
}
else
{
if
(
item
==
a0Value
)
{
index
=
i
;
break
;
}
}
}
else
if
(
1
===
a2Value
)
{
if
(
item
<=
a0Value
)
{
index
=
i
;
}
else
{
break
;
}
}
}
else
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
arr
[
i
]
==
a0Value
)
{
}
else
if
(
-
1
===
a2Value
)
{
if
(
item
>=
a0Value
)
{
index
=
i
;
}
else
{
break
;
}
}
}
}
else
if
(
a2Value
==
1
)
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
arr
[
i
]
<=
a0Value
)
{
index
=
i
;
}
else
{
break
;
}
}
}
if
(
index
>
-
1
)
{
res
=
new
cNumber
(
index
+
1
);
}
return
res
;
return
(
-
1
<
index
)
?
new
cNumber
(
index
+
1
)
:
new
cError
(
cErrorType
.
not_available
);
}
...
...
@@ -875,6 +871,8 @@
arg1
=
arg1
.
getMatrix
();
}
else
if
(
cElementType
.
cellsRange3D
===
arg1
.
type
&&
arg1
.
wsFrom
==
arg1
.
wsTo
)
{
arg1
=
arg1
.
getMatrix
()[
0
];
}
else
if
(
cElementType
.
cell
===
arg1
.
type
||
cElementType
.
cell3D
===
arg1
.
type
)
{
arg1
=
arg1
.
getMatrix
();
}
else
{
return
this
.
value
=
new
cError
(
cErrorType
.
not_available
);
}
...
...
cell/view/CellEditorView.js
View file @
f060b3ba
...
...
@@ -1314,7 +1314,7 @@
this
.
canvasOuterStyle
.
top
=
top
+
'
px
'
;
this
.
canvasOuterStyle
.
width
=
widthStyle
+
'
px
'
;
this
.
canvasOuterStyle
.
height
=
heightStyle
+
'
px
'
;
this
.
canvasOuterStyle
.
zIndex
=
this
.
top
<
=
0
?
-
1
:
z
;
this
.
canvasOuterStyle
.
zIndex
=
this
.
top
<
0
?
-
1
:
z
;
this
.
canvas
.
width
=
this
.
canvasOverlay
.
width
=
width
;
this
.
canvas
.
height
=
this
.
canvasOverlay
.
height
=
height
;
...
...
common/Local/common.js
View file @
f060b3ba
...
...
@@ -233,17 +233,6 @@ window["asc_initAdvancedOptions"] = function(_code)
_editor
.
_onNeedParams
(
undefined
,
(
_code
==
90
||
_code
==
91
)
?
true
:
undefined
);
};
// copy/paste focus error!!!
window
[
"
asc_desktop_copypaste
"
]
=
function
(
_api
,
_method
)
{
var
bIsFocus
=
_api
.
asc_IsFocus
();
if
(
!
bIsFocus
)
_api
.
asc_enableKeyEvents
(
true
);
window
[
"
AscDesktopEditor
"
][
_method
]();
if
(
!
bIsFocus
)
_api
.
asc_enableKeyEvents
(
false
);
}
// меняем среду
//AscBrowser.isSafari = false;
//AscBrowser.isSafariMacOs = false;
...
...
common/clipboard_base.js
View file @
f060b3ba
...
...
@@ -927,4 +927,15 @@
var
g_clipboardBase
=
new
CClipboardBase
();
window
[
'
AscCommon
'
]
=
window
[
'
AscCommon
'
]
||
{};
window
[
'
AscCommon
'
].
g_clipboardBase
=
g_clipboardBase
;
})(
window
);
\ No newline at end of file
})(
window
);
// copy/paste focus error!!!
window
[
"
asc_desktop_copypaste
"
]
=
function
(
_api
,
_method
)
{
var
bIsFocus
=
_api
.
asc_IsFocus
();
if
(
!
bIsFocus
)
_api
.
asc_enableKeyEvents
(
true
);
window
[
"
AscDesktopEditor
"
][
_method
]();
if
(
!
bIsFocus
)
_api
.
asc_enableKeyEvents
(
false
);
};
\ No newline at end of file
common/docscoapi.js
View file @
f060b3ba
...
...
@@ -1048,27 +1048,27 @@
}
};
DocsCoApi
.
prototype
.
_onSaveLock
=
function
(
data
)
{
if
(
null
!=
data
[
"
saveLock
"
])
{
var
indexCallback
=
this
.
_saveCallback
.
length
-
1
;
var
oTmpCallback
=
this
.
_saveCallback
[
indexCallback
];
if
(
oTmpCallback
)
{
// Очищаем предыдущий таймер
if
(
null
!==
this
.
saveLockCallbackErrorTimeOutId
)
{
clearTimeout
(
this
.
saveLockCallbackErrorTimeOutId
);
this
.
saveLockCallbackErrorTimeOutId
=
null
;
}
this
.
_saveCallback
[
indexCallback
]
=
null
;
oTmpCallback
(
data
);
if
(
data
[
'
error
'
])
{
this
.
_state
=
ConnectionState
.
Authorized
;
DocsCoApi
.
prototype
.
_onSaveLock
=
function
(
data
)
{
if
(
null
!=
data
[
"
saveLock
"
])
{
var
indexCallback
=
this
.
_saveCallback
.
length
-
1
;
var
oTmpCallback
=
this
.
_saveCallback
[
indexCallback
];
if
(
oTmpCallback
)
{
// Очищаем предыдущий таймер
if
(
null
!==
this
.
saveLockCallbackErrorTimeOutId
)
{
clearTimeout
(
this
.
saveLockCallbackErrorTimeOutId
);
this
.
saveLockCallbackErrorTimeOutId
=
null
;
}
this
.
_saveCallback
[
indexCallback
]
=
null
;
oTmpCallback
(
data
);
}
}
if
(
null
==
data
[
"
saveLock
"
]
||
data
[
'
error
'
]
||
data
[
"
saveLock
"
])
{
this
.
_state
=
ConnectionState
.
Authorized
;
// Делаем отложенные lock-и
this
.
_sendBufferedLocks
();
}
}
}
};
}
};
DocsCoApi
.
prototype
.
_onUnSaveLock
=
function
(
data
)
{
// Очищаем предыдущий таймер сохранения
...
...
word/Editor/Document.js
View file @
f060b3ba
...
...
@@ -5827,6 +5827,7 @@ CDocument.prototype.Insert_Content = function(SelectedContent, NearPos)
this
.
Selection
.
Use
=
true
;
this
.
Selection
.
StartPos
=
DstIndex
;
this
.
Selection
.
EndPos
=
DstIndex
+
ElementsCount
-
1
;
this
.
CurPos
.
ContentPos
=
DstIndex
+
ElementsCount
-
1
;
}
if
(
docpostype_DrawingObjects
!==
this
.
CurPos
.
Type
)
...
...
word/Editor/DocumentContent.js
View file @
f060b3ba
...
...
@@ -4473,6 +4473,7 @@ CDocumentContent.prototype.Insert_Content = function(Selecte
this
.
Selection
.
Use
=
true
;
this
.
Selection
.
StartPos
=
DstIndex
;
this
.
Selection
.
EndPos
=
DstIndex
+
ElementsCount
-
1
;
this
.
CurPos
.
ContentPos
=
DstIndex
+
ElementsCount
-
1
;
}
if
(
true
===
bNeedSelect
)
...
...
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