Commit bdf3412c authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баг при вставке (баги 27475, 27478, 27200 reop)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59562 954022d7-b5bf-4e40-9824-e11837661b57
parent 23237812
...@@ -8899,6 +8899,11 @@ CDocument.prototype = ...@@ -8899,6 +8899,11 @@ CDocument.prototype =
var StartIndex = 0; var StartIndex = 0;
if (true === bConcatS) if (true === bConcatS)
{ {
// Вызываем так, чтобы выделить все внутренние элементы
var _ParaS = Elements[0].Element;
_ParaS.Select_All();
var _ParaSContentLen = _ParaS.Content.length;
// Если мы присоединяем новый параграф, то и копируем все настройки параграфа (так делает Word) // Если мы присоединяем новый параграф, то и копируем все настройки параграфа (так делает Word)
ParaS.Concat(Elements[0].Element); ParaS.Concat(Elements[0].Element);
ParaS.Set_Pr(Elements[0].Element.Pr); ParaS.Set_Pr(Elements[0].Element.Pr);
...@@ -8907,13 +8912,8 @@ CDocument.prototype = ...@@ -8907,13 +8912,8 @@ CDocument.prototype =
StartIndex++; StartIndex++;
var TempPara = Elements[0].Element;
// Вызываем так, чтобы выделить все внутренние элементы
TempPara.Select_All();
ParaS.Selection.Use = true; ParaS.Selection.Use = true;
ParaS.Selection.StartPos = ParaS.Content.length - TempPara.Content.length; ParaS.Selection.StartPos = ParaS.Content.length - _ParaSContentLen;
ParaS.Selection.EndPos = ParaS.Content.length - 1; ParaS.Selection.EndPos = ParaS.Content.length - 1;
} }
......
...@@ -4095,6 +4095,11 @@ CDocumentContent.prototype = ...@@ -4095,6 +4095,11 @@ CDocumentContent.prototype =
var StartIndex = 0; var StartIndex = 0;
if (true === bConcatS) if (true === bConcatS)
{ {
// Вызываем так, чтобы выделить все внутренние элементы
var _ParaS = Elements[0].Element;
_ParaS.Select_All();
var _ParaSContentLen = _ParaS.Content.length;
// Если мы присоединяем новый параграф, то и копируем все настройки параграфа (так делает Word) // Если мы присоединяем новый параграф, то и копируем все настройки параграфа (так делает Word)
ParaS.Concat(Elements[0].Element); ParaS.Concat(Elements[0].Element);
ParaS.Set_Pr(Elements[0].Element.Pr); ParaS.Set_Pr(Elements[0].Element.Pr);
...@@ -4103,13 +4108,8 @@ CDocumentContent.prototype = ...@@ -4103,13 +4108,8 @@ CDocumentContent.prototype =
StartIndex++; StartIndex++;
var TempPara = Elements[0].Element;
// Вызываем так, чтобы выделить все внутренние элементы
TempPara.Select_All();
ParaS.Selection.Use = true; ParaS.Selection.Use = true;
ParaS.Selection.StartPos = ParaS.Content.length - TempPara.Content.length; ParaS.Selection.StartPos = ParaS.Content.length - _ParaSContentLen;
ParaS.Selection.EndPos = ParaS.Content.length - 1; ParaS.Selection.EndPos = ParaS.Content.length - 1;
} }
......
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