Commit 747fccd6 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

правка для бага №20636 ([Copy&Paste] Текст копируется со 2-ого раза в строке формул на Mac)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50670 954022d7-b5bf-4e40-9824-e11837661b57
parent 36631b30
...@@ -2783,10 +2783,13 @@ function Editor_CopyPaste_Create(api) ...@@ -2783,10 +2783,13 @@ function Editor_CopyPaste_Create(api)
}; };
ElemToSelect["onbeforecopy"] = function(e){ ElemToSelect["onbeforecopy"] = function(e){
if(!api.isCellEdited)
api.wb.clipboard.copyRange(api.wb.getWorksheet().getSelectedRange(), api.wb.getWorksheet()); api.wb.clipboard.copyRange(api.wb.getWorksheet().getSelectedRange(), api.wb.getWorksheet());
}; };
ElemToSelect["onbeforecut"] = function(e){ ElemToSelect["onbeforecut"] = function(e){
if(!api.isCellEdited)
{
api.wb.clipboard.copyRange(api.wb.getWorksheet().getSelectedRange(), api.wb.getWorksheet()); api.wb.clipboard.copyRange(api.wb.getWorksheet().getSelectedRange(), api.wb.getWorksheet());
if(isNeedEmptyAfterCut) if(isNeedEmptyAfterCut)
{ {
...@@ -2795,6 +2798,7 @@ function Editor_CopyPaste_Create(api) ...@@ -2795,6 +2798,7 @@ function Editor_CopyPaste_Create(api)
} }
else else
isNeedEmptyAfterCut = true; isNeedEmptyAfterCut = true;
}
}; };
document.body.appendChild( ElemToSelect ); document.body.appendChild( ElemToSelect );
...@@ -2813,6 +2817,7 @@ function Editor_CopyPaste_Create(api) ...@@ -2813,6 +2817,7 @@ function Editor_CopyPaste_Create(api)
elementText.style.zIndex = -1000; elementText.style.zIndex = -1000;
elementText.style.display = ELEMENT_DISPAY_STYLE; elementText.style.display = ELEMENT_DISPAY_STYLE;
elementText.setAttribute("contentEditable", true); elementText.setAttribute("contentEditable", true);
elementText.setAttribute("class", COPYPASTE_ELEMENT_CLASS);
elementText["onbeforecopy"] = function(e){ elementText["onbeforecopy"] = function(e){
if((api.wb && api.wb.getWorksheet() && api.wb.getWorksheet().isCellEditMode)) if((api.wb && api.wb.getWorksheet() && api.wb.getWorksheet().isCellEditMode))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment