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

Доработка новой схемы отрисовки селекта. В интерфейсе теперь отображается...

Доработка новой схемы отрисовки селекта. В интерфейсе теперь отображается щрифт, который идет в RFonts.Ascii

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47152 954022d7-b5bf-4e40-9824-e11837661b57
parent 429a0890
This diff is collapsed.
......@@ -5635,7 +5635,13 @@ CDocumentContent.prototype =
}
},
Selection_Draw_Page : function(Page_abs, bStart, bEnd)
Selection_Draw_Page : function(Page_abs)
{
if ( docpostype_DrawingObjects === this.CurPos.Type )
{
this.LogicDocument.DrawingObjects.drawSelectionPage(Page_abs);
}
else
{
var CurPage = Page_abs - this.Get_StartPage_Absolute();
if ( CurPage < 0 || CurPage >= this.Pages.length )
......@@ -5664,9 +5670,7 @@ CDocumentContent.prototype =
for ( var Index = Start; Index <= End; Index++ )
{
var _bStart = ( true === bStart && Index === Start ? true : false )
var _bEnd = ( true === bEnd && Index === End ? true : false )
this.Content[Index].Selection_Draw_Page(Page_abs, _bStart, _bEnd);
this.Content[Index].Selection_Draw_Page(Page_abs);
}
break;
......@@ -5681,13 +5685,14 @@ CDocumentContent.prototype =
for ( var Index = 0; Index < Count; Index++ )
{
if ( this.Selection.Data[Index] <= Pos_end && this.Selection.Data[Index] >= Pos_start )
this.Content[this.Selection.Data[Index]].Selection_Draw_Page(Page_abs, ( true === bStart && 0 === Index ? true : false ), ( true === bEnd && Count - 1 === Index ? true : false ) );
this.Content[this.Selection.Data[Index]].Selection_Draw_Page(Page_abs);
}
break;
}
}
}
}
},
Selection_Clear : function()
......@@ -6283,7 +6288,7 @@ CDocumentContent.prototype =
this.DrawingDocument.SelectEnabled(true);
this.Selection_Draw();
this.LogicDocument.Document_UpdateSelectionState();
this.Interface_Update_ParaPr();
this.Interface_Update_TextPr();
......
......@@ -8198,7 +8198,6 @@ CShape.prototype =
this.Container.DrawingDocument.TargetEnd();
this.Container.DrawingDocument.SelectEnabled(true);
this.Container.DrawingDocument.SelectClear();
Doc.Selection_Draw();
this.Container.DrawingDocument.SelectShow();
}
else if(this.parent.elementsManipulator.Document.CurPos.Type == docpostype_FlowObjects ) {
......
......@@ -1839,7 +1839,6 @@ WordImage.prototype =
this.document.DrawingDocument.TargetEnd();
this.document.DrawingDocument.SelectEnabled(true);
this.document.DrawingDocument.SelectClear();
Doc.Selection_Draw();
this.document.DrawingDocument.SelectShow();
}
else /*if(this.parent.elementsManipulator.Document.CurPos.Type == docpostype_FlowObjects ) */{
......
......@@ -3623,7 +3623,6 @@ WordShape.prototype =
this.document.DrawingDocument.TargetEnd();
this.document.DrawingDocument.SelectEnabled(true);
this.document.DrawingDocument.SelectClear();
Doc.Selection_Draw();
this.document.DrawingDocument.SelectShow();
}
else /*if(this.parent.elementsManipulator.Document.CurPos.Type == docpostype_FlowObjects ) */
......
......@@ -616,7 +616,6 @@ CHeaderFooter.prototype =
this.DrawingDocument.TargetEnd();
this.DrawingDocument.SelectEnabled(true);
this.DrawingDocument.SelectClear();
this.Content.Selection_Draw();
this.DrawingDocument.SelectShow();
}
// Обрабатываем движение границы у таблиц
......@@ -632,9 +631,6 @@ CHeaderFooter.prototype =
this.DrawingDocument.TargetEnd();
this.DrawingDocument.SelectEnabled(true);
this.DrawingDocument.SelectClear();
this.Content.Selection_Draw();
this.DrawingDocument.SelectShow();
}
else
......@@ -889,9 +885,9 @@ CHeaderFooter.prototype =
},
// Рисуем селект
Selection_Draw : function()
Selection_Draw_Page : function(Page_abs)
{
return this.Content.Selection_Draw();
return this.Content.Selection_Draw_Page(Page_abs, true, true);
},
Selection_Clear : function()
......@@ -2373,10 +2369,10 @@ CHeaderFooterController.prototype =
},
// Рисуем селект
Selection_Draw : function()
Selection_Draw_Page : function(Page_abs)
{
if ( null != this.CurHdrFtr )
return this.CurHdrFtr.Selection_Draw();
return this.CurHdrFtr.Selection_Draw_Page(Page_abs);
},
Selection_Clear : function()
......
......@@ -4644,6 +4644,9 @@ Paragraph.prototype =
TextPr.Merge( CurTextPr );
}
TextPr.FontFamily.Name = TextPr.RFonts.Ascii.Name;
TextPr.FontFamily.Index = TextPr.RFonts.Ascii.Index;
return TextPr;
},
......@@ -7056,151 +7059,6 @@ Paragraph.prototype =
{
},
Selection_Draw : function()
{
var StartPage = this.Get_StartPage_Absolute();
if ( true === this.Selection.Use )
{
switch ( this.Selection.Flag )
{
case selectionflag_Common:
{
// Делаем подсветку
var StartPos = this.Selection.StartPos;
var EndPos = this.Selection.EndPos;
if ( StartPos > EndPos )
{
var Temp = EndPos;
EndPos = StartPos;
StartPos = Temp;
}
// Найдем линию, с которой начинается селект
var StartParaPos = this.Internal_Get_ParaPos_By_Pos( StartPos );
var CurLine = StartParaPos.Line;
var CurRange = StartParaPos.Range;
var PNum = StartParaPos.Page;
// Найдем начальный сдвиг в данном отрезке
var StartX = this.Lines[CurLine].Ranges[CurRange].XVisible;
var Pos, Item;
for ( Pos = this.Lines[CurLine].Ranges[CurRange].StartPos; Pos <= StartPos - 1; Pos++ )
{
Item = this.Content[Pos];
if ( undefined != Item.WidthVisible && ( para_Drawing != Item.Type || drawing_Inline === Item.DrawingType ) )
StartX += Item.WidthVisible;
}
if ( this.Pages[PNum].StartLine > CurLine )
{
CurLine = this.Pages[PNum].StartLine;
CurRange = 0;
StartX = this.Lines[CurLine].Ranges[CurRange].XVisible;
StartPos = this.Lines[this.Pages[PNum].StartLine].StartPos;
}
var StartY = this.Pages[PNum].Y + this.Lines[CurLine].Top;
var H = this.Lines[CurLine].Bottom - this.Lines[CurLine].Top;
var W = 0;
for ( Pos = StartPos; Pos < EndPos; Pos++ )
{
Item = this.Content[Pos];
if ( undefined != Item.CurPage )
{
if ( PNum < Item.CurPage )
PNum = Item.CurPage;
if ( CurLine < Item.CurLine )
{
this.DrawingDocument.AddPageSelection(StartPage + PNum, StartX, StartY, W, H);
CurLine = Item.CurLine;
CurRange = Item.CurRange;
StartX = this.Lines[CurLine].Ranges[CurRange].XVisible;
StartY = this.Pages[PNum].Y + this.Lines[CurLine].Top;
H = this.Lines[CurLine].Bottom - this.Lines[CurLine].Top;
W = 0;
}
else if ( CurRange < Item.CurRange )
{
this.DrawingDocument.AddPageSelection(StartPage + PNum, StartX, StartY, W, H);
CurRange = Item.CurRange;
StartX = this.Lines[CurLine].Ranges[CurRange].XVisible;
W = 0;
}
}
if ( undefined != Item.WidthVisible )
{
if ( para_Drawing != Item.Type || drawing_Inline === Item.DrawingType )
W += Item.WidthVisible;
else
Item.Draw_Selection();
}
if ( Pos == EndPos - 1 )
this.DrawingDocument.AddPageSelection(StartPage + PNum, StartX, StartY, W, H);
}
break;
}
case selectionflag_Numbering:
{
var ParaNum = null;
var PNum = 0;
var CurRange = 0;
for ( var Index = 0; Index < this.Content.length; Index++ )
{
if ( para_Numbering == this.Content[Index].Type )
{
ParaNum = this.Content[Index];
var ParaPos = this.Internal_Get_ParaPos_By_Pos( Index );
CurRange = ParaPos.Range;
PNum = ParaPos.Page;
break;
}
}
var NumPr = this.Numbering_Get();
var SelectX = this.Lines[0].Ranges[CurRange].XVisible;
var SelectW = ParaNum.WidthVisible;
var NumJc = this.Parent.Get_Numbering().Get_AbstractNum( NumPr.NumId ).Lvl[NumPr.Lvl].Jc;
switch ( NumJc )
{
case align_Center:
SelectX = this.Lines[0].Ranges[CurRange].XVisible - ParaNum.WidthNum / 2;
SelectW = ParaNum.WidthVisible + ParaNum.WidthNum / 2;
break;
case align_Right:
SelectX = this.Lines[0].Ranges[CurRange].XVisible - ParaNum.WidthNum;
SelectW = ParaNum.WidthVisible + ParaNum.WidthNum;
break;
case align_Left:
default:
SelectX = this.Lines[0].Ranges[CurRange].XVisible;
SelectW = ParaNum.WidthVisible;
break;
}
this.DrawingDocument.AddPageSelection(StartPage + PNum, SelectX, this.Lines[0].Top + this.Pages[PNum].Y, SelectW, this.Lines[0].Bottom - this.Lines[0].Top);
break;
}
}
}
},
Selection_Draw_Page : function(Page_abs, bStart, bEnd)
{
if ( true != this.Selection.Use )
......
This diff is collapsed.
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