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
ad5bd150
Commit
ad5bd150
authored
Jul 21, 2016
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy/paste desktop editor
parent
eec7703c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
104 deletions
+38
-104
cell/api.js
cell/api.js
+13
-52
slide/api.js
slide/api.js
+17
-25
word/api.js
word/api.js
+8
-27
No files found.
cell/api.js
View file @
ad5bd150
...
...
@@ -454,70 +454,31 @@ var editor;
};
spreadsheet_api
.
prototype
.
asc_Copy
=
function
()
{
if
(
window
[
"
AscDesktopEditor
"
])
{
var
_e
=
{};
_e
.
ctrlKey
=
true
;
_e
.
shiftKey
=
false
;
_e
.
which
=
67
;
window
[
"
AscDesktopEditorButtonMode
"
]
=
true
;
if
(
!
this
.
asc_getCellEditMode
())
this
.
controller
.
_onWindowKeyDown
(
_e
);
else
this
.
wb
.
cellEditor
.
_onWindowKeyDown
(
_e
);
window
[
"
AscDesktopEditorButtonMode
"
]
=
false
;
return
;
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Copy
"
]();
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Copy
();
};
spreadsheet_api
.
prototype
.
asc_Paste
=
function
()
{
if
(
window
[
"
AscDesktopEditor
"
])
{
var
_e
=
{};
_e
.
ctrlKey
=
true
;
_e
.
shiftKey
=
false
;
_e
.
which
=
86
;
window
[
"
AscDesktopEditorButtonMode
"
]
=
true
;
if
(
!
this
.
asc_getCellEditMode
())
this
.
controller
.
_onWindowKeyDown
(
_e
);
else
this
.
wb
.
cellEditor
.
_onWindowKeyDown
(
_e
);
window
[
"
AscDesktopEditorButtonMode
"
]
=
false
;
return
;
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Paste
"
]();
return
true
;
}
else
if
(
!
AscCommon
.
g_clipboardBase
.
IsWorking
())
{
if
(
!
AscCommon
.
g_clipboardBase
.
IsWorking
())
{
return
AscCommon
.
g_clipboardBase
.
Button_Paste
();
}
return
false
;
};
spreadsheet_api
.
prototype
.
asc_Cut
=
function
()
{
if
(
window
[
"
AscDesktopEditor
"
])
{
var
_e
=
{};
_e
.
ctrlKey
=
true
;
_e
.
shiftKey
=
false
;
_e
.
which
=
88
;
window
[
"
AscDesktopEditorButtonMode
"
]
=
true
;
if
(
!
this
.
asc_getCellEditMode
())
this
.
controller
.
_onWindowKeyDown
(
_e
);
else
this
.
wb
.
cellEditor
.
_onWindowKeyDown
(
_e
);
window
[
"
AscDesktopEditorButtonMode
"
]
=
false
;
return
;
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
Cut
"
]();
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Cut
();
};
...
...
slide/api.js
View file @
ad5bd150
...
...
@@ -1819,16 +1819,10 @@ background-repeat: no-repeat;\
{
if
(
window
[
"
AscDesktopEditor
"
])
{
var
_e
=
new
AscCommon
.
CKeyboardEvent
();
_e
.
CtrlKey
=
true
;
_e
.
KeyCode
=
67
;
window
[
"
AscDesktopEditorButtonMode
"
]
=
true
;
this
.
WordControl
.
m_oLogicDocument
.
OnKeyDown
(
_e
);
window
[
"
AscDesktopEditorButtonMode
"
]
=
false
;
return
;
window
[
"
AscDesktopEditor
"
][
"
Copy
"
]();
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Copy
();
};
asc_docs_api
.
prototype
.
Update_ParaTab
=
function
(
Default_Tab
,
ParaTabs
)
{
...
...
@@ -1838,30 +1832,28 @@ background-repeat: no-repeat;\
{
if
(
window
[
"
AscDesktopEditor
"
])
{
var
_e
=
new
AscCommon
.
CKeyboardEvent
();
_e
.
CtrlKey
=
true
;
_e
.
KeyCode
=
88
;
window
[
"
AscDesktopEditorButtonMode
"
]
=
true
;
this
.
WordControl
.
m_oLogicDocument
.
OnKeyDown
(
_e
);
window
[
"
AscDesktopEditorButtonMode
"
]
=
false
;
return
;
window
[
"
AscDesktopEditor
"
][
"
Cut
"
]();
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Cut
();
};
asc_docs_api
.
prototype
.
Paste
=
function
()
{
if
(
window
[
"
AscDesktopEditor
"
])
{
var
_e
=
new
AscCommon
.
CKeyboardEvent
();
_e
.
CtrlKey
=
true
;
_e
.
KeyCode
=
86
;
window
[
"
AscDesktopEditor
"
][
"
Paste
"
]();
return
true
;
}
if
(
!
this
.
WordControl
.
m_oLogicDocument
)
return
false
;
window
[
"
AscDesktopEditorButtonMode
"
]
=
true
;
this
.
WordControl
.
m_oLogicDocument
.
OnKeyDown
(
_e
);
window
[
"
AscDesktopEditorButtonMode
"
]
=
false
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Paragraph_Content
))
{
if
(
AscCommon
.
g_clipboardBase
.
IsWorking
())
return
false
;
return
;
return
AscCommon
.
g_clipboardBase
.
Button_Paste
()
;
}
};
asc_docs_api
.
prototype
.
Share
=
function
()
...
...
word/api.js
View file @
ad5bd150
...
...
@@ -1863,15 +1863,8 @@ background-repeat: no-repeat;\
{
if
(
window
[
"
AscDesktopEditor
"
])
{
var
_e
=
new
AscCommon
.
CKeyboardEvent
();
_e
.
CtrlKey
=
true
;
_e
.
KeyCode
=
67
;
window
[
"
AscDesktopEditorButtonMode
"
]
=
true
;
this
.
WordControl
.
m_oLogicDocument
.
OnKeyDown
(
_e
);
window
[
"
AscDesktopEditorButtonMode
"
]
=
false
;
return
;
window
[
"
AscDesktopEditor
"
][
"
Copy
"
]();
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Copy
();
};
...
...
@@ -1883,15 +1876,8 @@ background-repeat: no-repeat;\
{
if
(
window
[
"
AscDesktopEditor
"
])
{
var
_e
=
new
AscCommon
.
CKeyboardEvent
();
_e
.
CtrlKey
=
true
;
_e
.
KeyCode
=
88
;
window
[
"
AscDesktopEditorButtonMode
"
]
=
true
;
this
.
WordControl
.
m_oLogicDocument
.
OnKeyDown
(
_e
);
window
[
"
AscDesktopEditorButtonMode
"
]
=
false
;
return
;
window
[
"
AscDesktopEditor
"
][
"
Cut
"
]();
return
true
;
}
return
AscCommon
.
g_clipboardBase
.
Button_Cut
();
};
...
...
@@ -1899,16 +1885,11 @@ background-repeat: no-repeat;\
{
if
(
window
[
"
AscDesktopEditor
"
])
{
var
_e
=
new
AscCommon
.
CKeyboardEvent
();
_e
.
CtrlKey
=
true
;
_e
.
KeyCode
=
86
;
window
[
"
AscDesktopEditorButtonMode
"
]
=
true
;
this
.
WordControl
.
m_oLogicDocument
.
OnKeyDown
(
_e
);
window
[
"
AscDesktopEditorButtonMode
"
]
=
false
;
return
;
window
[
"
AscDesktopEditor
"
][
"
Paste
"
]();
return
true
;
}
if
(
!
this
.
WordControl
.
m_oLogicDocument
)
return
false
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Paragraph_Content
))
{
...
...
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