Commit e9d69513 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #33929

parent a4a9461d
......@@ -8586,7 +8586,7 @@ CDocument.prototype.Hyperlink_Add = function(HyperProps)
HyperProps.TextPr = Para.Get_TextPr(Para.Get_ParaContentPos(true, true));
this.Remove(1, false, false, true);
this.Selection_Remove();
this.RemoveTextSelection();
}
this.Controller.AddHyperlink(HyperProps);
......@@ -15963,6 +15963,12 @@ CDocument.prototype.controller_GetCurrentSectionPr = function()
//----------------------------------------------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------------------------------------------
CDocument.prototype.RemoveTextSelection = function()
{
this.Controller.RemoveTextSelection();
};
function CDocumentSelectionState()
{
this.Id = null;
......
......@@ -9449,6 +9449,17 @@ CDocumentContent.prototype.Get_LogicDocument = function()
{
return this.LogicDocument;
};
CDocumentContent.prototype.RemoveTextSelection = function()
{
if (docpostype_DrawingObjects === this.CurPos.Type)
{
this.DrawingObjects.removeTextSelection();
}
else
{
this.Selection_Remove();
}
};
function CDocumentContentStartState(DocContent)
{
......
......@@ -728,3 +728,7 @@ CDocumentControllerBase.prototype.GetColumnSize = function(){return {W : 0, H :
* @returns {CSectionPr?}
*/
CDocumentControllerBase.prototype.GetCurrentSectionPr = function(){return null;};
/**
* Отличие от RemoveSelection в том, что сбрасываем селект с текста, но не сбрасываем с автофигур
*/
CDocumentControllerBase.prototype.RemoveTextSelection = function(){};
......@@ -512,4 +512,8 @@ CDrawingsController.prototype.GetCurrentSectionPr = function()
{
return null;
};
CDrawingsController.prototype.RemoveTextSelection = function()
{
this.DrawingObjects.removeTextSelection();
};
......@@ -3153,6 +3153,26 @@ CFootnotesController.prototype.GetColumnFields = function(nPageAbs, nColumnAbs)
return {X : oColumn.X, XLimit : oColumn.XLimit};
};
CFootnotesController.prototype.RemoveTextSelection = function()
{
if (true === this.Selection.Use)
{
for (var sId in this.Selection.Footnotes)
{
if (this.Selection.Footnotes[sId] !== this.CurFootnote)
this.Selection.Footnotes[sId].Selection_Remove();
}
this.Selection.Use = false;
}
this.Selection.Footnotes = {};
if (this.CurFootnote)
{
this.Selection.Footnotes[this.CurFootnote.Get_Id()] = this.CurFootnote;
this.CurFootnote.RemoveTextSelection();
}
};
function CFootEndnotePageColumn()
......
......@@ -475,3 +475,9 @@ CHdrFtrController.prototype.GetCurrentSectionPr = function()
{
return null;
};
CHdrFtrController.prototype.RemoveTextSelection = function()
{
var CurHdrFtr = this.HdrFtr.CurHdrFtr;
if (null != CurHdrFtr)
return CurHdrFtr.Content.RemoveTextSelection();
};
\ No newline at end of file
......@@ -373,3 +373,7 @@ CLogicDocumentController.prototype.GetCurrentSectionPr = function()
{
return this.LogicDocument.controller_GetCurrentSectionPr();
};
CLogicDocumentController.prototype.RemoveTextSelection = function()
{
return this.RemoveSelection();
};
\ No newline at end of file
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