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
5d030a42
Commit
5d030a42
authored
Jul 18, 2016
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Header/Footer selection bugs, Copy/Paste on button
parent
8d20fff7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
7 deletions
+54
-7
common/clipboard_base.js
common/clipboard_base.js
+52
-5
word/Editor/HeaderFooterController.js
word/Editor/HeaderFooterController.js
+2
-2
No files found.
common/clipboard_base.js
View file @
5d030a42
...
...
@@ -87,6 +87,7 @@
this
.
CopyPasteFocusTimer
=
-
1
;
this
.
inputContext
=
null
;
this
.
LastCopyBinary
=
null
;
// для вставки по кнопке, еогда браузер не позволяет
}
CClipboardBase
.
prototype
=
...
...
@@ -110,6 +111,7 @@
}
else
{
this
.
LastCopyBinary
=
null
;
this
.
Api
.
asc_CheckCopy
(
this
,
AscCommon
.
c_oAscClipboardDataFormat
.
Text
|
AscCommon
.
c_oAscClipboardDataFormat
.
Html
|
AscCommon
.
c_oAscClipboardDataFormat
.
Internal
);
setTimeout
(
function
(){
...
...
@@ -135,6 +137,7 @@
}
else
{
this
.
LastCopyBinary
=
null
;
this
.
Api
.
asc_CheckCopy
(
this
,
AscCommon
.
c_oAscClipboardDataFormat
.
Text
|
AscCommon
.
c_oAscClipboardDataFormat
.
Html
|
AscCommon
.
c_oAscClipboardDataFormat
.
Internal
);
}
...
...
@@ -505,7 +508,6 @@
setInterval
(
function
()
{
if
(
g_clipboardBase
.
Api
.
asc_IsFocus
(
true
))
g_clipboardBase
.
CommonDiv
.
focus
();
...
...
@@ -680,7 +682,8 @@
this
.
CommonDiv_Start
();
this
.
ClosureParams
.
isDivCopy
=
true
;
this
.
Api
.
asc_CheckCopy
(
this
,
AscCommon
.
c_oAscClipboardDataFormat
.
Html
);
this
.
LastCopyBinary
=
null
;
this
.
Api
.
asc_CheckCopy
(
this
,
AscCommon
.
c_oAscClipboardDataFormat
.
Text
|
AscCommon
.
c_oAscClipboardDataFormat
.
Html
|
AscCommon
.
c_oAscClipboardDataFormat
.
Internal
);
this
.
ClosureParams
.
isDivCopy
=
false
;
this
.
CommonDiv_Select
();
...
...
@@ -762,6 +765,10 @@
pushData
:
function
(
_format
,
_data
)
{
if
(
null
==
this
.
LastCopyBinary
)
this
.
LastCopyBinary
=
[];
this
.
LastCopyBinary
.
push
({
type
:
_format
,
data
:
_data
});
if
(
this
.
ClosureParams
.
isDivCopy
===
true
)
{
if
(
_format
==
AscCommon
.
c_oAscClipboardDataFormat
.
Html
)
...
...
@@ -796,19 +803,59 @@
Button_Copy
:
function
()
{
if
(
this
.
inputContext
)
this
.
inputContext
.
HtmlArea
.
focus
();
this
.
Api
.
asc_enableKeyEvents
(
true
,
true
);
this
.
CommonDiv_Execute_CopyCut
();
return
document
.
execCommand
(
"
copy
"
);
var
_ret
=
document
.
execCommand
(
"
copy
"
);
if
(
!
_ret
)
{
// копирования не было
this
.
LastCopyBinary
=
null
;
this
.
Api
.
asc_CheckCopy
(
this
,
AscCommon
.
c_oAscClipboardDataFormat
.
Text
|
AscCommon
.
c_oAscClipboardDataFormat
.
Html
|
AscCommon
.
c_oAscClipboardDataFormat
.
Internal
);
}
return
_ret
;
},
Button_Cut
:
function
()
{
if
(
this
.
inputContext
)
this
.
inputContext
.
HtmlArea
.
focus
();
this
.
Api
.
asc_enableKeyEvents
(
true
,
true
);
this
.
CommonDiv_Execute_CopyCut
();
return
document
.
execCommand
(
"
cut
"
);
var
_ret
=
document
.
execCommand
(
"
cut
"
);
if
(
!
_ret
)
{
// копирования не было
this
.
LastCopyBinary
=
null
;
this
.
Api
.
asc_CheckCopy
(
this
,
AscCommon
.
c_oAscClipboardDataFormat
.
Text
|
AscCommon
.
c_oAscClipboardDataFormat
.
Html
|
AscCommon
.
c_oAscClipboardDataFormat
.
Internal
);
this
.
Api
.
asc_SelectionCut
();
}
return
_ret
;
},
Button_Paste
:
function
()
{
return
document
.
execCommand
(
"
paste
"
);
if
(
this
.
inputContext
)
this
.
inputContext
.
HtmlArea
.
focus
();
this
.
Api
.
asc_enableKeyEvents
(
true
,
true
);
var
_ret
=
document
.
execCommand
(
"
paste
"
);
if
(
!
_ret
&&
null
!=
this
.
LastCopyBinary
)
{
var
_data
=
null
;
for
(
var
i
=
0
;
i
<
this
.
LastCopyBinary
.
length
;
i
++
)
{
if
(
c_oAscClipboardDataFormat
.
Internal
==
this
.
LastCopyBinary
[
i
].
type
)
{
this
.
Api
.
asc_PasteData
(
AscCommon
.
c_oAscClipboardDataFormat
.
Internal
,
this
.
LastCopyBinary
[
i
].
data
);
}
}
}
return
_ret
;
}
};
...
...
word/Editor/HeaderFooterController.js
View file @
5d030a42
...
...
@@ -82,8 +82,8 @@ CHdrFtrController.prototype.Remove = function(Count, bOnlyText, bRemoveOnlySelec
if
(
null
!==
this
.
HdrFtr
.
CurHdtr
&&
docpostype_DrawingObjects
!==
this
.
HdrFtr
.
CurHdrFtr
.
Content
.
CurPos
.
Type
)
{
this
.
Selection_Remove
();
this
.
Selection
.
Use
=
false
;
this
.
LogicDocument
.
Selection_Remove
();
this
.
LogicDocument
.
Selection
.
Use
=
false
;
}
return
nResult
;
...
...
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